0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 06:39:49 +03:00

Can now interrupt RF scanning with any other function

This commit is contained in:
OneOfEleven
2023-10-17 11:05:41 +01:00
parent 73572f24b1
commit d47cd80fd4
24 changed files with 529 additions and 459 deletions

View File

@ -59,6 +59,7 @@ const t_menu_item g_menu_list[] =
{"Tx TO", VOICE_ID_TRANSMIT_OVER_TIME, MENU_TOT }, // was "TOT"
{"Tx VFO", VOICE_ID_INVALID, MENU_XB }, // was "WX"
{"Dual W", VOICE_ID_DUAL_STANDBY, MENU_TDR }, // was "TDR"
{"S HOLD", VOICE_ID_INVALID, MENU_SCAN_HOLD },
{"SCRAM", VOICE_ID_SCRAMBLER_ON, MENU_SCR }, // was "SCR"
{"BCL", VOICE_ID_BUSY_LOCKOUT, MENU_BCL },
{"CH SAV", VOICE_ID_MEMORY_CHANNEL, MENU_MEM_CH }, // was "MEM-CH"
@ -853,6 +854,11 @@ void UI_DisplayMenu(void)
strcpy(String, g_sub_menu_off_on[g_sub_menu_selection]);
break;
case MENU_SCAN_HOLD:
strcpy(String, "SCAN HOLD\n");
sprintf(String + strlen(String), "%d.%d sec", g_sub_menu_selection / 2, 5 * (g_sub_menu_selection % 2));
break;
case MENU_XB:
strcpy(String, g_sub_menu_xb[g_sub_menu_selection]);
break;

View File

@ -53,6 +53,7 @@ enum
MENU_TOT,
MENU_XB,
MENU_TDR,
MENU_SCAN_HOLD,
MENU_SCR,
MENU_BCL,
MENU_MEM_CH,

View File

@ -23,6 +23,7 @@
#include "bitmaps.h"
#include "driver/keyboard.h"
#include "driver/st7565.h"
#include "app/dtmf.h"
#include "external/printf/printf.h"
#include "functions.h"
#include "helper/battery.h"
@ -135,19 +136,29 @@ void UI_DisplayStatus(const bool test_display)
// DUAL-WATCH indicator
if (g_eeprom.dual_watch != DUAL_WATCH_OFF || test_display)
{
if (g_scan_state_dir == SCAN_STATE_DIR_OFF ||
g_squelch_lost ||
g_current_function == FUNCTION_INCOMING ||
g_current_function == FUNCTION_MONITOR ||
g_screen_to_display == DISPLAY_SEARCH ||
test_display)
if (g_dual_watch_delay_10ms > dual_watch_delay_toggle_10ms ||
g_dtmf_call_state != DTMF_CALL_STATE_NONE ||
g_scan_state_dir != SCAN_STATE_DIR_OFF ||
g_css_scan_mode != CSS_SCAN_MODE_OFF ||
(g_current_function != FUNCTION_FOREGROUND && g_current_function != FUNCTION_POWER_SAVE) ||
g_screen_to_display == DISPLAY_SEARCH)
{
memmove(line + x, BITMAP_TDR1, sizeof(BITMAP_TDR1)); // dual-watch is paused
memmove(line + x, BITMAP_TDR_HOLDING, sizeof(BITMAP_TDR_HOLDING));
}
else
memmove(line + x, BITMAP_TDR2, sizeof(BITMAP_TDR2)); // dual-watch is running
{
memmove(line + x, BITMAP_TDR_RUNNING, sizeof(BITMAP_TDR_RUNNING));
}
x1 = x + sizeof(BITMAP_TDR_RUNNING);
}
x += sizeof(BITMAP_TDR1);
x += sizeof(BITMAP_TDR_RUNNING);
if (g_current_function == FUNCTION_MONITOR)
{
memmove(line + x, BITMAP_MONITOR, sizeof(BITMAP_MONITOR));
x1 = x + sizeof(BITMAP_MONITOR);
}
x += sizeof(BITMAP_MONITOR);
// CROSS-VFO indicator
if (g_eeprom.cross_vfo_rx_tx != CROSS_BAND_OFF || test_display)