1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

BACKLIGHT=OFF will take effect immediately

This commit is contained in:
Bertrand Songis 2019-03-13 13:54:47 +01:00
parent ab2c5870e9
commit 00b70da66a

View file

@ -710,7 +710,6 @@ void checkBacklight()
{
static uint8_t tmr10ms ;
uint8_t x = g_blinkTmr10ms;
if (tmr10ms != x) {
tmr10ms = x;
@ -721,13 +720,12 @@ void checkBacklight()
}
}
bool backlightOn = (g_eeGeneral.backlightMode == e_backlight_mode_on || lightOffCounter || isFunctionActive(FUNCTION_BACKLIGHT));
bool backlightOn = (g_eeGeneral.backlightMode == e_backlight_mode_on || (g_eeGeneral.backlightMode != e_backlight_mode_off && lightOffCounter) || isFunctionActive(FUNCTION_BACKLIGHT));
if (flashCounter) backlightOn = !backlightOn;
if (backlightOn)
BACKLIGHT_ENABLE();
else
BACKLIGHT_DISABLE();
}
}