2010-11-25 00:04:30 -04:00
|
|
|
/** @file
|
2011-08-31 02:23:18 -03:00
|
|
|
* @brief MAVLink comm protocol generated from common.xml
|
2011-08-05 05:18:08 -03:00
|
|
|
* @see http://qgroundcontrol.org/mavlink/
|
2010-11-25 00:04:30 -04:00
|
|
|
*/
|
|
|
|
#ifndef COMMON_H
|
|
|
|
#define COMMON_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2011-08-31 02:23:18 -03:00
|
|
|
// MESSAGE LENGTHS AND CRCS
|
|
|
|
|
|
|
|
#ifndef MAVLINK_MESSAGE_LENGTHS
|
|
|
|
#define MAVLINK_MESSAGE_LENGTHS {3, 4, 8, 14, 8, 28, 3, 32, 0, 2, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 19, 2, 23, 21, 0, 37, 26, 101, 26, 16, 32, 32, 37, 32, 11, 17, 17, 16, 18, 36, 4, 4, 2, 2, 4, 2, 2, 3, 14, 12, 18, 16, 8, 27, 25, 18, 18, 24, 24, 0, 0, 0, 26, 16, 36, 5, 6, 56, 26, 21, 18, 0, 0, 18, 20, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 14, 14, 51, 5}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MAVLINK_MESSAGE_CRCS
|
|
|
|
#define MAVLINK_MESSAGE_CRCS {72, 39, 190, 92, 191, 217, 104, 119, 0, 219, 60, 186, 10, 0, 0, 0, 0, 0, 0, 0, 89, 159, 162, 121, 0, 149, 222, 110, 179, 136, 66, 126, 185, 147, 112, 252, 162, 215, 229, 128, 9, 106, 101, 213, 4, 229, 21, 214, 215, 14, 206, 50, 157, 126, 108, 213, 95, 5, 127, 0, 0, 0, 57, 126, 130, 119, 193, 191, 236, 158, 143, 0, 0, 104, 123, 131, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 178, 224, 60, 106, 7}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MAVLINK_MESSAGE_INFO
|
2011-08-31 21:50:13 -03:00
|
|
|
#define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_BOOT, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_SYSTEM_TIME_UTC, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, {NULL}, MAVLINK_MESSAGE_INFO_ACTION_ACK, MAVLINK_MESSAGE_INFO_ACTION, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_SET_NAV_MODE, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, {NULL}, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_LOCAL_POSITION, MAVLINK_MESSAGE_INFO_GPS_RAW, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_WAYPOINT, MAVLINK_MESSAGE_INFO_WAYPOINT_REQUEST, MAVLINK_MESSAGE_INFO_WAYPOINT_SET_CURRENT, MAVLINK_MESSAGE_INFO_WAYPOINT_CURRENT, MAVLINK_MESSAGE_INFO_WAYPOINT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_WAYPOINT_COUNT, MAVLINK_MESSAGE_INFO_WAYPOINT_CLEAR_ALL, MAVLINK_MESSAGE_INFO_WAYPOINT_REACHED, MAVLINK_MESSAGE_INFO_WAYPOINT_ACK, MAVLINK_MESSAGE_INFO_GPS_SET_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_LOCAL_ORIGIN_SET, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_SETPOINT_SET, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_SETPOINT, MAVLINK_MESSAGE_INFO_CONTROL_STATUS, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SET_ROLL_PITCH_YAW_THRUST, MAVLINK_MESSAGE_INFO_SET_ROLL_PITCH_YAW_SPEED_THRUST, MAVLINK_MESSAGE_INFO_ROLL_PITCH_YAW_THRUST_SETPOINT, MAVLINK_MESSAGE_INFO_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT, {NULL}, {NULL}, {NULL}, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_POSITION_TARGET, MAVLINK_MESSAGE_INFO_STATE_CORRECTION, MAVLINK_MESSAGE_INFO_SET_ALTITUDE, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, {NULL}, {NULL}, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND, MAVLINK_MESSAGE_INFO_COMMAND_ACK, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, MAVLINK_MESSAGE_INFO_OBJECT_DETECTION_EVENT, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_N
|
2011-08-31 02:23:18 -03:00
|
|
|
#endif
|
2010-11-25 00:04:30 -04:00
|
|
|
|
|
|
|
#include "../protocol.h"
|
|
|
|
|
|
|
|
#define MAVLINK_ENABLED_COMMON
|
|
|
|
|
2011-08-31 02:23:18 -03:00
|
|
|
|
|
|
|
|
2011-01-12 04:57:54 -04:00
|
|
|
// MAVLINK VERSION
|
|
|
|
|
|
|
|
#ifndef MAVLINK_VERSION
|
2011-02-11 07:04:52 -04:00
|
|
|
#define MAVLINK_VERSION 2
|
2011-01-12 04:57:54 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (MAVLINK_VERSION == 0)
|
|
|
|
#undef MAVLINK_VERSION
|
2011-02-11 07:04:52 -04:00
|
|
|
#define MAVLINK_VERSION 2
|
2011-01-12 04:57:54 -04:00
|
|
|
#endif
|
|
|
|
|
2010-11-25 00:04:30 -04:00
|
|
|
// ENUM DEFINITIONS
|
|
|
|
|
2011-08-31 02:23:18 -03:00
|
|
|
|
|
|
|
/** @brief Data stream IDs. A data stream is not a fixed set of messages, but rather a
|
|
|
|
recommendation to the autopilot software. Individual autopilots may or may not obey
|
|
|
|
the recommended messages.
|
|
|
|
*/
|
2011-10-29 04:07:09 -03:00
|
|
|
#ifndef HAVE_ENUM_MAV_DATA_STREAM
|
|
|
|
#define HAVE_ENUM_MAV_DATA_STREAM
|
2011-02-11 07:04:52 -04:00
|
|
|
enum MAV_DATA_STREAM
|
|
|
|
{
|
2011-08-05 05:18:08 -03:00
|
|
|
MAV_DATA_STREAM_ALL=0, /* Enable all data streams | */
|
|
|
|
MAV_DATA_STREAM_RAW_SENSORS=1, /* Enable IMU_RAW, GPS_RAW, GPS_STATUS packets. | */
|
|
|
|
MAV_DATA_STREAM_EXTENDED_STATUS=2, /* Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS | */
|
|
|
|
MAV_DATA_STREAM_RC_CHANNELS=3, /* Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW | */
|
|
|
|
MAV_DATA_STREAM_RAW_CONTROLLER=4, /* Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT. | */
|
|
|
|
MAV_DATA_STREAM_POSITION=6, /* Enable LOCAL_POSITION, GLOBAL_POSITION/GLOBAL_POSITION_INT messages. | */
|
|
|
|
MAV_DATA_STREAM_EXTRA1=10, /* Dependent on the autopilot | */
|
|
|
|
MAV_DATA_STREAM_EXTRA2=11, /* Dependent on the autopilot | */
|
|
|
|
MAV_DATA_STREAM_EXTRA3=12, /* Dependent on the autopilot | */
|
2011-08-31 02:23:18 -03:00
|
|
|
MAV_DATA_STREAM_ENUM_END=13, /* | */
|
2011-02-11 07:04:52 -04:00
|
|
|
};
|
2011-10-29 04:07:09 -03:00
|
|
|
#endif
|
2011-02-11 07:04:52 -04:00
|
|
|
|
2011-08-31 02:23:18 -03:00
|
|
|
/** @brief The ROI (region of interest) for the vehicle. This can be
|
|
|
|
be used by the vehicle for camera/vehicle attitude alignment (see
|
|
|
|
MAV_CMD_NAV_ROI).
|
|
|
|
*/
|
2011-10-29 04:07:09 -03:00
|
|
|
#ifndef HAVE_ENUM_MAV_ROI
|
|
|
|
#define HAVE_ENUM_MAV_ROI
|
2011-05-07 17:49:13 -03:00
|
|
|
enum MAV_ROI
|
|
|
|
{
|
2011-08-05 05:18:08 -03:00
|
|
|
MAV_ROI_NONE=0, /* No region of interest. | */
|
|
|
|
MAV_ROI_WPNEXT=1, /* Point toward next waypoint. | */
|
|
|
|
MAV_ROI_WPINDEX=2, /* Point toward given waypoint. | */
|
|
|
|
MAV_ROI_LOCATION=3, /* Point toward fixed location. | */
|
|
|
|
MAV_ROI_TARGET=4, /* Point toward of given id. | */
|
2011-08-31 02:23:18 -03:00
|
|
|
MAV_ROI_ENUM_END=5, /* | */
|
2011-05-07 17:49:13 -03:00
|
|
|
};
|
2011-10-29 04:07:09 -03:00
|
|
|
#endif
|
2011-05-07 17:49:13 -03:00
|
|
|
|
2010-11-25 00:04:30 -04:00
|
|
|
// MESSAGE DEFINITIONS
|
|
|
|
#include "./mavlink_msg_heartbeat.h"
|
|
|
|
#include "./mavlink_msg_boot.h"
|
|
|
|
#include "./mavlink_msg_system_time.h"
|
|
|
|
#include "./mavlink_msg_ping.h"
|
2011-02-08 19:16:58 -04:00
|
|
|
#include "./mavlink_msg_system_time_utc.h"
|
2011-02-19 13:54:14 -04:00
|
|
|
#include "./mavlink_msg_change_operator_control.h"
|
|
|
|
#include "./mavlink_msg_change_operator_control_ack.h"
|
2011-03-16 07:09:22 -03:00
|
|
|
#include "./mavlink_msg_auth_key.h"
|
2010-11-25 00:04:30 -04:00
|
|
|
#include "./mavlink_msg_action_ack.h"
|
2011-02-08 19:16:58 -04:00
|
|
|
#include "./mavlink_msg_action.h"
|
2010-11-25 00:04:30 -04:00
|
|
|
#include "./mavlink_msg_set_mode.h"
|
|
|
|
#include "./mavlink_msg_set_nav_mode.h"
|
|
|
|
#include "./mavlink_msg_param_request_read.h"
|
|
|
|
#include "./mavlink_msg_param_request_list.h"
|
|
|
|
#include "./mavlink_msg_param_value.h"
|
|
|
|
#include "./mavlink_msg_param_set.h"
|
2011-02-11 07:04:52 -04:00
|
|
|
#include "./mavlink_msg_gps_raw_int.h"
|
|
|
|
#include "./mavlink_msg_scaled_imu.h"
|
|
|
|
#include "./mavlink_msg_gps_status.h"
|
2010-11-25 00:04:30 -04:00
|
|
|
#include "./mavlink_msg_raw_imu.h"
|
|
|
|
#include "./mavlink_msg_raw_pressure.h"
|
2011-05-07 17:49:13 -03:00
|
|
|
#include "./mavlink_msg_scaled_pressure.h"
|
2010-11-25 00:04:30 -04:00
|
|
|
#include "./mavlink_msg_attitude.h"
|
|
|
|
#include "./mavlink_msg_local_position.h"
|
|
|
|
#include "./mavlink_msg_global_position.h"
|
2011-02-11 07:04:52 -04:00
|
|
|
#include "./mavlink_msg_gps_raw.h"
|
2010-11-25 00:04:30 -04:00
|
|
|
#include "./mavlink_msg_sys_status.h"
|
|
|
|
#include "./mavlink_msg_rc_channels_raw.h"
|
|
|
|
#include "./mavlink_msg_rc_channels_scaled.h"
|
2011-02-08 19:16:58 -04:00
|
|
|
#include "./mavlink_msg_servo_output_raw.h"
|
2010-11-25 00:04:30 -04:00
|
|
|
#include "./mavlink_msg_waypoint.h"
|
|
|
|
#include "./mavlink_msg_waypoint_request.h"
|
|
|
|
#include "./mavlink_msg_waypoint_set_current.h"
|
|
|
|
#include "./mavlink_msg_waypoint_current.h"
|
|
|
|
#include "./mavlink_msg_waypoint_request_list.h"
|
|
|
|
#include "./mavlink_msg_waypoint_count.h"
|
|
|
|
#include "./mavlink_msg_waypoint_clear_all.h"
|
|
|
|
#include "./mavlink_msg_waypoint_reached.h"
|
|
|
|
#include "./mavlink_msg_waypoint_ack.h"
|
2011-02-11 07:04:52 -04:00
|
|
|
#include "./mavlink_msg_gps_set_global_origin.h"
|
|
|
|
#include "./mavlink_msg_gps_local_origin_set.h"
|
2010-11-25 00:04:30 -04:00
|
|
|
#include "./mavlink_msg_local_position_setpoint_set.h"
|
|
|
|
#include "./mavlink_msg_local_position_setpoint.h"
|
2011-02-08 19:16:58 -04:00
|
|
|
#include "./mavlink_msg_control_status.h"
|
|
|
|
#include "./mavlink_msg_safety_set_allowed_area.h"
|
|
|
|
#include "./mavlink_msg_safety_allowed_area.h"
|
2011-08-13 01:45:48 -03:00
|
|
|
#include "./mavlink_msg_set_roll_pitch_yaw_thrust.h"
|
|
|
|
#include "./mavlink_msg_set_roll_pitch_yaw_speed_thrust.h"
|
|
|
|
#include "./mavlink_msg_roll_pitch_yaw_thrust_setpoint.h"
|
|
|
|
#include "./mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint.h"
|
2011-02-08 19:16:58 -04:00
|
|
|
#include "./mavlink_msg_nav_controller_output.h"
|
2010-11-25 00:04:30 -04:00
|
|
|
#include "./mavlink_msg_position_target.h"
|
|
|
|
#include "./mavlink_msg_state_correction.h"
|
|
|
|
#include "./mavlink_msg_set_altitude.h"
|
|
|
|
#include "./mavlink_msg_request_data_stream.h"
|
2011-08-13 01:45:48 -03:00
|
|
|
#include "./mavlink_msg_hil_state.h"
|
|
|
|
#include "./mavlink_msg_hil_controls.h"
|
2010-11-25 00:04:30 -04:00
|
|
|
#include "./mavlink_msg_manual_control.h"
|
2011-05-18 00:24:31 -03:00
|
|
|
#include "./mavlink_msg_rc_channels_override.h"
|
2011-01-12 04:57:54 -04:00
|
|
|
#include "./mavlink_msg_global_position_int.h"
|
2011-02-08 19:16:58 -04:00
|
|
|
#include "./mavlink_msg_vfr_hud.h"
|
2011-03-08 07:07:58 -04:00
|
|
|
#include "./mavlink_msg_command.h"
|
|
|
|
#include "./mavlink_msg_command_ack.h"
|
2011-08-31 02:23:18 -03:00
|
|
|
#include "./mavlink_msg_optical_flow.h"
|
|
|
|
#include "./mavlink_msg_object_detection_event.h"
|
2011-02-08 19:16:58 -04:00
|
|
|
#include "./mavlink_msg_debug_vect.h"
|
2011-01-24 20:31:38 -04:00
|
|
|
#include "./mavlink_msg_named_value_float.h"
|
|
|
|
#include "./mavlink_msg_named_value_int.h"
|
2010-11-25 00:04:30 -04:00
|
|
|
#include "./mavlink_msg_statustext.h"
|
|
|
|
#include "./mavlink_msg_debug.h"
|
2011-05-07 17:49:13 -03:00
|
|
|
|
2010-11-25 00:04:30 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2011-08-31 02:23:18 -03:00
|
|
|
#endif // __cplusplus
|
|
|
|
#endif // COMMON_H
|