From fa5d3c1594fc3effbbbbea4dc11e8800a35ce2db Mon Sep 17 00:00:00 2001 From: Krzysiek Egzmont Date: Thu, 14 Dec 2023 15:07:33 +0100 Subject: [PATCH] FIX #269: battery indicator always at 4 bars --- ui/battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/battery.c b/ui/battery.c index 1a3e23369..1dd8e7576 100644 --- a/ui/battery.c +++ b/ui/battery.c @@ -36,7 +36,7 @@ void UI_DrawBattery(uint8_t* bitmap, uint8_t level, uint8_t blink) return; } - const uint8_t bars = MAX(4, level - 2); + const uint8_t bars = MIN(4, level - 2); for (int i = 0; i < bars; i++) { #ifndef ENABLE_REVERSE_BAT_SYMBOL