diff --git a/libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe.cpp b/libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe.cpp index c689d2e247..dce629b7a9 100644 --- a/libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe.cpp +++ b/libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe.cpp @@ -19,8 +19,11 @@ This is an advanced failsafe module originally modelled on the failsafe rules of the Outback Challenge */ -#include #include "AP_AdvancedFailsafe.h" + +#if AP_ADVANCEDFAILSAFE_ENABLED + +#include #include #include #include @@ -472,3 +475,5 @@ AP_AdvancedFailsafe *advancedfailsafe() } }; + +#endif // AP_ADVANCEDFAILSAFE_ENABLED diff --git a/libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe.h b/libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe.h index c4fb7b2d6b..ecf50386c6 100644 --- a/libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe.h +++ b/libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe.h @@ -20,6 +20,10 @@ Andrew Tridgell and CanberraUAV, August 2012 */ +#include "AP_AdvancedFailsafe_config.h" + +#if AP_ADVANCEDFAILSAFE_ENABLED + #include #include #include @@ -163,3 +167,5 @@ private: namespace AP { AP_AdvancedFailsafe *advancedfailsafe(); }; + +#endif // AP_ADVANCEDFAILSAFE_ENABLED diff --git a/libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe_config.h b/libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe_config.h new file mode 100644 index 0000000000..0a804e9dc1 --- /dev/null +++ b/libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe_config.h @@ -0,0 +1,7 @@ +#pragma once + +#include + +#ifndef AP_ADVANCEDFAILSAFE_ENABLED +#define AP_ADVANCEDFAILSAFE_ENABLED 1 +#endif