diff --git a/app/action.c b/app/action.c index e6f4b78..cf93bf9 100644 --- a/app/action.c +++ b/app/action.c @@ -399,7 +399,7 @@ static void ACTION_Scan_FM(bool bRestart) static void ACTION_AlarmOr1750(const bool b1750) { - if(gEeprom.KEY_LOCK && gSetting_set_lck) + if(gEeprom.KEY_LOCK && gEeprom.KEY_LOCK_PTT) return; #if defined(ENABLE_ALARM) diff --git a/settings.c b/settings.c index 65f5ec6..6dd46fb 100644 --- a/settings.c +++ b/settings.c @@ -307,6 +307,7 @@ void SETTINGS_InitEEPROM(void) // And set special session settings for actions gSetting_set_ptt_session = gSetting_set_ptt; + gEeprom.KEY_LOCK_PTT = gSetting_set_lck; #endif } @@ -647,6 +648,9 @@ void SETTINGS_SaveSettings(void) State[5] = ((tmp << 4) | (gSetting_set_ctr & 0x0F)); State[6] = ((gSetting_set_tot << 4) | (gSetting_set_eot & 0x0F)); State[7] = ((gSetting_set_low << 4) | (gSetting_set_ptt & 0x0F)); + + gEeprom.KEY_LOCK_PTT = gSetting_set_lck; + EEPROM_WriteBuffer(0x1FF0, State); #endif } diff --git a/settings.h b/settings.h index 07075d6..d0d6b97 100644 --- a/settings.h +++ b/settings.h @@ -165,6 +165,9 @@ typedef struct { uint8_t SQUELCH_LEVEL; uint8_t TX_TIMEOUT_TIMER; bool KEY_LOCK; +#ifdef ENABLE_FEAT_F4HWN + bool KEY_LOCK_PTT; +#endif bool VOX_SWITCH; uint8_t VOX_LEVEL; #ifdef ENABLE_VOICE