diff --git a/app/action.c b/app/action.c index 14178b0..8866984 100644 --- a/app/action.c +++ b/app/action.c @@ -340,7 +340,7 @@ void ACTION_Scan(bool bRestart) } #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 Long = ACTION_OPT_NONE; diff --git a/app/action.h b/app/action.h index b568599..fd8c909 100644 --- a/app/action.h +++ b/app/action.h @@ -33,7 +33,7 @@ void ACTION_Scan(bool bFlag); void ACTION_FM(void); #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 diff --git a/app/app.c b/app/app.c index bef0779..8f8a368 100644 --- a/app/app.c +++ b/app/app.c @@ -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) #endif { - ACTION_Handle(Key, key_pressed, key_held); + ACTION_process(Key, key_pressed, key_held); } else { diff --git a/app/main.c b/app/main.c index 5b91c5f..2505a2b 100644 --- a/app/main.c +++ b/app/main.c @@ -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) 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); #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 { // 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_PickRXFilterPathBasedOnFrequency(frequency); } diff --git a/firmware.bin b/firmware.bin index d62e32a..2b89ba3 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index ac0b7ef..98e4ac0 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ