Improve SetOff

This commit is contained in:
Armel FAUVEAU
2024-09-26 04:50:08 +02:00
parent 91cb12f0f9
commit 842571bb72

View File

@@ -1586,12 +1586,19 @@ void APP_TimeSlice500ms(void)
gWakeUp = false;
}
if (gSleepModeCountdown_500ms > 0 && --gSleepModeCountdown_500ms == 0) {
gBacklightCountdown_500ms = 0;
BACKLIGHT_TurnOff();
ST7565_ShutDown();
gPowerSave_10ms = 1;
gWakeUp = true;
if(gCurrentFunction != FUNCTION_TRANSMIT && !FUNCTION_IsRx())
{
if (gSleepModeCountdown_500ms > 0 && --gSleepModeCountdown_500ms == 0) {
gBacklightCountdown_500ms = 0;
BACKLIGHT_TurnOff();
ST7565_ShutDown();
gPowerSave_10ms = 1;
gWakeUp = true;
}
}
else
{
gSleepModeCountdown_500ms = gSetting_set_off * 120;
}
if (gWakeUp) {