This commit is contained in:
20
app/app.c
20
app/app.c
@@ -32,6 +32,7 @@
|
||||
#ifdef ENABLE_FLASHLIGHT
|
||||
|
||||
#include "app/flashlight.h"
|
||||
#include "../ui/fmradio.h"
|
||||
|
||||
#endif
|
||||
#ifdef ENABLE_FMRADIO
|
||||
@@ -1485,6 +1486,9 @@ void APP_TimeSlice500ms(void) {
|
||||
if (gFmRadioMode) // 1of11
|
||||
return;
|
||||
}
|
||||
if (gScreenToDisplay == DISPLAY_FM) {
|
||||
UI_UpdateFMThings(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gBacklightCountdown_500ms > 0 && !gAskToSave && !gCssBackgroundScan
|
||||
@@ -1814,18 +1818,7 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
|
||||
|
||||
bool lowBatPopup = gLowBattery && !gLowBatteryConfirmed && gScreenToDisplay == DISPLAY_MAIN;
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN // Disable PTT if KEY_LOCK
|
||||
bool lck_condition = false;
|
||||
|
||||
if (gSetting_set_lck)
|
||||
lck_condition = (gEeprom.KEY_LOCK || lowBatPopup) && gCurrentFunction != FUNCTION_TRANSMIT;
|
||||
else
|
||||
lck_condition = (gEeprom.KEY_LOCK || lowBatPopup) && gCurrentFunction != FUNCTION_TRANSMIT && Key != KEY_PTT;
|
||||
|
||||
if (lck_condition)
|
||||
#else
|
||||
if ((gEeprom.KEY_LOCK || lowBatPopup) && gCurrentFunction != FUNCTION_TRANSMIT && Key != KEY_PTT)
|
||||
#endif
|
||||
if ((gEeprom.KEY_LOCK || lowBatPopup) && gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
{ // keyboard is locked or low battery popup
|
||||
|
||||
// close low battery popup
|
||||
@@ -1850,8 +1843,7 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
|
||||
// KEY_MENU has a special treatment here, because we want to pass hold event to ACTION_Handle
|
||||
// but we don't want it to complain when initial press happens
|
||||
// we want to react on realese instead
|
||||
else if (Key != KEY_SIDE1 && Key != KEY_SIDE2 && // pass side buttons
|
||||
!(Key == KEY_MENU && bKeyHeld)) // pass KEY_MENU held
|
||||
else if (!(Key == KEY_MENU && bKeyHeld)) // pass KEY_MENU held
|
||||
{
|
||||
if ((!bKeyPressed || bKeyHeld || (Key == KEY_MENU && bKeyPressed)) &&
|
||||
// prevent released or held, prevent KEY_MENU pressed
|
||||
|
Reference in New Issue
Block a user