Modified S-meter in FM reception to show more realistic range

This commit is contained in:
Sjef Verhoeven PE5PVB
2024-02-18 18:41:10 +01:00
parent b8b54193d6
commit 1b9ea3c6c3

View File

@@ -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);