This commit is contained in:
146
ui/menu.h
146
ui/menu.h
@@ -24,12 +24,11 @@
|
||||
#include "settings.h"
|
||||
|
||||
typedef struct {
|
||||
const char name[7]; // menu display area only has room for 6 characters
|
||||
uint8_t menu_id;
|
||||
const char name[7]; // menu display area only has room for 6 characters
|
||||
uint8_t menu_id;
|
||||
} t_menu_item;
|
||||
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
MENU_SQL = 0,
|
||||
MENU_STEP,
|
||||
MENU_TXP,
|
||||
@@ -41,12 +40,10 @@ enum
|
||||
MENU_OFFSET,
|
||||
MENU_TOT,
|
||||
MENU_W_N,
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
MENU_SCR,
|
||||
#endif
|
||||
MENU_BCL,
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
MENU_TX_LOCK,
|
||||
MENU_TX_LOCK,
|
||||
#endif
|
||||
MENU_MEM_CH,
|
||||
MENU_DEL_CH,
|
||||
@@ -93,23 +90,23 @@ enum
|
||||
MENU_D_HOLD,
|
||||
#endif
|
||||
MENU_D_PRE,
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
MENU_D_DCD,
|
||||
MENU_D_LIST,
|
||||
#endif
|
||||
MENU_D_LIVE_DEC,
|
||||
MENU_PONMSG,
|
||||
MENU_FSKSRC,
|
||||
MENU_FSKMOD,
|
||||
MENU_ROGER,
|
||||
MENU_VOL,
|
||||
MENU_BAT_TXT,
|
||||
MENU_AM,
|
||||
#ifdef ENABLE_AM_FIX
|
||||
MENU_AM_FIX,
|
||||
#endif
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
#ifdef ENABLE_NOAA
|
||||
MENU_NOAA_S,
|
||||
#endif
|
||||
#ifdef ENABLE_NOAA
|
||||
MENU_NOAA_S,
|
||||
#endif
|
||||
#endif
|
||||
MENU_RESET,
|
||||
MENU_F_LOCK,
|
||||
@@ -117,11 +114,9 @@ enum
|
||||
MENU_200TX,
|
||||
MENU_350TX,
|
||||
MENU_500TX,
|
||||
#endif
|
||||
MENU_350EN,
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
MENU_SCREN,
|
||||
#endif
|
||||
MENU_350EN,
|
||||
#ifdef ENABLE_F_CAL_MENU
|
||||
MENU_F_CALI, // reference xtal calibration
|
||||
#endif
|
||||
@@ -139,18 +134,18 @@ enum
|
||||
MENU_SET_MET,
|
||||
MENU_SET_GUI,
|
||||
MENU_SET_TMR,
|
||||
#ifdef ENABLE_FEAT_F4HWN_NARROWER
|
||||
MENU_SET_NFM,
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_VOL
|
||||
MENU_SET_VOL,
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
|
||||
MENU_SET_KEY,
|
||||
#endif
|
||||
#ifdef ENABLE_NOAA
|
||||
MENU_NOAA_S,
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_NARROWER
|
||||
MENU_SET_NFM,
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_VOL
|
||||
MENU_SET_VOL,
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
|
||||
MENU_SET_KEY,
|
||||
#endif
|
||||
#ifdef ENABLE_NOAA
|
||||
MENU_NOAA_S,
|
||||
#endif
|
||||
#endif
|
||||
MENU_BATCAL, // battery voltage calibration
|
||||
MENU_F1SHRT,
|
||||
@@ -164,72 +159,71 @@ enum
|
||||
extern const uint8_t FIRST_HIDDEN_MENU_ITEM;
|
||||
extern const t_menu_item MenuList[];
|
||||
|
||||
extern const char gSubMenu_TXP[8][6];
|
||||
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_NA[4];
|
||||
extern const char gSubMenu_TOT[11][7];
|
||||
extern const char* const gSubMenu_RXMode[4];
|
||||
extern const char gSubMenu_TXP[8][6];
|
||||
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_NA[4];
|
||||
extern const char gSubMenu_TOT[11][7];
|
||||
extern const char *const gSubMenu_RXMode[4];
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
extern const char gSubMenu_VOICE[3][4];
|
||||
extern const char gSubMenu_VOICE[3][4];
|
||||
#endif
|
||||
extern const char* const gSubMenu_MDF[4];
|
||||
extern const char *const gSubMenu_MDF[4];
|
||||
#ifdef ENABLE_ALARM
|
||||
extern const char gSubMenu_AL_MOD[2][5];
|
||||
extern const char gSubMenu_AL_MOD[2][5];
|
||||
#endif
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
extern const char gSubMenu_D_RSP[4][11];
|
||||
extern const char gSubMenu_D_RSP[4][11];
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
extern const char gSubMenu_SET_PWR[7][6];
|
||||
extern const char gSubMenu_SET_PTT[2][8];
|
||||
extern const char gSubMenu_SET_TOT[4][7];
|
||||
extern const char gSubMenu_SET_LCK[2][9];
|
||||
extern const char gSubMenu_SET_MET[2][8];
|
||||
#ifdef ENABLE_FEAT_F4HWN_NARROWER
|
||||
extern const char gSubMenu_SET_NFM[2][9];
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
|
||||
extern const char gSubMenu_SET_KEY[][9];
|
||||
#endif
|
||||
extern const char gSubMenu_SET_PWR[7][6];
|
||||
extern const char gSubMenu_SET_PTT[2][8];
|
||||
extern const char gSubMenu_SET_TOT[4][7];
|
||||
extern const char gSubMenu_SET_LCK[2][9];
|
||||
extern const char gSubMenu_SET_MET[2][8];
|
||||
#ifdef ENABLE_FEAT_F4HWN_NARROWER
|
||||
extern const char gSubMenu_SET_NFM[2][9];
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
|
||||
extern const char gSubMenu_SET_KEY[][9];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern const char* const gSubMenu_PTT_ID[5];
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
extern const char gSubMenu_PONMSG[5][8];
|
||||
#else
|
||||
extern const char gSubMenu_PONMSG[4][8];
|
||||
#endif
|
||||
extern const char gSubMenu_ROGER[3][6];
|
||||
extern const char gSubMenu_RESET[2][4];
|
||||
extern const char* const gSubMenu_F_LOCK[F_LOCK_LEN];
|
||||
extern const char gSubMenu_RX_TX[4][6];
|
||||
extern const char gSubMenu_BAT_TXT[3][8];
|
||||
extern const char gSubMenu_BATTYP[3][9];
|
||||
extern const char *const gSubMenu_PTT_ID[5];
|
||||
extern const char gSubMenu_FSKMod[6][8];
|
||||
extern const char gSubMenu_ROGER[3][6];
|
||||
extern const char gSubMenu_RESET[2][4];
|
||||
extern const char *const gSubMenu_F_LOCK[F_LOCK_LEN];
|
||||
extern const char gSubMenu_RX_TX[4][6];
|
||||
extern const char gSubMenu_BAT_TXT[3][8];
|
||||
extern const char gSubMenu_BATTYP[3][9];
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
extern const char gSubMenu_SCRAMBLER[11][7];
|
||||
#endif
|
||||
extern const char gSubMenu_SCRAMBLER[11][7];
|
||||
|
||||
typedef struct {char* name; uint8_t id;} t_sidefunction;
|
||||
extern const uint8_t gSubMenu_SIDEFUNCTIONS_size;
|
||||
typedef struct {
|
||||
char *name;
|
||||
uint8_t id;
|
||||
} t_sidefunction;
|
||||
extern const uint8_t gSubMenu_SIDEFUNCTIONS_size;
|
||||
extern const t_sidefunction gSubMenu_SIDEFUNCTIONS[];
|
||||
|
||||
extern bool gIsInSubMenu;
|
||||
|
||||
extern uint8_t gMenuCursor;
|
||||
|
||||
extern int32_t gSubMenuSelection;
|
||||
|
||||
extern char edit_original[17];
|
||||
extern char edit[17];
|
||||
extern int edit_index;
|
||||
extern bool gIsInSubMenu;
|
||||
|
||||
extern uint8_t gMenuCursor;
|
||||
|
||||
extern int32_t gSubMenuSelection;
|
||||
|
||||
extern char edit_original[17];
|
||||
extern char edit[17];
|
||||
extern int edit_index;
|
||||
|
||||
void UI_DisplayMenu(void);
|
||||
|
||||
int UI_MENU_GetCurrentMenuId();
|
||||
|
||||
uint8_t UI_MENU_GetMenuIdx(uint8_t id);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user