From b6f92989a77e7a737fb61dbd4fc30bbdb6997ecd Mon Sep 17 00:00:00 2001 From: Samuel Tabor Date: Wed, 23 Sep 2020 09:20:07 +0100 Subject: [PATCH] AP_Soaring: Only compile if HAL_SOARING_ENABLED. --- libraries/AP_Soaring/AP_Soaring.cpp | 3 +++ libraries/AP_Soaring/AP_Soaring.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/libraries/AP_Soaring/AP_Soaring.cpp b/libraries/AP_Soaring/AP_Soaring.cpp index a3024455eb..2d301e5c97 100644 --- a/libraries/AP_Soaring/AP_Soaring.cpp +++ b/libraries/AP_Soaring/AP_Soaring.cpp @@ -4,6 +4,7 @@ #include extern const AP_HAL::HAL& hal; +#if HAL_SOARING_ENABLED // ArduSoar parameters const AP_Param::GroupInfo SoaringController::var_info[] = { @@ -470,3 +471,5 @@ bool SoaringController::check_drift(Vector2f prev_wp, Vector2f next_wp) return (powf(parallel,2)+powf(perpendicular,2)) > powf(max_drift,2);; } } + +#endif // HAL_SOARING_ENABLED diff --git a/libraries/AP_Soaring/AP_Soaring.h b/libraries/AP_Soaring/AP_Soaring.h index eecdf6d562..e7a628d5d7 100644 --- a/libraries/AP_Soaring/AP_Soaring.h +++ b/libraries/AP_Soaring/AP_Soaring.h @@ -20,6 +20,8 @@ #define HAL_SOARING_ENABLED !HAL_MINIMIZE_FEATURES #endif +#if HAL_SOARING_ENABLED + #define INITIAL_THERMAL_STRENGTH 2.0 #define INITIAL_THERMAL_RADIUS 80.0 #define INITIAL_STRENGTH_COVARIANCE 0.0049 @@ -145,3 +147,5 @@ private: bool _exit_commanded; }; + +#endif // HAL_SOARING_ENABLED \ No newline at end of file