Skip to content

Commit

Permalink
FIX egzumer#269: battery indicator always at 4 bars
Browse files Browse the repository at this point in the history
  • Loading branch information
egzumer committed Dec 14, 2023
1 parent 1a53586 commit fa5d3c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa5d3c1

Please sign in to comment.