自定义侧键功能

This commit is contained in:
Silent YANG 2024-01-12 06:09:46 -08:00
parent 2139b18865
commit 2278f7320b
13 changed files with 249 additions and 64 deletions

View file

@ -52,6 +52,8 @@ ENABLE_AUDIO_BAR_DEFAULT ?=0
ENABLE_EEPROM_4M ?=1 ENABLE_EEPROM_4M ?=1
ENABLE_CHINESE_FULL = 4 ENABLE_CHINESE_FULL = 4
ENABLE_DOCK = 1 ENABLE_DOCK = 1
ENABLE_CUSTOM_SIDEFUNCTIONS ?= 1
ENABLE_SIDEFUNCTIONS_SEND ?= 0
# ---- DEBUGGING ---- # ---- DEBUGGING ----
ENABLE_AM_FIX_SHOW_DATA ?= 0 ENABLE_AM_FIX_SHOW_DATA ?= 0
@ -302,6 +304,15 @@ ifeq ($(ENABLE_DOCK),1)
CFLAGS += -DENABLE_DOCK CFLAGS += -DENABLE_DOCK
endif endif
ifeq ($(ENABLE_CHINESE_FULL),4)
ifeq ($(ENABLE_CUSTOM_SIDEFUNCTIONS),1)
CFLAGS += -DENABLE_CUSTOM_SIDEFUNCTIONS
endif
ifeq ($(ENABLE_SIDEFUNCTIONS_SEND),1)
CFLAGS += -DENABLE_SIDEFUNCTIONS_SEND
endif
endif
ifeq ($(ENABLE_TIMER),1) ifeq ($(ENABLE_TIMER),1)
CFLAGS += -DENABLE_TIMER CFLAGS += -DENABLE_TIMER
endif endif

View file

@ -135,6 +135,8 @@ ENABLE_AGC_SHOW_DATA := 0 显示ACG参数
ENABLE_AUDIO_BAR_DEFAULT ?=0 默认语音条样式 ENABLE_AUDIO_BAR_DEFAULT ?=0 默认语音条样式
ENABLE_EEPROM_4M ?=1 两个2Mb Eeprom堆叠方案 ENABLE_EEPROM_4M ?=1 两个2Mb Eeprom堆叠方案
ENABLE_CHINESE_FULL =4 编译固件版本选项 ENABLE_CHINESE_FULL =4 编译固件版本选项
ENABLE_CUSTOM_SIDEFUNCTIONS ?= 1 自定义侧键功能(仅扩容设备支持)
ENABLE_SIDEFUNCTIONS_SEND ?= 0 自定义侧键功能(侧键发射功能)
``` ```
# 打赏 # 打赏

View file

@ -100,7 +100,10 @@ void (*action_opt_table[])(void) = {
[ACTION_OPT_D_DCD] = &ACTION_D_DCD, [ACTION_OPT_D_DCD] = &ACTION_D_DCD,
[ACTION_OPT_WIDTH] = &ACTION_WIDTH, [ACTION_OPT_WIDTH] = &ACTION_WIDTH,
#ifdef ENABLE_SIDEFUNCTIONS_SEND
[ACTION_OPT_SEND_A] = &ACTION_SEND_A,
[ACTION_OPT_SEND_B] = &ACTION_SEND_B
#endif
}; };
static_assert(ARRAY_SIZE(action_opt_table) == ACTION_OPT_LEN); static_assert(ARRAY_SIZE(action_opt_table) == ACTION_OPT_LEN);
@ -276,6 +279,24 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
enum ACTION_OPT_t funcShort = ACTION_OPT_NONE; enum ACTION_OPT_t funcShort = ACTION_OPT_NONE;
enum ACTION_OPT_t funcLong = ACTION_OPT_NONE; enum ACTION_OPT_t funcLong = ACTION_OPT_NONE;
#ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
switch(Key) {
case KEY_SIDE1:
funcShort = gEeprom.KEY_1_SHORT_PRESS_ACTION;
funcLong = gEeprom.KEY_1_LONG_PRESS_ACTION;
break;
case KEY_SIDE2:
funcShort = gEeprom.KEY_2_SHORT_PRESS_ACTION;
funcLong = gEeprom.KEY_2_LONG_PRESS_ACTION;
break;
case KEY_MENU:
funcLong = gEeprom.KEY_M_LONG_PRESS_ACTION;
break;
default:
break;
}
#else
switch(Key) { switch(Key) {
case KEY_SIDE1: case KEY_SIDE1:
funcShort = ACTION_OPT_MONITOR;//gEeprom.KEY_1_SHORT_PRESS_ACTION; funcShort = ACTION_OPT_MONITOR;//gEeprom.KEY_1_SHORT_PRESS_ACTION;
@ -291,6 +312,7 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
default: default:
break; break;
} }
#endif
if (!bKeyHeld && bKeyPressed) // button pushed if (!bKeyHeld && bKeyPressed) // button pushed
{ {
@ -305,6 +327,16 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
if (bKeyHeld || bKeyPressed) // held if (bKeyHeld || bKeyPressed) // held
{ {
funcShort = funcLong; funcShort = funcLong;
#ifdef ENABLE_SIDEFUNCTIONS_SEND
if(funcShort == ACTION_OPT_SEND_A || funcShort == ACTION_OPT_SEND_B){
gFlagLastVfo = gEeprom.TX_VFO;
gEeprom.TX_VFO = funcShort == ACTION_OPT_SEND_A ? 0 : 1;
gFlagReconfigureVfos = true;
gFlagStopTX = true;
GENERIC_Key_PTT(bKeyPressed);
}
#endif
if (!bKeyPressed) //ignore release if held if (!bKeyPressed) //ignore release if held
return; return;
@ -527,3 +559,8 @@ void ACTION_D_DCD(void)
gTxVfo->DTMF_DECODING_ENABLE = !gTxVfo->DTMF_DECODING_ENABLE; gTxVfo->DTMF_DECODING_ENABLE = !gTxVfo->DTMF_DECODING_ENABLE;
DTMF_clear_RX(); DTMF_clear_RX();
} }
#ifdef ENABLE_SIDEFUNCTIONS_SEND
void ACTION_SEND_A(void){return;}
void ACTION_SEND_B(void){return;}
#endif

View file

@ -43,5 +43,9 @@ void ACTION_WIDTH(void);
void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld); void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld);
#ifdef ENABLE_SIDEFUNCTIONS_SEND
void ACTION_SEND_A(void);
void ACTION_SEND_B(void);
#endif
#endif #endif

View file

@ -1594,6 +1594,19 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
GUI_SelectNextDisplay(DISPLAY_MAIN); GUI_SelectNextDisplay(DISPLAY_MAIN);
} }
#ifdef ENABLE_SIDEFUNCTIONS_SEND
if (gFlagStopTX)
{
gFlagStopTX = false;
RADIO_SetupRegisters(true);
GUI_SelectNextDisplay(DISPLAY_MAIN);
gEeprom.TX_VFO = gFlagLastVfo;
gFlagReconfigureVfos = true;
gUpdateDisplay = true;
return;
}
#endif
} }
else // key pressed or held else // key pressed or held
{ {

View file

@ -364,14 +364,16 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax) {
*pMax = 1; *pMax = 1;
break; break;
// case MENU_F1SHRT: #ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
// case MENU_F1LONG: case MENU_F1SHRT:
// case MENU_F2SHRT: case MENU_F1LONG:
// case MENU_F2LONG: case MENU_F2SHRT:
// case MENU_MLONG: case MENU_F2LONG:
// *pMin = 0; case MENU_MLONG:
// *pMax = gSubMenu_SIDEFUNCTIONS_size-1; *pMin = 0;
// break; *pMax = gSubMenu_SIDEFUNCTIONS_size-1;
break;
#endif
default: default:
return -1; return -1;
@ -802,21 +804,23 @@ void MENU_AcceptSetting(void) {
gEeprom.BATTERY_TYPE = gSubMenuSelection; gEeprom.BATTERY_TYPE = gSubMenuSelection;
break; break;
// case MENU_F1SHRT: #ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
// case MENU_F1LONG: case MENU_F1SHRT:
// case MENU_F2SHRT: case MENU_F1LONG:
// case MENU_F2LONG: case MENU_F2SHRT:
// case MENU_MLONG: case MENU_F2LONG:
// { case MENU_MLONG:
// uint8_t * fun[]= { {
// &gEeprom.KEY_1_SHORT_PRESS_ACTION, uint8_t * fun[]= {
// &gEeprom.KEY_1_LONG_PRESS_ACTION, &gEeprom.KEY_1_SHORT_PRESS_ACTION,
// &gEeprom.KEY_2_SHORT_PRESS_ACTION, &gEeprom.KEY_1_LONG_PRESS_ACTION,
// &gEeprom.KEY_2_LONG_PRESS_ACTION, &gEeprom.KEY_2_SHORT_PRESS_ACTION,
// &gEeprom.KEY_M_LONG_PRESS_ACTION}; &gEeprom.KEY_2_LONG_PRESS_ACTION,
// *fun[UI_MENU_GetCurrentMenuId()-MENU_F1SHRT] = gSubMenu_SIDEFUNCTIONS[gSubMenuSelection].id; &gEeprom.KEY_M_LONG_PRESS_ACTION};
// } *fun[UI_MENU_GetCurrentMenuId()-MENU_F1SHRT] = gSubMenu_SIDEFUNCTIONS[gSubMenuSelection].id;
// break; }
break;
#endif
} }
@ -1156,29 +1160,31 @@ void MENU_ShowCurrentSetting(void) {
gSubMenuSelection = gEeprom.BATTERY_TYPE; gSubMenuSelection = gEeprom.BATTERY_TYPE;
break; break;
// case MENU_F1SHRT: #ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
// case MENU_F1LONG: case MENU_F1SHRT:
// case MENU_F2SHRT: case MENU_F1LONG:
// case MENU_F2LONG: case MENU_F2SHRT:
// case MENU_MLONG: case MENU_F2LONG:
// { case MENU_MLONG:
// uint8_t * fun[]= { {
// &gEeprom.KEY_1_SHORT_PRESS_ACTION, uint8_t * fun[]= {
// &gEeprom.KEY_1_LONG_PRESS_ACTION, &gEeprom.KEY_1_SHORT_PRESS_ACTION,
// &gEeprom.KEY_2_SHORT_PRESS_ACTION, &gEeprom.KEY_1_LONG_PRESS_ACTION,
// &gEeprom.KEY_2_LONG_PRESS_ACTION, &gEeprom.KEY_2_SHORT_PRESS_ACTION,
// &gEeprom.KEY_M_LONG_PRESS_ACTION}; &gEeprom.KEY_2_LONG_PRESS_ACTION,
// uint8_t id = *fun[UI_MENU_GetCurrentMenuId()-MENU_F1SHRT]; &gEeprom.KEY_M_LONG_PRESS_ACTION};
// uint8_t id = *fun[UI_MENU_GetCurrentMenuId()-MENU_F1SHRT];
// for(int i = 0; i < gSubMenu_SIDEFUNCTIONS_size; i++) {
// if(gSubMenu_SIDEFUNCTIONS[i].id==id) { for(int i = 0; i < gSubMenu_SIDEFUNCTIONS_size; i++) {
// gSubMenuSelection = i; if(gSubMenu_SIDEFUNCTIONS[i].id==id) {
// break; gSubMenuSelection = i;
// } break;
// }
// }
// break; }
// } break;
}
#endif
default: default:
return; return;

View file

@ -277,5 +277,28 @@
#define 图片 "\x86\x4C\x80\x92" #define 图片 "\x86\x4C\x80\x92"
#define 信息 "\x89\x89\x8C\x8C" #define 信息 "\x89\x89\x8C\x8C"
#ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
#define 侧键一短按 "\x86\x80\x94\x8E\x80\x01\x92\x23\x88\x24"
#define 侧键一长按 "\x86\x80\x94\x8E\x80\x01\x80\x8E\x88\x24"
#define 侧键二短按 "\x86\x80\x94\x8E\x80\x03\x92\x23\x88\x24"
#define 侧键二长按 "\x86\x80\x94\x8E\x80\x03\x80\x8E\x88\x24"
#define M键长按 "\x4D\x94\x8E\x80\x8E\x88\x24"
#define 手电筒 "\x80\x86\x81\x1C\x92\x44"
#define 设置发射功率 "\x82\xCB\x94\x6D\x81\x9A\x8C\x89\x80\xEA\x8F\xEC"
#define 监听 "\x8B\xCE\x83\xD3"
#define 声控发射 "\x83\x45\x8E\x29\x81\x9A\x8C\x89"
#define FM收音机 "\x46\x4D\x82\xDD\x8A\x01\x81\xD9"
#define 锁定按键 "\x92\x0C\x87\x56\x88\x24\x94\x8E"
#define 切换信道 "\x80\x7A\x8B\x2F\x89\x89\x92\xC8"
#define 频率信道模式 "\x94\x10\x8F\xEC\x2F\x89\x89\x92\xC8\x95\xE1\x81\xAA"
#define 切换调制模式 "\x80\x7A\x8B\x2F\x8D\xA0\x86\x58\x95\xE1\x81\xAA"
#define DTMF解码 "\x44\x54\x4D\x46\x94\xEA\x85\xCF"
#define 切换宽窄带 "\x80\x7A\x8B\x2F\x8D\x75\x8D\x7D\x88\x3B"
#ifdef ENABLE_SIDEFUNCTIONS_SEND
#define 主频率发射 "\x81\x64\x94\x10\x8F\xEC\x81\x9A\x8C\x89"
#define 次频率发射 "\x82\x96\x94\x10\x8F\xEC\x81\x9A\x8C\x89"
#endif
#endif
#endif #endif
#endif //UV_K5_FIRMWARE_CUSTOM_0_17_CHINESE_H #endif //UV_K5_FIRMWARE_CUSTOM_0_17_CHINESE_H

4
misc.c
View file

@ -179,6 +179,10 @@ bool gFlagPrepareTX;
bool gFlagAcceptSetting; bool gFlagAcceptSetting;
bool gFlagRefreshSetting; bool gFlagRefreshSetting;
#ifdef ENABLE_SIDEFUNCTIONS_SEND
bool gFlagStopTX;
bool gFlagLastVfo;
#endif
bool gFlagSaveVfo; bool gFlagSaveVfo;
bool gFlagSaveSettings; bool gFlagSaveSettings;
bool gFlagSaveChannel; bool gFlagSaveChannel;

4
misc.h
View file

@ -259,6 +259,10 @@ extern bool gFlagPrepareTX;
extern bool gFlagAcceptSetting; // accept menu setting extern bool gFlagAcceptSetting; // accept menu setting
extern bool gFlagRefreshSetting; // refresh menu display extern bool gFlagRefreshSetting; // refresh menu display
#ifdef ENABLE_SIDEFUNCTIONS_SEND
extern bool gFlagStopTX;
extern bool gFlagLastVfo;
#endif
extern bool gFlagSaveVfo; extern bool gFlagSaveVfo;
extern bool gFlagSaveSettings; extern bool gFlagSaveSettings;
extern bool gFlagSaveChannel; extern bool gFlagSaveChannel;

View file

@ -123,6 +123,17 @@ void SETTINGS_InitEEPROM(void)
#if ENABLE_CHINESE_FULL==4 #if ENABLE_CHINESE_FULL==4
gEeprom.POWER_ON_DISPLAY_MODE = (Data[7] < 4) ? Data[7] : POWER_ON_DISPLAY_MODE_NONE; gEeprom.POWER_ON_DISPLAY_MODE = (Data[7] < 4) ? Data[7] : POWER_ON_DISPLAY_MODE_NONE;
#endif #endif
#ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
// 1FF8..1FFF
EEPROM_ReadBuffer(0x1FF8, Data, 8);
gEeprom.KEY_M_LONG_PRESS_ACTION = (Data[0] < ACTION_OPT_LEN) ? Data[0] : ACTION_OPT_SWITCH_DEMODUL;
gEeprom.KEY_1_SHORT_PRESS_ACTION = (Data[1] < ACTION_OPT_LEN) ? Data[1] : ACTION_OPT_MONITOR;
gEeprom.KEY_1_LONG_PRESS_ACTION = (Data[2] < ACTION_OPT_LEN) ? Data[2] : ACTION_OPT_D_DCD;
gEeprom.KEY_2_SHORT_PRESS_ACTION = (Data[3] < ACTION_OPT_LEN) ? Data[3] : ACTION_OPT_WIDTH;
gEeprom.KEY_2_LONG_PRESS_ACTION = (Data[4] < ACTION_OPT_LEN) ? Data[4] : ACTION_OPT_FLASHLIGHT;
#endif
// 0E98..0E9F // 0E98..0E9F
EEPROM_ReadBuffer(0x0E98, Data, 8); EEPROM_ReadBuffer(0x0E98, Data, 8);
memcpy(&gEeprom.POWER_ON_PASSWORD, Data, 4); memcpy(&gEeprom.POWER_ON_PASSWORD, Data, 4);
@ -543,6 +554,18 @@ void SETTINGS_SaveSettings(void)
#endif #endif
EEPROM_WriteBuffer(0x0E90, State,8); EEPROM_WriteBuffer(0x0E90, State,8);
#ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
State[0] = gEeprom.KEY_M_LONG_PRESS_ACTION;
State[1] = gEeprom.KEY_1_SHORT_PRESS_ACTION;
State[2] = gEeprom.KEY_1_LONG_PRESS_ACTION;
State[3] = gEeprom.KEY_2_SHORT_PRESS_ACTION;
State[4] = gEeprom.KEY_2_LONG_PRESS_ACTION;
State[5] = 0;
State[6] = 0;
State[7] = 0;
EEPROM_WriteBuffer(0x1FF8, State, 8);
#endif
memset(Password, 0xFF, sizeof(Password)); memset(Password, 0xFF, sizeof(Password));
#ifdef ENABLE_PWRON_PASSWORD #ifdef ENABLE_PWRON_PASSWORD
Password[0] = gEeprom.POWER_ON_PASSWORD; Password[0] = gEeprom.POWER_ON_PASSWORD;

View file

@ -94,8 +94,13 @@ enum ACTION_OPT_t {
ACTION_OPT_BLMIN_TMP_OFF, //BackLight Minimum Temporay OFF ACTION_OPT_BLMIN_TMP_OFF, //BackLight Minimum Temporay OFF
ACTION_OPT_D_DCD, ACTION_OPT_D_DCD,
ACTION_OPT_WIDTH, ACTION_OPT_WIDTH,
#ifdef ENABLE_SIDEFUNCTIONS_SEND
ACTION_OPT_SEND_A,
ACTION_OPT_SEND_B,
#endif
ACTION_OPT_LEN ACTION_OPT_LEN
}; };
#ifdef ENABLE_VOICE #ifdef ENABLE_VOICE
enum VOICE_Prompt_t enum VOICE_Prompt_t
{ {
@ -196,10 +201,12 @@ typedef struct {
#endif #endif
ROGER_Mode_t ROGER; ROGER_Mode_t ROGER;
uint8_t REPEATER_TAIL_TONE_ELIMINATION; uint8_t REPEATER_TAIL_TONE_ELIMINATION;
// uint8_t KEY_1_SHORT_PRESS_ACTION; #ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
// uint8_t KEY_1_LONG_PRESS_ACTION; uint8_t KEY_1_SHORT_PRESS_ACTION;
// uint8_t KEY_2_SHORT_PRESS_ACTION; uint8_t KEY_1_LONG_PRESS_ACTION;
// uint8_t KEY_2_LONG_PRESS_ACTION; uint8_t KEY_2_SHORT_PRESS_ACTION;
uint8_t KEY_2_LONG_PRESS_ACTION;
#endif
uint8_t MIC_SENSITIVITY; uint8_t MIC_SENSITIVITY;
uint8_t MIC_SENSITIVITY_TUNING; uint8_t MIC_SENSITIVITY_TUNING;
uint8_t CHAN_1_CALL; uint8_t CHAN_1_CALL;
@ -249,7 +256,9 @@ typedef struct {
uint8_t field78_0x96; uint8_t field78_0x96;
uint8_t field79_0x97; uint8_t field79_0x97;
// uint8_t KEY_M_LONG_PRESS_ACTION; #ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
uint8_t KEY_M_LONG_PRESS_ACTION;
#endif
// uint8_t BACKLIGHT_MIN; // uint8_t BACKLIGHT_MIN;
#ifdef ENABLE_BLMIN_TMP_OFF #ifdef ENABLE_BLMIN_TMP_OFF
BLMIN_STAT_t BACKLIGHT_MIN_STAT; BLMIN_STAT_t BACKLIGHT_MIN_STAT;

View file

@ -85,6 +85,14 @@ const t_menu_item MenuList[] =
{/*"RP STE",*/ VOICE_ID_INVALID, MENU_RP_STE, }, {/*"RP STE",*/ VOICE_ID_INVALID, MENU_RP_STE, },
{/*"1 Call",*/ VOICE_ID_INVALID, MENU_1_CALL, }, {/*"1 Call",*/ VOICE_ID_INVALID, MENU_1_CALL, },
#ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
{/*"F1Shrt",*/ VOICE_ID_INVALID, MENU_F1SHRT ,},
{/*"F1Long",*/ VOICE_ID_INVALID, MENU_F1LONG ,},
{/*"F2Shrt",*/ VOICE_ID_INVALID, MENU_F2SHRT ,},
{/*"F2Long",*/ VOICE_ID_INVALID, MENU_F2LONG ,},
{/*"M Long",*/ VOICE_ID_INVALID, MENU_MLONG ,M键长按},
#endif
#ifdef ENABLE_DTMF_CALLING #ifdef ENABLE_DTMF_CALLING
{/*"ANI ID",*/ VOICE_ID_ANI_CODE, MENU_ANI_ID ,DTMF_ID}, {/*"ANI ID",*/ VOICE_ID_ANI_CODE, MENU_ANI_ID ,DTMF_ID},
#endif #endif
@ -420,6 +428,43 @@ const char gSubMenu_SCRAMBLER[][7] =
"3500Hz" "3500Hz"
}; };
#ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
const t_sidefunction SIDEFUNCTIONS[] =
{
{, ACTION_OPT_NONE},
{, ACTION_OPT_FLASHLIGHT},
{, ACTION_OPT_POWER},
{, ACTION_OPT_MONITOR},
{, ACTION_OPT_SCAN},
#ifdef ENABLE_VOX
{, ACTION_OPT_VOX},
#endif
#ifdef ENABLE_ALARM
{"ALARM", ACTION_OPT_ALARM},
#endif
#ifdef ENABLE_FMRADIO
{FM收音机, ACTION_OPT_FM},
#endif
#ifdef ENABLE_TX1750
{"1750HZ", ACTION_OPT_1750},
#endif
{, ACTION_OPT_KEYLOCK},
{, ACTION_OPT_A_B},
{, ACTION_OPT_VFO_MR},
{, ACTION_OPT_SWITCH_DEMODUL},
{DTMF解码, ACTION_OPT_D_DCD},
{, ACTION_OPT_WIDTH},
#ifdef ENABLE_SIDEFUNCTIONS_SEND
{, ACTION_OPT_SEND_A},
{, ACTION_OPT_SEND_B},
#endif
#ifdef ENABLE_BLMIN_TMP_OFF
{"BLMIN\nTMP OFF", ACTION_OPT_BLMIN_TMP_OFF}, //BackLight Minimum Temporay OFF
#endif
};
const t_sidefunction *gSubMenu_SIDEFUNCTIONS = SIDEFUNCTIONS;
const uint8_t gSubMenu_SIDEFUNCTIONS_size = ARRAY_SIZE(SIDEFUNCTIONS);
#endif
bool gIsInSubMenu; bool gIsInSubMenu;
uint8_t gMenuCursor; uint8_t gMenuCursor;
@ -1008,13 +1053,15 @@ void UI_DisplayMenu(void) {
break; break;
// case MENU_F1SHRT: #ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
// case MENU_F1LONG: case MENU_F1SHRT:
// case MENU_F2SHRT: case MENU_F1LONG:
// case MENU_F2LONG: case MENU_F2SHRT:
// case MENU_MLONG: case MENU_F2LONG:
// strcpy(String, gSubMenu_SIDEFUNCTIONS[gSubMenuSelection].name); case MENU_MLONG:
// break; strcpy(String, gSubMenu_SIDEFUNCTIONS[gSubMenuSelection].name);
break;
#endif
} }

View file

@ -135,11 +135,13 @@ MENU_PONMSG,
MENU_F_CALI, // reference xtal calibration MENU_F_CALI, // reference xtal calibration
#endif #endif
MENU_BATCAL, // battery voltage calibration MENU_BATCAL, // battery voltage calibration
// MENU_F1SHRT, #ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
// MENU_F1LONG, MENU_F1SHRT,
// MENU_F2SHRT, MENU_F1LONG,
// MENU_F2LONG, MENU_F2SHRT,
//MENU_MLONG, MENU_F2LONG,
MENU_MLONG,
#endif
MENU_BATTYP MENU_BATTYP
}; };