mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-27 22:01:26 +03:00
scan ignore resuming update
This commit is contained in:
parent
ee6cf6bd8e
commit
ade0b61c67
4
Makefile
4
Makefile
@ -40,6 +40,7 @@ ENABLE_MDC1200_SIDE_BEEP := 1
|
||||
ENABLE_PWRON_PASSWORD := 0
|
||||
ENABLE_RESET_AES_KEY := 0
|
||||
ENABLE_BIG_FREQ := 0
|
||||
# DTMF_CALLING 2.8 kB
|
||||
ENABLE_DTMF_CALLING := 0
|
||||
ENABLE_DTMF_LIVE_DECODER := 1
|
||||
ENABLE_DTMF_TIMING_SETTINGS := 0
|
||||
@ -57,7 +58,8 @@ ENABLE_WIDE_RX := 1
|
||||
ENABLE_TX_WHEN_AM := 0
|
||||
# Frequency calibration 188 B
|
||||
ENABLE_F_CAL_MENU := 0
|
||||
ENABLE_FM_DEV_CAL_MENU := 1
|
||||
# FM DEV CAL 250 B
|
||||
ENABLE_FM_DEV_CAL_MENU := 0
|
||||
ENABLE_TX_UNLOCK_MENU := 0
|
||||
#ENABLE_TX_POWER_CAL_MENU := 0
|
||||
ENABLE_TX_POWER_FIX := 1
|
||||
|
@ -89,7 +89,7 @@ ENABLE_FREQ_SEARCH_TIMEOUT := 0 timeout if FREQ not found when using
|
||||
ENABLE_CODE_SEARCH_TIMEOUT := 0 timeout if CTCSS/CDCSS not found when using F+* search function
|
||||
ENABLE_SCAN_IGNORE_LIST := 0 ignore selected frequencies when scanning - add freqs to list with short */scan button when freq scanning, remove freq from list with long press MENU when not scanning
|
||||
ENABLE_SCAN_RANGES := 0 adds menu option to auto select frequency scan range/step depending on your initial frequency
|
||||
ENABLE_DTMF_KILL_REVIVE := 0 include kill and revive code
|
||||
ENABLE_DTMF_KILL_REVIVE := 0 include kill and revive code
|
||||
ENABLE_AM_FIX := 1 dynamically adjust the front end gains when in AM mode to help prevent AM demodulator saturation, ignore the on-screen RSSI level (for now)
|
||||
ENABLE_AM_FIX_SHOW_DATA := 0 show debug data for the AM fix (still tweaking it)
|
||||
ENABLE_SQUELCH_MORE_SENSITIVE := 1 make squelch levels a little bit more sensitive - I plan to let user adjust the values themselves
|
||||
|
@ -705,7 +705,7 @@ void APP_stop_scan(void)
|
||||
g_update_status = true;
|
||||
}
|
||||
|
||||
static void APP_next_freq(void)
|
||||
void APP_next_freq(void)
|
||||
{
|
||||
uint32_t freq = g_tx_vfo->freq_config_rx.frequency;
|
||||
|
||||
@ -774,7 +774,7 @@ static void APP_next_freq(void)
|
||||
g_update_display = true;
|
||||
}
|
||||
|
||||
static void APP_next_channel(void)
|
||||
void APP_next_channel(void)
|
||||
{
|
||||
static unsigned int prevChannel = 0;
|
||||
const unsigned int index = g_eeprom.config.setting.scan_list_default;
|
||||
@ -1702,7 +1702,8 @@ void APP_process_scan(void)
|
||||
}
|
||||
else
|
||||
if (g_scan_tick_10ms == 0)
|
||||
{ // switch to next channel
|
||||
{ // hop to next channel/freq
|
||||
|
||||
g_scan_pause_time_mode = false;
|
||||
g_rx_reception_mode = RX_MODE_NONE;
|
||||
|
||||
|
15
app/app.h
15
app/app.h
@ -23,12 +23,15 @@
|
||||
#include "frequencies.h"
|
||||
#include "radio.h"
|
||||
|
||||
void APP_end_tx(void);
|
||||
void APP_stop_scan(void);
|
||||
void APP_channel_next(const bool remember_current, const scan_state_dir_t scan_direction);
|
||||
bool APP_start_listening(void);
|
||||
void APP_time_slice_10ms(void);
|
||||
void APP_time_slice_500ms(void);
|
||||
void APP_end_tx(void);
|
||||
void APP_stop_scan(void);
|
||||
void APP_channel_next(const bool remember_current, const scan_state_dir_t scan_direction);
|
||||
bool APP_start_listening(void);
|
||||
void APP_time_slice_10ms(void);
|
||||
void APP_time_slice_500ms(void);
|
||||
|
||||
void APP_next_freq(void);
|
||||
void APP_next_channel(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
52
app/main.c
52
app/main.c
@ -51,6 +51,27 @@
|
||||
|
||||
bool g_manual_scanning;
|
||||
|
||||
void resume_scanning(void)
|
||||
{
|
||||
g_scan_tick_10ms = 0;
|
||||
g_scan_pause_time_mode = false;
|
||||
g_squelch_open = false;
|
||||
g_rx_reception_mode = RX_MODE_NONE;
|
||||
|
||||
FUNCTION_Select(FUNCTION_FOREGROUND);
|
||||
|
||||
if (g_current_display_screen != DISPLAY_SEARCH &&
|
||||
g_scan_state_dir != SCAN_STATE_DIR_OFF &&
|
||||
!g_ptt_is_pressed)
|
||||
{
|
||||
if (g_scan_next_channel <= USER_CHANNEL_LAST)
|
||||
APP_next_channel();
|
||||
else
|
||||
if (IS_FREQ_CHANNEL(g_scan_next_channel))
|
||||
APP_next_freq();
|
||||
}
|
||||
}
|
||||
|
||||
bool scanning_paused(void)
|
||||
{
|
||||
if (g_scan_state_dir != SCAN_STATE_DIR_OFF &&
|
||||
@ -187,10 +208,11 @@ void toggle_chan_scanlist(void)
|
||||
// UART_printf("vfo to mem %u\r\n", chan);
|
||||
#endif
|
||||
|
||||
g_sub_menu_selection = chan;
|
||||
g_update_menu = false;
|
||||
g_current_display_screen = DISPLAY_MENU;
|
||||
g_update_display = false;
|
||||
g_sub_menu_selection = chan;
|
||||
g_update_menu = false;
|
||||
g_current_display_screen = DISPLAY_MENU;
|
||||
g_update_display = false;
|
||||
|
||||
UI_DisplayMenu();
|
||||
}
|
||||
|
||||
@ -358,9 +380,9 @@ void processFKeyFunction(const key_code_t Key)
|
||||
|
||||
APP_stop_scan();
|
||||
|
||||
g_search_flag_start_scan = true;
|
||||
g_search_single_frequency = false;
|
||||
g_backup_cross_vfo = g_eeprom.config.setting.cross_vfo;
|
||||
g_search_flag_start_scan = true;
|
||||
g_search_single_frequency = false;
|
||||
g_backup_cross_vfo = g_eeprom.config.setting.cross_vfo;
|
||||
g_eeprom.config.setting.cross_vfo = CROSS_BAND_OFF;
|
||||
break;
|
||||
|
||||
@ -765,8 +787,8 @@ void MAIN_Key_EXIT(bool key_pressed, bool key_held)
|
||||
|
||||
if (g_input_box_index > 0 || g_dtmf_input_box_index > 0 || g_dtmf_input_mode)
|
||||
{ // cancel key input mode (channel/frequency entry)
|
||||
g_dtmf_input_mode = false;
|
||||
g_dtmf_input_box_index = 0;
|
||||
g_dtmf_input_mode = false;
|
||||
g_dtmf_input_box_index = 0;
|
||||
memset(g_dtmf_string, 0, sizeof(g_dtmf_string));
|
||||
g_input_box_index = 0;
|
||||
g_request_display_screen = DISPLAY_MAIN;
|
||||
@ -899,11 +921,7 @@ void MAIN_Key_STAR(bool key_pressed, bool key_held)
|
||||
g_beep_to_play = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL; // not added for some reason
|
||||
|
||||
// immediately continue the scan
|
||||
g_scan_tick_10ms = 0;
|
||||
g_scan_pause_time_mode = false;
|
||||
g_squelch_open = false;
|
||||
g_rx_reception_mode = RX_MODE_NONE;
|
||||
FUNCTION_Select(FUNCTION_FOREGROUND);
|
||||
resume_scanning();
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1195,11 +1213,7 @@ void MAIN_Key_UP_DOWN(bool key_pressed, bool key_held, scan_state_dir_t directio
|
||||
APP_channel_next(false, direction);
|
||||
|
||||
// go NOW
|
||||
g_scan_tick_10ms = 0;
|
||||
g_scan_pause_time_mode = false;
|
||||
g_squelch_open = false;
|
||||
g_rx_reception_mode = RX_MODE_NONE;
|
||||
FUNCTION_Select(FUNCTION_FOREGROUND);
|
||||
resume_scanning();
|
||||
|
||||
g_ptt_was_released = true;
|
||||
}
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user