diff --git a/libraries/AP_Parachute/AP_Parachute.cpp b/libraries/AP_Parachute/AP_Parachute.cpp index 3c89d390d6..1fd6a4e810 100644 --- a/libraries/AP_Parachute/AP_Parachute.cpp +++ b/libraries/AP_Parachute/AP_Parachute.cpp @@ -1,4 +1,7 @@ #include "AP_Parachute.h" + +#if HAL_PARACHUTE_ENABLED + #include #include #include @@ -172,3 +175,4 @@ AP_Parachute *parachute() } } +#endif // HAL_PARACHUTE_ENABLED diff --git a/libraries/AP_Parachute/AP_Parachute.h b/libraries/AP_Parachute/AP_Parachute.h index 4280fb6df8..e4680d526c 100644 --- a/libraries/AP_Parachute/AP_Parachute.h +++ b/libraries/AP_Parachute/AP_Parachute.h @@ -22,6 +22,12 @@ #define AP_PARACHUTE_CRITICAL_SINK_DEFAULT 0 // default critical sink speed in m/s to trigger emergency parachute +#ifndef HAL_PARACHUTE_ENABLED +#define HAL_PARACHUTE_ENABLED !HAL_MINIMIZE_FEATURES +#endif + +#if HAL_PARACHUTE_ENABLED + /// @class AP_Parachute /// @brief Class managing the release of a parachute class AP_Parachute { @@ -109,3 +115,5 @@ private: namespace AP { AP_Parachute *parachute(); }; + +#endif // HAL_PARACHUTE_ENABLED