AC_Fence: defualt to AP_FENCE_ENABLED 2, 1 disables dummy methods

This commit is contained in:
Iampete1 2022-07-25 17:51:32 +01:00 committed by Andrew Tridgell
parent 68e29f02a1
commit 2fc9cf97d4
3 changed files with 9 additions and 3 deletions

View File

@ -5,7 +5,7 @@
#include <AP_Vehicle/AP_Vehicle_Type.h>
#ifndef AC_FENCE_DUMMY_METHODS_ENABLED
#define AC_FENCE_DUMMY_METHODS_ENABLED (!(APM_BUILD_TYPE(APM_BUILD_Rover) | APM_BUILD_COPTER_OR_HELI | APM_BUILD_TYPE(APM_BUILD_ArduPlane) | APM_BUILD_TYPE(APM_BUILD_ArduSub)))
#define AC_FENCE_DUMMY_METHODS_ENABLED (!(APM_BUILD_TYPE(APM_BUILD_Rover) | APM_BUILD_COPTER_OR_HELI | APM_BUILD_TYPE(APM_BUILD_ArduPlane) | APM_BUILD_TYPE(APM_BUILD_ArduSub) | (AP_FENCE_ENABLED == 1)))
#endif
#if !AC_FENCE_DUMMY_METHODS_ENABLED

View File

@ -1,5 +1,11 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
// Enabled 0 is compiled out
// Enabled 1 is always enabled on all vehicles
// Enabled 2 is enabled with dummy methods for tracker and blimp
#ifndef AP_FENCE_ENABLED
#define AP_FENCE_ENABLED 1
#define AP_FENCE_ENABLED 2
#endif

View File

@ -5,7 +5,7 @@
#include <AP_Vehicle/AP_Vehicle_Type.h>
#ifndef AC_FENCE_DUMMY_METHODS_ENABLED
#define AC_FENCE_DUMMY_METHODS_ENABLED (!(APM_BUILD_TYPE(APM_BUILD_Rover) | APM_BUILD_COPTER_OR_HELI | APM_BUILD_TYPE(APM_BUILD_ArduPlane) | APM_BUILD_TYPE(APM_BUILD_ArduSub)))
#define AC_FENCE_DUMMY_METHODS_ENABLED (!(APM_BUILD_TYPE(APM_BUILD_Rover) | APM_BUILD_COPTER_OR_HELI | APM_BUILD_TYPE(APM_BUILD_ArduPlane) | APM_BUILD_TYPE(APM_BUILD_ArduSub) | (AP_FENCE_ENABLED == 1)))
#endif
#if !AC_FENCE_DUMMY_METHODS_ENABLED