Disable PTT if KEY_LOCK

This commit is contained in:
Armel FAUVEAU
2024-02-09 02:07:08 +01:00
parent dfe301b2dd
commit 5f7da35e06

View File

@@ -1755,7 +1755,11 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
bool lowBatPopup = gLowBattery && !gLowBatteryConfirmed && gScreenToDisplay == DISPLAY_MAIN; bool lowBatPopup = gLowBattery && !gLowBatteryConfirmed && gScreenToDisplay == DISPLAY_MAIN;
#ifdef ENABLE_FEAT_F4HWN // Disable PTT if KEY_LOCK
if ((gEeprom.KEY_LOCK || lowBatPopup) && gCurrentFunction != FUNCTION_TRANSMIT)
#else
if ((gEeprom.KEY_LOCK || lowBatPopup) && gCurrentFunction != FUNCTION_TRANSMIT && Key != KEY_PTT) if ((gEeprom.KEY_LOCK || lowBatPopup) && gCurrentFunction != FUNCTION_TRANSMIT && Key != KEY_PTT)
#endif
{ // keyboard is locked or low battery popup { // keyboard is locked or low battery popup
// close low battery popup // close low battery popup