0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-20 06:58:39 +03:00

Added VOX enable/disable compile option

This commit is contained in:
OneOfEleven
2023-10-04 11:57:34 +01:00
parent 5f2e069437
commit f4b637b51a
25 changed files with 419 additions and 310 deletions

View File

@ -224,16 +224,18 @@ void ACTION_Scan(bool bRestart)
}
}
void ACTION_Vox(void)
{
gEeprom.VOX_SWITCH = !gEeprom.VOX_SWITCH;
gRequestSaveSettings = true;
gFlagReconfigureVfos = true;
#ifdef ENABLE_VOICE
gAnotherVoiceID = VOICE_ID_VOX;
#endif
gUpdateStatus = true;
}
#ifdef ENABLE_VOX
void ACTION_Vox(void)
{
gEeprom.VOX_SWITCH = !gEeprom.VOX_SWITCH;
gRequestSaveSettings = true;
gFlagReconfigureVfos = true;
#ifdef ENABLE_VOICE
gAnotherVoiceID = VOICE_ID_VOX;
#endif
gUpdateStatus = true;
}
#endif
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
static void ACTION_AlarmOr1750(const bool b1750)
@ -268,7 +270,9 @@ void ACTION_Vox(void)
FM_TurnOff();
gInputBoxIndex = 0;
gVoxResumeCountdown = 80;
#ifdef ENABLE_VOX
gVoxResumeCountdown = 80;
#endif
gFlagReconfigureVfos = true;
gRequestDisplayScreen = DISPLAY_MAIN;
@ -369,7 +373,9 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
ACTION_Scan(true);
break;
case ACTION_OPT_VOX:
ACTION_Vox();
#ifdef ENABLE_VOX
ACTION_Vox();
#endif
break;
case ACTION_OPT_ALARM:
#ifdef ENABLE_ALARM