From f7134580f89cd9853779290443fb4e7598501c77 Mon Sep 17 00:00:00 2001 From: mikeller Date: Fri, 1 Feb 2019 01:21:53 +1300 Subject: [PATCH] Fixed missing conditional, incremented parameter group version, added config reset. --- src/main/cli/cli.c | 2 ++ src/main/cms/cms_menu_osd.c | 4 ---- src/main/fc/config.c | 5 +++-- src/main/target/common_post.h | 12 ++++++------ 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/main/cli/cli.c b/src/main/cli/cli.c index 14390b526..57d52ede6 100644 --- a/src/main/cli/cli.c +++ b/src/main/cli/cli.c @@ -4634,8 +4634,10 @@ static void printConfig(char *cmdline, bool doDiff) cliPrintHashLine("name"); printName(dumpMask, &pilotConfig_Copy); +#ifdef USE_OSD cliPrintHashLine("display_name"); printDisplayName(dumpMask, &pilotConfig_Copy); +#endif #ifdef USE_RESOURCE_MGMT cliPrintHashLine("resources"); diff --git a/src/main/cms/cms_menu_osd.c b/src/main/cms/cms_menu_osd.c index c35db7ee1..930f10bbf 100644 --- a/src/main/cms/cms_menu_osd.c +++ b/src/main/cms/cms_menu_osd.c @@ -132,11 +132,7 @@ OSD_Entry menuOsdActiveElemsEntries[] = {"STICK OVERLAY LEFT", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_STICK_OVERLAY_LEFT], DYNAMIC}, {"STICK OVERLAY RIGHT",OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_STICK_OVERLAY_RIGHT], DYNAMIC}, #endif - {"G-FORCE", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_G_FORCE], 0}, - {"FLIP ARROW", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_FLIP_ARROW], 0}, -#ifdef USE_OSD {"DISPLAY NAME", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_DISPLAY_NAME], 0}, -#endif {"BACK", OME_Back, NULL, NULL, 0}, {NULL, OME_END, NULL, NULL, 0} }; diff --git a/src/main/fc/config.c b/src/main/fc/config.c index 60870a385..5fb093386 100644 --- a/src/main/fc/config.c +++ b/src/main/fc/config.c @@ -74,10 +74,11 @@ pidProfile_t *currentPidProfile; #define DYNAMIC_FILTER_MAX_SUPPORTED_LOOP_TIME HZ_TO_INTERVAL_US(2000) -PG_REGISTER_WITH_RESET_TEMPLATE(pilotConfig_t, pilotConfig, PG_PILOT_CONFIG, 0); +PG_REGISTER_WITH_RESET_TEMPLATE(pilotConfig_t, pilotConfig, PG_PILOT_CONFIG, 1); PG_RESET_TEMPLATE(pilotConfig_t, pilotConfig, - .name = { 0 } + .name = { 0 }, + .displayName = { 0 }, ); PG_REGISTER_WITH_RESET_TEMPLATE(systemConfig_t, systemConfig, PG_SYSTEM_CONFIG, 2); diff --git a/src/main/target/common_post.h b/src/main/target/common_post.h index 708451f56..d2dad6b65 100644 --- a/src/main/target/common_post.h +++ b/src/main/target/common_post.h @@ -124,12 +124,6 @@ #undef USE_MSP_OVER_TELEMETRY #endif -#if !defined(USE_OSD) -#undef USE_RX_LINK_QUALITY_INFO -#undef USE_OSD_PROFILES -#undef USE_OSD_STICK_OVERLAY -#endif - /* If either VTX_CONTROL or VTX_COMMON is undefined then remove common code and device drivers */ #if !defined(USE_VTX_COMMON) || !defined(USE_VTX_CONTROL) #undef USE_VTX_COMMON @@ -187,6 +181,12 @@ #define USE_OSD #endif +#if !defined(USE_OSD) +#undef USE_RX_LINK_QUALITY_INFO +#undef USE_OSD_PROFILES +#undef USE_OSD_STICK_OVERLAY +#endif + #if defined(USE_GPS_RESCUE) #define USE_GPS #endif -- 2.11.4.GIT