mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 14:21:25 +03:00
.
This commit is contained in:
parent
81e9419647
commit
6f9b770b77
@ -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;
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
@ -210,6 +210,7 @@ uint32_t FREQUENCY_wrap_to_step_band(uint32_t freq, const uint32_t step_size, co
|
||||
{ 5000000, 5400000, 1000},
|
||||
{ 7000000, 7050000, 1250},
|
||||
{10800000, 11800000, 2500},
|
||||
// {11800000, 13700000, 833},
|
||||
{11800000, 13700000, 2500},
|
||||
{14400000, 14600000, 1250},
|
||||
{14400000, 14800000, 1250},
|
||||
|
@ -426,7 +426,10 @@ typedef struct {
|
||||
|
||||
uint8_t scan_hold_time; // ticks we stay paused for on an RX'ed signal when scanning
|
||||
|
||||
uint8_t unused12[7]; // 0xff's
|
||||
uint8_t scan_ranges_enable:1; // enable/disable auto scan ranges
|
||||
uint8_t unused11g:7; // 0xff's
|
||||
|
||||
uint8_t unused12[6]; // 0xff's
|
||||
#endif
|
||||
} __attribute__((packed)) setting;
|
||||
|
||||
|
@ -84,6 +84,9 @@ const t_menu_item g_menu_list[] =
|
||||
#endif
|
||||
#ifdef ENABLE_KEYLOCK
|
||||
{"KeyLOC", VOICE_ID_INVALID, MENU_AUTO_KEY_LOCK }, // was "AUTOLk"
|
||||
#endif
|
||||
#ifdef ENABLE_SCAN_RANGES
|
||||
{"S RANG", VOICE_ID_INVALID, MENU_SCAN_RANGES },
|
||||
#endif
|
||||
{"S ADD1", VOICE_ID_INVALID, MENU_S_ADD1 },
|
||||
{"S ADD2", VOICE_ID_INVALID, MENU_S_ADD2 },
|
||||
@ -765,6 +768,9 @@ void UI_DisplayMenu(void)
|
||||
#ifdef ENABLE_AM_FIX
|
||||
// case MENU_AM_FIX:
|
||||
#endif
|
||||
#ifdef ENABLE_SCAN_RANGES
|
||||
case MENU_SCAN_RANGES:
|
||||
#endif
|
||||
case MENU_S_ADD1:
|
||||
case MENU_S_ADD2:
|
||||
strcpy(str, g_sub_menu_off_on[g_sub_menu_selection]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user