From 3f395f995451943d94ddb23018bea609f7495074 Mon Sep 17 00:00:00 2001 From: Sarijen Date: Wed, 26 Aug 2026 23:19:58 +0200 Subject: [PATCH] Fix RSSI level line overlapping BW text in spectrum --- App/app/spectrum.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/App/app/spectrum.c b/App/app/spectrum.c index f86cb8a1..7d04acde 100644 --- a/App/app/spectrum.c +++ b/App/app/spectrum.c @@ -1733,17 +1733,23 @@ static uint8_t GetScanStepTextWidth() return (sprintf(NULL, "%u", GetScanStep() / 100) + 4) * 4; // "%u.%02uk", 4 px advance per char } +static uint8_t GetBwTextWidth() +{ + return (strlen(bwOptions[settings.listenBw]) * 4) + 4; // 4 px advance per char +} + static void DrawRssiTriggerLevel(const uint8_t *topY) { if (settings.rssiTriggerLevel == RSSI_MAX_VALUE || monitorMode) return; uint8_t scanStepTextWidth = GetScanStepTextWidth(); + uint8_t bwTextWidth = GetBwTextWidth(); uint8_t y = Rssi2Y(settings.rssiTriggerLevel); for (uint8_t x = 0; x < 128; x += 2) { if (SpectrumColumnAtOrAboveY(topY, x, y)) continue; - if (y <= 12 && (x < scanStepTextWidth + 2 || x >= 114)) + if (y <= 12 && (x < scanStepTextWidth + 2 || x >= 128 - bwTextWidth - 2)) continue; if (gFrameBuffer[y / 8][x] & (1 << (y % 8))) continue;