0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-20 15:08:37 +03:00

Menu SIDE_BUTT can be disabled to save 300 bytes.

This is a very rough version as I just did some search and replace.
This commit is contained in:
cloudwindy
2023-10-20 20:29:25 +08:00
parent 7e4508436f
commit da52374496
4 changed files with 92 additions and 72 deletions

View File

@ -127,10 +127,12 @@ const t_menu_item g_menu_list[] =
#ifdef ENABLE_NOAA
{"NOAA-S", VOICE_ID_INVALID, MENU_NOAA_SCAN },
#endif
#ifdef ENABLE_SIDE_BUTT_MENU
{"Side1S", VOICE_ID_INVALID, MENU_SIDE1_SHORT },
{"Side1L", VOICE_ID_INVALID, MENU_SIDE1_LONG },
{"Side2S", VOICE_ID_INVALID, MENU_SIDE2_SHORT },
{"Side2L", VOICE_ID_INVALID, MENU_SIDE2_LONG },
#endif
{"VER", VOICE_ID_INVALID, MENU_VERSION },
{"RESET", VOICE_ID_INITIALISATION, MENU_RESET }, // might be better to move this to the hidden menu items ?
@ -356,6 +358,7 @@ const char g_sub_MENU_SCRAMBLERAMBLER[11][7] =
"3500Hz"
};
#ifdef ENABLE_SIDE_BUTT_MENU
const char g_sub_menu_SIDE_BUTT[9][16] =
//const char g_sub_menu_SIDE_BUTT[10][16] =
{
@ -370,6 +373,7 @@ const char g_sub_menu_SIDE_BUTT[9][16] =
"TX\n1750Hz",
// "2nd PTT",
};
#endif
// ***************************************************************************************
@ -1025,12 +1029,14 @@ void UI_DisplayMenu(void)
g_usb_current);
break;
#ifdef ENABLE_SIDE_BUTT_MENU
case MENU_SIDE1_SHORT:
case MENU_SIDE1_LONG:
case MENU_SIDE2_SHORT:
case MENU_SIDE2_LONG:
strcpy(String, g_sub_menu_SIDE_BUTT[g_sub_menu_selection]);
break;
#endif
case MENU_VERSION:
{ // show the version string on multiple lines - if need be
@ -1098,15 +1104,15 @@ void UI_DisplayMenu(void)
case FREQ_LOCK_446:
strcpy(String, "446.00625\n~\n446.19375");
break;
#ifdef ENABLE_TX_UNLOCK
#ifdef ENABLE_TX_UNLOCK
case FREQ_LOCK_TX_UNLOCK:
sprintf(String, "UNLOCKED\n%u~%u", BX4819_BAND1.lower / 100000, BX4819_BAND2.upper / 100000);
break;
#endif
#endif
}
break;
#ifdef ENABLE_F_CAL_MENU
#ifdef ENABLE_F_CAL_MENU
case MENU_F_CALI:
{
const uint32_t value = 22656 + g_sub_menu_selection;
@ -1119,7 +1125,7 @@ void UI_DisplayMenu(void)
xtal_Hz / 1000000, xtal_Hz % 1000000);
}
break;
#endif
#endif
case MENU_BAT_CAL:
{