diff --git a/src/main/fc/runtime_config.h b/src/main/fc/runtime_config.h index 637ea867e64..452256a6b64 100644 --- a/src/main/fc/runtime_config.h +++ b/src/main/fc/runtime_config.h @@ -23,7 +23,6 @@ typedef enum { WAS_EVER_ARMED = (1 << 3), SIMULATOR_MODE_HITL = (1 << 4), SIMULATOR_MODE_SITL = (1 << 5), - ARMING_DISABLED_GEOZONE = (1 << 6), ARMING_DISABLED_FAILSAFE_SYSTEM = (1 << 7), ARMING_DISABLED_NOT_LEVEL = (1 << 8), diff --git a/src/main/fc/settings.yaml b/src/main/fc/settings.yaml index 490fab4b914..c64f56a9602 100644 --- a/src/main/fc/settings.yaml +++ b/src/main/fc/settings.yaml @@ -3829,7 +3829,6 @@ groups: condition: USE_OSD || USE_DJI_HD_OSD members: - name: osd_speed_source - condition: USE_GEOZONE description: "Sets the speed type displayed by the DJI OSD and OSD canvas (FrSky Pixel): GROUND, 3D, AIR" default_value: "GROUND" field: speedSource diff --git a/src/main/io/osd.c b/src/main/io/osd.c index a00f8f97b40..fc3278d8110 100644 --- a/src/main/io/osd.c +++ b/src/main/io/osd.c @@ -866,8 +866,14 @@ static const char * osdArmingDisabledReasonMessage(void) return OSD_MESSAGE_STR(OSD_MSG_NO_PREARM); case ARMING_DISABLED_DSHOT_BEEPER: return OSD_MESSAGE_STR(OSD_MSG_DSHOT_BEEPER); + case ARMING_DISABLED_GEOZONE: +#ifdef USE_GEOZONE return OSD_MESSAGE_STR(OSD_MSG_NFZ); +#else + FALLTHROUGH; +#endif + // Cases without message case ARMING_DISABLED_LANDING_DETECTED: FALLTHROUGH; diff --git a/src/main/navigation/navigation.c b/src/main/navigation/navigation.c index 900cc8f3ba6..a72cd027966 100644 --- a/src/main/navigation/navigation.c +++ b/src/main/navigation/navigation.c @@ -4515,13 +4515,16 @@ static navigationFSMEvent_t selectNavEventFromBoxModeInput(void) return NAV_FSM_EVENT_SWITCH_TO_RTH; } +#ifdef USE_GEOZONE if (posControl.flags.sendToActive) { return NAV_FSM_EVENT_SWITCH_TO_SEND_TO; } + if (posControl.flags.forcedPosholdActive) { return NAV_FSM_EVENT_SWITCH_TO_POSHOLD_3D; } +#endif /* WP mission activation control: * canActivateWaypoint & waypointWasActivated are used to prevent WP mission diff --git a/src/main/target/common.h b/src/main/target/common.h index bcfb3bbbf60..f4963636715 100644 --- a/src/main/target/common.h +++ b/src/main/target/common.h @@ -209,6 +209,7 @@ #define USE_34CHANNELS #define MAX_MIXER_PROFILE_COUNT 2 #define USE_SMARTPORT_MASTER +#define USE_GEOZONE #define MAX_GEOZONES_IN_CONFIG 63 #define MAX_VERTICES_IN_CONFIG 126 #elif !defined(STM32F7) @@ -219,10 +220,8 @@ #define SKIP_CLI_COMMAND_HELP #undef USE_SERIALRX_SPEKTRUM #undef USE_TELEMETRY_SRXL - #define MAX_GEOZONES_IN_CONFIG 32 - #define MAX_VERTICES_IN_CONFIG 64 #endif #define USE_EZ_TUNE #define USE_ADAPTIVE_FILTER -#define USE_GEOZONE +