0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 06:39:49 +03:00

Fixed backlight = off exit problem

This commit is contained in:
OneOfEleven
2023-09-20 08:40:35 +01:00
parent af9b0d6cb7
commit 2e0571b600
6 changed files with 15 additions and 25 deletions

View File

@ -166,7 +166,7 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
case MENU_ABR:
*pMin = 0;
*pMax = 5;
*pMax = ARRAY_SIZE(gSubMenu_BACK_LIGHT) - 1;
break;
case MENU_F_LOCK:
@ -518,11 +518,9 @@ void MENU_AcceptSetting(void)
break;
case MENU_ABR:
gEeprom.BACKLIGHT = 1; // turn the light on to let them find there way around for a bit
BACKLIGHT_TurnOn();
gEeprom.BACKLIGHT = gSubMenuSelection;
if (gSubMenuSelection == 0)
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
else
BACKLIGHT_TurnOn();
break;
case MENU_TDR: