diff --git a/libraries/AP_HAL/AP_HAL_Namespace.h b/libraries/AP_HAL/AP_HAL_Namespace.h index e224339f89..8452b3d37c 100644 --- a/libraries/AP_HAL/AP_HAL_Namespace.h +++ b/libraries/AP_HAL/AP_HAL_Namespace.h @@ -27,6 +27,14 @@ #define DELEGATE_FUNCTION1(rettype, args...) fastdelegate::FastDelegate1 #define DELEGATE_FUNCTION2(rettype, args...) fastdelegate::FastDelegate2 +#ifndef APM_BUILD_FUNCTOR +#define APM_BUILD_FUNCTOR 0 +#endif + +#if APM_BUILD_FUNCTOR +#include "utility/functor.h" +#endif + namespace AP_HAL { /* Toplevel pure virtual class Hal.*/ diff --git a/libraries/AP_Vehicle/AP_Vehicle.h b/libraries/AP_Vehicle/AP_Vehicle.h index c6e8e2f348..f071463bca 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.h +++ b/libraries/AP_Vehicle/AP_Vehicle.h @@ -74,6 +74,9 @@ public: #define APM_BUILD_TYPE(type) ((type) == APM_BUILD_UNKNOWN) #endif +#ifndef APM_BUILD_FUNCTOR +#define APM_BUILD_FUNCTOR 0 +#endif #if APM_BUILD_TYPE(APM_BUILD_APMrover2) || APM_BUILD_TYPE(APM_BUILD_ArduPlane) # define APM_BUILD_DELEGATES 1