diff --git a/app/aircopy.c b/app/aircopy.c index deca40e9..5c2372bf 100644 --- a/app/aircopy.c +++ b/app/aircopy.c @@ -115,7 +115,7 @@ static void AIRCOPY_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) gInputBoxIndex = 0; NUMBER_Get(gInputBox, &Frequency); for (i = 0; i < 7; i++) { - if (Frequency >= gLowerLimitFrequencyBandTable[i] && Frequency <= gUpperLimitFrequencyBandTable[i]) { + if (Frequency >= LowerLimitFrequencyBandTable[i] && Frequency <= UpperLimitFrequencyBandTable[i]) { gAnotherVoiceID = (VOICE_ID_t)Key; gRxVfo->Band = i; Frequency += 75; diff --git a/app/app.c b/app/app.c index 478f4fd0..b2672632 100644 --- a/app/app.c +++ b/app/app.c @@ -381,10 +381,10 @@ void APP_SetFrequencyByStep(VFO_Info_t *pInfo, int8_t Step) uint32_t Frequency; Frequency = pInfo->ConfigRX.Frequency + (Step * pInfo->StepFrequency); - if (Frequency > gUpperLimitFrequencyBandTable[pInfo->Band]) { - pInfo->ConfigRX.Frequency = gLowerLimitFrequencyBandTable[pInfo->Band]; - } else if (Frequency < gLowerLimitFrequencyBandTable[pInfo->Band]) { - pInfo->ConfigRX.Frequency = FREQUENCY_FloorToStep(gUpperLimitFrequencyBandTable[pInfo->Band], pInfo->StepFrequency, gLowerLimitFrequencyBandTable[pInfo->Band]); + if (Frequency > UpperLimitFrequencyBandTable[pInfo->Band]) { + pInfo->ConfigRX.Frequency = LowerLimitFrequencyBandTable[pInfo->Band]; + } else if (Frequency < LowerLimitFrequencyBandTable[pInfo->Band]) { + pInfo->ConfigRX.Frequency = FREQUENCY_FloorToStep(UpperLimitFrequencyBandTable[pInfo->Band], pInfo->StepFrequency, LowerLimitFrequencyBandTable[pInfo->Band]); } else { pInfo->ConfigRX.Frequency = Frequency; } diff --git a/app/main.c b/app/main.c index 571bb4a1..b389638b 100644 --- a/app/main.c +++ b/app/main.c @@ -85,7 +85,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) uint8_t i; for (i = 0; i < 7; i++) { - if (Frequency <= gUpperLimitFrequencyBandTable[i] && (gLowerLimitFrequencyBandTable[i] <= Frequency)) { + if (Frequency <= UpperLimitFrequencyBandTable[i] && (LowerLimitFrequencyBandTable[i] <= Frequency)) { gAnotherVoiceID = (VOICE_ID_t)Key; if (gTxVfo->Band != i) { gTxVfo->Band = i; @@ -98,7 +98,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) gTxVfo->ConfigRX.Frequency = FREQUENCY_FloorToStep( Frequency, gTxVfo->StepFrequency, - gLowerLimitFrequencyBandTable[gTxVfo->Band] + LowerLimitFrequencyBandTable[gTxVfo->Band] ); gRequestSaveChannel = 1; return; diff --git a/board.c b/board.c index 3b840ffd..c7e058bb 100644 --- a/board.c +++ b/board.c @@ -683,9 +683,6 @@ void BOARD_EEPROM_Init(void) EEPROM_ReadBuffer(0x0F40, Data, 8); gSetting_F_LOCK = (Data[0] < 6) ? Data[0] : F_LOCK_OFF; - gUpperLimitFrequencyBandTable = UpperLimitFrequencyBandTable; - gLowerLimitFrequencyBandTable = LowerLimitFrequencyBandTable; - gSetting_350TX = (Data[1] < 2) ? Data[1] : true; gSetting_KILLED = (Data[2] < 2) ? Data[2] : false; gSetting_200TX = (Data[3] < 2) ? Data[3] : false; diff --git a/misc.h b/misc.h index 76929f50..20a7db3e 100644 --- a/misc.h +++ b/misc.h @@ -79,9 +79,6 @@ enum CssScanMode_t { typedef enum CssScanMode_t CssScanMode_t; -extern const uint32_t *gUpperLimitFrequencyBandTable; -extern const uint32_t *gLowerLimitFrequencyBandTable; - extern bool gSetting_350TX; extern bool gSetting_KILLED; extern bool gSetting_200TX; diff --git a/radio.c b/radio.c index 04cd104a..3bdacf93 100644 --- a/radio.c +++ b/radio.c @@ -194,7 +194,7 @@ void RADIO_ConfigureChannel(uint8_t VFO, uint32_t Configure) gEeprom.ScreenChannel[VFO] = gEeprom.FreqChannel[VFO]; } Index = Channel - FREQ_CHANNEL_FIRST; - RADIO_InitInfo(pRadio, Channel, Index, gLowerLimitFrequencyBandTable[Index]); + RADIO_InitInfo(pRadio, Channel, Index, LowerLimitFrequencyBandTable[Index]); return; } @@ -321,12 +321,12 @@ void RADIO_ConfigureChannel(uint8_t VFO, uint32_t Configure) } Frequency = pRadio->ConfigRX.Frequency; - if (Frequency < gLowerLimitFrequencyBandTable[Band]) { - pRadio->ConfigRX.Frequency = gLowerLimitFrequencyBandTable[Band]; - } else if (Frequency > gUpperLimitFrequencyBandTable[Band]) { - pRadio->ConfigRX.Frequency = gUpperLimitFrequencyBandTable[Band]; + if (Frequency < LowerLimitFrequencyBandTable[Band]) { + pRadio->ConfigRX.Frequency = LowerLimitFrequencyBandTable[Band]; + } else if (Frequency > UpperLimitFrequencyBandTable[Band]) { + pRadio->ConfigRX.Frequency = UpperLimitFrequencyBandTable[Band]; } else if (Channel >= FREQ_CHANNEL_FIRST) { - pRadio->ConfigRX.Frequency = FREQUENCY_FloorToStep(pRadio->ConfigRX.Frequency, gEeprom.VfoInfo[VFO].StepFrequency, gLowerLimitFrequencyBandTable[Band]); + pRadio->ConfigRX.Frequency = FREQUENCY_FloorToStep(pRadio->ConfigRX.Frequency, gEeprom.VfoInfo[VFO].StepFrequency, LowerLimitFrequencyBandTable[Band]); } if (Frequency >= 10800000 && Frequency <= 13599990) {