AC_Fence: add AC_FENCE define

This commit is contained in:
Iampete1 2022-03-04 16:42:09 +00:00 committed by Andrew Tridgell
parent 9e86f4dc43
commit 6a6f3ec4e5
2 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,7 @@
#include "AC_Fence.h"
#if AC_FENCE
#include <AP_AHRS/AP_AHRS.h>
#include <AP_HAL/AP_HAL.h>
#include <AP_Logger/AP_Logger.h>
@ -705,3 +707,5 @@ AC_Fence *fence()
}
}
#endif // AC_FENCE

View File

@ -6,6 +6,12 @@
#include <AP_Math/AP_Math.h>
#include <AC_Fence/AC_PolyFence_loader.h>
#ifndef AC_FENCE
#define AC_FENCE 1
#endif
#if AC_FENCE
// bit masks for enabled fence types. Used for TYPE parameter
#define AC_FENCE_TYPE_ALT_MAX 1 // high alt fence which usually initiates an RTL
#define AC_FENCE_TYPE_CIRCLE 2 // circular horizontal fence (usually initiates an RTL)
@ -224,3 +230,5 @@ private:
namespace AP {
AC_Fence *fence();
};
#endif // AC_FENCE