mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
Allow to change to functor implementation
Start to add code behind APM_BUILD_FUNCTOR to support changing the functor implementation (without breaking the build while the change is not complete).
This commit is contained in:
parent
a1e1503e1a
commit
4b5cf24a81
@ -27,6 +27,14 @@
|
||||
#define DELEGATE_FUNCTION1(rettype, args...) fastdelegate::FastDelegate1<args, rettype>
|
||||
#define DELEGATE_FUNCTION2(rettype, args...) fastdelegate::FastDelegate2<args, rettype>
|
||||
|
||||
#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.*/
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user