Skip to content

Commit

Permalink
Fix other backlight menu issues #275
Browse files Browse the repository at this point in the history
  • Loading branch information
egzumer committed Dec 15, 2023
1 parent 1151cf8 commit fc679c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions app/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion ui/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down

0 comments on commit fc679c7

Please sign in to comment.