0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 14:21:25 +03:00

Fast manual up/down frequency scan

This commit is contained in:
OneOfEleven 2023-10-16 06:54:27 +01:00
parent 244c4f1091
commit 7b44bb6253
6 changed files with 12 additions and 3 deletions

View File

@ -340,7 +340,7 @@ void ACTION_Scan(bool bRestart)
} }
#endif #endif
void ACTION_Handle(key_code_t Key, bool key_pressed, bool key_held) void ACTION_process(const key_code_t Key, const bool key_pressed, const bool key_held)
{ {
uint8_t Short = ACTION_OPT_NONE; uint8_t Short = ACTION_OPT_NONE;
uint8_t Long = ACTION_OPT_NONE; uint8_t Long = ACTION_OPT_NONE;

View File

@ -33,7 +33,7 @@ void ACTION_Scan(bool bFlag);
void ACTION_FM(void); void ACTION_FM(void);
#endif #endif
void ACTION_Handle(key_code_t Key, bool bKeyPressed, bool bKeyHeld); void ACTION_process(const key_code_t Key, const bool bKeyPressed, const bool bKeyHeld);
#endif #endif

View File

@ -2665,7 +2665,7 @@ static void APP_process_key(const key_code_t Key, const bool key_pressed, const
if (g_screen_to_display != DISPLAY_SEARCH) if (g_screen_to_display != DISPLAY_SEARCH)
#endif #endif
{ {
ACTION_Handle(Key, key_pressed, key_held); ACTION_process(Key, key_pressed, key_held);
} }
else else
{ {

View File

@ -723,6 +723,10 @@ static void MAIN_Key_UP_DOWN(bool key_pressed, bool key_held, scan_state_dir_t D
// only update eeprom when the key is released (saves wear and tear) // only update eeprom when the key is released (saves wear and tear)
if (!key_pressed && g_scan_state_dir == SCAN_STATE_DIR_OFF && IS_NOT_NOAA_CHANNEL(Channel) && IS_FREQ_CHANNEL(Channel)) if (!key_pressed && g_scan_state_dir == SCAN_STATE_DIR_OFF && IS_NOT_NOAA_CHANNEL(Channel) && IS_FREQ_CHANNEL(Channel))
{ {
// monitor off
if (key_held && !key_pressed && g_current_function == FUNCTION_MONITOR)
APP_start_listening(FUNCTION_RECEIVE, false);
SETTINGS_SaveChannel(g_tx_vfo->channel_save, g_eeprom.tx_vfo, g_tx_vfo, 1); SETTINGS_SaveChannel(g_tx_vfo->channel_save, g_eeprom.tx_vfo, g_tx_vfo, 1);
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG) #if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG)
@ -794,6 +798,11 @@ static void MAIN_Key_UP_DOWN(bool key_pressed, bool key_held, scan_state_dir_t D
} }
else else
{ // don't need to go through all the other stuff { // don't need to go through all the other stuff
// open the squelch
if (key_held && key_pressed && g_current_function != FUNCTION_MONITOR)
APP_start_listening(FUNCTION_MONITOR, false);
BK4819_set_rf_frequency(frequency, true); BK4819_set_rf_frequency(frequency, true);
//BK4819_PickRXFilterPathBasedOnFrequency(frequency); //BK4819_PickRXFilterPathBasedOnFrequency(frequency);
} }

Binary file not shown.

Binary file not shown.