From 69816daaf489b9cc076ddd29b01bebb299421939 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 7 Mar 2024 21:21:26 +1100 Subject: [PATCH] AP_Parachute: remove AUX_FUNC entries based on feature defines --- libraries/AP_Parachute/AP_Parachute.h | 11 ++++------- libraries/AP_Parachute/AP_Parachute_config.h | 8 ++++++++ 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 libraries/AP_Parachute/AP_Parachute_config.h diff --git a/libraries/AP_Parachute/AP_Parachute.h b/libraries/AP_Parachute/AP_Parachute.h index b37f20051a97a8..8c88c2be26a3bb 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 00000000000000..0d646cdb7a473e --- /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