From 03f4fd5fdf7a896b1d41bac0840e8c65a8bf40e8 Mon Sep 17 00:00:00 2001 From: Kuba <132459354+KubaPro010@users.noreply.github.com> Date: Fri, 3 Nov 2023 09:37:06 +0000 Subject: [PATCH] nuking nukes and funny coment --- src/pifmrds/rds.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pifmrds/rds.c b/src/pifmrds/rds.c index 1015291..5dc8ab7 100644 --- a/src/pifmrds/rds.c +++ b/src/pifmrds/rds.c @@ -83,7 +83,6 @@ uint16_t crc(uint16_t block) { Returns 1 if the CT group was generated, 0 otherwise */ int get_rds_ct_group(uint16_t *blocks, int enabled) { - if(!enabled) return 0; static int latest_minutes = -1; // Check time @@ -93,6 +92,10 @@ int get_rds_ct_group(uint16_t *blocks, int enabled) { now = time (NULL); utc = gmtime (&now); + if(!enabled) { + latest_minutes = utc->tm_min; //so if many minutes when disabled someone enables it won't bomb the rds decoders with like 1 million 4As(s [sorry]) + return 0; + } if(utc->tm_min != latest_minutes) { // Generate CT group latest_minutes = utc->tm_min;