0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 06:11:24 +03:00

scan ignore resuming update

This commit is contained in:
OneOfEleven 2023-12-08 14:48:22 +00:00
parent ee6cf6bd8e
commit ade0b61c67
7 changed files with 50 additions and 30 deletions

View File

@ -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

View File

@ -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;

View File

@ -30,5 +30,8 @@ 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

View File

@ -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 &&
@ -191,6 +212,7 @@ void toggle_chan_scanlist(void)
g_update_menu = false;
g_current_display_screen = DISPLAY_MENU;
g_update_display = false;
UI_DisplayMenu();
}
@ -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;
}

Binary file not shown.

Binary file not shown.