From 140d7da7b1bce02efd360afd2a6fbd9d5ab76743 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Thu, 13 Mar 2025 21:37:11 +0100 Subject: [PATCH] update logic --- src/rds.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rds.c b/src/rds.c index 1b218dc..3cfb501 100644 --- a/src/rds.c +++ b/src/rds.c @@ -503,6 +503,11 @@ void set_rds_ps(unsigned char *ps) { void set_rds_tps(unsigned char *tps) { uint8_t len = 0; + if(tps[0] == '\0') { + memset(rds_data.tps, 0, PS_LENGTH); + return; + } + rds_state.tps_update = 1; memset(rds_data.tps, ' ', PS_LENGTH); while (*tps != 0 && len < PS_LENGTH) @@ -512,7 +517,7 @@ void set_rds_tps(unsigned char *tps) { void set_rds_lps(unsigned char *lps) { uint8_t i = 0, len = 0; - if (!lps[0]) { + if(lps[0] == '\0') { memset(rds_data.lps, 0, LPS_LENGTH); return; }