Fix bug on SetOff if BLMin > 0

This commit is contained in:
Armel FAUVEAU
2024-09-27 21:12:01 +02:00
parent 842571bb72
commit 17b8aee527
2 changed files with 14 additions and 3 deletions

View File

@@ -1590,10 +1590,10 @@ void APP_TimeSlice500ms(void)
{
if (gSleepModeCountdown_500ms > 0 && --gSleepModeCountdown_500ms == 0) {
gBacklightCountdown_500ms = 0;
BACKLIGHT_TurnOff();
ST7565_ShutDown();
gPowerSave_10ms = 1;
gWakeUp = true;
BACKLIGHT_TurnOff();
ST7565_ShutDown();
}
}
else

View File

@@ -139,7 +139,18 @@ void BACKLIGHT_TurnOff()
BACKLIGHT_SetBrightness(tmp);
#else
#ifdef ENABLE_FEAT_F4HWN_SLEEP
if(gWakeUp)
{
BACKLIGHT_SetBrightness(0);
}
else
{
BACKLIGHT_SetBrightness(gEeprom.BACKLIGHT_MIN);
}
#else
BACKLIGHT_SetBrightness(gEeprom.BACKLIGHT_MIN);
#endif
#endif
gBacklightCountdown_500ms = 0;
backlightOn = false;