From c384a682bbb461d4b9b92c4f478338be51f59d4b Mon Sep 17 00:00:00 2001 From: Armel FAUVEAU Date: Wed, 12 Feb 2025 02:13:55 +0100 Subject: [PATCH] Fix Voxless not functional menus --- compile-with-docker.sh | 1 + main.c | 2 +- ui/menu.c | 24 ++++++++++++------------ ui/menu.h | 4 ---- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/compile-with-docker.sh b/compile-with-docker.sh index 2aab0ec..e47359d 100755 --- a/compile-with-docker.sh +++ b/compile-with-docker.sh @@ -119,6 +119,7 @@ case "$1" in bandscope broadcast rescueops + voxless ;; *) echo "Usage: $0 {custom|bandscope|broadcast|voxless|standard|all}" diff --git a/main.c b/main.c index aae3477..18de500 100644 --- a/main.c +++ b/main.c @@ -164,7 +164,7 @@ void Main(void) gEeprom.KEY_LOCK = 0; SETTINGS_SaveSettings(); #ifndef ENABLE_VOX - gMenuCursor = 65; // move to hidden section, fix me if change... !!! Remove VOX and Mic Bar + gMenuCursor = 67; // move to hidden section, fix me if change... !!! Remove VOX and Mic Bar #else gMenuCursor = 68; // move to hidden section, fix me if change... !!! #endif diff --git a/ui/menu.c b/ui/menu.c index 83f95a3..ef0e0e8 100644 --- a/ui/menu.c +++ b/ui/menu.c @@ -86,9 +86,7 @@ const t_menu_item MenuList[] = {"BatSav", MENU_SAVE }, // was "SAVE" {"BatTxt", MENU_BAT_TXT }, {"Mic", MENU_MIC }, -#ifdef ENABLE_AUDIO_BAR {"MicBar", MENU_MIC_BAR }, -#endif {"ChDisp", MENU_MDF }, // was "MDF" {"POnMsg", MENU_PONMSG }, {"BLTime", MENU_ABR }, // was "ABR" @@ -128,9 +126,7 @@ const t_menu_item MenuList[] = {"AM Fix", MENU_AM_FIX }, #endif #endif -#ifdef ENABLE_VOX {"VOX", MENU_VOX }, -#endif #ifdef ENABLE_FEAT_F4HWN {"SysInf", MENU_VOL }, // was "VOL" #else @@ -614,11 +610,13 @@ void UI_DisplayMenu(void) } break; - #ifdef ENABLE_AUDIO_BAR - case MENU_MIC_BAR: + case MENU_MIC_BAR: + #ifdef ENABLE_AUDIO_BAR strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]); - break; - #endif + #else + strcpy(String, gSubMenu_OFF_ON[0]); + #endif + break; case MENU_STEP: { uint16_t step = gStepFrequencyTable[FREQUENCY_GetStepIdxFromSortedIdx(gSubMenuSelection)]; @@ -695,11 +693,13 @@ void UI_DisplayMenu(void) break; #endif - #ifdef ENABLE_VOX - case MENU_VOX: + case MENU_VOX: + #ifdef ENABLE_VOX sprintf(String, gSubMenuSelection == 0 ? "OFF" : "%u", gSubMenuSelection); - break; - #endif + #else + strcpy(String, gSubMenu_OFF_ON[0]); + #endif + break; case MENU_ABR: if(gSubMenuSelection == 0) diff --git a/ui/menu.h b/ui/menu.h index 4b106aa..733f396 100644 --- a/ui/menu.h +++ b/ui/menu.h @@ -53,9 +53,7 @@ enum MENU_MEM_NAME, MENU_MDF, MENU_SAVE, -#ifdef ENABLE_VOX MENU_VOX, -#endif MENU_ABR, MENU_ABR_ON_TX_RX, MENU_ABR_MIN, @@ -73,9 +71,7 @@ enum MENU_STE, MENU_RP_STE, MENU_MIC, -#ifdef ENABLE_AUDIO_BAR MENU_MIC_BAR, -#endif MENU_COMPAND, MENU_1_CALL, MENU_S_LIST,