AP_AdvancedFailsafe: add and use AP_ADVANCEDFAILSAFE_ENABLED

This commit is contained in:
Peter Barker 2023-02-06 16:39:02 +11:00 committed by Andrew Tridgell
parent 28690d66b2
commit 6ce546d2fb
3 changed files with 19 additions and 1 deletions

View File

@ -19,8 +19,11 @@
This is an advanced failsafe module originally modelled on the
failsafe rules of the Outback Challenge
*/
#include <AP_HAL/AP_HAL.h>
#include "AP_AdvancedFailsafe.h"
#if AP_ADVANCEDFAILSAFE_ENABLED
#include <AP_HAL/AP_HAL.h>
#include <RC_Channel/RC_Channel.h>
#include <SRV_Channel/SRV_Channel.h>
#include <GCS_MAVLink/GCS.h>
@ -472,3 +475,5 @@ AP_AdvancedFailsafe *advancedfailsafe()
}
};
#endif // AP_ADVANCEDFAILSAFE_ENABLED

View File

@ -20,6 +20,10 @@
Andrew Tridgell and CanberraUAV, August 2012
*/
#include "AP_AdvancedFailsafe_config.h"
#if AP_ADVANCEDFAILSAFE_ENABLED
#include <AP_Common/AP_Common.h>
#include <AP_Param/AP_Param.h>
#include <inttypes.h>
@ -163,3 +167,5 @@ private:
namespace AP {
AP_AdvancedFailsafe *advancedfailsafe();
};
#endif // AP_ADVANCEDFAILSAFE_ENABLED

View File

@ -0,0 +1,7 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef AP_ADVANCEDFAILSAFE_ENABLED
#define AP_ADVANCEDFAILSAFE_ENABLED 1
#endif