mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 01:05:21 +03:00
Made inclusion of CMS guard conditional on debug flag
This commit is contained in:
parent
1833bfd374
commit
a8efd77d73
11 changed files with 66 additions and 3 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
#endif
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue