Renamed a FM variable.

This commit is contained in:
Dual Tachyon 2023-09-02 18:15:37 +01:00
parent 8e2836f506
commit 240db191a6
4 changed files with 5 additions and 5 deletions

View File

@ -37,6 +37,7 @@ volatile uint16_t gFmPlayCountdown = 1;
volatile int8_t gFM_Step;
bool gFM_AutoScan;
uint8_t gFM_ChannelPosition;
bool gFM_FoundFrequency;
bool FM_CheckValidChannel(uint8_t Channel)
{
@ -118,7 +119,7 @@ void FM_Tune(uint16_t Frequency, int8_t Step, bool bFlag)
gFmPlayCountdown = 10;
}
gScheduleFM = false;
g_20000427 = 0;
gFM_FoundFrequency = false;
gAskToSave = false;
gAskToDelete = false;
gEeprom.FM_FrequencyPlaying = Frequency;
@ -387,7 +388,7 @@ static void FM_Key_MENU(bool bKeyPressed, bool bKeyHeld)
}
}
} else {
if (gFM_AutoScan || g_20000427 != 1) {
if (gFM_AutoScan || !gFM_FoundFrequency) {
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
gInputBoxIndex = 0;
return;
@ -498,7 +499,7 @@ void FM_Play(void)
if (!FM_CheckFrequencyLock(gEeprom.FM_FrequencyPlaying, gEeprom.FM_LowerLimit)) {
if (!gFM_AutoScan) {
gFmPlayCountdown = 0;
g_20000427 = 1;
gFM_FoundFrequency = true;
if (!gEeprom.FM_IsMrMode) {
gEeprom.FM_SelectedFrequency = gEeprom.FM_FrequencyPlaying;
}

View File

@ -31,6 +31,7 @@ extern bool gFM_AutoScan;
extern uint8_t gFM_ChannelPosition;
// Doubts about whether this should be signed or not.
extern int16_t gFM_FrequencyDeviation;
extern bool gFM_FoundFrequency;
bool FM_CheckValidChannel(uint8_t Channel);
uint8_t FM_FindNextChannel(uint8_t Channel, uint8_t Direction);

1
misc.c
View File

@ -126,7 +126,6 @@ uint32_t g_20000418;
uint8_t g_2000041F;
uint8_t g_20000420;
uint16_t g_20000422;
uint8_t g_20000427;
bool gKeyBeingHeld;
bool gPttIsPressed;
uint8_t gPttDebounceCounter;

1
misc.h
View File

@ -151,7 +151,6 @@ extern uint32_t g_20000418;
extern uint8_t g_2000041F;
extern uint8_t g_20000420;
extern uint16_t g_20000422;
extern uint8_t g_20000427;
extern bool gKeyBeingHeld;
extern bool gPttIsPressed;
extern uint8_t gPttDebounceCounter;