From fc679c77a49b988d5c21ed793702db3d42760e04 Mon Sep 17 00:00:00 2001 From: Krzysiek Egzmont Date: Fri, 15 Dec 2023 18:08:40 +0100 Subject: [PATCH] Fix other backlight menu issues #275 --- app/menu.c | 7 +++++-- ui/menu.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/menu.c b/app/menu.c index ecfc245..2f8c877 100644 --- a/app/menu.c +++ b/app/menu.c @@ -1341,7 +1341,7 @@ static void MENU_Key_EXIT(bool bKeyPressed, bool bKeyHeld) { /* Backlight related menus set full brightness. Set it back to the configured value, just in case we are exiting from one of them. */ - BACKLIGHT_SetBrightness(gEeprom.BACKLIGHT_MAX); + BACKLIGHT_TurnOn(); if (gIsInSubMenu) { @@ -1628,7 +1628,10 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction) gRequestDisplayScreen = DISPLAY_MENU; - if (UI_MENU_GetCurrentMenuId() != MENU_ABR && gEeprom.BACKLIGHT_TIME == 0) // backlight always off and not in the backlight menu + if (UI_MENU_GetCurrentMenuId() != MENU_ABR + && UI_MENU_GetCurrentMenuId() != MENU_ABR_MIN + && UI_MENU_GetCurrentMenuId() != MENU_ABR_MAX + && gEeprom.BACKLIGHT_TIME == 0) // backlight always off and not in the backlight menu { BACKLIGHT_TurnOff(); } diff --git a/ui/menu.c b/ui/menu.c index fb63f0a..62ce8e5 100644 --- a/ui/menu.c +++ b/ui/menu.c @@ -492,7 +492,7 @@ void UI_DisplayMenu(void) level the "next" time we enter here.I.e., when we move from one menu to another. It also has to be set back to max when pressing the Exit key. */ - BACKLIGHT_SetBrightness(gEeprom.BACKLIGHT_MAX); + BACKLIGHT_TurnOn(); switch (UI_MENU_GetCurrentMenuId()) {