Fix powerscreen.c

This commit is contained in:
Alexander Rosenberg 2024-04-10 19:16:21 -07:00
parent 56a5060fa1
commit 6bb004f588
Signed by: school-rpi4
GPG Key ID: 5CCFC80B0B47B04B

View File

@ -48,7 +48,7 @@ static bool power_screen_dispatch(PowerScreen *screen,
screen->choice = (screen->choice + state->up_down - state->down_down) %
POWER_SCREEN_NCHOICE;
if (screen->choice < 0) {
screen->choice = POWER_SCREEN_NCHOICE - screen->choice;
screen->choice = POWER_SCREEN_NCHOICE + screen->choice;
}
if (state->force_draw || state->up_down || state->down_down) {
lcd_clear(state->lcd);