mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-08-03 01:26:33 +03:00
.
This commit is contained in:
@@ -263,7 +263,7 @@ void ACTION_Scan(bool bRestart)
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SCAN_RANGES
|
||||
if (IS_FREQ_CHANNEL(g_tx_vfo->channel_save))
|
||||
if (IS_FREQ_CHANNEL(g_tx_vfo->channel_save) && g_eeprom.config.setting.scan_ranges_enable)
|
||||
{
|
||||
const uint32_t freq = g_tx_vfo->freq_config_rx.frequency;
|
||||
FREQUENCY_scan_range(freq, &g_scan_initial_lower, &g_scan_initial_upper, &g_scan_initial_step_size);
|
||||
|
@@ -673,7 +673,8 @@ static void APP_next_freq(void)
|
||||
|
||||
// round
|
||||
#ifdef ENABLE_SCAN_RANGES
|
||||
freq = g_scan_initial_lower + ((((freq - g_scan_initial_lower) + (g_scan_initial_step_size / 2)) / g_scan_initial_step_size) * g_scan_initial_step_size);
|
||||
if (g_eeprom.config.setting.scan_ranges_enable)
|
||||
freq = g_scan_initial_lower + ((((freq - g_scan_initial_lower) + (g_scan_initial_step_size / 2)) / g_scan_initial_step_size) * g_scan_initial_step_size);
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_SCAN_IGNORE_LIST
|
||||
|
@@ -1026,7 +1026,8 @@ void MAIN_Key_UP_DOWN(bool key_pressed, bool key_held, scan_state_dir_t directio
|
||||
g_scan_initial_step_size = g_tx_vfo->step_freq;
|
||||
|
||||
#ifdef ENABLE_SCAN_RANGES
|
||||
//FREQUENCY_scan_range(freq, &g_scan_initial_lower, &g_scan_initial_upper, &g_scan_initial_step_size);
|
||||
//if (g_eeprom.config.setting.scan_ranges_enable)
|
||||
// FREQUENCY_scan_range(freq, &g_scan_initial_lower, &g_scan_initial_upper, &g_scan_initial_step_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
17
app/menu.c
17
app/menu.c
@@ -238,7 +238,10 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
|
||||
case MENU_BUSY_CHAN_LOCK:
|
||||
case MENU_BEEP:
|
||||
#ifdef ENABLE_KEYLOCK
|
||||
case MENU_AUTO_KEY_LOCK:
|
||||
case MENU_AUTO_KEY_LOCK:
|
||||
#endif
|
||||
#ifdef ENABLE_SCAN_RANGES
|
||||
case MENU_SCAN_RANGES:
|
||||
#endif
|
||||
case MENU_S_ADD1:
|
||||
case MENU_S_ADD2:
|
||||
@@ -632,6 +635,12 @@ void MENU_AcceptSetting(void)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_SCAN_RANGES
|
||||
case MENU_SCAN_RANGES:
|
||||
g_eeprom.config.setting.scan_ranges_enable = g_sub_menu_selection;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case MENU_S_ADD1:
|
||||
g_tx_vfo->channel_attributes.scanlist1 = g_sub_menu_selection;
|
||||
SETTINGS_save_chan_attribs_name(g_tx_vfo->channel_save, g_tx_vfo);
|
||||
@@ -1107,6 +1116,12 @@ void MENU_ShowCurrentSetting(void)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_SCAN_RANGES
|
||||
case MENU_SCAN_RANGES:
|
||||
g_sub_menu_selection = g_eeprom.config.setting.scan_ranges_enable;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case MENU_S_ADD1:
|
||||
g_sub_menu_selection = g_tx_vfo->channel_attributes.scanlist1;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user