Added PTY to EON screen
This commit is contained in:
@@ -140,6 +140,7 @@ byte ContrastSet;
|
|||||||
byte CurrentTheme;
|
byte CurrentTheme;
|
||||||
byte displayflip;
|
byte displayflip;
|
||||||
byte ECCold;
|
byte ECCold;
|
||||||
|
byte eonptyold[20];
|
||||||
byte EQset;
|
byte EQset;
|
||||||
byte fmdefaultstepsize;
|
byte fmdefaultstepsize;
|
||||||
byte fmnb;
|
byte fmnb;
|
||||||
|
|||||||
+3
-1
@@ -1426,6 +1426,7 @@ void TEF6686::readRDS(byte showrdserrors)
|
|||||||
if (offset == 13 && eon[position].pi == rds.rdsD) {
|
if (offset == 13 && eon[position].pi == rds.rdsD) {
|
||||||
eon[position].taset = true;
|
eon[position].taset = true;
|
||||||
eon[position].ta = bitRead(rds.rdsC, 0);
|
eon[position].ta = bitRead(rds.rdsC, 0);
|
||||||
|
eon[position].pty = (rds.rdsC >> 11) & 0xF;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bitRead(rds.rdsB, 4) && eon[position].pi == rds.rdsD) eon[position].tp = true;
|
if (bitRead(rds.rdsB, 4) && eon[position].pi == rds.rdsD) eon[position].tp = true;
|
||||||
@@ -1460,7 +1461,7 @@ void TEF6686::readRDS(byte showrdserrors)
|
|||||||
eon[j].picode[sizeof(eon[j].picode) - 1] = '\0';
|
eon[j].picode[sizeof(eon[j].picode) - 1] = '\0';
|
||||||
strncpy(eon[j + 1].picode, temp6, sizeof(eon[j + 1].picode) - 1);
|
strncpy(eon[j + 1].picode, temp6, sizeof(eon[j + 1].picode) - 1);
|
||||||
eon[j + 1].picode[sizeof(eon[j + 1].picode) - 1] = '\0';
|
eon[j + 1].picode[sizeof(eon[j + 1].picode) - 1] = '\0';
|
||||||
|
std::swap(eon[j].pty, eon[j + 1].pty);
|
||||||
std::swap(eon[j].ps, eon[j + 1].ps);
|
std::swap(eon[j].ps, eon[j + 1].ps);
|
||||||
std::swap(eon[j].ta, eon[j + 1].ta);
|
std::swap(eon[j].ta, eon[j + 1].ta);
|
||||||
std::swap(eon[j].tp, eon[j + 1].tp);
|
std::swap(eon[j].tp, eon[j + 1].tp);
|
||||||
@@ -1535,6 +1536,7 @@ void TEF6686::clearRDS (bool fullsearchrds) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 20; i++) {
|
for (i = 0; i < 20; i++) {
|
||||||
|
eon[i].pty = 254;
|
||||||
eon[i].pi = 0;
|
eon[i].pi = 0;
|
||||||
eon[i].ps = "";
|
eon[i].ps = "";
|
||||||
eon[i].mappedfreq = 0;
|
eon[i].mappedfreq = 0;
|
||||||
|
|||||||
@@ -635,6 +635,7 @@ typedef struct _eon_ {
|
|||||||
bool ta;
|
bool ta;
|
||||||
bool tp;
|
bool tp;
|
||||||
bool taset;
|
bool taset;
|
||||||
|
uint8_t pty;
|
||||||
} eon_;
|
} eon_;
|
||||||
|
|
||||||
typedef struct _logbook_ {
|
typedef struct _logbook_ {
|
||||||
|
|||||||
+27
-21
@@ -633,9 +633,10 @@ void ShowAFEON() {
|
|||||||
if (radio.rds.hasEON && afpagenr > 1) {
|
if (radio.rds.hasEON && afpagenr > 1) {
|
||||||
if (!haseonold) {
|
if (!haseonold) {
|
||||||
tftPrint(-1, myLanguage[language][88], 6, 48, BackgroundColor, BackgroundColor, 16);
|
tftPrint(-1, myLanguage[language][88], 6, 48, BackgroundColor, BackgroundColor, 16);
|
||||||
tftPrint(-1, "PI:", 4, 32, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(-1, "PI", 4, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||||
tftPrint(0, "TA:", 276, 32, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(0, "TA", 250, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||||
tftPrint(0, "TP:", 302, 32, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(0, "TP", 276, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||||
|
tftPrint(0, "PTY", 304, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||||
haseonold = true;
|
haseonold = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -649,54 +650,59 @@ void ShowAFEON() {
|
|||||||
strcpy(eonpicodeold[i + y], radio.eon[i + y].picode);
|
strcpy(eonpicodeold[i + y], radio.eon[i + y].picode);
|
||||||
|
|
||||||
if (radio.eon[i + y].ps.length() > 0) {
|
if (radio.eon[i + y].ps.length() > 0) {
|
||||||
tftPrint(-1, "PS:", 66, 32, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(-1, "PS", 46, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||||
|
|
||||||
if (strcmp(radio.eon[i + y].ps.c_str(), eonpsold[i + y].c_str()) != 0) tftPrint(-1, String(eonpsold[i + y]), 66, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
if (strcmp(radio.eon[i + y].ps.c_str(), eonpsold[i + y].c_str()) != 0) tftPrint(-1, String(eonpsold[i + y]), 46, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
tftPrint(-1, String(radio.eon[i + y].ps), 66, 48 + (15 * i), SecondaryColor, SecondaryColorSmooth, 16);
|
tftPrint(-1, String(radio.eon[i + y].ps), 46, 48 + (15 * i), SecondaryColor, SecondaryColorSmooth, 16);
|
||||||
eonpsold[i + y] = radio.eon[i + y].ps;
|
eonpsold[i + y] = radio.eon[i + y].ps;
|
||||||
} else {
|
} else {
|
||||||
tftPrint(-1, String(eonpsold[i + y]), 66, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
tftPrint(-1, String(eonpsold[i + y]), 46, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (radio.eon[i + y].mappedfreq > 0) {
|
if (radio.eon[i + y].mappedfreq > 0) {
|
||||||
tftPrint(1, "FREQ:", 176, 32, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(1, "FREQ", 156, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||||
|
|
||||||
if (radio.eon[i + y].mappedfreq != mappedfreqold[i + y]) tftPrint(1, String(mappedfreqold[i + y] / 100) + "." + String((mappedfreqold[i + y] % 100) / 10), 176, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
if (radio.eon[i + y].mappedfreq != mappedfreqold[i + y]) tftPrint(1, String(mappedfreqold[i + y] / 100) + "." + String((mappedfreqold[i + y] % 100) / 10), 156, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
tftPrint(1, String(radio.eon[i + y].mappedfreq / 100) + "." + String((radio.eon[i + y].mappedfreq % 100) / 10), 176, 48 + (15 * i), PrimaryColor, PrimaryColorSmooth, 16);
|
tftPrint(1, String(radio.eon[i + y].mappedfreq / 100) + "." + String((radio.eon[i + y].mappedfreq % 100) / 10), 156, 48 + (15 * i), PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
mappedfreqold[i + y] = radio.eon[i + y].mappedfreq;
|
mappedfreqold[i + y] = radio.eon[i + y].mappedfreq;
|
||||||
} else {
|
} else {
|
||||||
tftPrint(1, String(mappedfreqold[i + y] / 100) + "." + String((mappedfreqold[i + y] % 100) / 10), 176, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
tftPrint(1, String(mappedfreqold[i + y] / 100) + "." + String((mappedfreqold[i + y] % 100) / 10), 156, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (radio.eon[i + y].mappedfreq2 > 0) {
|
if (radio.eon[i + y].mappedfreq2 > 0) {
|
||||||
if (radio.eon[i + y].mappedfreq2 != mappedfreqold2[i + y]) tftPrint(1, String(mappedfreqold2[i + y] / 100) + "." + String((mappedfreqold2[i + y] % 100) / 10), 216, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
if (radio.eon[i + y].mappedfreq2 != mappedfreqold2[i + y]) tftPrint(1, String(mappedfreqold2[i + y] / 100) + "." + String((mappedfreqold2[i + y] % 100) / 10), 196, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
tftPrint(1, String(radio.eon[i + y].mappedfreq2 / 100) + "." + String((radio.eon[i + y].mappedfreq2 % 100) / 10), 216, 48 + (15 * i), PrimaryColor, PrimaryColorSmooth, 16);
|
tftPrint(1, String(radio.eon[i + y].mappedfreq2 / 100) + "." + String((radio.eon[i + y].mappedfreq2 % 100) / 10), 196, 48 + (15 * i), PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
mappedfreqold2[i + y] = radio.eon[i + y].mappedfreq2;
|
mappedfreqold2[i + y] = radio.eon[i + y].mappedfreq2;
|
||||||
} else {
|
} else {
|
||||||
tftPrint(1, String(mappedfreqold2[i + y] / 100) + "." + String((mappedfreqold2[i + y] % 100) / 10), 216, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
tftPrint(1, String(mappedfreqold2[i + y] / 100) + "." + String((mappedfreqold2[i + y] % 100) / 10), 196, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (radio.eon[i + y].mappedfreq3 > 0) {
|
if (radio.eon[i + y].mappedfreq3 > 0) {
|
||||||
if (radio.eon[i + y].mappedfreq3 != mappedfreqold3[i + y]) tftPrint(1, String(mappedfreqold3[i + y] / 100) + "." + String((mappedfreqold3[i + y] % 100) / 10), 256, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
if (radio.eon[i + y].mappedfreq3 != mappedfreqold3[i + y]) tftPrint(1, String(mappedfreqold3[i + y] / 100) + "." + String((mappedfreqold3[i + y] % 100) / 10), 236, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
tftPrint(1, String(radio.eon[i + y].mappedfreq3 / 100) + "." + String((radio.eon[i + y].mappedfreq3 % 100) / 10), 256, 48 + (15 * i), PrimaryColor, PrimaryColorSmooth, 16);
|
tftPrint(1, String(radio.eon[i + y].mappedfreq3 / 100) + "." + String((radio.eon[i + y].mappedfreq3 % 100) / 10), 236, 48 + (15 * i), PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
mappedfreqold3[i + y] = radio.eon[i + y].mappedfreq3;
|
mappedfreqold3[i + y] = radio.eon[i + y].mappedfreq3;
|
||||||
} else {
|
} else {
|
||||||
tftPrint(1, String(mappedfreqold3[i + y] / 100) + "." + String((mappedfreqold3[i + y] % 100) / 10), 256, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
tftPrint(1, String(mappedfreqold3[i + y] / 100) + "." + String((mappedfreqold3[i + y] % 100) / 10), 236, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (radio.eon[i + y].taset) {
|
if (radio.eon[i + y].taset) {
|
||||||
if (radio.eon[i + y].ta) {
|
if (radio.eon[i + y].ta) {
|
||||||
tft.fillCircle(276, 54 + (15 * i), 4, InsignificantColor);
|
tft.fillCircle(250, 54 + (15 * i), 4, InsignificantColor);
|
||||||
} else {
|
} else {
|
||||||
tft.fillCircle(276, 54 + (15 * i), 4, BackgroundColor);
|
tft.fillCircle(250, 54 + (15 * i), 4, BackgroundColor);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
tft.fillCircle(276, 54 + (15 * i), 4, BackgroundColor);
|
tft.fillCircle(250, 54 + (15 * i), 4, BackgroundColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (radio.eon[i + y].tp) tft.fillCircle(302, 54 + (15 * i), 4, InsignificantColor); else tft.fillCircle(302, 54 + (15 * i), 4, BackgroundColor);
|
if (radio.eon[i + y].tp) tft.fillCircle(276, 54 + (15 * i), 4, InsignificantColor); else tft.fillCircle(276, 54 + (15 * i), 4, BackgroundColor);
|
||||||
|
|
||||||
|
if (radio.eon[i + y].pty != eonptyold[i + y]) {
|
||||||
|
tftReplace(0, String(eonptyold[i + y]), (radio.eon[i + y].pty < 32 ? String(radio.eon[i + y].pty) : " "), 304, 48 + (15 * i), PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
|
eonptyold[i + y] = radio.eon[i + y].pty;
|
||||||
|
}
|
||||||
|
|
||||||
if (i == 9) i = 254;
|
if (i == 9) i = 254;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ extern byte ECCold;
|
|||||||
extern byte language;
|
extern byte language;
|
||||||
extern byte licold;
|
extern byte licold;
|
||||||
extern byte MSold;
|
extern byte MSold;
|
||||||
|
extern byte eonptyold[20];
|
||||||
extern byte rdsblockold;
|
extern byte rdsblockold;
|
||||||
extern byte region;
|
extern byte region;
|
||||||
extern byte stationlistid;
|
extern byte stationlistid;
|
||||||
|
|||||||
Reference in New Issue
Block a user