EON view wasn't able to show PTY 0

This commit is contained in:
Sjef Verhoeven PE5PVB
2025-02-11 19:36:45 +01:00
parent 0e47b2b1b6
commit a99eba3400
3 changed files with 7 additions and 3 deletions

View File

@@ -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';
}

View File

@@ -653,6 +653,7 @@ typedef struct _eon_ {
bool tp;
bool taset;
uint8_t pty;
bool ptyset;
} eon_;
typedef struct _logbook_ {

View File

@@ -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);
}
}
}