Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Identified some more differences.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dual Tachyon authored and Dual Tachyon committed Oct 16, 2023
1 parent 8aa434d commit 79a1819
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion app/aircopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions app/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions app/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 79a1819

Please sign in to comment.