Improve Wake Up (disable key action except PTT)

This commit is contained in:
Armel FAUVEAU
2024-11-19 06:37:38 +01:00
parent 73a4dc97a4
commit 8555c19c22
2 changed files with 20 additions and 1 deletions

View File

@@ -1825,6 +1825,25 @@ static void ALARM_Off(void)
static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{
#ifdef ENABLE_FEAT_F4HWN_SLEEP
if(gWakeUp)
{
if(!bKeyPressed || Key == KEY_PTT)
{
BACKLIGHT_TurnOn();
if(Key == KEY_SIDE1 || Key == KEY_SIDE2)
{
Key = KEY_INVALID;
}
}
else
{
return;
}
}
#endif
if (Key == KEY_EXIT && !BACKLIGHT_IsOn() && gEeprom.BACKLIGHT_TIME > 0)
{ // just turn the light on for now so the user can see what's what
BACKLIGHT_TurnOn();

View File

@@ -121,7 +121,7 @@ void FUNCTION_PowerSave() {
#ifdef ENABLE_FEAT_F4HWN_SLEEP
if(gWakeUp)
{
gPowerSave_10ms = gEeprom.BATTERY_SAVE * 250; // deep sleep now indexed on BatSav
gPowerSave_10ms = gEeprom.BATTERY_SAVE * 200; // deep sleep now indexed on BatSav
}
else
{