diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index 9e5f5cb..34f29b1 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -287,9 +287,11 @@ float batteryVold; IPAddress remoteip; String AIDString; String cryptedpassword; -String ECColdtxt; +String ECColdString; +String ECCString; String eonpsold[20]; String LIColdString; +String LICString; String pinstringold; String PIold; String PSold; diff --git a/src/rds.cpp b/src/rds.cpp index 841cc4a..bfc64ef 100644 --- a/src/rds.cpp +++ b/src/rds.cpp @@ -60,10 +60,13 @@ void ShowAdvancedRDS() { if (licold != radio.rds.LIC || rdsreset) { if (!screenmute) { + if (radio.rds.hasLIC) LICString = (radio.rds.LICtext.length() == 0 ? myLanguage[language][73] : radio.rds.LICtext); else LICString = "N/A"; + if (LICString != LIColdString) { tftPrint(-1, "N/A", 242, 208, BackgroundColor, BackgroundColor, 16); tftPrint(-1, LIColdString, 242, 208, BackgroundColor, BackgroundColor, 16); - if (radio.rds.hasLIC) tftPrint(-1, (radio.rds.LICtext.length() == 0 ? myLanguage[language][73] : radio.rds.LICtext), 242, 208, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "N/A", 242, 208, RDSColor, RDSColorSmooth, 16); - if (radio.rds.LICtext.length() == 0) LIColdString = myLanguage[language][73]; else LIColdString = radio.rds.LICtext; + } + tftPrint(-1, LICString, 242, 208, RDSColor, RDSColorSmooth, 16); + LIColdString = LICString; licold = radio.rds.LIC; } } @@ -287,11 +290,14 @@ void showECC() { if (ECCold != radio.rds.ECC) { if (advancedRDS) { if (!screenmute) { + if (radio.rds.hasECC) ECCString = (radio.rds.ECCtext.length() == 0 ? myLanguage[language][73] : radio.rds.ECCtext); else ECCString = "N/A"; + if (ECCString != ECColdString) { tftPrint(-1, "N/A", 242, 193, BackgroundColor, BackgroundColor, 16); - tftPrint(-1, ECColdtxt, 242, 193, BackgroundColor, BackgroundColor, 16); - if (radio.rds.hasECC) tftPrint(-1, (radio.rds.ECCtext.length() == 0 ? myLanguage[language][73] : radio.rds.ECCtext), 242, 193, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "N/A", 242, 193, RDSColor, RDSColorSmooth, 16); + tftPrint(-1, ECColdString, 242, 193, BackgroundColor, BackgroundColor, 16); + } + tftPrint(-1, ECCString, 242, 193, RDSColor, RDSColorSmooth, 16); } - if (radio.rds.ECCtext.length() == 0) ECColdtxt = myLanguage[language][73]; else ECColdtxt = radio.rds.ECCtext; + ECColdString = ECCString; } if (wifi) { diff --git a/src/rds.h b/src/rds.h index baf83eb..85d6d57 100644 --- a/src/rds.h +++ b/src/rds.h @@ -90,9 +90,11 @@ extern int xPos5; extern int16_t SAvg3; extern IPAddress remoteip; extern String AIDString; -extern String ECColdtxt; +extern String ECColdString; +extern String ECCString; extern String eonpsold[20]; extern String LIColdString; +extern String LICString; extern String pinstringold; extern String PIold; extern String PSold;