Improve SetOff

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

View File

@@ -1586,6 +1586,8 @@ void APP_TimeSlice500ms(void)
gWakeUp = false; gWakeUp = false;
} }
if(gCurrentFunction != FUNCTION_TRANSMIT && !FUNCTION_IsRx())
{
if (gSleepModeCountdown_500ms > 0 && --gSleepModeCountdown_500ms == 0) { if (gSleepModeCountdown_500ms > 0 && --gSleepModeCountdown_500ms == 0) {
gBacklightCountdown_500ms = 0; gBacklightCountdown_500ms = 0;
BACKLIGHT_TurnOff(); BACKLIGHT_TurnOff();
@@ -1593,6 +1595,11 @@ void APP_TimeSlice500ms(void)
gPowerSave_10ms = 1; gPowerSave_10ms = 1;
gWakeUp = true; gWakeUp = true;
} }
}
else
{
gSleepModeCountdown_500ms = gSetting_set_off * 120;
}
if (gWakeUp) { if (gWakeUp) {
static bool swap = true; static bool swap = true;