0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-20 06:58:39 +03:00

added ignore freq compile option - use when frequency scanning, see README.md

This commit is contained in:
OneOfEleven
2023-11-03 15:19:29 +00:00
parent a3d603ea83
commit fba4ece9fd
10 changed files with 219 additions and 9 deletions

View File

@ -35,6 +35,9 @@
#endif
#include "dtmf.h"
#include "frequencies.h"
#ifdef ENABLE_SCAN_IGNORE_LIST
#include "freq_ignore.h"
#endif
#include "misc.h"
#include "radio.h"
#include "settings.h"
@ -807,14 +810,30 @@ void MAIN_Key_STAR(bool key_pressed, bool key_held)
return;
}
if (g_scan_state_dir != SCAN_STATE_DIR_OFF || g_current_function == FUNCTION_TRANSMIT)
{ // RF scanning or TX'ing
if (g_current_function == FUNCTION_TRANSMIT)
return;
}
if (!g_fkey_pressed)
{ // pressed without the F-key
if (g_scan_state_dir != SCAN_STATE_DIR_OFF)
{ // RF scanning
if (scanning_paused())
{
FI_add_freq_ignored(g_rx_vfo->freq_config_rx.frequency);
// immediately continue the scan
g_scan_pause_tick_10ms = 0;
g_scan_pause_time_mode = false;
g_squelch_open = false;
g_rx_reception_mode = RX_MODE_NONE;
FUNCTION_Select(FUNCTION_FOREGROUND);
}
return;
}
if (g_scan_state_dir == SCAN_STATE_DIR_OFF && IS_NOT_NOAA_CHANNEL(g_tx_vfo->channel_save))
{ // start entering a DTMF string
@ -833,6 +852,9 @@ void MAIN_Key_STAR(bool key_pressed, bool key_held)
{ // with the F-key
g_fkey_pressed = false;
if (g_scan_state_dir != SCAN_STATE_DIR_OFF)
return; // RF scanning
if (IS_NOAA_CHANNEL(g_tx_vfo->channel_save))
{
g_beep_to_play = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;