AP_Soaring: Only compile if HAL_SOARING_ENABLED.

This commit is contained in:
Samuel Tabor 2020-09-23 09:20:07 +01:00 committed by Peter Barker
parent 10111f92d5
commit b6f92989a7
2 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,7 @@
#include <stdint.h>
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

View File

@ -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