2023-09-09 07:03:56 +00:00
|
|
|
/* Copyright 2023 Dual Tachyon
|
|
|
|
* https://github.com/DualTachyon
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef UI_MENU_H
|
|
|
|
#define UI_MENU_H
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2023-09-21 07:46:24 +00:00
|
|
|
#include "audio.h" // VOICE_ID_t
|
|
|
|
|
|
|
|
typedef struct {
|
2023-09-24 08:00:34 +00:00
|
|
|
const char name[7]; // menu display area only has room for 6 characters
|
2023-09-21 07:46:24 +00:00
|
|
|
VOICE_ID_t voice_id;
|
2023-09-21 11:06:31 +00:00
|
|
|
uint8_t menu_id;
|
2023-09-21 07:46:24 +00:00
|
|
|
} t_menu_item;
|
|
|
|
|
2023-09-09 07:03:56 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
MENU_SQL = 0,
|
|
|
|
MENU_STEP,
|
|
|
|
MENU_TXP,
|
|
|
|
MENU_R_DCS,
|
|
|
|
MENU_R_CTCS,
|
|
|
|
MENU_T_DCS,
|
|
|
|
MENU_T_CTCS,
|
|
|
|
MENU_SFT_D,
|
|
|
|
MENU_OFFSET,
|
2023-09-19 13:48:09 +00:00
|
|
|
MENU_XB,
|
|
|
|
MENU_TOT,
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_W_N,
|
|
|
|
MENU_SCR,
|
|
|
|
MENU_BCL,
|
|
|
|
MENU_MEM_CH,
|
2023-09-19 13:48:09 +00:00
|
|
|
MENU_DEL_CH,
|
2023-09-20 07:29:11 +00:00
|
|
|
MENU_MEM_NAME,
|
2023-09-19 13:48:09 +00:00
|
|
|
MENU_MDF,
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_SAVE,
|
2023-10-04 10:57:34 +00:00
|
|
|
#ifdef ENABLE_VOX
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_VOX,
|
2023-10-04 10:57:34 +00:00
|
|
|
#endif
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_ABR,
|
2023-10-04 10:57:34 +00:00
|
|
|
MENU_ABR_ON_TX_RX,
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_TDR,
|
|
|
|
MENU_BEEP,
|
2023-10-02 19:52:18 +00:00
|
|
|
#ifdef ENABLE_VOICE
|
|
|
|
MENU_VOICE,
|
|
|
|
#endif
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_SC_REV,
|
|
|
|
MENU_AUTOLK,
|
|
|
|
MENU_S_ADD1,
|
|
|
|
MENU_S_ADD2,
|
|
|
|
MENU_STE,
|
|
|
|
MENU_RP_STE,
|
|
|
|
MENU_MIC,
|
2023-10-02 19:52:18 +00:00
|
|
|
#ifdef ENABLE_AUDIO_BAR
|
|
|
|
MENU_MIC_BAR,
|
|
|
|
#endif
|
|
|
|
MENU_COMPAND,
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_1_CALL,
|
|
|
|
MENU_S_LIST,
|
|
|
|
MENU_SLIST1,
|
|
|
|
MENU_SLIST2,
|
2023-10-02 19:52:18 +00:00
|
|
|
#ifdef ENABLE_ALARM
|
|
|
|
MENU_AL_MOD,
|
|
|
|
#endif
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_ANI_ID,
|
|
|
|
MENU_UPCODE,
|
|
|
|
MENU_DWCODE,
|
2023-10-01 20:50:05 +00:00
|
|
|
MENU_PTT_ID,
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_D_ST,
|
|
|
|
MENU_D_RSP,
|
|
|
|
MENU_D_HOLD,
|
|
|
|
MENU_D_PRE,
|
|
|
|
MENU_D_DCD,
|
|
|
|
MENU_D_LIST,
|
2023-09-19 09:23:50 +00:00
|
|
|
MENU_D_LIVE_DEC,
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_PONMSG,
|
|
|
|
MENU_ROGER,
|
|
|
|
MENU_VOL,
|
2023-09-19 19:04:02 +00:00
|
|
|
MENU_BAT_TXT,
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_AM,
|
2023-10-02 19:52:18 +00:00
|
|
|
#ifdef ENABLE_AM_FIX
|
|
|
|
MENU_AM_FIX,
|
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_AM_FIX_TEST1
|
|
|
|
MENU_AM_FIX_TEST1,
|
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_NOAA
|
|
|
|
MENU_NOAA_S,
|
|
|
|
#endif
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_RESET,
|
2023-09-15 20:58:59 +00:00
|
|
|
|
2023-09-19 08:16:57 +00:00
|
|
|
// items after here are normally hidden
|
2023-09-15 20:58:59 +00:00
|
|
|
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_F_LOCK,
|
|
|
|
MENU_200TX,
|
2023-09-17 23:48:40 +00:00
|
|
|
MENU_350TX,
|
2023-09-09 07:03:56 +00:00
|
|
|
MENU_500TX,
|
|
|
|
MENU_350EN,
|
2023-09-15 20:58:59 +00:00
|
|
|
MENU_SCREN,
|
|
|
|
|
2023-09-19 08:16:57 +00:00
|
|
|
MENU_TX_EN, // enable TX
|
2023-10-02 19:52:18 +00:00
|
|
|
#ifdef ENABLE_F_CAL_MENU
|
2023-10-02 00:09:35 +00:00
|
|
|
MENU_F_CALI, // reference xtal calibration
|
2023-10-02 19:52:18 +00:00
|
|
|
#endif
|
2023-10-02 00:09:35 +00:00
|
|
|
MENU_BATCAL // battery voltage calibration
|
2023-09-09 07:03:56 +00:00
|
|
|
};
|
|
|
|
|
2023-09-21 07:46:24 +00:00
|
|
|
extern const t_menu_item MenuList[];
|
2023-09-09 07:03:56 +00:00
|
|
|
|
2023-09-21 07:46:24 +00:00
|
|
|
extern const char gSubMenu_TXP[3][5];
|
|
|
|
extern const char gSubMenu_SFT_D[3][4];
|
|
|
|
extern const char gSubMenu_W_N[2][7];
|
|
|
|
extern const char gSubMenu_OFF_ON[2][4];
|
|
|
|
extern const char gSubMenu_SAVE[5][4];
|
2023-09-28 16:39:45 +00:00
|
|
|
extern const char gSubMenu_TOT[11][7];
|
2023-10-01 20:50:05 +00:00
|
|
|
extern const char gSubMenu_CHAN[3][10];
|
|
|
|
extern const char gSubMenu_XB[3][10];
|
2023-09-15 16:45:07 +00:00
|
|
|
#ifdef ENABLE_VOICE
|
2023-09-21 07:46:24 +00:00
|
|
|
extern const char gSubMenu_VOICE[3][4];
|
2023-09-15 16:45:07 +00:00
|
|
|
#endif
|
2023-10-01 20:50:05 +00:00
|
|
|
extern const char gSubMenu_SC_REV[3][13];
|
|
|
|
extern const char gSubMenu_MDF[4][15];
|
2023-09-15 16:45:07 +00:00
|
|
|
#ifdef ENABLE_ALARM
|
2023-09-21 07:46:24 +00:00
|
|
|
extern const char gSubMenu_AL_MOD[2][5];
|
2023-09-15 16:45:07 +00:00
|
|
|
#endif
|
2023-10-02 08:31:35 +00:00
|
|
|
extern const char gSubMenu_D_RSP[4][11];
|
2023-10-06 06:48:45 +00:00
|
|
|
extern const char gSubMenu_PTT_ID[5][15];
|
2023-10-01 20:50:05 +00:00
|
|
|
extern const char gSubMenu_PONMSG[4][8];
|
2023-10-02 08:31:35 +00:00
|
|
|
extern const char gSubMenu_ROGER[3][9];
|
2023-09-21 07:46:24 +00:00
|
|
|
extern const char gSubMenu_RESET[2][4];
|
|
|
|
extern const char gSubMenu_F_LOCK[6][4];
|
2023-09-24 18:52:14 +00:00
|
|
|
extern const char gSubMenu_BACKLIGHT[8][7];
|
2023-10-04 15:37:11 +00:00
|
|
|
extern const char gSubMenu_RX_TX[4][6];
|
2023-09-23 16:23:21 +00:00
|
|
|
#ifdef ENABLE_AM_FIX_TEST1
|
|
|
|
extern const char gSubMenu_AM_fix_test1[4][8];
|
|
|
|
#endif
|
2023-09-21 07:46:24 +00:00
|
|
|
extern const char gSubMenu_BAT_TXT[3][8];
|
2023-09-26 15:48:16 +00:00
|
|
|
|
|
|
|
extern const char gSubMenu_SCRAMBLER[11][7];
|
2023-09-21 07:46:24 +00:00
|
|
|
|
|
|
|
extern bool gIsInSubMenu;
|
|
|
|
|
|
|
|
extern uint8_t gMenuCursor;
|
|
|
|
extern int8_t gMenuScrollDirection;
|
|
|
|
extern int32_t gSubMenuSelection;
|
|
|
|
|
|
|
|
extern char edit_original[17];
|
|
|
|
extern char edit[17];
|
|
|
|
extern int edit_index;
|
2023-09-20 07:29:11 +00:00
|
|
|
|
2023-09-09 07:03:56 +00:00
|
|
|
void UI_DisplayMenu(void);
|
|
|
|
|
|
|
|
#endif
|