From 29a74c2cd9eec65ffd8c26c44d4e103ac2349f0d Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Mon, 8 Jun 2026 08:57:40 +0200 Subject: [PATCH] suppress single-percent ADC noise for battery level --- src/ui/LvStatusBar.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/LvStatusBar.cpp b/src/ui/LvStatusBar.cpp index d2bef34..2a4ffab 100644 --- a/src/ui/LvStatusBar.cpp +++ b/src/ui/LvStatusBar.cpp @@ -177,7 +177,10 @@ void LvStatusBar::setGPSFix(bool hasFix) { void LvStatusBar::setBatteryPercent(int pct) { pct = normalizedBattery(pct); - if (_battPct == pct) return; + + // Suppress single-percent ADC noise: only update if the value changed by 2% or more + if (_battPct >= 0 && abs(pct - _battPct) < 2) return; + _battPct = pct; refreshBattery(); }