From 0158ad817302ea52fbf0bf2006c87eb67b1a87b5 Mon Sep 17 00:00:00 2001 From: MCelliotG Date: Mon, 10 Feb 2025 15:11:10 +0200 Subject: [PATCH 1/2] GUI optimizations --- TEF6686_ESP32.ino | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index b673ddd..9cdfbf4 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -718,7 +718,7 @@ void setup() { PSSprite.setTextDatum(TL_DATUM); PSSprite.setSwapBytes(true); - SquelchSprite.createSprite(47, 19); + SquelchSprite.createSprite(24, 19); SquelchSprite.setTextDatum(TL_DATUM); SquelchSprite.setSwapBytes(true); @@ -3320,12 +3320,12 @@ void ShowSignalLevel() { SNRupdatetimer = millis(); if (!advancedRDS) { if (CN > (CNold + 1) || CN < (CNold - 1)) { - if (CNold == 0) tftPrint(1, "--", 248, 163, BackgroundColor, BackgroundColor, 16); else tftPrint(1, String(CNold), 248, 163, BackgroundColor, BackgroundColor, 16); + if (CNold == 0) tftPrint(1, "--", 236, 163, BackgroundColor, BackgroundColor, 16); else tftPrint(1, String(CNold), 236, 163, BackgroundColor, BackgroundColor, 16); if (tuned) { - if (CN == 0) tftPrint(1, "--", 248, 163, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, String(CN), 248, 163, PrimaryColor, PrimaryColorSmooth, 16); + if (CN == 0) tftPrint(1, "--", 236, 163, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, String(CN), 236, 163, PrimaryColor, PrimaryColorSmooth, 16); CNold = CN; } else { - tftPrint(1, "--", 248, 163, PrimaryColor, PrimaryColorSmooth, 16); + tftPrint(1, "--", 236, 163, PrimaryColor, PrimaryColorSmooth, 16); CNold = 0; } } @@ -3333,7 +3333,8 @@ void ShowSignalLevel() { MPprint = constrain(map(MP, 0, 1000, 0, 99), 0, 99); if (MPprint != MPold) { - tftReplace(1, String(MPold), (band < BAND_GAP ? String(MPprint) : "--"), 318, 163, PrimaryColor, PrimaryColorSmooth, BackgroundColor, 16); + tftReplace(1, String(MPold), (band < BAND_GAP ? String(MPprint) : "--"), 299, 163, PrimaryColor, PrimaryColorSmooth, BackgroundColor, 16); + tftPrint(1, "%", 316, 163, PrimaryColor, PrimaryColorSmooth, 16); MPold = MPprint; } @@ -3341,7 +3342,8 @@ void ShowSignalLevel() { USprint = constrain(map(US, 0, 1000, 0, 99), 0, 99); if (USprint != USold) { - tftReplace(1, String(USold), (band < BAND_GAP ? String(USprint) : "--"), 318, 145, PrimaryColor, PrimaryColorSmooth, BackgroundColor, 16); + tftReplace(1, String(USold), (band < BAND_GAP ? String(USprint) : "--"), 299, 145, PrimaryColor, PrimaryColorSmooth, BackgroundColor, 16); + tftPrint(1, "%", 316, 145, PrimaryColor, PrimaryColorSmooth, 16); USold = USprint; } } @@ -3675,7 +3677,7 @@ void showAutoSquelch(bool mode) { } SquelchSprite.fillSprite(BackgroundColor); SquelchSprite.drawString("A.", 0, 0); - SquelchSprite.pushSprite(235, 145); + SquelchSprite.pushSprite(223, 145); } void doSquelch() { @@ -3740,7 +3742,7 @@ void doSquelch() { SquelchSprite.drawString(String(SquelchShow), 0, 0); } if (Squelch != Squelchold) { - SquelchSprite.pushSprite(235, 145); + SquelchSprite.pushSprite(223, 145); } } Squelchold = Squelch; @@ -3791,7 +3793,7 @@ void doSquelch() { SquelchSprite.drawString(String(SquelchShow), 0, 0); } if (Squelch != Squelchold) { - SquelchSprite.pushSprite(235, 145); + SquelchSprite.pushSprite(223, 145); } Squelchold = Squelch; } From 3d6abbd954a466cb5e9e967a1f8afdf87ed83121 Mon Sep 17 00:00:00 2001 From: MCelliotG Date: Mon, 10 Feb 2025 15:11:52 +0200 Subject: [PATCH 2/2] GUI optimizations --- src/gui.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui.cpp b/src/gui.cpp index 7dc66f1..01adbca 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -2891,7 +2891,7 @@ void BuildAdvancedRDS() { tftPrint(-1, "LIC", 214, 208, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, "PIN", 214, 223, ActiveColor, ActiveColorSmooth, 16); tftPrint(1, "Dynamic PTY", 300, 130, ActiveColor, ActiveColorSmooth, 16); - tftPrint(1, "Artif. head", 300, 145, ActiveColor, ActiveColorSmooth, 16); + tftPrint(1, "Artificial head", 300, 145, ActiveColor, ActiveColorSmooth, 16); tftPrint(1, "Compressed", 300, 160, ActiveColor, ActiveColorSmooth, 16); tftPrint(1, "Has stereo", 300, 175, ActiveColor, ActiveColorSmooth, 16); @@ -3006,11 +3006,11 @@ void BuildDisplay() { } } } - if (usesquelch || autosquelch) tftPrint(-1, "SQ", 212, 145, ActiveColor, ActiveColorSmooth, 16); - tftPrint(-1, "US", 283, 145, ActiveColor, ActiveColorSmooth, 16); - tftPrint(-1, "MP", 283, 163, ActiveColor, ActiveColorSmooth, 16); - tftPrint(-1, "CN", 212, 163, ActiveColor, ActiveColorSmooth, 16); - tftPrint(1, "dB", 270, 163, ActiveColor, ActiveColorSmooth, 16); + if (usesquelch || autosquelch) tftPrint(-1, "SQ:", 200, 145, ActiveColor, ActiveColorSmooth, 16); + tftPrint(-1, "US:", 261, 145, ActiveColor, ActiveColorSmooth, 16); + tftPrint(-1, "MP:", 261, 163, ActiveColor, ActiveColorSmooth, 16); + tftPrint(-1, "CN:", 200, 163, ActiveColor, ActiveColorSmooth, 16); + tftPrint(1, "dB", 257, 163, ActiveColor, ActiveColorSmooth, 16); tftPrint(0, "S", 7, 101, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, "1", 24, 115, ActiveColor, ActiveColorSmooth, 16);