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, /* Backlight related menus set full brightness. Set it back to the configured value,
just in case we are exiting from one of them. */ just in case we are exiting from one of them. */
BACKLIGHT_SetBrightness(gEeprom.BACKLIGHT_MAX); BACKLIGHT_TurnOn();
if (gIsInSubMenu) if (gIsInSubMenu)
{ {
@@ -1628,7 +1628,10 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
gRequestDisplayScreen = DISPLAY_MENU; 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(); BACKLIGHT_TurnOff();
} }

View File

@@ -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. 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. */ 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()) switch (UI_MENU_GetCurrentMenuId())
{ {