From 1b9ea3c6c3b9cb6a9d7539a092e91839ae141615 Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sun, 18 Feb 2024 18:41:10 +0100 Subject: [PATCH] Modified S-meter in FM reception to show more realistic range --- TEF6686_ESP32.ino | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index b6012a3..43e70f2 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -2620,8 +2620,7 @@ void ShowSignalLevel() { if (SStatusold / 10 != SStatusprint / 10) tftReplace(1, String(SStatusold / 10), String(SStatusprint / 10), 288, 105, FreqColor, FreqColorSmooth, 48); tftReplace(1, "." + String(abs(SStatusold % 10)), "." + String(abs(SStatusprint % 10)), 310, 105, FreqColor, FreqColorSmooth, 28); - if (band < BAND_GAP) segments = (SStatus + 200) / 10; else segments = (SStatus + 200) / 10; - + if (band < BAND_GAP) segments = map(SStatus/10, 5, 70, 0, 100); else segments = (SStatus + 200) / 10; tft.fillRect(16, 105, 2 * constrain(segments, 0, 54), 6, BarInsignificantColor); tft.fillRect(16 + 2 * 54, 105, 2 * (constrain(segments, 54, 94) - 54), 6, BarSignificantColor); tft.fillRect(16 + 2 * constrain(segments, 0, 94), 105, 2 * (94 - constrain(segments, 0, 94)), 6, GreyoutColor);