diff --git a/Makefile b/Makefile index dc08b61..26664ea 100644 --- a/Makefile +++ b/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 diff --git a/README.md b/README.md index 4210f16..16750eb 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/app/app.c b/app/app.c index 2c8cd16..2dfea03 100644 --- a/app/app.c +++ b/app/app.c @@ -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; diff --git a/app/app.h b/app/app.h index c4e9fb0..9d8bdd3 100644 --- a/app/app.h +++ b/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 diff --git a/app/main.c b/app/main.c index 24e3c05..ed5f9b3 100644 --- a/app/main.c +++ b/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; } diff --git a/firmware.bin b/firmware.bin index b8751d7..e8ab50c 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index dba1f28..17d52a5 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ