mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 06:39:49 +03:00
reduce FM radio compile size if only 1 band used
This commit is contained in:
@ -346,7 +346,8 @@ void ACTION_Scan(bool bRestart)
|
||||
if (g_current_function != FUNCTION_TRANSMIT)
|
||||
{
|
||||
if (g_fm_radio_mode)
|
||||
{
|
||||
{ // return normal service
|
||||
|
||||
FM_TurnOff();
|
||||
|
||||
g_input_box_index = 0;
|
||||
@ -359,6 +360,8 @@ void ACTION_Scan(bool bRestart)
|
||||
return;
|
||||
}
|
||||
|
||||
// switch to FM radio mode
|
||||
|
||||
g_monitor_enabled = false;
|
||||
|
||||
RADIO_select_vfos();
|
||||
|
10
app/app.c
10
app/app.c
@ -469,11 +469,6 @@ bool APP_start_listening(void)
|
||||
if (g_setting_backlight_on_tx_rx >= 2)
|
||||
backlight_turn_on(backlight_tx_rx_time_500ms);
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (g_fm_radio_mode)
|
||||
BK1080_Init(0, false);
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_MDC1200
|
||||
// MDC1200_reset_rx();
|
||||
#endif
|
||||
@ -558,6 +553,11 @@ bool APP_start_listening(void)
|
||||
AUDIO_set_mod_mode(g_rx_vfo->am_mode);
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (g_fm_radio_mode)
|
||||
BK1080_Init(0, false); // disable the FM radio audio
|
||||
#endif
|
||||
|
||||
// enable the speaker
|
||||
g_speaker_enabled = true;
|
||||
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_SPEAKER);
|
||||
|
Reference in New Issue
Block a user