Improve Wake Up (disable key action except PTT)
This commit is contained in:
19
app/app.c
19
app/app.c
@@ -1825,6 +1825,25 @@ static void ALARM_Off(void)
|
|||||||
|
|
||||||
static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
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)
|
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
|
{ // just turn the light on for now so the user can see what's what
|
||||||
BACKLIGHT_TurnOn();
|
BACKLIGHT_TurnOn();
|
||||||
|
@@ -121,7 +121,7 @@ void FUNCTION_PowerSave() {
|
|||||||
#ifdef ENABLE_FEAT_F4HWN_SLEEP
|
#ifdef ENABLE_FEAT_F4HWN_SLEEP
|
||||||
if(gWakeUp)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user