From 5ce7df8f9778d21c2d5266e8a6f314adadacceb5 Mon Sep 17 00:00:00 2001 From: MCelliotG Date: Fri, 7 Feb 2025 01:24:29 +0200 Subject: [PATCH 1/2] Major UI enhancements --- TEF6686_ESP32.ino | 124 +++++++++++++++++++--------------------------- 1 file changed, 52 insertions(+), 72 deletions(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index 5f8d4d0..70d25e8 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -288,6 +288,8 @@ int SignificantColor; int SignificantColorSmooth; int StereoColor; int StereoColorSmooth; +int WifiColorHigh; +int WifiColorLow; int SquelchShow; int rotary; int rotarycounter; @@ -1004,7 +1006,7 @@ void loop() { if (shouldScan) { if (scanmute && scanholdonsignal) { radio.setMute(); - if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); + if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor); SQ = true; } scanholdflag = false; @@ -1046,7 +1048,7 @@ void loop() { if (scanmute && scanholdonsignal) { radio.setUnMute(); SQ = false; - if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); } } @@ -1102,7 +1104,7 @@ void loop() { if (radio.af_counter == 0) { if (findMemoryAF && radio.rds.correctPI != 0 && tunemode == TUNE_MEM && (USN > 250 || WAM > 250)) { radio.setMute(); - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor); SQ = true; if (!screenmute) { if (advancedRDS) { @@ -1146,7 +1148,7 @@ void loop() { radio.setUnMute(); SQ = false; - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); } findMemoryAF = false; } else { @@ -1272,7 +1274,7 @@ void loop() { tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16); tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16); tft.drawLine(16, 143, 203, 143, GreyoutColor); - tft.drawBitmap(70, 5, RDSLogo, 35, 22, GreyoutColor); + tft.drawBitmap(68, 5, RDSLogo, 35, 22, GreyoutColor); } LowLevelInit = false; } @@ -2352,7 +2354,7 @@ void SelectBand() { } if (band > BAND_GAP) { - if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); if (tunemode == TUNE_MI_BAND && band != BAND_SW) tunemode = TUNE_MAN; BWreset = true; BWset = BWsetAM; @@ -2388,7 +2390,7 @@ void SelectBand() { tftPrint(-1, "PS:", 3, 193, GreyoutColor, BackgroundColor, 16); tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16); tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16); - tft.drawBitmap(70, 5, RDSLogo, 35, 22, GreyoutColor); + tft.drawBitmap(68, 5, RDSLogo, 35, 22, GreyoutColor); tft.fillRoundRect(249, 57, 30, 18, 2, GreyoutColor); tftPrint(0, "iMS", 265, 59, BackgroundColor, GreyoutColor, 16); tft.fillRoundRect(287, 57, 30, 18, 2, GreyoutColor); @@ -2481,7 +2483,7 @@ void BWButtonPress() { } else { if (!usesquelch) radio.setUnMute(); if (!BWtune && !menu) { - if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); unsigned long counterold = millis(); unsigned long counter = millis(); while (digitalRead(BWBUTTON) == LOW && counter - counterold <= 1000) counter = millis(); @@ -2509,23 +2511,15 @@ void BWButtonPress() { void doStereoToggle() { if (StereoToggle) { if (!screenmute) { - tft.drawCircle(43, 15, 10, BackgroundColor); - tft.drawCircle(43, 15, 9, BackgroundColor); - tft.drawCircle(53, 15, 10, BackgroundColor); - tft.drawCircle(53, 15, 9, BackgroundColor); - tft.drawCircle(48, 15, 10, SecondaryColor); - tft.drawCircle(48, 15, 9, SecondaryColor); + tft.drawBitmap(32, 5, Stereo, 32, 22, BackgroundColor); + tft.drawBitmap(38, 5, Mono, 22, 22, SecondaryColor); } radio.setMono(true); StereoToggle = false; } else { if (!screenmute) { - tft.drawCircle(48, 15, 10, BackgroundColor); - tft.drawCircle(48, 15, 9, BackgroundColor); - tft.drawCircle(43, 15, 10, GreyoutColor); - tft.drawCircle(43, 15, 9, GreyoutColor); - tft.drawCircle(53, 15, 10, GreyoutColor); - tft.drawCircle(53, 15, 9, GreyoutColor); + tft.drawBitmap(38, 5, Mono, 22, 22, BackgroundColor); + tft.drawBitmap(32, 5, Stereo, 32, 22, GreyoutColor); } radio.setMono(false); Stereostatusold = false; @@ -2555,7 +2549,7 @@ void ModeButtonPress() { } else { if (!BWtune && !menu) { if (!screenmute && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); } memorystore = false; unsigned long counterold = millis(); @@ -2763,7 +2757,7 @@ void ButtonPress() { } } } else { - if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); unsigned long counterold = millis(); unsigned long counter = millis(); while (digitalRead(ROTARY_BUTTON) == LOW && counter - counterold <= 1000) counter = millis(); @@ -3104,20 +3098,12 @@ void DoMemoryPosTune() { StereoToggle = presets[memorypos].ms; if (!StereoToggle) { Stereostatusold = false; - tft.drawCircle(43, 15, 10, BackgroundColor); - tft.drawCircle(43, 15, 9, BackgroundColor); - tft.drawCircle(53, 15, 10, BackgroundColor); - tft.drawCircle(53, 15, 9, BackgroundColor); - tft.drawCircle(48, 15, 10, SecondaryColor); - tft.drawCircle(48, 15, 9, SecondaryColor); + tft.drawBitmap(32, 5, Stereo, 32, 22, BackgroundColor); + tft.drawBitmap(38, 5, Mono, 22, 22, SecondaryColor); } else { Stereostatusold = false; - tft.drawCircle(48, 15, 10, BackgroundColor); - tft.drawCircle(48, 15, 9, BackgroundColor); - tft.drawCircle(43, 15, 10, GreyoutColor); - tft.drawCircle(43, 15, 9, GreyoutColor); - tft.drawCircle(53, 15, 10, GreyoutColor); - tft.drawCircle(53, 15, 9, GreyoutColor); + tft.drawBitmap(38, 5, Mono, 22, 22, BackgroundColor); + tft.drawBitmap(32, 5, Stereo, 32, 22, GreyoutColor); } } @@ -3423,9 +3409,9 @@ void ShowRDSLogo(bool RDSstatus) { if (!screenmute) { if (RDSstatus != RDSstatusold) { if (RDSstatus) { - tft.drawBitmap(70, 5, RDSLogo, 35, 22, RDSColor); + tft.drawBitmap(68, 5, RDSLogo, 35, 22, RDSColor); } else { - tft.drawBitmap(70, 5, RDSLogo, 35, 22, GreyoutColor); + tft.drawBitmap(68, 5, RDSLogo, 35, 22, GreyoutColor); } } RDSstatusold = RDSstatus; @@ -3437,16 +3423,10 @@ void ShowStereoStatus() { if (band < BAND_GAP) Stereostatus = radio.getStereoStatus(); else Stereostatus = false; if (Stereostatus != Stereostatusold) { if (Stereostatus && !screenmute) { - tft.drawCircle(43, 15, 10, StereoColor); - tft.drawCircle(43, 15, 9, StereoColor); - tft.drawCircle(53, 15, 10, StereoColor); - tft.drawCircle(53, 15, 9, StereoColor); + tft.drawBitmap(32, 5, Stereo, 32, 22, StereoColor); } else { if (!screenmute) { - tft.drawCircle(43, 15, 10, GreyoutColor); - tft.drawCircle(43, 15, 9, GreyoutColor); - tft.drawCircle(53, 15, 10, GreyoutColor); - tft.drawCircle(53, 15, 9, GreyoutColor); + tft.drawBitmap(32, 5, Stereo, 32, 22, GreyoutColor); } } Stereostatusold = Stereostatus; @@ -3550,7 +3530,7 @@ void ShowBW() { } if (BW != BWOld || BWreset) { - if (BWset == 0) tftReplace(1, String (BWOld, DEC), String (BW, DEC), 201, 4, BWAutoColor, BWAutoColorSmooth, BackgroundColor, 28); else tftReplace(1, String (BWOld, DEC), String (BW, DEC), 201, 4, PrimaryColor, PrimaryColorSmooth, BackgroundColor, 28); + if (BWset == 0) tftReplace(1, String (BWOld, DEC), String (BW, DEC), 203, 4, BWAutoColor, BWAutoColorSmooth, BackgroundColor, 28); else tftReplace(1, String (BWOld, DEC), String (BW, DEC), 203, 4, PrimaryColor, PrimaryColorSmooth, BackgroundColor, 28); BWOld = BW; BWreset = false; if (wifi) { @@ -3675,7 +3655,7 @@ void doSquelch() { if (SQ || BWreset) { if (!seek) radio.setUnMute(); if (!screenmute && !seek && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); } autosquelchtimer = millis(); SQ = false; @@ -3684,7 +3664,7 @@ void doSquelch() { if ((!SQ || BWreset) && (millis() >= autosquelchtimer + 1000)) { radio.setMute(); if (!screenmute && !seek && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor); } autosquelchtimer = millis(); SQ = true; @@ -3694,13 +3674,13 @@ void doSquelch() { if ((USN < amscansens * 30) && (OStatus < 2 && OStatus > -2) && (!scandxmode || (scandxmode && !scanmute))) { if (!seek) radio.setUnMute(); if (!screenmute && !seek && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); } SQ = false; } else { radio.setMute(); if (!screenmute && !seek && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor); } SQ = true; } @@ -3734,13 +3714,13 @@ void doSquelch() { if (Squelch < SStatus || Squelch == -100 || Squelch == 0) { if (!seek) radio.setUnMute(); if (!screenmute && !seek && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); } SQ = false; } else { radio.setMute(); if (!screenmute && !seek && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor); } SQ = true; } @@ -3748,13 +3728,13 @@ void doSquelch() { if (Stereostatus) { radio.setUnMute(); if (!screenmute && !seek && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); } SQ = false; } else { radio.setMute(); if (!screenmute && !seek && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor); } SQ = true; } @@ -3783,13 +3763,13 @@ void doSquelch() { if (Squelch < SStatus || Squelch == -100 || Squelch == 0) { if (!seek) radio.setUnMute(); if (!screenmute && !seek && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); } SQ = false; } else { radio.setMute(); if (!screenmute && !seek && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor); } SQ = true; } @@ -3797,13 +3777,13 @@ void doSquelch() { if (Stereostatus) { if (!seek) radio.setUnMute(); if (!screenmute && !seek && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); } SQ = false; } else { radio.setMute(); if (!screenmute && !seek && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor); } SQ = true; } @@ -4110,18 +4090,18 @@ void ShowRSSI() { if (rssiold != rssi) { rssiold = rssi; if (rssi == 0) { - tft.drawBitmap(250, 4, WiFi4, 25, 25, GreyoutColor); + tft.drawBitmap(250, 4, WiFi4, 25, 23, GreyoutColor); } else if (rssi > -50 && rssi < 0) { - tft.drawBitmap(250, 4, WiFi4, 25, 25, PrimaryColor); + tft.drawBitmap(250, 4, WiFi4, 25, 23, WifiColorHigh); } else if (rssi > -60) { - tft.drawBitmap(250, 4, WiFi4, 25, 25, GreyoutColor); - tft.drawBitmap(250, 4, WiFi3, 25, 25, PrimaryColor); + tft.drawBitmap(250, 4, WiFi4, 25, 23, GreyoutColor); + tft.drawBitmap(250, 4, WiFi3, 25, 23, WifiColorHigh); } else if (rssi > -70) { - tft.drawBitmap(250, 4, WiFi4, 25, 25, GreyoutColor); - tft.drawBitmap(250, 4, WiFi2, 25, 25, PrimaryColor); + tft.drawBitmap(250, 4, WiFi4, 25, 23, GreyoutColor); + tft.drawBitmap(250, 4, WiFi2, 25, 23, WifiColorLow); } else if (rssi < -70) { - tft.drawBitmap(250, 4, WiFi4, 25, 25, GreyoutColor); - tft.drawBitmap(250, 4, WiFi1, 25, 25, PrimaryColor); + tft.drawBitmap(250, 4, WiFi4, 25, 23, GreyoutColor); + tft.drawBitmap(250, 4, WiFi1, 25, 23, WifiColorLow); } } } @@ -4406,12 +4386,12 @@ void EdgeBeeper() { if (radio.mute) { radio.setMute(); if (!screenmute && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor); } } else { radio.setUnMute(); if (!screenmute && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); } } } @@ -4428,7 +4408,7 @@ void Seek(bool mode) { } if (!screenmute && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor); } if (!mode) TuneDown(); else TuneUp(); delay(50); @@ -4444,7 +4424,7 @@ void Seek(bool mode) { seek = false; radio.setUnMute(); if (!screenmute && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); } store = true; } else { @@ -4458,7 +4438,7 @@ void Seek(bool mode) { seek = false; radio.setUnMute(); if (!screenmute && !afscreen) { - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); } store = true; } else { @@ -4832,7 +4812,7 @@ void cancelDXScan() { scandxmode = false; if (scanmute) { radio.setUnMute(); - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); if (!flashing) { tft.fillRoundRect(2, 80, 40, 18, 2, SecondaryColor); @@ -4997,7 +4977,7 @@ void startFMDXScan() { } if (scanmute) { radio.setMute(); - tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); + tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor); SQ = true; Squelchold = -2; } From 0c0eb76cdc9e865842a448c74e345bf42fc07d3d Mon Sep 17 00:00:00 2001 From: MCelliotG Date: Fri, 7 Feb 2025 01:25:34 +0200 Subject: [PATCH 2/2] Major UI enhancements --- src/comms.cpp | 10 +-- src/constants.h | 174 ++++++++++++++++++++++++++++++------------------ src/gui.cpp | 169 +++++++++++++++++++++++++--------------------- src/gui.h | 2 + src/rds.cpp | 18 ++--- 5 files changed, 216 insertions(+), 157 deletions(-) diff --git a/src/comms.cpp b/src/comms.cpp index 64f5eac..ea823bf 100644 --- a/src/comms.cpp +++ b/src/comms.cpp @@ -732,7 +732,7 @@ void XDRGTKRoutine() { case '\0': radio.setMute(); - if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); + if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor); if (!screenmute) { tft.drawRoundRect(10, 30, 300, 170, 5, ActiveColor); tft.fillRoundRect(12, 32, 296, 166, 5, BackgroundColor); @@ -761,7 +761,7 @@ void XDRGTKRoutine() { XDRScan = false; if (VolSet != 0) { radio.setUnMute(); - if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); radio.setVolume(((VolSet * 10) - 40) / 10); } break; @@ -799,12 +799,12 @@ void XDRGTKRoutine() { VolSet = atoi(buff + 1); if (VolSet == 0) { radio.setMute(); - if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); + if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor); XDRMute = true; SQ = true; } else { radio.setUnMute(); - if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); radio.setVolume((VolSet - 40) / 10); XDRMute = false; } @@ -831,7 +831,7 @@ void XDRGTKRoutine() { store = true; XDRMute = false; radio.setUnMute(); - if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); + if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor); VolSet = EEPROM.readByte(EE_BYTE_VOLSET); LowLevelSet = EEPROM.readByte(EE_BYTE_LOWLEVELSET); softmuteam = EEPROM.readByte(EE_BYTE_SOFTMUTEAM); diff --git a/src/constants.h b/src/constants.h index 053a1f5..75fdb36 100644 --- a/src/constants.h +++ b/src/constants.h @@ -515,32 +515,80 @@ static const uint8_t Speaker[] PROGMEM = { 0x00, 0x00, 0x00 }; +static const uint8_t Mono[] PROGMEM = { + 0x00, 0x78, 0x00, + 0x03, 0xff, 0x00, + 0x0f, 0xff, 0xc0, + 0x1f, 0x03, 0xe0, + 0x3c, 0x00, 0xf0, + 0x38, 0x00, 0x70, + 0x70, 0x00, 0x38, + 0x70, 0x00, 0x38, + 0x60, 0x00, 0x18, + 0xe0, 0x00, 0x1c, + 0xe0, 0x00, 0x1c, + 0xe0, 0x00, 0x1c, + 0xe0, 0x00, 0x1c, + 0x60, 0x00, 0x18, + 0x70, 0x00, 0x38, + 0x70, 0x00, 0x38, + 0x38, 0x00, 0x70, + 0x3c, 0x00, 0xf0, + 0x1f, 0x03, 0xe0, + 0x0f, 0xff, 0xc0, + 0x03, 0xff, 0x00, + 0x00, 0x78, 0x00 +}; + +static const uint8_t Stereo[] PROGMEM = { + 0x00, 0x78, 0x1e, 0x00, + 0x03, 0xfc, 0xff, 0xc0, + 0x0f, 0xf1, 0xff, 0xf0, + 0x1f, 0x07, 0xc0, 0xf8, + 0x3c, 0x07, 0x80, 0x3c, + 0x38, 0x0e, 0x00, 0x1c, + 0x70, 0x1e, 0x00, 0x0e, + 0x70, 0x1c, 0x00, 0x0e, + 0xe0, 0x1c, 0x00, 0x07, + 0xe0, 0x38, 0x00, 0x07, + 0xe0, 0x38, 0x00, 0x07, + 0xe0, 0x38, 0x00, 0x07, + 0xe0, 0x38, 0x00, 0x07, + 0xe0, 0x1c, 0x00, 0x07, + 0x70, 0x1c, 0x00, 0x0e, + 0x70, 0x1e, 0x00, 0x0e, + 0x38, 0x0e, 0x00, 0x1c, + 0x3c, 0x07, 0x00, 0x3c, + 0x1f, 0x07, 0xc0, 0xf8, + 0x0f, 0xf1, 0xff, 0xf0, + 0x03, 0xfc, 0xff, 0xc0, + 0x00, 0x78, 0x1e, 0x00 +}; + static const uint8_t WiFi1[] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x3e, 0x00, 0x00, +0x00, 0x7f, 0x00, 0x00, +0x00, 0x3e, 0x00, 0x00, +0x00, 0x1c, 0x00, 0x00, +0x00, 0x0c, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00 }; static const uint8_t WiFi2[] PROGMEM = { @@ -556,18 +604,16 @@ static const uint8_t WiFi2[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, - 0x00, 0x41, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, + 0x01, 0xff, 0xc0, 0x00, + 0x01, 0xff, 0xc0, 0x00, + 0x00, 0xff, 0xc0, 0x00, + 0x00, 0xff, 0x80, 0x00, + 0x00, 0x7f, 0x00, 0x00, + 0x00, 0x3e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; @@ -578,52 +624,48 @@ static const uint8_t WiFi3[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x03, 0xff, 0xe0, 0x00, - 0x07, 0x80, 0xf0, 0x00, - 0x0e, 0x00, 0x38, 0x00, - 0x04, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x7f, 0x00, 0x00, + 0x07, 0xff, 0xf0, 0x00, + 0x0f, 0xff, 0xf8, 0x00, + 0x0f, 0xff, 0xfc, 0x00, + 0x0f, 0xff, 0xf8, 0x00, + 0x07, 0xff, 0xf0, 0x00, + 0x03, 0xff, 0xe0, 0x00, + 0x01, 0xff, 0xc0, 0x00, + 0x00, 0xff, 0xc0, 0x00, 0x00, 0xff, 0x80, 0x00, - 0x00, 0x41, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, + 0x00, 0x7f, 0x00, 0x00, + 0x00, 0x3e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static const uint8_t WiFi4[] PROGMEM = { + 0x00, 0x3e, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x07, 0xff, 0xf0, 0x00, - 0x1f, 0xc1, 0xfc, 0x00, - 0x3e, 0x00, 0x3e, 0x00, - 0x78, 0x00, 0x0f, 0x00, - 0x70, 0x00, 0x07, 0x00, - 0x60, 0x00, 0x03, 0x00, - 0x00, 0x7f, 0x00, 0x00, - 0x01, 0xff, 0xc0, 0x00, + 0x0f, 0xff, 0xf8, 0x00, + 0x1f, 0xff, 0xfc, 0x00, + 0x3f, 0xff, 0xfe, 0x00, + 0x7f, 0xff, 0xff, 0x00, + 0x7f, 0xff, 0xff, 0x80, + 0x7f, 0xff, 0xff, 0x00, + 0x3f, 0xff, 0xfe, 0x00, + 0x1f, 0xff, 0xfc, 0x00, + 0x0f, 0xff, 0xfc, 0x00, + 0x0f, 0xff, 0xf8, 0x00, + 0x07, 0xff, 0xf0, 0x00, 0x03, 0xff, 0xe0, 0x00, - 0x07, 0x80, 0xf0, 0x00, - 0x0e, 0x00, 0x38, 0x00, - 0x04, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x7f, 0x00, 0x00, + 0x01, 0xff, 0xc0, 0x00, + 0x00, 0xff, 0xc0, 0x00, 0x00, 0xff, 0x80, 0x00, - 0x00, 0x41, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, + 0x00, 0x7f, 0x00, 0x00, + 0x00, 0x3e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/src/gui.cpp b/src/gui.cpp index 5e0de13..069e48f 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -36,12 +36,14 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSDropoutColorSmooth = TealSmooth; BarSignificantColor = Red; BarInsignificantColor = Green; - ModBarSignificantColor = Red; - ModBarInsignificantColor = Green; + ModBarSignificantColor = Green; + ModBarInsignificantColor = Red; BWAutoColor = Teal; BWAutoColorSmooth = TealSmooth; BatteryValueColor = Teal; BatteryValueColorSmooth = Black; + WifiColorLow = Red; + WifiColorHigh = Green; break; case 1: // Cyan theme PrimaryColor = Cyan; @@ -65,14 +67,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSColorSmooth = CyanSmooth; RDSDropoutColor = CyanDark; RDSDropoutColorSmooth = CyanDarkSmooth; - BarSignificantColor = Red; + BarSignificantColor = Purple; BarInsignificantColor = Cyan; - ModBarSignificantColor = Red; - ModBarInsignificantColor = Cyan; + ModBarSignificantColor = Cyan; + ModBarInsignificantColor = Blue; BWAutoColor = Teal; BWAutoColorSmooth = TealSmooth; BatteryValueColor = Teal; BatteryValueColorSmooth = TealSmooth; + WifiColorLow = Skyblue; + WifiColorHigh = Cyan; break; case 2: // Crimson theme PrimaryColor = Crimson; @@ -98,12 +102,14 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSDropoutColorSmooth = CrimsonDarkSmooth; BarSignificantColor = Yellow; BarInsignificantColor = Crimson; - ModBarSignificantColor = Yellow; - ModBarInsignificantColor = Crimson; + ModBarSignificantColor = Watermelon; + ModBarInsignificantColor = Yellow; BWAutoColor = Coral; BWAutoColorSmooth = CoralSmooth; BatteryValueColor = Watermelon; BatteryValueColorSmooth = WatermelonSmooth; + WifiColorLow = Yellow; + WifiColorHigh = Crimson; break; case 3: // Monochrome theme PrimaryColor = White; @@ -127,14 +133,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSColorSmooth = Black; RDSDropoutColor = PaleGrey; RDSDropoutColorSmooth = Black; - BarSignificantColor = Red; - BarInsignificantColor = Green; - ModBarSignificantColor = Red; - ModBarInsignificantColor = Green; + BarSignificantColor = Honeydew; + BarInsignificantColor = White; + ModBarSignificantColor = White; + ModBarInsignificantColor = Honeydew; BWAutoColor = PureGrey; BWAutoColorSmooth = Black; BatteryValueColor = White; BatteryValueColorSmooth = Black; + WifiColorLow = Honeydew; + WifiColorHigh = White; break; case 4: // Volcano theme PrimaryColor = Orange; @@ -160,12 +168,14 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSDropoutColorSmooth = DallasSmooth; BarSignificantColor = Red; BarInsignificantColor = Orange; - ModBarSignificantColor = Red; - ModBarInsignificantColor = Orange; + ModBarSignificantColor = Orange; + ModBarInsignificantColor = Cherry; BWAutoColor = Tangerine; BWAutoColorSmooth = TangerineSmooth; BatteryValueColor = Tangerine; BatteryValueColorSmooth = TangerineSmooth; + WifiColorLow = Orange; + WifiColorHigh = Red; break; case 5: // Dendro theme PrimaryColor = Green; @@ -189,14 +199,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSColorSmooth = GreenDark; RDSDropoutColor = Laurel; RDSDropoutColorSmooth = LaurelSmooth; - BarSignificantColor = Red; + BarSignificantColor = Cabbage; BarInsignificantColor = Green; - ModBarSignificantColor = Red; - ModBarInsignificantColor = Green; + ModBarSignificantColor = Green; + ModBarInsignificantColor = Teal; BWAutoColor = Cabbage; BWAutoColorSmooth = CabbageSmooth; BatteryValueColor = Cabbage; BatteryValueColorSmooth = CabbageSmooth; + WifiColorLow = Green; + WifiColorHigh = Turquoise; break; case 6: // Sakura theme PrimaryColor = Sakura; @@ -220,15 +232,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSColorSmooth = SakuraSmooth; RDSDropoutColor = SakuraGrey; RDSDropoutColorSmooth = SakuraGreySmooth; - BarSignificantColor = Black; - BarSignificantColor = Red; + BarSignificantColor = Violet; BarInsignificantColor = Sakura; - ModBarSignificantColor = Red; - ModBarInsignificantColor = Sakura; + ModBarSignificantColor = Sakura; + ModBarInsignificantColor = Pink; BWAutoColor = Cherry; BWAutoColorSmooth = CherrySmooth; BatteryValueColor = Cherry; BatteryValueColorSmooth = CherrySmooth; + WifiColorLow = Violet; + WifiColorHigh = Sakura; break; case 7: // Whiteout theme PrimaryColor = Black; @@ -252,14 +265,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSColorSmooth = Honeydew; RDSDropoutColor = PureGrey; RDSDropoutColorSmooth = White; - BarSignificantColor = Black; - BarInsignificantColor = Green; + BarSignificantColor = PureGrey; + BarInsignificantColor = Black; ModBarSignificantColor = Black; - ModBarInsignificantColor = Green; + ModBarInsignificantColor = PureGrey; BWAutoColor = PureGrey; BWAutoColorSmooth = White; BatteryValueColor = Black; BatteryValueColorSmooth = White; + WifiColorLow = Black; + WifiColorHigh = Darkgrey; break; case 8: // Tangerine theme PrimaryColor = Tangerine; @@ -283,14 +298,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSColorSmooth = IndigoSmooth; RDSDropoutColor = Copper; RDSDropoutColorSmooth = CopperSmooth; - BarSignificantColor = Red; - BarInsignificantColor = Green; - ModBarSignificantColor = Red; - ModBarInsignificantColor = Green; + BarSignificantColor = Tangerine; + BarInsignificantColor = Yellow; + ModBarSignificantColor = Yellow; + ModBarInsignificantColor = Orange; BWAutoColor = Yolk; BWAutoColorSmooth = YolkSmooth; BatteryValueColor = Yolk; BatteryValueColorSmooth = YolkSmooth; + WifiColorLow = Yellow; + WifiColorHigh = Orange; break; case 9: // Ocean theme PrimaryColor = Ocean; @@ -314,14 +331,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSColorSmooth = OceanSmooth; RDSDropoutColor = Cove; RDSDropoutColorSmooth = CoveSmooth; - BarSignificantColor = Red; + BarSignificantColor = Skyblue; BarInsignificantColor = Ocean; - ModBarSignificantColor = Red; - ModBarInsignificantColor = Ocean; + ModBarSignificantColor = Ocean; + ModBarInsignificantColor = Deepsky; BWAutoColor = Deepsky; BWAutoColorSmooth = DeepskySmooth; BatteryValueColor = Deepsky; BatteryValueColorSmooth = DeepskySmooth; + WifiColorLow = Ocean; + WifiColorHigh = Skyblue; break; case 10: // Indigo theme PrimaryColor = Indigo; @@ -345,14 +364,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSColorSmooth = IndigoSmooth; RDSDropoutColor = Logan; RDSDropoutColorSmooth = LoganSmooth; - BarSignificantColor = Red; + BarSignificantColor = Cherry; BarInsignificantColor = Indigo; - ModBarSignificantColor = Red; - ModBarInsignificantColor = Indigo; + ModBarSignificantColor = Indigo; + ModBarInsignificantColor = Purple; BWAutoColor = Violet; BWAutoColorSmooth = VioletSmooth; BatteryValueColor = Violet; BatteryValueColorSmooth = VioletSmooth; + WifiColorLow = Violet; + WifiColorHigh = Purple; break; case 11: // Maroon @@ -379,12 +400,14 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSDropoutColorSmooth = LoganSmooth; BarSignificantColor = Yolk; BarInsignificantColor = Cherry; - ModBarSignificantColor = Yolk; - ModBarInsignificantColor = Cherry; + ModBarSignificantColor = Cherry; + ModBarInsignificantColor = Violet; BWAutoColor = Violet; BWAutoColorSmooth = VioletSmooth; BatteryValueColor = Purple; BatteryValueColorSmooth = PurpleSmooth; + WifiColorLow = Yolk; + WifiColorHigh = Cherry; break; case 12: // GoldBrite @@ -409,14 +432,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSColorSmooth = YellowSmooth; RDSDropoutColor = Teal; RDSDropoutColorSmooth = TealSmooth; - BarSignificantColor = Red; - BarInsignificantColor = Ocean; - ModBarSignificantColor = Red; - ModBarInsignificantColor = Green; + BarSignificantColor = Ocean; + BarInsignificantColor = Cherry; + ModBarSignificantColor = Green; + ModBarInsignificantColor = Blue; BWAutoColor = Teal; BWAutoColorSmooth = TealSmooth; BatteryValueColor = Teal; BatteryValueColorSmooth = Black; + WifiColorLow = Ocean; + WifiColorHigh = Cherry; break; case 13: // Bubblegum @@ -441,14 +466,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de RDSColorSmooth = TealSmooth; RDSDropoutColor = Logan; RDSDropoutColorSmooth = LoganSmooth; - BarSignificantColor = Coral; + BarSignificantColor = Violet; BarInsignificantColor = Teal; - ModBarSignificantColor = Sakura; - ModBarInsignificantColor = Skyblue; + ModBarSignificantColor = Teal; + ModBarInsignificantColor = Pink; BWAutoColor = Violet; BWAutoColorSmooth = VioletSmooth; BatteryValueColor = Turquoise; BatteryValueColorSmooth = CyanDarkSmooth; + WifiColorLow = Violet; + WifiColorHigh = Turquoise; break; } } @@ -466,16 +493,14 @@ void BuildAFScreen() { tft.fillScreen(BackgroundColor); tft.drawRect(0, 0, 320, 240, FrameColor); tft.drawLine(0, 30, 320, 30, FrameColor); - tft.drawLine(0, 15, 13, 15, FrameColor); tft.drawLine(0, 199, 320, 199, FrameColor); tft.drawLine(0, 218, 320, 218, FrameColor); tft.drawLine(30, 30, 30, 0, FrameColor); - tft.drawLine(67, 30, 67, 0, FrameColor); - tft.drawLine(107, 30, 107, 0, FrameColor); - tft.drawLine(107, 15, 160, 15, FrameColor); - tft.drawLine(160, 30, 160, 0, FrameColor); + tft.drawLine(66, 30, 66, 0, FrameColor); + tft.drawLine(105, 30, 105, 0, FrameColor); + tft.drawLine(162, 30, 162, 0, FrameColor); tft.drawLine(248, 30, 248, 0, FrameColor); - tftPrint(-1, "kHz", 203, 4, ActiveColor, ActiveColorSmooth, 28); + tftPrint(-1, "kHz", 205, 4, ActiveColor, ActiveColorSmooth, 28); tftPrint(0, myLanguage[language][33], 160, 222, ActiveColor, ActiveColorSmooth, 16); if (afpagenr == 1) { if (!radio.rds.hasAF) tftPrint(-1, myLanguage[language][87], 6, 48, PrimaryColor, PrimaryColorSmooth, 16); @@ -1394,7 +1419,7 @@ void ShowOneLine(byte position, byte item, bool selected) { FullLineSprite.setTextDatum(TR_DATUM); FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("kHz", 298, 2); + FullLineSprite.drawString("kHz", 300, 2); FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (fmdefaultstepsize) { @@ -1413,7 +1438,7 @@ void ShowOneLine(byte position, byte item, bool selected) { FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); FullLineSprite.drawString((mwstepsize ? "10" : "9"), 258, 2); FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("kHz", 298, 2); + FullLineSprite.drawString("kHz", 300, 2); break; case CONNECTIVITY: @@ -2827,15 +2852,14 @@ void BuildAdvancedRDS() { tft.drawRect(0, 0, 320, 240, FrameColor); tft.drawLine(0, 30, 320, 30, FrameColor); tft.drawLine(0, 68, 320, 68, FrameColor); - tft.drawLine(107, 15, 160, 15, FrameColor); tft.drawLine(0, 104, 320, 104, FrameColor); tft.drawLine(0, 126, 320, 126, FrameColor); - tft.drawLine(107, 30, 107, 0, FrameColor); + tft.drawLine(105, 30, 105, 0, FrameColor); tft.drawLine(210, 30, 210, 240, FrameColor); tft.drawLine(30, 30, 30, 0, FrameColor); - tft.drawLine(67, 30, 67, 0, FrameColor); - tft.drawLine(107, 30, 107, 0, FrameColor); - tft.drawLine(160, 30, 160, 0, FrameColor); + tft.drawLine(66, 30, 66, 0, FrameColor); + tft.drawLine(105, 30, 105, 0, FrameColor); + tft.drawLine(162, 30, 162, 0, FrameColor); tft.drawLine(248, 30, 248, 0, FrameColor); tft.drawLine(0, 140, 210, 140, FrameColor); tft.drawLine(0, 166, 210, 166, FrameColor); @@ -2883,19 +2907,15 @@ void BuildAdvancedRDS() { for (int i = 0; i < 33; i++) tft.fillCircle((6 * i) + 10, 133, 2, GreyoutColor); - tftPrint(-1, "kHz", 203, 4, ActiveColor, ActiveColorSmooth, 28); + tftPrint(-1, "kHz", 205, 4, ActiveColor, ActiveColorSmooth, 28); - tft.drawBitmap(70, 5, RDSLogo, 35, 22, GreyoutColor); - tft.drawBitmap(215, 45, Speaker, 21, 20, GreyoutColor); + tft.drawBitmap(68, 5, RDSLogo, 35, 22, GreyoutColor); + tft.drawBitmap(215, 47, Speaker, 21, 20, GreyoutColor); if (!StereoToggle) { - tft.drawCircle(48, 15, 10, SecondaryColor); - tft.drawCircle(48, 15, 9, SecondaryColor); + tft.drawBitmap(38, 5, Mono, 22, 22, SecondaryColor); } else { - tft.drawCircle(43, 15, 10, GreyoutColor); - tft.drawCircle(43, 15, 9, GreyoutColor); - tft.drawCircle(53, 15, 10, GreyoutColor); - tft.drawCircle(53, 15, 9, GreyoutColor); + tft.drawBitmap(32, 5, Stereo, 32, 22, GreyoutColor); } tftPrint(-1, "TP", 2, 51, GreyoutColor, BackgroundColor, 16); @@ -2961,16 +2981,15 @@ void BuildDisplay() { tft.drawRect(0, 0, 320, 240, FrameColor); tft.drawLine(0, 30, 320, 30, FrameColor); tft.drawLine(0, 100, 320, 100, FrameColor); - tft.drawLine(107, 15, 160, 15, FrameColor); - tft.drawLine(107, 30, 107, 0, FrameColor); + tft.drawLine(105, 30, 105, 0, FrameColor); tft.drawLine(210, 100, 210, 217, FrameColor); tft.drawLine(248, 30, 248, 0, FrameColor); tft.drawLine(0, 160, 210, 160, FrameColor); tft.drawLine(0, 180, 320, 180, FrameColor); tft.drawLine(0, 217, 320, 217, FrameColor); tft.drawLine(30, 30, 30, 0, FrameColor); - tft.drawLine(67, 30, 67, 0, FrameColor); - tft.drawLine(160, 30, 160, 0, FrameColor); + tft.drawLine(66, 30, 66, 0, FrameColor); + tft.drawLine(162, 30, 162, 0, FrameColor); tft.drawLine(16, 114, 202, 114, ActiveColor); if (!showmodulation) tft.drawLine(16, 143, 202, 143, GreyoutColor); else tft.drawLine(16, 143, 202, 143, ActiveColor); @@ -3017,20 +3036,16 @@ void BuildDisplay() { tftPrint(-1, "100", 164, 144, ActiveColor, ActiveColorSmooth, 16); } - tftPrint(-1, "kHz", 203, 4, ActiveColor, ActiveColorSmooth, 28); + tftPrint(-1, "kHz", 205, 4, ActiveColor, ActiveColorSmooth, 28); tftPrint(-1, unitString[unit], 282, 145, ActiveColor, ActiveColorSmooth, 16); - tft.drawBitmap(70, 5, RDSLogo, 35, 22, GreyoutColor); - tft.drawBitmap(253, 140, Speaker, 21, 20, GreyoutColor); + tft.drawBitmap(68, 5, RDSLogo, 35, 22, GreyoutColor); + tft.drawBitmap(253, 142, Speaker, 21, 20, GreyoutColor); if (!StereoToggle) { - tft.drawCircle(48, 15, 10, SecondaryColor); - tft.drawCircle(48, 15, 9, SecondaryColor); + tft.drawBitmap(38, 5, Mono, 22, 22, SecondaryColor); } else { - tft.drawCircle(43, 15, 10, GreyoutColor); - tft.drawCircle(43, 15, 9, GreyoutColor); - tft.drawCircle(53, 15, 10, GreyoutColor); - tft.drawCircle(53, 15, 9, GreyoutColor); + tft.drawBitmap(32, 5, Stereo, 32, 22, GreyoutColor); } if (autosquelch) showAutoSquelch(1); diff --git a/src/gui.h b/src/gui.h index 602552b..3ef4ed7 100644 --- a/src/gui.h +++ b/src/gui.h @@ -173,6 +173,8 @@ extern int Squelchold; extern int SStatusold; extern int StereoColor; extern int StereoColorSmooth; +extern int WifiColorHigh; +extern int WifiColorLow; extern int xPos; extern int xPos2; extern int xPos3; diff --git a/src/rds.cpp b/src/rds.cpp index 34e1f14..17be665 100644 --- a/src/rds.cpp +++ b/src/rds.cpp @@ -805,7 +805,7 @@ void showCT() { } else if (hour > 12) { hour -= 12; // Convert PM hours } - sprintf(timeStr, "%d:%02d%s", hour, localtime(&t)->tm_min, ampm.c_str()); + sprintf(timeStr, "%d:%02d %s", hour, localtime(&t)->tm_min, ampm.c_str()); } else { // Other regions: 24-hour format strftime(timeStr, sizeof(timeStr), "%H:%M", localtime(&t)); } @@ -828,17 +828,17 @@ void showCT() { } // Display the updated time and date - tftReplace(0, rds_clockold, rds_clock, 135, 1, RDSColor, RDSColorSmooth, BackgroundColor, 16); - tftReplace(0, rds_dateold, rds_date, 135, 16, RDSColor, RDSColorSmooth, BackgroundColor, 16); + tftReplace(0, rds_clockold, rds_clock, 134, 1, RDSColor, RDSColorSmooth, BackgroundColor, 16); + tftReplace(0, rds_dateold, rds_date, 134, 16, RDSColor, RDSColorSmooth, BackgroundColor, 16); } else { // Handle dropout scenarios if (rtcset) { // Display dropout message if RTC was set - tftReplace(0, rds_clockold, rds_clock, 135, 1, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16); - tftReplace(0, rds_dateold, rds_date, 135, 16, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16); + tftReplace(0, rds_clockold, rds_clock, 134, 1, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16); + tftReplace(0, rds_dateold, rds_date, 134, 16, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16); } else { // Clear and reprint the clock and date - tftPrint(0, rds_clockold, 135, 1, BackgroundColor, BackgroundColor, 16); - tftPrint(0, rds_clock, 135, 1, BackgroundColor, BackgroundColor, 16); - tftPrint(0, rds_dateold, 135, 16, BackgroundColor, BackgroundColor, 16); - tftPrint(0, rds_date, 135, 16, BackgroundColor, BackgroundColor, 16); + tftPrint(0, rds_clockold, 134, 1, BackgroundColor, BackgroundColor, 16); + tftPrint(0, rds_clock, 134, 1, BackgroundColor, BackgroundColor, 16); + tftPrint(0, rds_dateold, 134, 16, BackgroundColor, BackgroundColor, 16); + tftPrint(0, rds_date, 134, 16, BackgroundColor, BackgroundColor, 16); } } }