diff --git a/libraries/AP_Parachute/AP_Parachute.h b/libraries/AP_Parachute/AP_Parachute.h index b37f20051a..8c88c2be26 100644 --- a/libraries/AP_Parachute/AP_Parachute.h +++ b/libraries/AP_Parachute/AP_Parachute.h @@ -2,6 +2,10 @@ /// @brief Parachute release library #pragma once +#include "AP_Parachute_config.h" + +#if HAL_PARACHUTE_ENABLED + #include #include @@ -22,13 +26,6 @@ #define AP_PARACHUTE_CRITICAL_SINK_DEFAULT 0 // default critical sink speed in m/s to trigger emergency parachute #define AP_PARACHUTE_OPTIONS_DEFAULT 0 // default parachute options: enabled disarm after parachute release -#ifndef HAL_PARACHUTE_ENABLED -// default to parachute enabled to match previous configs -#define HAL_PARACHUTE_ENABLED 1 -#endif - -#if HAL_PARACHUTE_ENABLED - /// @class AP_Parachute /// @brief Class managing the release of a parachute class AP_Parachute { diff --git a/libraries/AP_Parachute/AP_Parachute_config.h b/libraries/AP_Parachute/AP_Parachute_config.h new file mode 100644 index 0000000000..0d646cdb7a --- /dev/null +++ b/libraries/AP_Parachute/AP_Parachute_config.h @@ -0,0 +1,8 @@ +#pragma once + +#include + +#ifndef HAL_PARACHUTE_ENABLED +// default to parachute enabled to match previous configs +#define HAL_PARACHUTE_ENABLED 1 +#endif