Refactoring

This commit is contained in:
Krzysiek Egzmont
2023-10-17 01:31:08 +02:00
parent 298ff29cf4
commit 0c0cbb232c
5 changed files with 156 additions and 157 deletions

View File

@@ -22,7 +22,7 @@
//static void ACTION_FlashLight(void)
void ACTION_Power(void);
void ACTION_Monitor(void);
void ACTION_Scan(bool bFlag);
void ACTION_Scan(bool bRestart);
#ifdef ENABLE_VOX
void ACTION_Vox(void);
#endif

View File

@@ -647,19 +647,19 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
return;
}
if (bKeyHeld && !gWasFKeyPressed)
{ // long press .. toggle scanning
if (!bKeyPressed)
return; // released
if (bKeyHeld && !gWasFKeyPressed) // long press
{
if (!bKeyPressed) // released
return;
ACTION_Scan(false);
ACTION_Scan(false);// toggle scanning
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
return;
}
if (bKeyPressed)
{ // just pressed
if (bKeyPressed) // just pressed
{
// gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
gBeepToPlay = BEEP_880HZ_40MS_OPTIONAL;
return;
@@ -667,8 +667,8 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
// just released
if (!gWasFKeyPressed)
{ // pressed without the F-key
if (!gWasFKeyPressed) // pressed without the F-key
{
#ifdef ENABLE_NOAA
if (gScanStateDir == SCAN_OFF && IS_NOT_NOAA_CHANNEL(gTxVfo->CHANNEL_SAVE))

3
main.c
View File

@@ -201,8 +201,7 @@ void Main(void)
AUDIO_SetVoiceID(1, VOICE_ID_CHANNEL_MODE);
AUDIO_SetDigitVoice(2, Channel + 1);
}
else
if (IS_FREQ_CHANNEL(Channel))
else if (IS_FREQ_CHANNEL(Channel))
AUDIO_SetVoiceID(1, VOICE_ID_FREQUENCY_MODE);
AUDIO_PlaySingleVoice(0);