Refactor frequency rounding

This commit is contained in:
Krzysiek Egzmont
2023-10-24 01:58:40 +02:00
parent 8b41a1fa66
commit a510b89c6a
9 changed files with 33 additions and 75 deletions

View File

@@ -141,8 +141,7 @@ static void AIRCOPY_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
gAnotherVoiceID = (VOICE_ID_t)Key;
#endif
gRxVfo->Band = i;
Frequency += 75;
Frequency = FREQUENCY_FloorToStep(Frequency, gRxVfo->StepFrequency, 0);
Frequency = FREQUENCY_RoundToStep(Frequency, gRxVfo->StepFrequency);
gRxVfo->freq_config_RX.Frequency = Frequency;
gRxVfo->freq_config_TX.Frequency = Frequency;
RADIO_ConfigureSquelchAndOutputPower(gRxVfo);