0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-18 22:29:50 +03:00

Added always ON backlight menu option

This commit is contained in:
OneOfEleven
2023-09-10 14:07:23 +01:00
parent 16434c8d14
commit 37afeb0414
8 changed files with 11 additions and 5 deletions

View File

@ -1301,7 +1301,8 @@ void APP_TimeSlice500ms(void)
{
if (gBacklightCountdown)
if (--gBacklightCountdown == 0)
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn backlight off
if (gEeprom.BACKLIGHT < 5)
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn backlight off
#ifndef DISABLE_AIRCOPY
if (gScreenToDisplay != DISPLAY_AIRCOPY && (gScreenToDisplay != DISPLAY_SCANNER || gScanCssState >= SCAN_CSS_STATE_FOUND))
@ -1397,7 +1398,8 @@ void APP_TimeSlice500ms(void)
gReducedService = true;
FUNCTION_Select(FUNCTION_POWER_SAVE);
ST7565_Configure_GPIO_B11();
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
//if (gEeprom.BACKLIGHT < 5)
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
}
#ifndef DISABLE_VOICE
else