diff --git a/app/app.c b/app/app.c index c760afa..9dfe7bc 100644 --- a/app/app.c +++ b/app/app.c @@ -1866,6 +1866,19 @@ void APP_time_slice_500ms(void) } } + if (g_update_screen_tick_500ms > 0) + { // update display once every 500ms + if (--g_update_screen_tick_500ms == 0) + { + RADIO_set_vfo_state(VFO_STATE_NORMAL); + + g_update_status = true; + g_update_display = true; + } + //g_update_status = true; + //g_update_display = true; + } + #ifdef ENABLE_MDC1200 if (mdc1200_rx_ready_tick_500ms > 0) { @@ -1896,6 +1909,12 @@ void APP_time_slice_500ms(void) } } + #ifdef ENABLE_TX_TIMEOUT_BAR + if (g_current_function == FUNCTION_TRANSMIT && g_tx_timer_tick_500ms & 1u)) + g_update_display = true; +// UI_DisplayTXCountdown(true); + #endif + if (g_menu_tick_10ms > 0) if (--g_menu_tick_10ms == 0) exit_menu = (g_current_display_screen == DISPLAY_MENU); // exit menu mode @@ -2117,8 +2136,6 @@ void APP_time_slice_500ms(void) { if (--g_fm_resume_tick_500ms == 0) { - RADIO_set_vfo_state(VFO_STATE_NORMAL); - if (g_current_function != FUNCTION_RECEIVE && g_fm_radio_mode) { // switch back to FM radio mode if (g_current_display_screen != DISPLAY_FM) @@ -2188,11 +2205,6 @@ void APP_time_slice_500ms(void) g_update_display = true; } } - - #ifdef ENABLE_TX_TIMEOUT_BAR - if (g_current_function == FUNCTION_TRANSMIT && (g_tx_timer_tick_500ms & 1u)) - UI_DisplayTXCountdown(true); - #endif } void APP_time_slice_10ms(void) diff --git a/firmware.bin b/firmware.bin index 65d9e37..def3602 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index afb25c2..0a702fd 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ diff --git a/misc.c b/misc.c index dd401a2..41461c8 100644 --- a/misc.c +++ b/misc.c @@ -157,6 +157,8 @@ volatile uint16_t g_tail_tone_elimination_tick_10ms; volatile uint16_t g_noaa_tick_10ms; #endif +uint8_t g_update_screen_tick_500ms; + uint8_t g_key_input_count_down; #ifdef ENABLE_KEYLOCK uint8_t g_key_lock_tick_500ms; diff --git a/misc.h b/misc.h index a8e6abf..226e323 100644 --- a/misc.h +++ b/misc.h @@ -250,6 +250,8 @@ extern volatile uint16_t g_tail_tone_elimination_tick_10ms; extern volatile uint16_t g_noaa_tick_10ms; #endif +extern uint8_t g_update_screen_tick_500ms; + extern uint8_t g_key_input_count_down; #ifdef ENABLE_KEYLOCK diff --git a/radio.c b/radio.c index 0538160..8bb0fbd 100644 --- a/radio.c +++ b/radio.c @@ -977,10 +977,8 @@ void RADIO_set_vfo_state(vfo_state_t State) g_vfo_state[vfo] = State; } - #ifdef ENABLE_FMRADIO - if (g_fm_radio_mode && g_fm_resume_tick_500ms < fm_resume_500ms) - g_fm_resume_tick_500ms = fm_resume_500ms; - #endif + // cause a display update to remove the message + g_update_screen_tick_500ms = 8; // 4 seconds } g_update_display = true; diff --git a/ui/fmradio.c b/ui/fmradio.c index 2a5637d..9cd014c 100644 --- a/ui/fmradio.c +++ b/ui/fmradio.c @@ -141,8 +141,9 @@ void UI_DisplayFM(void) // ************************************* - // can't do this during FM radio - audio clicks else - if (g_fm_scan_state_dir != FM_SCAN_STATE_DIR_OFF || g_fm_resume_tick_500ms > 0) + if (!g_ask_to_delete && + !g_ask_to_save && + (g_fm_scan_state_dir != FM_SCAN_STATE_DIR_OFF || g_fm_resume_tick_500ms > 0)) { const uint16_t rssi_status = BK1080_ReadRegister(BK1080_REG_10); const uint16_t dev_snr = BK1080_ReadRegister(BK1080_REG_07);