Fix other backlight menu issues #275

This commit is contained in:
Krzysiek Egzmont
2023-12-15 18:08:40 +01:00
parent 1151cf8667
commit fc679c77a4
2 changed files with 6 additions and 3 deletions

View File

@@ -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();
}