0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 06:39:49 +03:00

Fixed keypad-5 noaa bug

This commit is contained in:
OneOfEleven
2023-09-15 22:48:06 +01:00
parent eb7dcceaab
commit 540906cc3f
12 changed files with 47 additions and 26 deletions

View File

@ -475,9 +475,7 @@ void APP_StartListening(FUNCTION_Type_t Function)
void APP_SetFrequencyByStep(VFO_Info_t *pInfo, int8_t Step)
{
uint32_t Frequency;
Frequency = pInfo->ConfigRX.Frequency + (Step * pInfo->StepFrequency);
uint32_t Frequency = pInfo->ConfigRX.Frequency + (Step * pInfo->StepFrequency);
if (pInfo->StepFrequency == 833)
{
@ -493,12 +491,12 @@ void APP_SetFrequencyByStep(VFO_Info_t *pInfo, int8_t Step)
}
if (Frequency > UpperLimitFrequencyBandTable[pInfo->Band])
pInfo->ConfigRX.Frequency = LowerLimitFrequencyBandTable[pInfo->Band];
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;
Frequency = FREQUENCY_FloorToStep(UpperLimitFrequencyBandTable[pInfo->Band], pInfo->StepFrequency, LowerLimitFrequencyBandTable[pInfo->Band]);
pInfo->ConfigRX.Frequency = Frequency;
}
static void FREQ_NextChannel(void)
@ -1201,7 +1199,7 @@ void APP_TimeSlice10ms(void)
#ifdef ENABLE_BOOT_BEEPS
if (boot_counter < 255)
if ((boot_counter % 25) == 0)
AUDIO_PlayBeep(BEEP_440HZ_40MS_OPTIONAL);
AUDIO_PlayBeep(BEEP_880HZ_40MS_OPTIONAL);
#endif
if (UART_IsCommandAvailable())

View File

@ -161,8 +161,6 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
break;
case KEY_5:
// TODO: something wrong here !!
#ifdef ENABLE_NOAA
if (IS_NOT_NOAA_CHANNEL(gTxVfo->CHANNEL_SAVE))
{
@ -175,16 +173,9 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
gAnotherVoiceID = VOICE_ID_FREQUENCY_MODE;
#endif
}
#else
//gEeprom.ScreenChannel[Vfo] = gEeprom.NoaaChannel[gEeprom.TX_CHANNEL];
gEeprom.ScreenChannel[Vfo] = gEeprom.FreqChannel[gEeprom.TX_CHANNEL];
#ifdef ENABLE_VOICE
gAnotherVoiceID = VOICE_ID_FREQUENCY_MODE;
#endif
gRequestSaveVFO = true;
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
#endif
gRequestSaveVFO = true;
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
break;
case KEY_6: