Some cosmetics

This commit is contained in:
MCelliotG
2023-11-19 02:41:50 +02:00
committed by GitHub
parent 4e2239f50f
commit dc361af3f1
+10 -10
View File
@@ -64,7 +64,7 @@ void ShowAdvancedRDS() {
if (radio.rds.hasAF) for (byte i = 0; i < radio.af_counter; i++) afstring += String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10) + (i == radio.af_counter - 1 ? " " : " | "); else afstring = myLanguage[language][87];
if (hasafold != radio.rds.hasAF) {
if (!screenmute) {
if (radio.rds.hasAF) tftPrint(-1, "AF", 52, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "AF", 52, 51, GreyoutColor, BackgroundColor, 16);
if (radio.rds.hasAF) tftPrint(-1, "AF", 50, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "AF", 50, 51, GreyoutColor, BackgroundColor, 16);
}
hasafold = radio.rds.hasAF;
}
@@ -91,7 +91,7 @@ void ShowAdvancedRDS() {
if (radio.rds.hasEON) for (byte i = 0; i < radio.eon_counter; i++) eonstring += String(radio.eon[i].picode) + (radio.eon[i].ps.length() > 0 ? String(": " + String(radio.eon[i].ps)) : "") + (radio.eon[i].mappedfreq > 0 ? String(" " + String(radio.eon[i].mappedfreq / 100) + "." + String((radio.eon[i].mappedfreq % 100) / 10)) : "") + (radio.eon[i].mappedfreq2 > 0 ? String(" / " + String(radio.eon[i].mappedfreq2 / 100) + "." + String((radio.eon[i].mappedfreq2 % 100) / 10)) : "") + (radio.eon[i].mappedfreq3 > 0 ? String(" / " + String(radio.eon[i].mappedfreq3 / 100) + "." + String((radio.eon[i].mappedfreq3 % 100) / 10)) : "") + (i == radio.eon_counter - 1 ? " " : " | "); else eonstring = myLanguage[language][88];
if (haseonold != radio.rds.hasEON) {
if (!screenmute) {
if (radio.rds.hasEON) tftPrint(-1, "EON", 155, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "EON", 155, 51, GreyoutColor, BackgroundColor, 16);
if (radio.rds.hasEON) tftPrint(-1, "EON", 153, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "EON", 153, 51, GreyoutColor, BackgroundColor, 16);
}
haseonold = radio.rds.hasEON;
}
@@ -119,7 +119,7 @@ void ShowAdvancedRDS() {
if (radio.rds.hasRDSplus) rtplusstring = (radio.rds.rdsplusTag1 != 169 ? String(myLanguage[language][radio.rds.rdsplusTag1]) + ": " + String(radio.rds.RTContent1) : "") + (radio.rds.rdsplusTag2 != 169 ? " - " + String(myLanguage[language][radio.rds.rdsplusTag2]) + ": " + String(radio.rds.RTContent2) : "") + " "; else rtplusstring = myLanguage[language][89];
if (hasrtplusold != radio.rds.hasRDSplus) {
if (!screenmute) {
if (radio.rds.hasRDSplus) tftPrint(-1, "RT+", 127, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "RT+", 127, 51, GreyoutColor, BackgroundColor, 16);
if (radio.rds.hasRDSplus) tftPrint(-1, "RT+", 125, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "RT+", 125, 51, GreyoutColor, BackgroundColor, 16);
}
hasrtplusold = radio.rds.hasRDSplus;
}
@@ -151,14 +151,14 @@ void ShowAdvancedRDS() {
if (TAold != radio.rds.hasTA) {
if (!screenmute) {
if (radio.rds.hasTA) tftPrint(-1, "TA", 25, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "TA", 25, 51, GreyoutColor, BackgroundColor, 16);
if (radio.rds.hasTA) tftPrint(-1, "TA", 24, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "TA", 24, 51, GreyoutColor, BackgroundColor, 16);
}
TAold = radio.rds.hasTA;
}
if (afmethodBold != radio.afmethodB || rdsreset) {
if (!screenmute) {
if (radio.afmethodB) tftPrint(-1, "-B", 70, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "-B", 70, 51, GreyoutColor, BackgroundColor, 16);
if (radio.afmethodB) tftPrint(-1, "-B", 68, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "-B", 68, 51, GreyoutColor, BackgroundColor, 16);
}
afmethodBold = radio.afmethodB;
}
@@ -168,17 +168,17 @@ void ShowAdvancedRDS() {
switch (radio.rds.MS) {
case 0:
tftPrint(-1, "M", 196, 51, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "S", 188, 51, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "S", 185, 51, GreyoutColor, BackgroundColor, 16);
break;
case 1:
tftPrint(-1, "M", 196, 51, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "S", 188, 51, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "S", 185, 51, GreyoutColor, BackgroundColor, 16);
break;
case 2:
tftPrint(-1, "M", 196, 51, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "S", 188, 51, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "S", 185, 51, PrimaryColor, PrimaryColorSmooth, 16);
break;
}
}
@@ -193,7 +193,7 @@ void ShowAdvancedRDS() {
if (hastmcold != radio.rds.hasTMC) {
if (!screenmute) {
if (radio.rds.hasTMC) tftPrint(-1, "TMC", 90, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "TMC", 90, 51, GreyoutColor, BackgroundColor, 16);
if (radio.rds.hasTMC) tftPrint(-1, "TMC", 88, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "TMC", 88, 51, GreyoutColor, BackgroundColor, 16);
}
hastmcold = radio.rds.hasTMC;
}
@@ -764,4 +764,4 @@ void ShowAFEON() {
}
}
}
#pragma GCC diagnostic pop
#pragma GCC diagnostic pop