AP_Vehicle: added APM_BUILD_TYPE() macro

this makes checking build type less fragile
This commit is contained in:
Andrew Tridgell 2014-03-26 12:41:53 +11:00
parent e3792f9b26
commit fbec098e2f
1 changed files with 8 additions and 0 deletions

View File

@ -58,4 +58,12 @@ public:
#define APM_BUILD_ArduPlane 3
#define APM_BUILD_AntennaTracker 4
/*
using this macro catches cases where we try to check vehicle type on
build systems that don't support it
*/
#ifdef APM_BUILD_DIRECTORY
#define APM_BUILD_TYPE(type) ((type) == APM_BUILD_DIRECTORY)
#endif
#endif // AP_VEHICLE_H