APM:Libraries
AP_Vehicle_Type.h
Go to the documentation of this file.
1 /*
2  This program is free software: you can redistribute it and/or modify
3  it under the terms of the GNU General Public License as published by
4  the Free Software Foundation, either version 3 of the License, or
5  (at your option) any later version.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program. If not, see <http://www.gnu.org/licenses/>.
14  */
15 #pragma once
16 
17 /*
18  define common vehicle build types. Note that the APM_BUILD_DIRECTORY
19  define is only available with makefile based build, not with
20  arduino.
21  Also note that code needs to support other APM_BUILD_DIRECTORY
22  values for example sketches
23  */
24 #define APM_BUILD_APMrover2 1
25 #define APM_BUILD_ArduCopter 2
26 #define APM_BUILD_ArduPlane 3
27 #define APM_BUILD_AntennaTracker 4
28 #define APM_BUILD_UNKNOWN 5
29 #define APM_BUILD_Replay 6
30 #define APM_BUILD_ArduSub 7
31 
32 /*
33  using this macro catches cases where we try to check vehicle type on
34  build systems that don't support it
35  */
36 #ifdef APM_BUILD_DIRECTORY
37 #define APM_BUILD_TYPE(type) ((type) == APM_BUILD_DIRECTORY)
38 #else
39 #define APM_BUILD_TYPE(type) ((type) == APM_BUILD_UNKNOWN)
40 #endif