diff --git a/src/main/cms/cms_menu_blackbox.c b/src/main/cms/cms_menu_blackbox.c index e0e8e29bb6..78f91f9e9b 100644 --- a/src/main/cms/cms_menu_blackbox.c +++ b/src/main/cms/cms_menu_blackbox.c @@ -89,8 +89,10 @@ static OSD_Entry cmsx_menuBlackboxEntries[] = }; CMS_Menu cmsx_menuBlackbox = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENUBB", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, diff --git a/src/main/cms/cms_menu_builtin.c b/src/main/cms/cms_menu_builtin.c index 7721fc16f1..290802356a 100644 --- a/src/main/cms/cms_menu_builtin.c +++ b/src/main/cms/cms_menu_builtin.c @@ -81,8 +81,10 @@ static OSD_Entry menuInfoEntries[] = { }; static CMS_Menu menuInfo = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENUINFO", .GUARD_type = OME_MENU, +#endif .onEnter = cmsx_InfoInit, .onExit = NULL, .onGlobalExit = NULL, @@ -117,8 +119,10 @@ static OSD_Entry menuFeaturesEntries[] = }; static CMS_Menu menuFeatures = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENUFEATURES", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, @@ -149,8 +153,10 @@ static OSD_Entry menuMainEntries[] = }; CMS_Menu menuMain = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENUMAIN", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, diff --git a/src/main/cms/cms_menu_imu.c b/src/main/cms/cms_menu_imu.c index e2b4df7e14..f2cdc0edd0 100644 --- a/src/main/cms/cms_menu_imu.c +++ b/src/main/cms/cms_menu_imu.c @@ -150,8 +150,10 @@ static OSD_Entry cmsx_menuPidEntries[] = }; static CMS_Menu cmsx_menuPid = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XPID", .GUARD_type = OME_MENU, +#endif .onEnter = cmsx_PidOnEnter, .onExit = cmsx_PidWriteback, .onGlobalExit = NULL, @@ -200,8 +202,10 @@ static OSD_Entry cmsx_menuPidAltMagEntries[] = { }; static CMS_Menu cmsx_menuPidAltMag = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XALTMAG", .GUARD_type = OME_MENU, +#endif .onEnter = cmsx_menuPidAltMag_onEnter, .onExit = cmsx_menuPidAltMag_onExit, .onGlobalExit = NULL, @@ -245,8 +249,10 @@ static OSD_Entry cmsx_menuPidGpsnavEntries[] = { }; static CMS_Menu cmsx_menuPidGpsnav = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XGPSNAV", .GUARD_type = OME_MENU, +#endif .onEnter = cmsx_menuPidGpsnav_onEnter, .onExit = cmsx_menuPidGpsnav_onExit, .onGlobalExit = NULL, @@ -283,8 +289,10 @@ static OSD_Entry cmsx_menuRateProfileEntries[] = }; static CMS_Menu cmsx_menuRateProfile = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENURATE", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, @@ -340,8 +348,10 @@ static OSD_Entry cmsx_menuProfileOtherEntries[] = { }; static CMS_Menu cmsx_menuProfileOther = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XPROFOTHER", .GUARD_type = OME_MENU, +#endif .onEnter = cmsx_profileOtherOnEnter, .onExit = cmsx_profileOtherOnExit, .onGlobalExit = NULL, @@ -366,8 +376,10 @@ static OSD_Entry cmsx_menuFilterPerProfileEntries[] = }; static CMS_Menu cmsx_menuFilterPerProfile = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XFLTPP", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, @@ -387,8 +399,10 @@ static OSD_Entry cmsx_menuGyroEntries[] = }; static CMS_Menu cmsx_menuGyro = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XGYROGLB", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, @@ -424,8 +438,10 @@ static OSD_Entry cmsx_menuImuEntries[] = }; CMS_Menu cmsx_menuImu = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XIMU", .GUARD_type = OME_MENU, +#endif .onEnter = cmsx_menuImu_onEnter, .onExit = cmsx_menuImu_onExit, .onGlobalExit = NULL, diff --git a/src/main/cms/cms_menu_ledstrip.c b/src/main/cms/cms_menu_ledstrip.c index 8343b3dee2..219d2f8e66 100644 --- a/src/main/cms/cms_menu_ledstrip.c +++ b/src/main/cms/cms_menu_ledstrip.c @@ -66,8 +66,10 @@ static OSD_Entry cmsx_menuLedstripEntries[] = }; CMS_Menu cmsx_menuLedstrip = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENULED", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, diff --git a/src/main/cms/cms_menu_misc.c b/src/main/cms/cms_menu_misc.c index 9095d61a9b..a24fcea8d0 100644 --- a/src/main/cms/cms_menu_misc.c +++ b/src/main/cms/cms_menu_misc.c @@ -71,8 +71,10 @@ static OSD_Entry cmsx_menuRcEntries[] = }; CMS_Menu cmsx_menuRcPreview = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XRCPREV", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = cmsx_menuRcConfirmBack, .onGlobalExit = NULL, @@ -96,8 +98,10 @@ static OSD_Entry menuMiscEntries[]= }; CMS_Menu cmsx_menuMisc = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XMISC", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, diff --git a/src/main/cms/cms_menu_navigation.c b/src/main/cms/cms_menu_navigation.c index 7e2961e1d9..c7ead575e3 100644 --- a/src/main/cms/cms_menu_navigation.c +++ b/src/main/cms/cms_menu_navigation.c @@ -54,8 +54,10 @@ static OSD_Entry cmsx_menuNavSettingsEntries[] = }; static CMS_Menu cmsx_menuNavSettings = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENUNAVSETTINGS", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, @@ -81,8 +83,10 @@ static CMS_Menu cmsx_menuNavSettings = { }; static CMS_Menu cmsx_menuRTH = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENUNAVRTH", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, @@ -105,8 +109,10 @@ static OSD_Entry cmsx_menuFixedWingEntries[] = }; static CMS_Menu cmsx_menuFixedWing = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENUNAVFW", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, @@ -124,12 +130,14 @@ static OSD_Entry cmsx_menuNavigationEntries[] = }; CMS_Menu cmsx_menuNavigation = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENUNAV", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, .entries = cmsx_menuNavigationEntries }; - #endif \ No newline at end of file + #endif diff --git a/src/main/cms/cms_menu_osd.c b/src/main/cms/cms_menu_osd.c index 637a3a4017..a0c8cf56b9 100755 --- a/src/main/cms/cms_menu_osd.c +++ b/src/main/cms/cms_menu_osd.c @@ -47,8 +47,10 @@ OSD_Entry cmsx_menuAlarmsEntries[] = }; CMS_Menu cmsx_menuAlarms = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENUALARMS", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, @@ -108,8 +110,10 @@ OSD_Entry menuOsdActiveElemsEntries[] = }; CMS_Menu menuOsdActiveElems = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENUOSDACT", .GUARD_type = OME_MENU, +#endif .onEnter = menuOsdActiveElemsOnEnter, .onExit = menuOsdActiveElemsOnExit, .onGlobalExit = NULL, @@ -125,8 +129,10 @@ OSD_Entry cmsx_menuOsdLayoutEntries[] = }; CMS_Menu cmsx_menuOsdLayout = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENULAYOUT", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, diff --git a/src/main/cms/cms_menu_vtx.c b/src/main/cms/cms_menu_vtx.c index 80661326d0..fb8bdec216 100644 --- a/src/main/cms/cms_menu_vtx.c +++ b/src/main/cms/cms_menu_vtx.c @@ -132,8 +132,10 @@ static OSD_Entry cmsx_menuVtxEntries[] = }; CMS_Menu cmsx_menuVtx = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "MENUVTX", .GUARD_type = OME_MENU, +#endif .onEnter = cmsx_Vtx_onEnter, .onExit= cmsx_Vtx_onExit, .onGlobalExit = cmsx_Vtx_FeatureWriteback, diff --git a/src/main/cms/cms_types.h b/src/main/cms/cms_types.h index fe7021b2f4..2e17c08b92 100644 --- a/src/main/cms/cms_types.h +++ b/src/main/cms/cms_types.h @@ -61,7 +61,7 @@ typedef long (*CMSEntryFuncPtr)(displayPort_t *displayPort, const void *ptr); typedef struct { - const char *text; + const char * const text; const OSD_MenuElement type; const CMSEntryFuncPtr func; void *data; @@ -110,10 +110,11 @@ typedef long (*CMSMenuOnExitPtr)(const OSD_Entry *self); typedef struct { +#ifdef CMS_MENU_DEBUG // These two are debug aids for menu content creators. const char *GUARD_text; const OSD_MenuElement GUARD_type; - +#endif const CMSMenuFuncPtr onEnter; const CMSMenuOnExitPtr onExit; const CMSMenuFuncPtr onGlobalExit; diff --git a/src/main/io/vtx_smartaudio.c b/src/main/io/vtx_smartaudio.c index e5f456266d..d2a5156a7f 100644 --- a/src/main/io/vtx_smartaudio.c +++ b/src/main/io/vtx_smartaudio.c @@ -1130,8 +1130,10 @@ static OSD_Entry saCmsMenuStatsEntries[] = { }; static CMS_Menu saCmsMenuStats = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XSAST", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, @@ -1294,8 +1296,10 @@ static OSD_Entry saCmsMenuPORFreqEntries[] = { static CMS_Menu saCmsMenuPORFreq = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XSAPOR", .GUARD_type = OME_MENU, +#endif .onEnter = saCmsSetPORFreqOnEnter, .onExit = NULL, .onGlobalExit = NULL, @@ -1315,8 +1319,10 @@ static OSD_Entry saCmsMenuUserFreqEntries[] = { static CMS_Menu saCmsMenuUserFreq = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XSAUFQ", .GUARD_type = OME_MENU, +#endif .onEnter = saCmsSetUserFreqOnEnter, .onExit = NULL, .onGlobalExit = NULL, @@ -1339,8 +1345,10 @@ static OSD_Entry saCmsMenuConfigEntries[] = { }; static CMS_Menu saCmsMenuConfig = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XSACFG", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, @@ -1357,8 +1365,10 @@ static OSD_Entry saCmsMenuCommenceEntries[] = { }; static CMS_Menu saCmsMenuCommence = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XVTXCOM", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, @@ -1422,8 +1432,10 @@ static long sacms_SetupTopMenu(void) } CMS_Menu cmsx_menuVtxSmartAudio = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XVTXSA", .GUARD_type = OME_MENU, +#endif .onEnter = sacms_SetupTopMenu, .onExit = NULL, .onGlobalExit = NULL, diff --git a/src/main/io/vtx_tramp.c b/src/main/io/vtx_tramp.c index 7179173bf5..c7b04556d8 100644 --- a/src/main/io/vtx_tramp.c +++ b/src/main/io/vtx_tramp.c @@ -591,8 +591,10 @@ static OSD_Entry trampCmsMenuCommenceEntries[] = { }; static CMS_Menu trampCmsMenuCommence = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XVTXTRC", .GUARD_type = OME_MENU, +#endif .onEnter = NULL, .onExit = NULL, .onGlobalExit = NULL, @@ -617,8 +619,10 @@ static OSD_Entry trampMenuEntries[] = }; CMS_Menu cmsx_menuVtxTramp = { +#ifdef CMS_MENU_DEBUG .GUARD_text = "XVTXTR", .GUARD_type = OME_MENU, +#endif .onEnter = trampCmsOnEnter, .onExit = NULL, .onGlobalExit = NULL,