diff --git a/src/TEF6686.cpp b/src/TEF6686.cpp index aaa4c2a..e2dde58 100644 --- a/src/TEF6686.cpp +++ b/src/TEF6686.cpp @@ -1581,6 +1581,7 @@ void TEF6686::readRDS(byte showrdserrors) { eon[eonIndex].taset = true; eon[eonIndex].ta = bitRead(rds.rdsC, 0); eon[eonIndex].pty = (rds.rdsC >> 11) & 0xF; + eon[eonIndex].ptyset = true; } if (bitRead(rds.rdsB, 4) && eon[eonIndex].pi == rds.rdsD) eon[eonIndex].tp = true; @@ -1618,6 +1619,7 @@ void TEF6686::readRDS(byte showrdserrors) { std::swap(eon[j].ta, eon[j + 1].ta); std::swap(eon[j].tp, eon[j + 1].tp); std::swap(eon[j].taset, eon[j + 1].taset); + std::swap(eon[j].ptyset, eon[j + 1].ptyset); std::swap(eon_buffer[j], eon_buffer[j + 1]); std::swap(EONPStext[j], EONPStext[j + 1]); } @@ -1766,6 +1768,7 @@ void TEF6686::clearRDS (bool fullsearchrds) { eon[i].ta = false; eon[i].tp = false; eon[i].taset = false; + eon[i].ptyset = false; for (int y = 0; y < 5; y++) { eon[i].picode[y] = '\0'; } diff --git a/src/TEF6686.h b/src/TEF6686.h index e5c6c2c..368dbf4 100644 --- a/src/TEF6686.h +++ b/src/TEF6686.h @@ -653,6 +653,7 @@ typedef struct _eon_ { bool tp; bool taset; uint8_t pty; + bool ptyset; } eon_; typedef struct _logbook_ { diff --git a/src/rds.cpp b/src/rds.cpp index 8c87812..b984d43 100644 --- a/src/rds.cpp +++ b/src/rds.cpp @@ -1136,7 +1136,7 @@ void ShowAFEON() { tftPrint(-1, oldFreq3, 205, 48 + (15 * i), BackgroundColor, BackgroundColor, 16); } - if (radio.eon[i + y].pty > 0) { + if (radio.eon[i + y].ptyset) { if (eonptyold[i + y] != radio.eon[i + y].pty) tft.fillRect(290, 48 + (15 * i), 29, 16, BackgroundColor); if (radio.eon[i + y].pty != 254) tftPrint(1, String(radio.eon[i + y].pty), 310, 48 + (15 * i), RDSColor, RDSColorSmooth, 16); eonptyold[i + y] = radio.eon[i + y].pty; @@ -1144,8 +1144,8 @@ void ShowAFEON() { tft.fillRect(290, 48 + (15 * i), 29, 16, BackgroundColor); } - if (radio.eon[i + y].ta) tftPrint(0, "X", 250, 48 + (15 * i), RDSColor, RDSColorSmooth, 16); else tftPrint(0, "X", 250, 48 + (15 * i), BackgroundColor, BackgroundColor, 16); - if (radio.eon[i + y].tp) tftPrint(0, "X", 276, 48 + (15 * i), RDSColor, RDSColorSmooth, 16); else tftPrint(0, "X", 276, 48 + (15 * i), BackgroundColor, BackgroundColor, 16); + if (radio.eon[i + y].ta) tftPrint(0, "O", 250, 48 + (15 * i), RDSColor, RDSColorSmooth, 16); else tftPrint(0, "O", 250, 48 + (15 * i), BackgroundColor, BackgroundColor, 16); + if (radio.eon[i + y].tp) tftPrint(0, "O", 276, 48 + (15 * i), RDSColor, RDSColorSmooth, 16); else tftPrint(0, "O", 276, 48 + (15 * i), BackgroundColor, BackgroundColor, 16); } } }