RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
minimal.h
浏览该文件的文档.
1
5#pragma once
6#ifndef MAVLINK_MINIMAL_H
7#define MAVLINK_MINIMAL_H
8
9#ifndef MAVLINK_H
10 #error Wrong include order: MAVLINK_MINIMAL.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
11#endif
12
13#undef MAVLINK_THIS_XML_IDX
14#define MAVLINK_THIS_XML_IDX 0
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20// MESSAGE LENGTHS AND CRCS
21
22#ifndef MAVLINK_MESSAGE_LENGTHS
23#define MAVLINK_MESSAGE_LENGTHS {}
24#endif
25
26#ifndef MAVLINK_MESSAGE_CRCS
27#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 0, 0, 0}}
28#endif
29
30#include "../protocol.h"
31
32#define MAVLINK_ENABLED_MINIMAL
33
34// ENUM DEFINITIONS
35
36
38#ifndef HAVE_ENUM_MAV_AUTOPILOT
39#define HAVE_ENUM_MAV_AUTOPILOT
40typedef enum MAV_AUTOPILOT
41{
42 MAV_AUTOPILOT_GENERIC=0, /* Generic autopilot, full support for everything | */
43 MAV_AUTOPILOT_PIXHAWK=1, /* PIXHAWK autopilot, http://pixhawk.ethz.ch | */
44 MAV_AUTOPILOT_SLUGS=2, /* SLUGS autopilot, http://slugsuav.soe.ucsc.edu | */
45 MAV_AUTOPILOT_ARDUPILOTMEGA=3, /* ArduPilotMega / ArduCopter, http://diydrones.com | */
46 MAV_AUTOPILOT_OPENPILOT=4, /* OpenPilot, http://openpilot.org | */
47 MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY=5, /* Generic autopilot only supporting simple waypoints | */
48 MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY=6, /* Generic autopilot supporting waypoints and other simple navigation commands | */
49 MAV_AUTOPILOT_GENERIC_MISSION_FULL=7, /* Generic autopilot supporting the full mission command set | */
50 MAV_AUTOPILOT_INVALID=8, /* No valid autopilot, e.g. a GCS or other MAVLink component | */
51 MAV_AUTOPILOT_PPZ=9, /* PPZ UAV - http://nongnu.org/paparazzi | */
52 MAV_AUTOPILOT_UDB=10, /* UAV Dev Board | */
53 MAV_AUTOPILOT_FP=11, /* FlexiPilot | */
54 MAV_AUTOPILOT_ENUM_END=12, /* | */
55} MAV_AUTOPILOT;
56#endif
57
59#ifndef HAVE_ENUM_MAV_TYPE
60#define HAVE_ENUM_MAV_TYPE
61typedef enum MAV_TYPE
62{
63 MAV_TYPE_GENERIC=0, /* Generic micro air vehicle. | */
64 MAV_TYPE_FIXED_WING=1, /* Fixed wing aircraft. | */
65 MAV_TYPE_QUADROTOR=2, /* Quadrotor | */
66 MAV_TYPE_COAXIAL=3, /* Coaxial helicopter | */
67 MAV_TYPE_HELICOPTER=4, /* Normal helicopter with tail rotor. | */
68 MAV_TYPE_ANTENNA_TRACKER=5, /* Ground installation | */
69 MAV_TYPE_GCS=6, /* Operator control unit / ground control station | */
70 MAV_TYPE_AIRSHIP=7, /* Airship, controlled | */
71 MAV_TYPE_FREE_BALLOON=8, /* Free balloon, uncontrolled | */
72 MAV_TYPE_ROCKET=9, /* Rocket | */
73 MAV_TYPE_GROUND_ROVER=10, /* Ground rover | */
74 MAV_TYPE_SURFACE_BOAT=11, /* Surface vessel, boat, ship | */
75 MAV_TYPE_SUBMARINE=12, /* Submarine | */
76 MAV_TYPE_HEXAROTOR=13, /* Hexarotor | */
77 MAV_TYPE_OCTOROTOR=14, /* Octorotor | */
78 MAV_TYPE_TRICOPTER=15, /* Octorotor | */
79 MAV_TYPE_FLAPPING_WING=16, /* Flapping wing | */
80 MAV_TYPE_ENUM_END=17, /* | */
81} MAV_TYPE;
82#endif
83
85#ifndef HAVE_ENUM_MAV_MODE_FLAG
86#define HAVE_ENUM_MAV_MODE_FLAG
87typedef enum MAV_MODE_FLAG
88{
89 MAV_MODE_FLAG_CUSTOM_MODE_ENABLED=1, /* 0b00000001 Reserved for future use. | */
90 MAV_MODE_FLAG_TEST_ENABLED=2, /* 0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations. | */
91 MAV_MODE_FLAG_AUTO_ENABLED=4, /* 0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation. | */
92 MAV_MODE_FLAG_GUIDED_ENABLED=8, /* 0b00001000 guided mode enabled, system flies waypoints / mission items. | */
93 MAV_MODE_FLAG_STABILIZE_ENABLED=16, /* 0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around. | */
94 MAV_MODE_FLAG_HIL_ENABLED=32, /* 0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational. | */
95 MAV_MODE_FLAG_MANUAL_INPUT_ENABLED=64, /* 0b01000000 remote control input is enabled. | */
96 MAV_MODE_FLAG_SAFETY_ARMED=128, /* 0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. | */
97 MAV_MODE_FLAG_ENUM_END=129, /* | */
98} MAV_MODE_FLAG;
99#endif
100
102#ifndef HAVE_ENUM_MAV_MODE_FLAG_DECODE_POSITION
103#define HAVE_ENUM_MAV_MODE_FLAG_DECODE_POSITION
104typedef enum MAV_MODE_FLAG_DECODE_POSITION
105{
106 MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE=1, /* Eighth bit: 00000001 | */
107 MAV_MODE_FLAG_DECODE_POSITION_TEST=2, /* Seventh bit: 00000010 | */
108 MAV_MODE_FLAG_DECODE_POSITION_AUTO=4, /* Sixt bit: 00000100 | */
109 MAV_MODE_FLAG_DECODE_POSITION_GUIDED=8, /* Fifth bit: 00001000 | */
110 MAV_MODE_FLAG_DECODE_POSITION_STABILIZE=16, /* Fourth bit: 00010000 | */
111 MAV_MODE_FLAG_DECODE_POSITION_HIL=32, /* Third bit: 00100000 | */
112 MAV_MODE_FLAG_DECODE_POSITION_MANUAL=64, /* Second bit: 01000000 | */
113 MAV_MODE_FLAG_DECODE_POSITION_SAFETY=128, /* First bit: 10000000 | */
114 MAV_MODE_FLAG_DECODE_POSITION_ENUM_END=129, /* | */
115} MAV_MODE_FLAG_DECODE_POSITION;
116#endif
117
119#ifndef HAVE_ENUM_MAV_STATE
120#define HAVE_ENUM_MAV_STATE
121typedef enum MAV_STATE
122{
123 MAV_STATE_UNINIT=0, /* Uninitialized system, state is unknown. | */
124 MAV_STATE_BOOT=1, /* System is booting up. | */
125 MAV_STATE_CALIBRATING=2, /* System is calibrating and not flight-ready. | */
126 MAV_STATE_STANDBY=3, /* System is grounded and on standby. It can be launched any time. | */
127 MAV_STATE_ACTIVE=4, /* System is active and might be already airborne. Motors are engaged. | */
128 MAV_STATE_CRITICAL=5, /* System is in a non-normal flight mode. It can however still navigate. | */
129 MAV_STATE_EMERGENCY=6, /* System is in a non-normal flight mode. It lost control over parts or over the whole airframe. It is in mayday and going down. | */
130 MAV_STATE_POWEROFF=7, /* System just initialized its power-down sequence, will shut down now. | */
131 MAV_STATE_ENUM_END=8, /* | */
132} MAV_STATE;
133#endif
134
135// MAVLINK VERSION
136
137#ifndef MAVLINK_VERSION
138#define MAVLINK_VERSION 2
139#endif
140
141#if (MAVLINK_VERSION == 0)
142#undef MAVLINK_VERSION
143#define MAVLINK_VERSION 2
144#endif
145
146// MESSAGE DEFINITIONS
147#include "./mavlink_msg_heartbeat.h"
148
149// base include
150
151
152#undef MAVLINK_THIS_XML_IDX
153#define MAVLINK_THIS_XML_IDX 0
154
155#if MAVLINK_THIS_XML_IDX == MAVLINK_PRIMARY_XML_IDX
156# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT}
157# define MAVLINK_MESSAGE_NAMES {{ "HEARTBEAT", 0 }}
158# if MAVLINK_COMMAND_24BIT
159# include "../mavlink_get_info.h"
160# endif
161#endif
162
163#ifdef __cplusplus
164}
165#endif // __cplusplus
166#endif // MAVLINK_MINIMAL_H