Fix bug on SetOff if BLMin > 0

This commit is contained in:
Armel FAUVEAU
2024-09-28 00:47:30 +02:00
parent 17b8aee527
commit b993a7a832
2 changed files with 5 additions and 13 deletions

View File

@@ -44,6 +44,9 @@
#include "audio.h"
#include "board.h"
#include "bsp/dp32g030/gpio.h"
#ifdef ENABLE_FEAT_F4HWN_SLEEP
#include "bsp/dp32g030/pwmplus.h"
#endif
#include "driver/backlight.h"
#ifdef ENABLE_FMRADIO
#include "driver/bk1080.h"
@@ -1592,7 +1595,7 @@ void APP_TimeSlice500ms(void)
gBacklightCountdown_500ms = 0;
gPowerSave_10ms = 1;
gWakeUp = true;
BACKLIGHT_TurnOff();
PWM_PLUS0_CH0_COMP = 0;
ST7565_ShutDown();
}
}

View File

@@ -139,18 +139,7 @@ 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
BACKLIGHT_SetBrightness(gEeprom.BACKLIGHT_MIN);
#endif
gBacklightCountdown_500ms = 0;
backlightOn = false;