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

FM radio updates

This commit is contained in:
OneOfEleven
2023-10-31 06:56:21 +00:00
parent b85ea562c7
commit 0a9765b2bd
36 changed files with 152 additions and 167 deletions

View File

@ -14,9 +14,6 @@
* limitations under the License.
*/
#include <string.h>
#include <stdlib.h> // abs()
#ifdef ENABLE_AM_FIX
#include "am_fix.h"
#endif
@ -1911,8 +1908,8 @@ void APP_time_slice_500ms(void)
if (g_fm_radio_tick_500ms > 0)
g_fm_radio_tick_500ms--;
if (g_fm_radio_mode && g_current_display_screen == DISPLAY_FM && g_fm_scan_state_dir != FM_SCAN_STATE_DIR_OFF)
g_update_display = true; // can't do this if not FM scanning, it causes audio clicks
// if (g_fm_radio_mode && g_current_display_screen == DISPLAY_FM && g_fm_scan_state_dir != FM_SCAN_STATE_DIR_OFF)
// g_update_display = true; // can't do this if not FM scanning, it causes audio clicks
#endif
if (g_backlight_count_down > 0 &&
@ -2116,18 +2113,23 @@ void APP_time_slice_500ms(void)
{
if (g_fm_resume_tick_500ms > 0)
{
if (--g_fm_resume_tick_500ms == 0)
if (g_fm_radio_mode)
{
RADIO_set_vfo_state(VFO_STATE_NORMAL);
if (g_current_function != FUNCTION_RECEIVE &&
!g_monitor_enabled &&
g_fm_radio_mode)
{ // switch back to FM radio mode
FM_turn_on();
GUI_SelectNextDisplay(DISPLAY_FM);
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)
FM_turn_on();
//GUI_SelectNextDisplay(DISPLAY_FM);
}
}
GUI_SelectNextDisplay(DISPLAY_FM);
}
else
FM_turn_off();
}
}