From f3acb150f477108d5c6a5e0fb3ca8ec691f84565 Mon Sep 17 00:00:00 2001 From: MCelliotG Date: Fri, 4 Aug 2023 03:26:48 +0300 Subject: [PATCH] More GUI adjustments and minor fixes --- TEF6686_ESP32.ino | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index 2811f9d..7ddea49 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -1019,7 +1019,7 @@ void ShowBandSelectionFM(bool notglanceview, bool normaldisplay) { bandFMx = 155; bandFMy = 118; } else { - bandFMx = 305; + bandFMx = 310; bandFMy = 196; } @@ -1118,7 +1118,7 @@ void ShowBandSelectionAM(bool notglanceview, bool normaldisplay) { bandAMx = 155; bandAMy = 118; } else { - bandAMx = 305; + bandAMx = 310; bandAMy = 216; } @@ -2303,7 +2303,7 @@ void ShowAdvancedRDS() { String afstring; 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) + (radio.af[i].filler ? "(f)" : "") + (i == radio.af_counter - 1 ? " " : " | "); else afstring = myLanguage[language][87]; if (hasafold != radio.rds.hasAF) { - if (radio.rds.hasAF) tftPrint(-1, "AF", 50, 51, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, "AF", 50, 51, GreyoutColor, BackgroundColor, FONT16); + if (radio.rds.hasAF) tftPrint(-1, "AF", 47, 51, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, "AF", 47, 51, GreyoutColor, BackgroundColor, FONT16); hasafold = radio.rds.hasAF; } @@ -2341,7 +2341,7 @@ void ShowAdvancedRDS() { String eonstring; 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 (radio.rds.hasEON) tftPrint(-1, "EON", 153, 51, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, "EON", 153, 51, GreyoutColor, BackgroundColor, FONT16); + if (radio.rds.hasEON) tftPrint(-1, "EON", 150, 51, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, "EON", 150, 51, GreyoutColor, BackgroundColor, FONT16); haseonold = radio.rds.hasEON; } if (eonstring.length() < 20) { @@ -2378,7 +2378,7 @@ void ShowAdvancedRDS() { String rtplusstring; 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 (radio.rds.hasRDSplus) tftPrint(-1, "RT+", 124, 51, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, "RT+", 124, 51, GreyoutColor, BackgroundColor, FONT16); + if (radio.rds.hasRDSplus) tftPrint(-1, "RT+", 122, 51, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, "RT+", 122, 51, GreyoutColor, BackgroundColor, FONT16); hasrtplusold = radio.rds.hasRDSplus; } if (rtplusstring.length() < 20) { @@ -2413,30 +2413,30 @@ void ShowAdvancedRDS() { rtplusstringold = rtplusstring; if (TPold != radio.rds.hasTP) { - if (radio.rds.hasTP == true) tftPrint(-1, "TP", 6, 51, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, "TP", 6, 51, GreyoutColor, BackgroundColor, FONT16); + if (radio.rds.hasTP == true) tftPrint(-1, "TP", 3, 51, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, "TP", 3, 51, GreyoutColor, BackgroundColor, FONT16); TPold = radio.rds.hasTP; } if (TAold != radio.rds.hasTA) { - if (radio.rds.hasTA == true) tftPrint(-1, "TA", 28, 51, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, "TA", 28, 51, GreyoutColor, BackgroundColor, FONT16); + if (radio.rds.hasTA == true) tftPrint(-1, "TA", 25, 51, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, "TA", 25, 51, GreyoutColor, BackgroundColor, FONT16); TAold = radio.rds.hasTA; } if (MSold != radio.rds.MS) { switch (radio.rds.MS) { case 0: - tftPrint(-1, "M", 185, 51, GreyoutColor, BackgroundColor, FONT16); - tftPrint(-1, "S", 198, 51, GreyoutColor, BackgroundColor, FONT16); + tftPrint(-1, "M", 183, 51, GreyoutColor, BackgroundColor, FONT16); + tftPrint(-1, "S", 199, 51, GreyoutColor, BackgroundColor, FONT16); break; case 1: - tftPrint(-1, "M", 185, 51, PrimaryColor, PrimaryColorSmooth, FONT16); - tftPrint(-1, "S", 198, 51, GreyoutColor, BackgroundColor, FONT16); + tftPrint(-1, "M", 183, 51, PrimaryColor, PrimaryColorSmooth, FONT16); + tftPrint(-1, "S", 199, 51, GreyoutColor, BackgroundColor, FONT16); break; case 2: - tftPrint(-1, "M", 185, 51, GreyoutColor, BackgroundColor, FONT16); - tftPrint(-1, "S", 198, 51, PrimaryColor, PrimaryColorSmooth, FONT16); + tftPrint(-1, "M", 183, 51, GreyoutColor, BackgroundColor, FONT16); + tftPrint(-1, "S", 199, 51, PrimaryColor, PrimaryColorSmooth, FONT16); break; } MSold = radio.rds.MS; @@ -2446,10 +2446,10 @@ void ShowAdvancedRDS() { if (rds_clock != rds_clockold) { if (radio.rds.hasCT) { tftReplace(1, rds_clockold, rds_clock, 205, 109, PrimaryColor, PrimaryColorSmooth, FONT16); - tftPrint(-1, "CT", 72, 51, PrimaryColor, PrimaryColorSmooth, FONT16); + tftPrint(-1, "CT", 69, 51, PrimaryColor, PrimaryColorSmooth, FONT16); } else { tftPrint(1, rds_clock, 205, 109, BackgroundColor, BackgroundColor, FONT16); - tftPrint(-1, "CT", 72, 51, GreyoutColor, BackgroundColor, FONT16); + tftPrint(-1, "CT", 69, 51, GreyoutColor, BackgroundColor, FONT16); } rds_clockold = rds_clock; } @@ -2461,7 +2461,7 @@ void ShowAdvancedRDS() { } if (hastmcold != radio.rds.hasTMC) { - if (radio.rds.hasTMC == true) tftPrint(-1, "TMC", 90, 51, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, "TMC", 90, 51, GreyoutColor, BackgroundColor, FONT16); + if (radio.rds.hasTMC == true) tftPrint(-1, "TMC", 89, 51, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, "TMC", 89, 51, GreyoutColor, BackgroundColor, FONT16); hastmcold = radio.rds.hasTMC; } }