0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-08-03 09:36:32 +03:00

Stop TX transmitting out of allowed frequency range when alarm is activated

This commit is contained in:
OneOfEleven
2023-10-06 19:31:29 +01:00
parent 5397b3ee88
commit b385b53af0
23 changed files with 423 additions and 388 deletions

View File

@@ -31,5 +31,6 @@ void INPUTBOX_Append(const KEY_Code_t Digit)
if (Digit >= KEY_0 && Digit != KEY_INVALID)
gInputBox[gInputBoxIndex++] = (char)(Digit - KEY_0);
// gInputBox[gInputBoxIndex++] = Digit;
}

View File

@@ -386,10 +386,8 @@ void UI_DisplayMain(void)
else
{
sprintf(String, ">%s", gDTMF_InputBox);
center_line = CENTER_LINE_IN_USE;
}
UI_PrintString(String, 2, 0, vfo_num * 3, 8);
UI_PrintString(String, 2, 0, 0 + (vfo_num * 3), 8);
memset(String, 0, sizeof(String));
if (!gDTMF_InputMode)
@@ -404,10 +402,6 @@ void UI_DisplayMain(void)
if (gDTMF_IsTx)
sprintf(String, ">%s", gDTMF_String);
}
else
{
center_line = CENTER_LINE_IN_USE;
}
UI_PrintString(String, 2, 0, 2 + (vfo_num * 3), 8);
center_line = CENTER_LINE_IN_USE;

View File

@@ -58,8 +58,8 @@ const t_menu_item MenuList[] =
{"SCRAM", VOICE_ID_SCRAMBLER_ON, MENU_SCR }, // was "SCR"
{"BUSYCL", VOICE_ID_BUSY_LOCKOUT, MENU_BCL }, // was "BCL"
{"CH SAV", VOICE_ID_MEMORY_CHANNEL, MENU_MEM_CH }, // was "MEM-CH"
{"CH DEL", VOICE_ID_DELETE_CHANNEL, MENU_DEL_CH }, // was "DEL-CH"
{"CH NAM", VOICE_ID_INVALID, MENU_MEM_NAME },
{"CH DEL", VOICE_ID_DELETE_CHANNEL, MENU_DEL_CH }, // was "DEL-CH"
{"CH DIS", VOICE_ID_INVALID, MENU_MDF }, // was "MDF"
{"BATSAV", VOICE_ID_SAVE_MODE, MENU_SAVE }, // was "SAVE"
#ifdef ENABLE_VOX
@@ -88,7 +88,7 @@ const t_menu_item MenuList[] =
{"SLIST1", VOICE_ID_INVALID, MENU_SLIST1 },
{"SLIST2", VOICE_ID_INVALID, MENU_SLIST2 },
#ifdef ENABLE_ALARM
{"AL-MOD", VOICE_ID_INVALID, MENU_AL_MOD },
{"ALMODE", VOICE_ID_INVALID, MENU_AL_MOD },
#endif
{"ANI ID", VOICE_ID_ANI_CODE, MENU_ANI_ID },
{"UPCODE", VOICE_ID_INVALID, MENU_UPCODE },

View File

@@ -28,6 +28,14 @@ typedef struct {
uint8_t menu_id;
} t_menu_item;
// currently this list MUST be in exactly the same order
// as the other menu list "MenuList[]" in "ui/menu.c", otherwise
// you'll have big problems
//
// I'm going to fix that so that you can reorder the menu items
// anyway you like simply by editing this list only (the other list
// you just leave as is, or any which way, it won't matter)
//
enum
{
MENU_SQL = 0,
@@ -45,8 +53,8 @@ enum
MENU_SCR,
MENU_BCL,
MENU_MEM_CH,
MENU_DEL_CH,
MENU_MEM_NAME,
MENU_DEL_CH,
MENU_MDF,
MENU_SAVE,
#ifdef ENABLE_VOX

45
ui/ui.c
View File

@@ -77,33 +77,28 @@ void GUI_DisplayScreen(void)
void GUI_SelectNextDisplay(GUI_DisplayType_t Display)
{
if (Display != DISPLAY_INVALID)
if (Display == DISPLAY_INVALID)
return;
if (gScreenToDisplay != Display)
{
if (gScreenToDisplay != Display)
{
gInputBoxIndex = 0;
gIsInSubMenu = false;
gCssScanMode = CSS_SCAN_MODE_OFF;
gScanStateDir = SCAN_OFF;
#ifdef ENABLE_FMRADIO
gFM_ScanState = FM_SCAN_OFF;
#endif
gAskForConfirmation = 0;
gDTMF_InputMode = false;
gDTMF_InputIndex = 0;
gAskToSave = false;
gAskToDelete = false;
DTMF_clear_input_box();
if (gWasFKeyPressed)
{
gWasFKeyPressed = false;
gUpdateStatus = true;
}
gInputBoxIndex = 0;
gIsInSubMenu = false;
gCssScanMode = CSS_SCAN_MODE_OFF;
gScanStateDir = SCAN_OFF;
#ifdef ENABLE_FMRADIO
gFM_ScanState = FM_SCAN_OFF;
#endif
gAskForConfirmation = 0;
gAskToSave = false;
gAskToDelete = false;
gWasFKeyPressed = false;
gUpdateStatus = true;
}
gUpdateDisplay = true;
gScreenToDisplay = Display;
gUpdateStatus = true;
}
gScreenToDisplay = Display;
gUpdateDisplay = true;
}