0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 06:11:24 +03:00

fix missing display update

This commit is contained in:
OneOfEleven 2023-10-31 10:07:29 +00:00
parent 0a9765b2bd
commit 2522b4184a
7 changed files with 28 additions and 13 deletions

View File

@ -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)

Binary file not shown.

Binary file not shown.

2
misc.c
View File

@ -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;

2
misc.h
View File

@ -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

View File

@ -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;

View File

@ -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);