Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 1701 → Rev 1702

/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/common.h
0,0 → 1,446
/** @file
* @brief MAVLink comm protocol generated from common.xml
* @see http://qgroundcontrol.org/mavlink/
*/
#ifndef COMMON_H
#define COMMON_H
 
#ifdef __cplusplus
extern "C" {
#endif
 
// MESSAGE LENGTHS AND CRCS
 
#ifndef MAVLINK_MESSAGE_LENGTHS
#define MAVLINK_MESSAGE_LENGTHS {9, 31, 12, 0, 14, 28, 3, 32, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 20, 2, 25, 23, 30, 101, 22, 26, 16, 14, 28, 32, 28, 28, 22, 22, 21, 6, 6, 37, 4, 4, 2, 2, 4, 2, 2, 3, 13, 12, 19, 17, 15, 15, 27, 25, 18, 18, 20, 20, 9, 54, 26, 0, 36, 0, 6, 4, 0, 21, 18, 0, 0, 0, 20, 0, 33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 56, 42, 33, 0, 0, 0, 0, 0, 0, 0, 26, 32, 32, 20, 32, 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, 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, 30, 18, 18, 51, 9, 0}
#endif
 
#ifndef MAVLINK_MESSAGE_CRCS
#define MAVLINK_MESSAGE_CRCS {50, 124, 137, 0, 237, 217, 104, 119, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 214, 159, 220, 168, 24, 23, 170, 144, 67, 115, 39, 246, 185, 104, 237, 244, 222, 212, 9, 254, 230, 28, 28, 132, 221, 232, 11, 153, 41, 39, 214, 223, 141, 33, 15, 3, 100, 24, 239, 238, 30, 200, 183, 0, 130, 0, 148, 21, 0, 52, 124, 0, 0, 0, 20, 0, 152, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 231, 183, 63, 54, 0, 0, 0, 0, 0, 0, 0, 175, 102, 158, 208, 56, 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, 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, 204, 49, 170, 44, 83, 46, 0}
#endif
 
#ifndef MAVLINK_MESSAGE_INFO
#define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_SET_MODE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_SET_LOCAL_POSITION_SETPOINT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_SETPOINT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_SETPOINT_INT, MAVLINK_MESSAGE_INFO_SET_GLOBAL_POSITION_SETPOINT_INT, 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, MAVLINK_MESSAGE_INFO_SET_QUAD_MOTORS_SETPOINT, MAVLINK_MESSAGE_INFO_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_STATE_CORRECTION, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_VFR_HUD, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}}
#endif
 
#include "../protocol.h"
 
#define MAVLINK_ENABLED_COMMON
 
// ENUM DEFINITIONS
 
 
/** @brief Micro air vehicle / autopilot classes. This identifies the individual model. */
#ifndef HAVE_ENUM_MAV_AUTOPILOT
#define HAVE_ENUM_MAV_AUTOPILOT
enum MAV_AUTOPILOT
{
MAV_AUTOPILOT_GENERIC=0, /* Generic autopilot, full support for everything | */
MAV_AUTOPILOT_PIXHAWK=1, /* PIXHAWK autopilot, http://pixhawk.ethz.ch | */
MAV_AUTOPILOT_SLUGS=2, /* SLUGS autopilot, http://slugsuav.soe.ucsc.edu | */
MAV_AUTOPILOT_ARDUPILOTMEGA=3, /* ArduPilotMega / ArduCopter, http://diydrones.com | */
MAV_AUTOPILOT_OPENPILOT=4, /* OpenPilot, http://openpilot.org | */
MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY=5, /* Generic autopilot only supporting simple waypoints | */
MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY=6, /* Generic autopilot supporting waypoints and other simple navigation commands | */
MAV_AUTOPILOT_GENERIC_MISSION_FULL=7, /* Generic autopilot supporting the full mission command set | */
MAV_AUTOPILOT_INVALID=8, /* No valid autopilot, e.g. a GCS or other MAVLink component | */
MAV_AUTOPILOT_PPZ=9, /* PPZ UAV - http://nongnu.org/paparazzi | */
MAV_AUTOPILOT_UDB=10, /* UAV Dev Board | */
MAV_AUTOPILOT_FP=11, /* FlexiPilot | */
MAV_AUTOPILOT_ENUM_END=12, /* | */
};
#endif
 
/** @brief */
#ifndef HAVE_ENUM_MAV_TYPE
#define HAVE_ENUM_MAV_TYPE
enum MAV_TYPE
{
MAV_TYPE_GENERIC=0, /* Generic micro air vehicle. | */
MAV_TYPE_FIXED_WING=1, /* Fixed wing aircraft. | */
MAV_TYPE_QUADROTOR=2, /* Quadrotor | */
MAV_TYPE_COAXIAL=3, /* Coaxial helicopter | */
MAV_TYPE_HELICOPTER=4, /* Normal helicopter with tail rotor. | */
MAV_TYPE_ANTENNA_TRACKER=5, /* Ground installation | */
MAV_TYPE_GCS=6, /* Operator control unit / ground control station | */
MAV_TYPE_AIRSHIP=7, /* Airship, controlled | */
MAV_TYPE_FREE_BALLOON=8, /* Free balloon, uncontrolled | */
MAV_TYPE_ROCKET=9, /* Rocket | */
MAV_TYPE_GROUND_ROVER=10, /* Ground rover | */
MAV_TYPE_SURFACE_BOAT=11, /* Surface vessel, boat, ship | */
MAV_TYPE_SUBMARINE=12, /* Submarine | */
MAV_TYPE_HEXAROTOR=13, /* Hexarotor | */
MAV_TYPE_OCTOROTOR=14, /* Octorotor | */
MAV_TYPE_TRICOPTER=15, /* Octorotor | */
MAV_TYPE_FLAPPING_WING=16, /* Flapping wing | */
MAV_TYPE_ENUM_END=17, /* | */
};
#endif
 
/** @brief These flags encode the MAV mode. */
#ifndef HAVE_ENUM_MAV_MODE_FLAG
#define HAVE_ENUM_MAV_MODE_FLAG
enum MAV_MODE_FLAG
{
MAV_MODE_FLAG_CUSTOM_MODE_ENABLED=1, /* 0b00000001 Reserved for future use. | */
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. | */
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. | */
MAV_MODE_FLAG_GUIDED_ENABLED=8, /* 0b00001000 guided mode enabled, system flies MISSIONs / mission items. | */
MAV_MODE_FLAG_STABILIZE_ENABLED=16, /* 0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around. | */
MAV_MODE_FLAG_HIL_ENABLED=32, /* 0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational. | */
MAV_MODE_FLAG_MANUAL_INPUT_ENABLED=64, /* 0b01000000 remote control input is enabled. | */
MAV_MODE_FLAG_SAFETY_ARMED=128, /* 0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. | */
MAV_MODE_FLAG_ENUM_END=129, /* | */
};
#endif
 
/** @brief These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not. */
#ifndef HAVE_ENUM_MAV_MODE_FLAG_DECODE_POSITION
#define HAVE_ENUM_MAV_MODE_FLAG_DECODE_POSITION
enum MAV_MODE_FLAG_DECODE_POSITION
{
MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE=1, /* Eighth bit: 00000001 | */
MAV_MODE_FLAG_DECODE_POSITION_TEST=2, /* Seventh bit: 00000010 | */
MAV_MODE_FLAG_DECODE_POSITION_AUTO=4, /* Sixt bit: 00000100 | */
MAV_MODE_FLAG_DECODE_POSITION_GUIDED=8, /* Fifth bit: 00001000 | */
MAV_MODE_FLAG_DECODE_POSITION_STABILIZE=16, /* Fourth bit: 00010000 | */
MAV_MODE_FLAG_DECODE_POSITION_HIL=32, /* Third bit: 00100000 | */
MAV_MODE_FLAG_DECODE_POSITION_MANUAL=64, /* Second bit: 01000000 | */
MAV_MODE_FLAG_DECODE_POSITION_SAFETY=128, /* First bit: 10000000 | */
MAV_MODE_FLAG_DECODE_POSITION_ENUM_END=129, /* | */
};
#endif
 
/** @brief Override command, pauses current mission execution and moves immediately to a position */
#ifndef HAVE_ENUM_MAV_GOTO
#define HAVE_ENUM_MAV_GOTO
enum MAV_GOTO
{
MAV_GOTO_DO_HOLD=0, /* Hold at the current position. | */
MAV_GOTO_DO_CONTINUE=1, /* Continue with the next item in mission execution. | */
MAV_GOTO_HOLD_AT_CURRENT_POSITION=2, /* Hold at the current position of the system | */
MAV_GOTO_HOLD_AT_SPECIFIED_POSITION=3, /* Hold at the position specified in the parameters of the DO_HOLD action | */
MAV_GOTO_ENUM_END=4, /* | */
};
#endif
 
/** @brief These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it
simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override. */
#ifndef HAVE_ENUM_MAV_MODE
#define HAVE_ENUM_MAV_MODE
enum MAV_MODE
{
MAV_MODE_PREFLIGHT=0, /* System is not ready to fly, booting, calibrating, etc. No flag is set. | */
MAV_MODE_MANUAL_DISARMED=64, /* System is allowed to be active, under manual (RC) control, no stabilization | */
MAV_MODE_TEST_DISARMED=66, /* UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only. | */
MAV_MODE_STABILIZE_DISARMED=80, /* System is allowed to be active, under assisted RC control. | */
MAV_MODE_GUIDED_DISARMED=88, /* System is allowed to be active, under autonomous control, manual setpoint | */
MAV_MODE_AUTO_DISARMED=92, /* System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by MISSIONs) | */
MAV_MODE_MANUAL_ARMED=192, /* System is allowed to be active, under manual (RC) control, no stabilization | */
MAV_MODE_TEST_ARMED=194, /* UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only. | */
MAV_MODE_STABILIZE_ARMED=208, /* System is allowed to be active, under assisted RC control. | */
MAV_MODE_GUIDED_ARMED=216, /* System is allowed to be active, under autonomous control, manual setpoint | */
MAV_MODE_AUTO_ARMED=220, /* System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by MISSIONs) | */
MAV_MODE_ENUM_END=221, /* | */
};
#endif
 
/** @brief */
#ifndef HAVE_ENUM_MAV_STATE
#define HAVE_ENUM_MAV_STATE
enum MAV_STATE
{
MAV_STATE_UNINIT=0, /* Uninitialized system, state is unknown. | */
MAV_STATE_BOOT=1, /* System is booting up. | */
MAV_STATE_CALIBRATING=2, /* System is calibrating and not flight-ready. | */
MAV_STATE_STANDBY=3, /* System is grounded and on standby. It can be launched any time. | */
MAV_STATE_ACTIVE=4, /* System is active and might be already airborne. Motors are engaged. | */
MAV_STATE_CRITICAL=5, /* System is in a non-normal flight mode. It can however still navigate. | */
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. | */
MAV_STATE_POWEROFF=7, /* System just initialized its power-down sequence, will shut down now. | */
MAV_STATE_ENUM_END=8, /* | */
};
#endif
 
/** @brief */
#ifndef HAVE_ENUM_MAV_COMPONENT
#define HAVE_ENUM_MAV_COMPONENT
enum MAV_COMPONENT
{
MAV_COMP_ID_ALL=0, /* | */
MAV_COMP_ID_CAMERA=100, /* | */
MAV_COMP_ID_SERVO1=140, /* | */
MAV_COMP_ID_SERVO2=141, /* | */
MAV_COMP_ID_SERVO3=142, /* | */
MAV_COMP_ID_SERVO4=143, /* | */
MAV_COMP_ID_SERVO5=144, /* | */
MAV_COMP_ID_SERVO6=145, /* | */
MAV_COMP_ID_SERVO7=146, /* | */
MAV_COMP_ID_SERVO8=147, /* | */
MAV_COMP_ID_SERVO9=148, /* | */
MAV_COMP_ID_SERVO10=149, /* | */
MAV_COMP_ID_SERVO11=150, /* | */
MAV_COMP_ID_SERVO12=151, /* | */
MAV_COMP_ID_SERVO13=152, /* | */
MAV_COMP_ID_SERVO14=153, /* | */
MAV_COMP_ID_MAPPER=180, /* | */
MAV_COMP_ID_MISSIONPLANNER=190, /* | */
MAV_COMP_ID_PATHPLANNER=195, /* | */
MAV_COMP_ID_IMU=200, /* | */
MAV_COMP_ID_IMU_2=201, /* | */
MAV_COMP_ID_IMU_3=202, /* | */
MAV_COMP_ID_GPS=220, /* | */
MAV_COMP_ID_UDP_BRIDGE=240, /* | */
MAV_COMP_ID_UART_BRIDGE=241, /* | */
MAV_COMP_ID_SYSTEM_CONTROL=250, /* | */
MAV_COMPONENT_ENUM_END=251, /* | */
};
#endif
 
/** @brief */
#ifndef HAVE_ENUM_MAV_FRAME
#define HAVE_ENUM_MAV_FRAME
enum MAV_FRAME
{
MAV_FRAME_GLOBAL=0, /* Global coordinate frame, WGS84 coordinate system. First value / x: latitude, second value / y: longitude, third value / z: positive altitude over mean sea level (MSL) | */
MAV_FRAME_LOCAL_NED=1, /* Local coordinate frame, Z-up (x: north, y: east, z: down). | */
MAV_FRAME_MISSION=2, /* NOT a coordinate frame, indicates a mission command. | */
MAV_FRAME_GLOBAL_RELATIVE_ALT=3, /* Global coordinate frame, WGS84 coordinate system, relative altitude over ground with respect to the home position. First value / x: latitude, second value / y: longitude, third value / z: positive altitude with 0 being at the altitude of the home location. | */
MAV_FRAME_LOCAL_ENU=4, /* Local coordinate frame, Z-down (x: east, y: north, z: up) | */
MAV_FRAME_ENUM_END=5, /* | */
};
#endif
 
/** @brief */
#ifndef HAVE_ENUM_MAVLINK_DATA_STREAM_TYPE
#define HAVE_ENUM_MAVLINK_DATA_STREAM_TYPE
enum MAVLINK_DATA_STREAM_TYPE
{
MAVLINK_DATA_STREAM_IMG_JPEG=1, /* | */
MAVLINK_DATA_STREAM_IMG_BMP=2, /* | */
MAVLINK_DATA_STREAM_IMG_RAW8U=3, /* | */
MAVLINK_DATA_STREAM_IMG_RAW32U=4, /* | */
MAVLINK_DATA_STREAM_IMG_PGM=5, /* | */
MAVLINK_DATA_STREAM_IMG_PNG=6, /* | */
MAVLINK_DATA_STREAM_TYPE_ENUM_END=7, /* | */
};
#endif
 
/** @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. */
#ifndef HAVE_ENUM_MAV_DATA_STREAM
#define HAVE_ENUM_MAV_DATA_STREAM
enum MAV_DATA_STREAM
{
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 | */
MAV_DATA_STREAM_ENUM_END=13, /* | */
};
#endif
 
/** @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). */
#ifndef HAVE_ENUM_MAV_ROI
#define HAVE_ENUM_MAV_ROI
enum MAV_ROI
{
MAV_ROI_NONE=0, /* No region of interest. | */
MAV_ROI_WPNEXT=1, /* Point toward next MISSION. | */
MAV_ROI_WPINDEX=2, /* Point toward given MISSION. | */
MAV_ROI_LOCATION=3, /* Point toward fixed location. | */
MAV_ROI_TARGET=4, /* Point toward of given id. | */
MAV_ROI_ENUM_END=5, /* | */
};
#endif
 
/** @brief ACK / NACK / ERROR values as a result of MAV_CMDs and for mission item transmission. */
#ifndef HAVE_ENUM_MAV_CMD_ACK
#define HAVE_ENUM_MAV_CMD_ACK
enum MAV_CMD_ACK
{
MAV_CMD_ACK_OK=1, /* Command / mission item is ok. | */
MAV_CMD_ACK_ERR_FAIL=2, /* Generic error message if none of the other reasons fails or if no detailed error reporting is implemented. | */
MAV_CMD_ACK_ERR_ACCESS_DENIED=3, /* The system is refusing to accept this command from this source / communication partner. | */
MAV_CMD_ACK_ERR_NOT_SUPPORTED=4, /* Command or mission item is not supported, other commands would be accepted. | */
MAV_CMD_ACK_ERR_COORDINATE_FRAME_NOT_SUPPORTED=5, /* The coordinate frame of this command / mission item is not supported. | */
MAV_CMD_ACK_ERR_COORDINATES_OUT_OF_RANGE=6, /* The coordinate frame of this command is ok, but he coordinate values exceed the safety limits of this system. This is a generic error, please use the more specific error messages below if possible. | */
MAV_CMD_ACK_ERR_X_LAT_OUT_OF_RANGE=7, /* The X or latitude value is out of range. | */
MAV_CMD_ACK_ERR_Y_LON_OUT_OF_RANGE=8, /* The Y or longitude value is out of range. | */
MAV_CMD_ACK_ERR_Z_ALT_OUT_OF_RANGE=9, /* The Z or altitude value is out of range. | */
MAV_CMD_ACK_ENUM_END=10, /* | */
};
#endif
 
/** @brief type of a mavlink parameter */
#ifndef HAVE_ENUM_MAV_VAR
#define HAVE_ENUM_MAV_VAR
enum MAV_VAR
{
MAV_VAR_FLOAT=0, /* 32 bit float | */
MAV_VAR_UINT8=1, /* 8 bit unsigned integer | */
MAV_VAR_INT8=2, /* 8 bit signed integer | */
MAV_VAR_UINT16=3, /* 16 bit unsigned integer | */
MAV_VAR_INT16=4, /* 16 bit signed integer | */
MAV_VAR_UINT32=5, /* 32 bit unsigned integer | */
MAV_VAR_INT32=6, /* 32 bit signed integer | */
MAV_VAR_ENUM_END=7, /* | */
};
#endif
 
/** @brief result from a mavlink command */
#ifndef HAVE_ENUM_MAV_RESULT
#define HAVE_ENUM_MAV_RESULT
enum MAV_RESULT
{
MAV_RESULT_ACCEPTED=0, /* Command ACCEPTED and EXECUTED | */
MAV_RESULT_TEMPORARILY_REJECTED=1, /* Command TEMPORARY REJECTED/DENIED | */
MAV_RESULT_DENIED=2, /* Command PERMANENTLY DENIED | */
MAV_RESULT_UNSUPPORTED=3, /* Command UNKNOWN/UNSUPPORTED | */
MAV_RESULT_FAILED=4, /* Command executed, but failed | */
MAV_RESULT_ENUM_END=5, /* | */
};
#endif
 
/** @brief result in a mavlink mission ack */
#ifndef HAVE_ENUM_MAV_MISSION_RESULT
#define HAVE_ENUM_MAV_MISSION_RESULT
enum MAV_MISSION_RESULT
{
MAV_MISSION_ACCEPTED=0, /* mission accepted OK | */
MAV_MISSION_ERROR=1, /* generic error / not accepting mission commands at all right now | */
MAV_MISSION_UNSUPPORTED_FRAME=2, /* coordinate frame is not supported | */
MAV_MISSION_UNSUPPORTED=3, /* command is not supported | */
MAV_MISSION_NO_SPACE=4, /* mission item exceeds storage space | */
MAV_MISSION_INVALID=5, /* one of the parameters has an invalid value | */
MAV_MISSION_INVALID_PARAM1=6, /* param1 has an invalid value | */
MAV_MISSION_INVALID_PARAM2=7, /* param2 has an invalid value | */
MAV_MISSION_INVALID_PARAM3=8, /* param3 has an invalid value | */
MAV_MISSION_INVALID_PARAM4=9, /* param4 has an invalid value | */
MAV_MISSION_INVALID_PARAM5_X=10, /* x/param5 has an invalid value | */
MAV_MISSION_INVALID_PARAM6_Y=11, /* y/param6 has an invalid value | */
MAV_MISSION_INVALID_PARAM7=12, /* param7 has an invalid value | */
MAV_MISSION_INVALID_SEQUENCE=13, /* received waypoint out of sequence | */
MAV_MISSION_DENIED=14, /* not accepting any mission commands from this communication partner | */
MAV_MISSION_RESULT_ENUM_END=15, /* | */
};
#endif
 
/** @brief Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: http://www.kiwisyslog.com/kb/info:-syslog-message-levels/. */
#ifndef HAVE_ENUM_MAV_SEVERITY
#define HAVE_ENUM_MAV_SEVERITY
enum MAV_SEVERITY
{
MAV_SEVERITY_EMERGENCY=0, /* System is unusable. This is a "panic" condition. | */
MAV_SEVERITY_ALERT=1, /* Action should be taken immediately. Indicates error in non-critical systems. | */
MAV_SEVERITY_CRITICAL=2, /* Action must be taken immediately. Indicates failure in a primary system. | */
MAV_SEVERITY_ERROR=3, /* Indicates an error in secondary/redundant systems. | */
MAV_SEVERITY_WARNING=4, /* Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning. | */
MAV_SEVERITY_NOTICE=5, /* An unusual event has occured, though not an error condition. This should be investigated for the root cause. | */
MAV_SEVERITY_INFO=6, /* Normal operational messages. Useful for logging. No action is required for these messages. | */
MAV_SEVERITY_DEBUG=7, /* Useful non-operational messages that can assist in debugging. These should not occur during normal operation. | */
MAV_SEVERITY_ENUM_END=8, /* | */
};
#endif
 
 
 
// MAVLINK VERSION
 
#ifndef MAVLINK_VERSION
#define MAVLINK_VERSION 3
#endif
 
#if (MAVLINK_VERSION == 0)
#undef MAVLINK_VERSION
#define MAVLINK_VERSION 3
#endif
 
// MESSAGE DEFINITIONS
#include "./mavlink_msg_heartbeat.h"
#include "./mavlink_msg_sys_status.h"
#include "./mavlink_msg_system_time.h"
#include "./mavlink_msg_ping.h"
#include "./mavlink_msg_change_operator_control.h"
#include "./mavlink_msg_change_operator_control_ack.h"
#include "./mavlink_msg_auth_key.h"
#include "./mavlink_msg_set_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"
#include "./mavlink_msg_gps_raw_int.h"
#include "./mavlink_msg_gps_status.h"
#include "./mavlink_msg_scaled_imu.h"
#include "./mavlink_msg_raw_imu.h"
#include "./mavlink_msg_raw_pressure.h"
#include "./mavlink_msg_scaled_pressure.h"
#include "./mavlink_msg_attitude.h"
#include "./mavlink_msg_attitude_quaternion.h"
#include "./mavlink_msg_local_position_ned.h"
#include "./mavlink_msg_global_position_int.h"
#include "./mavlink_msg_rc_channels_scaled.h"
#include "./mavlink_msg_rc_channels_raw.h"
#include "./mavlink_msg_servo_output_raw.h"
#include "./mavlink_msg_mission_request_partial_list.h"
#include "./mavlink_msg_mission_write_partial_list.h"
#include "./mavlink_msg_mission_item.h"
#include "./mavlink_msg_mission_request.h"
#include "./mavlink_msg_mission_set_current.h"
#include "./mavlink_msg_mission_current.h"
#include "./mavlink_msg_mission_request_list.h"
#include "./mavlink_msg_mission_count.h"
#include "./mavlink_msg_mission_clear_all.h"
#include "./mavlink_msg_mission_item_reached.h"
#include "./mavlink_msg_mission_ack.h"
#include "./mavlink_msg_set_gps_global_origin.h"
#include "./mavlink_msg_gps_global_origin.h"
#include "./mavlink_msg_set_local_position_setpoint.h"
#include "./mavlink_msg_local_position_setpoint.h"
#include "./mavlink_msg_global_position_setpoint_int.h"
#include "./mavlink_msg_set_global_position_setpoint_int.h"
#include "./mavlink_msg_safety_set_allowed_area.h"
#include "./mavlink_msg_safety_allowed_area.h"
#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"
#include "./mavlink_msg_set_quad_motors_setpoint.h"
#include "./mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust.h"
#include "./mavlink_msg_nav_controller_output.h"
#include "./mavlink_msg_state_correction.h"
#include "./mavlink_msg_request_data_stream.h"
#include "./mavlink_msg_data_stream.h"
#include "./mavlink_msg_manual_control.h"
#include "./mavlink_msg_rc_channels_override.h"
#include "./mavlink_msg_vfr_hud.h"
#include "./mavlink_msg_command_long.h"
#include "./mavlink_msg_command_ack.h"
#include "./mavlink_msg_local_position_ned_system_global_offset.h"
#include "./mavlink_msg_hil_state.h"
#include "./mavlink_msg_hil_controls.h"
#include "./mavlink_msg_hil_rc_inputs_raw.h"
#include "./mavlink_msg_optical_flow.h"
#include "./mavlink_msg_global_vision_position_estimate.h"
#include "./mavlink_msg_vision_position_estimate.h"
#include "./mavlink_msg_vision_speed_estimate.h"
#include "./mavlink_msg_vicon_position_estimate.h"
#include "./mavlink_msg_memory_vect.h"
#include "./mavlink_msg_debug_vect.h"
#include "./mavlink_msg_named_value_float.h"
#include "./mavlink_msg_named_value_int.h"
#include "./mavlink_msg_statustext.h"
#include "./mavlink_msg_debug.h"
 
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // COMMON_H
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink.h
0,0 → 1,27
/** @file
* @brief MAVLink comm protocol built from common.xml
* @see http://pixhawk.ethz.ch/software/mavlink
*/
#ifndef MAVLINK_H
#define MAVLINK_H
 
#ifndef MAVLINK_STX
#define MAVLINK_STX 254
#endif
 
#ifndef MAVLINK_ENDIAN
#define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
#endif
 
#ifndef MAVLINK_ALIGNED_FIELDS
#define MAVLINK_ALIGNED_FIELDS 1
#endif
 
#ifndef MAVLINK_CRC_EXTRA
#define MAVLINK_CRC_EXTRA 1
#endif
 
#include "version.h"
#include "common.h"
 
#endif // MAVLINK_H
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_attitude.h
0,0 → 1,276
// MESSAGE ATTITUDE PACKING
 
#define MAVLINK_MSG_ID_ATTITUDE 30
 
typedef struct __mavlink_attitude_t
{
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
float roll; ///< Roll angle (rad)
float pitch; ///< Pitch angle (rad)
float yaw; ///< Yaw angle (rad)
float rollspeed; ///< Roll angular speed (rad/s)
float pitchspeed; ///< Pitch angular speed (rad/s)
float yawspeed; ///< Yaw angular speed (rad/s)
} mavlink_attitude_t;
 
#define MAVLINK_MSG_ID_ATTITUDE_LEN 28
#define MAVLINK_MSG_ID_30_LEN 28
 
 
 
#define MAVLINK_MESSAGE_INFO_ATTITUDE { \
"ATTITUDE", \
7, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_attitude_t, time_boot_ms) }, \
{ "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_attitude_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_attitude_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_attitude_t, yaw) }, \
{ "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_attitude_t, rollspeed) }, \
{ "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_attitude_t, pitchspeed) }, \
{ "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_attitude_t, yawspeed) }, \
} \
}
 
 
/**
* @brief Pack a attitude message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_attitude_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
_mav_put_float(buf, 12, yaw);
_mav_put_float(buf, 16, rollspeed);
_mav_put_float(buf, 20, pitchspeed);
_mav_put_float(buf, 24, yawspeed);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_attitude_t packet;
packet.time_boot_ms = time_boot_ms;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif
 
msg->msgid = MAVLINK_MSG_ID_ATTITUDE;
return mavlink_finalize_message(msg, system_id, component_id, 28, 39);
}
 
/**
* @brief Pack a attitude message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_attitude_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,float roll,float pitch,float yaw,float rollspeed,float pitchspeed,float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
_mav_put_float(buf, 12, yaw);
_mav_put_float(buf, 16, rollspeed);
_mav_put_float(buf, 20, pitchspeed);
_mav_put_float(buf, 24, yawspeed);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_attitude_t packet;
packet.time_boot_ms = time_boot_ms;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif
 
msg->msgid = MAVLINK_MSG_ID_ATTITUDE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 39);
}
 
/**
* @brief Encode a attitude struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param attitude C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_attitude_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_attitude_t* attitude)
{
return mavlink_msg_attitude_pack(system_id, component_id, msg, attitude->time_boot_ms, attitude->roll, attitude->pitch, attitude->yaw, attitude->rollspeed, attitude->pitchspeed, attitude->yawspeed);
}
 
/**
* @brief Send a attitude message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_attitude_send(mavlink_channel_t chan, uint32_t time_boot_ms, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
_mav_put_float(buf, 12, yaw);
_mav_put_float(buf, 16, rollspeed);
_mav_put_float(buf, 20, pitchspeed);
_mav_put_float(buf, 24, yawspeed);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE, buf, 28, 39);
#else
mavlink_attitude_t packet;
packet.time_boot_ms = time_boot_ms;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE, (const char *)&packet, 28, 39);
#endif
}
 
#endif
 
// MESSAGE ATTITUDE UNPACKING
 
 
/**
* @brief Get field time_boot_ms from attitude message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_attitude_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field roll from attitude message
*
* @return Roll angle (rad)
*/
static inline float mavlink_msg_attitude_get_roll(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field pitch from attitude message
*
* @return Pitch angle (rad)
*/
static inline float mavlink_msg_attitude_get_pitch(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field yaw from attitude message
*
* @return Yaw angle (rad)
*/
static inline float mavlink_msg_attitude_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field rollspeed from attitude message
*
* @return Roll angular speed (rad/s)
*/
static inline float mavlink_msg_attitude_get_rollspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field pitchspeed from attitude message
*
* @return Pitch angular speed (rad/s)
*/
static inline float mavlink_msg_attitude_get_pitchspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Get field yawspeed from attitude message
*
* @return Yaw angular speed (rad/s)
*/
static inline float mavlink_msg_attitude_get_yawspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
 
/**
* @brief Decode a attitude message into a struct
*
* @param msg The message to decode
* @param attitude C-struct to decode the message contents into
*/
static inline void mavlink_msg_attitude_decode(const mavlink_message_t* msg, mavlink_attitude_t* attitude)
{
#if MAVLINK_NEED_BYTE_SWAP
attitude->time_boot_ms = mavlink_msg_attitude_get_time_boot_ms(msg);
attitude->roll = mavlink_msg_attitude_get_roll(msg);
attitude->pitch = mavlink_msg_attitude_get_pitch(msg);
attitude->yaw = mavlink_msg_attitude_get_yaw(msg);
attitude->rollspeed = mavlink_msg_attitude_get_rollspeed(msg);
attitude->pitchspeed = mavlink_msg_attitude_get_pitchspeed(msg);
attitude->yawspeed = mavlink_msg_attitude_get_yawspeed(msg);
#else
memcpy(attitude, _MAV_PAYLOAD(msg), 28);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_attitude_quaternion.h
0,0 → 1,298
// MESSAGE ATTITUDE_QUATERNION PACKING
 
#define MAVLINK_MSG_ID_ATTITUDE_QUATERNION 31
 
typedef struct __mavlink_attitude_quaternion_t
{
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
float q1; ///< Quaternion component 1
float q2; ///< Quaternion component 2
float q3; ///< Quaternion component 3
float q4; ///< Quaternion component 4
float rollspeed; ///< Roll angular speed (rad/s)
float pitchspeed; ///< Pitch angular speed (rad/s)
float yawspeed; ///< Yaw angular speed (rad/s)
} mavlink_attitude_quaternion_t;
 
#define MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN 32
#define MAVLINK_MSG_ID_31_LEN 32
 
 
 
#define MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION { \
"ATTITUDE_QUATERNION", \
8, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_attitude_quaternion_t, time_boot_ms) }, \
{ "q1", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_attitude_quaternion_t, q1) }, \
{ "q2", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_attitude_quaternion_t, q2) }, \
{ "q3", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_attitude_quaternion_t, q3) }, \
{ "q4", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_attitude_quaternion_t, q4) }, \
{ "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_attitude_quaternion_t, rollspeed) }, \
{ "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_attitude_quaternion_t, pitchspeed) }, \
{ "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_attitude_quaternion_t, yawspeed) }, \
} \
}
 
 
/**
* @brief Pack a attitude_quaternion message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param q1 Quaternion component 1
* @param q2 Quaternion component 2
* @param q3 Quaternion component 3
* @param q4 Quaternion component 4
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_attitude_quaternion_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, float q1, float q2, float q3, float q4, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, q1);
_mav_put_float(buf, 8, q2);
_mav_put_float(buf, 12, q3);
_mav_put_float(buf, 16, q4);
_mav_put_float(buf, 20, rollspeed);
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_attitude_quaternion_t packet;
packet.time_boot_ms = time_boot_ms;
packet.q1 = q1;
packet.q2 = q2;
packet.q3 = q3;
packet.q4 = q4;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif
 
msg->msgid = MAVLINK_MSG_ID_ATTITUDE_QUATERNION;
return mavlink_finalize_message(msg, system_id, component_id, 32, 246);
}
 
/**
* @brief Pack a attitude_quaternion message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param q1 Quaternion component 1
* @param q2 Quaternion component 2
* @param q3 Quaternion component 3
* @param q4 Quaternion component 4
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_attitude_quaternion_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,float q1,float q2,float q3,float q4,float rollspeed,float pitchspeed,float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, q1);
_mav_put_float(buf, 8, q2);
_mav_put_float(buf, 12, q3);
_mav_put_float(buf, 16, q4);
_mav_put_float(buf, 20, rollspeed);
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_attitude_quaternion_t packet;
packet.time_boot_ms = time_boot_ms;
packet.q1 = q1;
packet.q2 = q2;
packet.q3 = q3;
packet.q4 = q4;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif
 
msg->msgid = MAVLINK_MSG_ID_ATTITUDE_QUATERNION;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 32, 246);
}
 
/**
* @brief Encode a attitude_quaternion struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param attitude_quaternion C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_attitude_quaternion_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_attitude_quaternion_t* attitude_quaternion)
{
return mavlink_msg_attitude_quaternion_pack(system_id, component_id, msg, attitude_quaternion->time_boot_ms, attitude_quaternion->q1, attitude_quaternion->q2, attitude_quaternion->q3, attitude_quaternion->q4, attitude_quaternion->rollspeed, attitude_quaternion->pitchspeed, attitude_quaternion->yawspeed);
}
 
/**
* @brief Send a attitude_quaternion message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param q1 Quaternion component 1
* @param q2 Quaternion component 2
* @param q3 Quaternion component 3
* @param q4 Quaternion component 4
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_attitude_quaternion_send(mavlink_channel_t chan, uint32_t time_boot_ms, float q1, float q2, float q3, float q4, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, q1);
_mav_put_float(buf, 8, q2);
_mav_put_float(buf, 12, q3);
_mav_put_float(buf, 16, q4);
_mav_put_float(buf, 20, rollspeed);
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION, buf, 32, 246);
#else
mavlink_attitude_quaternion_t packet;
packet.time_boot_ms = time_boot_ms;
packet.q1 = q1;
packet.q2 = q2;
packet.q3 = q3;
packet.q4 = q4;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION, (const char *)&packet, 32, 246);
#endif
}
 
#endif
 
// MESSAGE ATTITUDE_QUATERNION UNPACKING
 
 
/**
* @brief Get field time_boot_ms from attitude_quaternion message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_attitude_quaternion_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field q1 from attitude_quaternion message
*
* @return Quaternion component 1
*/
static inline float mavlink_msg_attitude_quaternion_get_q1(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field q2 from attitude_quaternion message
*
* @return Quaternion component 2
*/
static inline float mavlink_msg_attitude_quaternion_get_q2(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field q3 from attitude_quaternion message
*
* @return Quaternion component 3
*/
static inline float mavlink_msg_attitude_quaternion_get_q3(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field q4 from attitude_quaternion message
*
* @return Quaternion component 4
*/
static inline float mavlink_msg_attitude_quaternion_get_q4(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field rollspeed from attitude_quaternion message
*
* @return Roll angular speed (rad/s)
*/
static inline float mavlink_msg_attitude_quaternion_get_rollspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Get field pitchspeed from attitude_quaternion message
*
* @return Pitch angular speed (rad/s)
*/
static inline float mavlink_msg_attitude_quaternion_get_pitchspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
 
/**
* @brief Get field yawspeed from attitude_quaternion message
*
* @return Yaw angular speed (rad/s)
*/
static inline float mavlink_msg_attitude_quaternion_get_yawspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 28);
}
 
/**
* @brief Decode a attitude_quaternion message into a struct
*
* @param msg The message to decode
* @param attitude_quaternion C-struct to decode the message contents into
*/
static inline void mavlink_msg_attitude_quaternion_decode(const mavlink_message_t* msg, mavlink_attitude_quaternion_t* attitude_quaternion)
{
#if MAVLINK_NEED_BYTE_SWAP
attitude_quaternion->time_boot_ms = mavlink_msg_attitude_quaternion_get_time_boot_ms(msg);
attitude_quaternion->q1 = mavlink_msg_attitude_quaternion_get_q1(msg);
attitude_quaternion->q2 = mavlink_msg_attitude_quaternion_get_q2(msg);
attitude_quaternion->q3 = mavlink_msg_attitude_quaternion_get_q3(msg);
attitude_quaternion->q4 = mavlink_msg_attitude_quaternion_get_q4(msg);
attitude_quaternion->rollspeed = mavlink_msg_attitude_quaternion_get_rollspeed(msg);
attitude_quaternion->pitchspeed = mavlink_msg_attitude_quaternion_get_pitchspeed(msg);
attitude_quaternion->yawspeed = mavlink_msg_attitude_quaternion_get_yawspeed(msg);
#else
memcpy(attitude_quaternion, _MAV_PAYLOAD(msg), 32);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_auth_key.h
0,0 → 1,144
// MESSAGE AUTH_KEY PACKING
 
#define MAVLINK_MSG_ID_AUTH_KEY 7
 
typedef struct __mavlink_auth_key_t
{
char key[32]; ///< key
} mavlink_auth_key_t;
 
#define MAVLINK_MSG_ID_AUTH_KEY_LEN 32
#define MAVLINK_MSG_ID_7_LEN 32
 
#define MAVLINK_MSG_AUTH_KEY_FIELD_KEY_LEN 32
 
#define MAVLINK_MESSAGE_INFO_AUTH_KEY { \
"AUTH_KEY", \
1, \
{ { "key", NULL, MAVLINK_TYPE_CHAR, 32, 0, offsetof(mavlink_auth_key_t, key) }, \
} \
}
 
 
/**
* @brief Pack a auth_key message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param key key
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_auth_key_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const char *key)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
 
_mav_put_char_array(buf, 0, key, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_auth_key_t packet;
 
mav_array_memcpy(packet.key, key, sizeof(char)*32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif
 
msg->msgid = MAVLINK_MSG_ID_AUTH_KEY;
return mavlink_finalize_message(msg, system_id, component_id, 32, 119);
}
 
/**
* @brief Pack a auth_key message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param key key
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_auth_key_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
const char *key)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
 
_mav_put_char_array(buf, 0, key, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_auth_key_t packet;
 
mav_array_memcpy(packet.key, key, sizeof(char)*32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif
 
msg->msgid = MAVLINK_MSG_ID_AUTH_KEY;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 32, 119);
}
 
/**
* @brief Encode a auth_key struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param auth_key C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_auth_key_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_auth_key_t* auth_key)
{
return mavlink_msg_auth_key_pack(system_id, component_id, msg, auth_key->key);
}
 
/**
* @brief Send a auth_key message
* @param chan MAVLink channel to send the message
*
* @param key key
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_auth_key_send(mavlink_channel_t chan, const char *key)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
 
_mav_put_char_array(buf, 0, key, 32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, buf, 32, 119);
#else
mavlink_auth_key_t packet;
 
mav_array_memcpy(packet.key, key, sizeof(char)*32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, (const char *)&packet, 32, 119);
#endif
}
 
#endif
 
// MESSAGE AUTH_KEY UNPACKING
 
 
/**
* @brief Get field key from auth_key message
*
* @return key
*/
static inline uint16_t mavlink_msg_auth_key_get_key(const mavlink_message_t* msg, char *key)
{
return _MAV_RETURN_char_array(msg, key, 32, 0);
}
 
/**
* @brief Decode a auth_key message into a struct
*
* @param msg The message to decode
* @param auth_key C-struct to decode the message contents into
*/
static inline void mavlink_msg_auth_key_decode(const mavlink_message_t* msg, mavlink_auth_key_t* auth_key)
{
#if MAVLINK_NEED_BYTE_SWAP
mavlink_msg_auth_key_get_key(msg, auth_key->key);
#else
memcpy(auth_key, _MAV_PAYLOAD(msg), 32);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_change_operator_control.h
0,0 → 1,204
// MESSAGE CHANGE_OPERATOR_CONTROL PACKING
 
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL 5
 
typedef struct __mavlink_change_operator_control_t
{
uint8_t target_system; ///< System the GCS requests control for
uint8_t control_request; ///< 0: request control of this MAV, 1: Release control of this MAV
uint8_t version; ///< 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
char passkey[25]; ///< Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
} mavlink_change_operator_control_t;
 
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN 28
#define MAVLINK_MSG_ID_5_LEN 28
 
#define MAVLINK_MSG_CHANGE_OPERATOR_CONTROL_FIELD_PASSKEY_LEN 25
 
#define MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL { \
"CHANGE_OPERATOR_CONTROL", \
4, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_change_operator_control_t, target_system) }, \
{ "control_request", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_change_operator_control_t, control_request) }, \
{ "version", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_change_operator_control_t, version) }, \
{ "passkey", NULL, MAVLINK_TYPE_CHAR, 25, 3, offsetof(mavlink_change_operator_control_t, passkey) }, \
} \
}
 
 
/**
* @brief Pack a change_operator_control message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System the GCS requests control for
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
* @param version 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
* @param passkey Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_change_operator_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t control_request, uint8_t version, const char *passkey)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, version);
_mav_put_char_array(buf, 3, passkey, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_change_operator_control_t packet;
packet.target_system = target_system;
packet.control_request = control_request;
packet.version = version;
mav_array_memcpy(packet.passkey, passkey, sizeof(char)*25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif
 
msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL;
return mavlink_finalize_message(msg, system_id, component_id, 28, 217);
}
 
/**
* @brief Pack a change_operator_control message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System the GCS requests control for
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
* @param version 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
* @param passkey Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_change_operator_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t control_request,uint8_t version,const char *passkey)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, version);
_mav_put_char_array(buf, 3, passkey, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_change_operator_control_t packet;
packet.target_system = target_system;
packet.control_request = control_request;
packet.version = version;
mav_array_memcpy(packet.passkey, passkey, sizeof(char)*25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif
 
msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 217);
}
 
/**
* @brief Encode a change_operator_control struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param change_operator_control C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_change_operator_control_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_change_operator_control_t* change_operator_control)
{
return mavlink_msg_change_operator_control_pack(system_id, component_id, msg, change_operator_control->target_system, change_operator_control->control_request, change_operator_control->version, change_operator_control->passkey);
}
 
/**
* @brief Send a change_operator_control message
* @param chan MAVLink channel to send the message
*
* @param target_system System the GCS requests control for
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
* @param version 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
* @param passkey Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_change_operator_control_send(mavlink_channel_t chan, uint8_t target_system, uint8_t control_request, uint8_t version, const char *passkey)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, version);
_mav_put_char_array(buf, 3, passkey, 25);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL, buf, 28, 217);
#else
mavlink_change_operator_control_t packet;
packet.target_system = target_system;
packet.control_request = control_request;
packet.version = version;
mav_array_memcpy(packet.passkey, passkey, sizeof(char)*25);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL, (const char *)&packet, 28, 217);
#endif
}
 
#endif
 
// MESSAGE CHANGE_OPERATOR_CONTROL UNPACKING
 
 
/**
* @brief Get field target_system from change_operator_control message
*
* @return System the GCS requests control for
*/
static inline uint8_t mavlink_msg_change_operator_control_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
 
/**
* @brief Get field control_request from change_operator_control message
*
* @return 0: request control of this MAV, 1: Release control of this MAV
*/
static inline uint8_t mavlink_msg_change_operator_control_get_control_request(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
 
/**
* @brief Get field version from change_operator_control message
*
* @return 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
*/
static inline uint8_t mavlink_msg_change_operator_control_get_version(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
 
/**
* @brief Get field passkey from change_operator_control message
*
* @return Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
*/
static inline uint16_t mavlink_msg_change_operator_control_get_passkey(const mavlink_message_t* msg, char *passkey)
{
return _MAV_RETURN_char_array(msg, passkey, 25, 3);
}
 
/**
* @brief Decode a change_operator_control message into a struct
*
* @param msg The message to decode
* @param change_operator_control C-struct to decode the message contents into
*/
static inline void mavlink_msg_change_operator_control_decode(const mavlink_message_t* msg, mavlink_change_operator_control_t* change_operator_control)
{
#if MAVLINK_NEED_BYTE_SWAP
change_operator_control->target_system = mavlink_msg_change_operator_control_get_target_system(msg);
change_operator_control->control_request = mavlink_msg_change_operator_control_get_control_request(msg);
change_operator_control->version = mavlink_msg_change_operator_control_get_version(msg);
mavlink_msg_change_operator_control_get_passkey(msg, change_operator_control->passkey);
#else
memcpy(change_operator_control, _MAV_PAYLOAD(msg), 28);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_change_operator_control_ack.h
0,0 → 1,188
// MESSAGE CHANGE_OPERATOR_CONTROL_ACK PACKING
 
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK 6
 
typedef struct __mavlink_change_operator_control_ack_t
{
uint8_t gcs_system_id; ///< ID of the GCS this message
uint8_t control_request; ///< 0: request control of this MAV, 1: Release control of this MAV
uint8_t ack; ///< 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control
} mavlink_change_operator_control_ack_t;
 
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN 3
#define MAVLINK_MSG_ID_6_LEN 3
 
 
 
#define MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK { \
"CHANGE_OPERATOR_CONTROL_ACK", \
3, \
{ { "gcs_system_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_change_operator_control_ack_t, gcs_system_id) }, \
{ "control_request", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_change_operator_control_ack_t, control_request) }, \
{ "ack", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_change_operator_control_ack_t, ack) }, \
} \
}
 
 
/**
* @brief Pack a change_operator_control_ack message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param gcs_system_id ID of the GCS this message
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
* @param ack 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_change_operator_control_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t gcs_system_id, uint8_t control_request, uint8_t ack)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint8_t(buf, 0, gcs_system_id);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, ack);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
#else
mavlink_change_operator_control_ack_t packet;
packet.gcs_system_id = gcs_system_id;
packet.control_request = control_request;
packet.ack = ack;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
#endif
 
msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK;
return mavlink_finalize_message(msg, system_id, component_id, 3, 104);
}
 
/**
* @brief Pack a change_operator_control_ack message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param gcs_system_id ID of the GCS this message
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
* @param ack 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_change_operator_control_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t gcs_system_id,uint8_t control_request,uint8_t ack)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint8_t(buf, 0, gcs_system_id);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, ack);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
#else
mavlink_change_operator_control_ack_t packet;
packet.gcs_system_id = gcs_system_id;
packet.control_request = control_request;
packet.ack = ack;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
#endif
 
msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 3, 104);
}
 
/**
* @brief Encode a change_operator_control_ack struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param change_operator_control_ack C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_change_operator_control_ack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_change_operator_control_ack_t* change_operator_control_ack)
{
return mavlink_msg_change_operator_control_ack_pack(system_id, component_id, msg, change_operator_control_ack->gcs_system_id, change_operator_control_ack->control_request, change_operator_control_ack->ack);
}
 
/**
* @brief Send a change_operator_control_ack message
* @param chan MAVLink channel to send the message
*
* @param gcs_system_id ID of the GCS this message
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
* @param ack 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_change_operator_control_ack_send(mavlink_channel_t chan, uint8_t gcs_system_id, uint8_t control_request, uint8_t ack)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint8_t(buf, 0, gcs_system_id);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, ack);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, buf, 3, 104);
#else
mavlink_change_operator_control_ack_t packet;
packet.gcs_system_id = gcs_system_id;
packet.control_request = control_request;
packet.ack = ack;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, (const char *)&packet, 3, 104);
#endif
}
 
#endif
 
// MESSAGE CHANGE_OPERATOR_CONTROL_ACK UNPACKING
 
 
/**
* @brief Get field gcs_system_id from change_operator_control_ack message
*
* @return ID of the GCS this message
*/
static inline uint8_t mavlink_msg_change_operator_control_ack_get_gcs_system_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
 
/**
* @brief Get field control_request from change_operator_control_ack message
*
* @return 0: request control of this MAV, 1: Release control of this MAV
*/
static inline uint8_t mavlink_msg_change_operator_control_ack_get_control_request(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
 
/**
* @brief Get field ack from change_operator_control_ack message
*
* @return 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control
*/
static inline uint8_t mavlink_msg_change_operator_control_ack_get_ack(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
 
/**
* @brief Decode a change_operator_control_ack message into a struct
*
* @param msg The message to decode
* @param change_operator_control_ack C-struct to decode the message contents into
*/
static inline void mavlink_msg_change_operator_control_ack_decode(const mavlink_message_t* msg, mavlink_change_operator_control_ack_t* change_operator_control_ack)
{
#if MAVLINK_NEED_BYTE_SWAP
change_operator_control_ack->gcs_system_id = mavlink_msg_change_operator_control_ack_get_gcs_system_id(msg);
change_operator_control_ack->control_request = mavlink_msg_change_operator_control_ack_get_control_request(msg);
change_operator_control_ack->ack = mavlink_msg_change_operator_control_ack_get_ack(msg);
#else
memcpy(change_operator_control_ack, _MAV_PAYLOAD(msg), 3);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_command_ack.h
0,0 → 1,166
// MESSAGE COMMAND_ACK PACKING
 
#define MAVLINK_MSG_ID_COMMAND_ACK 77
 
typedef struct __mavlink_command_ack_t
{
uint16_t command; ///< Command ID, as defined by MAV_CMD enum.
uint8_t result; ///< See MAV_RESULT enum
} mavlink_command_ack_t;
 
#define MAVLINK_MSG_ID_COMMAND_ACK_LEN 3
#define MAVLINK_MSG_ID_77_LEN 3
 
 
 
#define MAVLINK_MESSAGE_INFO_COMMAND_ACK { \
"COMMAND_ACK", \
2, \
{ { "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_command_ack_t, command) }, \
{ "result", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_command_ack_t, result) }, \
} \
}
 
 
/**
* @brief Pack a command_ack message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param command Command ID, as defined by MAV_CMD enum.
* @param result See MAV_RESULT enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_command_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint16_t command, uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint16_t(buf, 0, command);
_mav_put_uint8_t(buf, 2, result);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
#else
mavlink_command_ack_t packet;
packet.command = command;
packet.result = result;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
#endif
 
msg->msgid = MAVLINK_MSG_ID_COMMAND_ACK;
return mavlink_finalize_message(msg, system_id, component_id, 3, 143);
}
 
/**
* @brief Pack a command_ack message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param command Command ID, as defined by MAV_CMD enum.
* @param result See MAV_RESULT enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_command_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint16_t command,uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint16_t(buf, 0, command);
_mav_put_uint8_t(buf, 2, result);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
#else
mavlink_command_ack_t packet;
packet.command = command;
packet.result = result;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
#endif
 
msg->msgid = MAVLINK_MSG_ID_COMMAND_ACK;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 3, 143);
}
 
/**
* @brief Encode a command_ack struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param command_ack C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_command_ack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_command_ack_t* command_ack)
{
return mavlink_msg_command_ack_pack(system_id, component_id, msg, command_ack->command, command_ack->result);
}
 
/**
* @brief Send a command_ack message
* @param chan MAVLink channel to send the message
*
* @param command Command ID, as defined by MAV_CMD enum.
* @param result See MAV_RESULT enum
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_command_ack_send(mavlink_channel_t chan, uint16_t command, uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint16_t(buf, 0, command);
_mav_put_uint8_t(buf, 2, result);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_ACK, buf, 3, 143);
#else
mavlink_command_ack_t packet;
packet.command = command;
packet.result = result;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_ACK, (const char *)&packet, 3, 143);
#endif
}
 
#endif
 
// MESSAGE COMMAND_ACK UNPACKING
 
 
/**
* @brief Get field command from command_ack message
*
* @return Command ID, as defined by MAV_CMD enum.
*/
static inline uint16_t mavlink_msg_command_ack_get_command(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
 
/**
* @brief Get field result from command_ack message
*
* @return See MAV_RESULT enum
*/
static inline uint8_t mavlink_msg_command_ack_get_result(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
 
/**
* @brief Decode a command_ack message into a struct
*
* @param msg The message to decode
* @param command_ack C-struct to decode the message contents into
*/
static inline void mavlink_msg_command_ack_decode(const mavlink_message_t* msg, mavlink_command_ack_t* command_ack)
{
#if MAVLINK_NEED_BYTE_SWAP
command_ack->command = mavlink_msg_command_ack_get_command(msg);
command_ack->result = mavlink_msg_command_ack_get_result(msg);
#else
memcpy(command_ack, _MAV_PAYLOAD(msg), 3);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_command_long.h
0,0 → 1,364
// MESSAGE COMMAND_LONG PACKING
 
#define MAVLINK_MSG_ID_COMMAND_LONG 76
 
typedef struct __mavlink_command_long_t
{
float param1; ///< Parameter 1, as defined by MAV_CMD enum.
float param2; ///< Parameter 2, as defined by MAV_CMD enum.
float param3; ///< Parameter 3, as defined by MAV_CMD enum.
float param4; ///< Parameter 4, as defined by MAV_CMD enum.
float param5; ///< Parameter 5, as defined by MAV_CMD enum.
float param6; ///< Parameter 6, as defined by MAV_CMD enum.
float param7; ///< Parameter 7, as defined by MAV_CMD enum.
uint16_t command; ///< Command ID, as defined by MAV_CMD enum.
uint8_t target_system; ///< System which should execute the command
uint8_t target_component; ///< Component which should execute the command, 0 for all components
uint8_t confirmation; ///< 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
} mavlink_command_long_t;
 
#define MAVLINK_MSG_ID_COMMAND_LONG_LEN 33
#define MAVLINK_MSG_ID_76_LEN 33
 
 
 
#define MAVLINK_MESSAGE_INFO_COMMAND_LONG { \
"COMMAND_LONG", \
11, \
{ { "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_command_long_t, param1) }, \
{ "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_command_long_t, param2) }, \
{ "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_command_long_t, param3) }, \
{ "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_command_long_t, param4) }, \
{ "param5", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_command_long_t, param5) }, \
{ "param6", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_command_long_t, param6) }, \
{ "param7", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_command_long_t, param7) }, \
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_command_long_t, command) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_command_long_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_command_long_t, target_component) }, \
{ "confirmation", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_command_long_t, confirmation) }, \
} \
}
 
 
/**
* @brief Pack a command_long message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System which should execute the command
* @param target_component Component which should execute the command, 0 for all components
* @param command Command ID, as defined by MAV_CMD enum.
* @param confirmation 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
* @param param1 Parameter 1, as defined by MAV_CMD enum.
* @param param2 Parameter 2, as defined by MAV_CMD enum.
* @param param3 Parameter 3, as defined by MAV_CMD enum.
* @param param4 Parameter 4, as defined by MAV_CMD enum.
* @param param5 Parameter 5, as defined by MAV_CMD enum.
* @param param6 Parameter 6, as defined by MAV_CMD enum.
* @param param7 Parameter 7, as defined by MAV_CMD enum.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_command_long_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint16_t command, uint8_t confirmation, float param1, float param2, float param3, float param4, float param5, float param6, float param7)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
_mav_put_float(buf, 12, param4);
_mav_put_float(buf, 16, param5);
_mav_put_float(buf, 20, param6);
_mav_put_float(buf, 24, param7);
_mav_put_uint16_t(buf, 28, command);
_mav_put_uint8_t(buf, 30, target_system);
_mav_put_uint8_t(buf, 31, target_component);
_mav_put_uint8_t(buf, 32, confirmation);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 33);
#else
mavlink_command_long_t packet;
packet.param1 = param1;
packet.param2 = param2;
packet.param3 = param3;
packet.param4 = param4;
packet.param5 = param5;
packet.param6 = param6;
packet.param7 = param7;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.confirmation = confirmation;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 33);
#endif
 
msg->msgid = MAVLINK_MSG_ID_COMMAND_LONG;
return mavlink_finalize_message(msg, system_id, component_id, 33, 152);
}
 
/**
* @brief Pack a command_long message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System which should execute the command
* @param target_component Component which should execute the command, 0 for all components
* @param command Command ID, as defined by MAV_CMD enum.
* @param confirmation 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
* @param param1 Parameter 1, as defined by MAV_CMD enum.
* @param param2 Parameter 2, as defined by MAV_CMD enum.
* @param param3 Parameter 3, as defined by MAV_CMD enum.
* @param param4 Parameter 4, as defined by MAV_CMD enum.
* @param param5 Parameter 5, as defined by MAV_CMD enum.
* @param param6 Parameter 6, as defined by MAV_CMD enum.
* @param param7 Parameter 7, as defined by MAV_CMD enum.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_command_long_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint16_t command,uint8_t confirmation,float param1,float param2,float param3,float param4,float param5,float param6,float param7)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
_mav_put_float(buf, 12, param4);
_mav_put_float(buf, 16, param5);
_mav_put_float(buf, 20, param6);
_mav_put_float(buf, 24, param7);
_mav_put_uint16_t(buf, 28, command);
_mav_put_uint8_t(buf, 30, target_system);
_mav_put_uint8_t(buf, 31, target_component);
_mav_put_uint8_t(buf, 32, confirmation);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 33);
#else
mavlink_command_long_t packet;
packet.param1 = param1;
packet.param2 = param2;
packet.param3 = param3;
packet.param4 = param4;
packet.param5 = param5;
packet.param6 = param6;
packet.param7 = param7;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.confirmation = confirmation;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 33);
#endif
 
msg->msgid = MAVLINK_MSG_ID_COMMAND_LONG;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 33, 152);
}
 
/**
* @brief Encode a command_long struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param command_long C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_command_long_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_command_long_t* command_long)
{
return mavlink_msg_command_long_pack(system_id, component_id, msg, command_long->target_system, command_long->target_component, command_long->command, command_long->confirmation, command_long->param1, command_long->param2, command_long->param3, command_long->param4, command_long->param5, command_long->param6, command_long->param7);
}
 
/**
* @brief Send a command_long message
* @param chan MAVLink channel to send the message
*
* @param target_system System which should execute the command
* @param target_component Component which should execute the command, 0 for all components
* @param command Command ID, as defined by MAV_CMD enum.
* @param confirmation 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
* @param param1 Parameter 1, as defined by MAV_CMD enum.
* @param param2 Parameter 2, as defined by MAV_CMD enum.
* @param param3 Parameter 3, as defined by MAV_CMD enum.
* @param param4 Parameter 4, as defined by MAV_CMD enum.
* @param param5 Parameter 5, as defined by MAV_CMD enum.
* @param param6 Parameter 6, as defined by MAV_CMD enum.
* @param param7 Parameter 7, as defined by MAV_CMD enum.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_command_long_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t command, uint8_t confirmation, float param1, float param2, float param3, float param4, float param5, float param6, float param7)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
_mav_put_float(buf, 12, param4);
_mav_put_float(buf, 16, param5);
_mav_put_float(buf, 20, param6);
_mav_put_float(buf, 24, param7);
_mav_put_uint16_t(buf, 28, command);
_mav_put_uint8_t(buf, 30, target_system);
_mav_put_uint8_t(buf, 31, target_component);
_mav_put_uint8_t(buf, 32, confirmation);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG, buf, 33, 152);
#else
mavlink_command_long_t packet;
packet.param1 = param1;
packet.param2 = param2;
packet.param3 = param3;
packet.param4 = param4;
packet.param5 = param5;
packet.param6 = param6;
packet.param7 = param7;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.confirmation = confirmation;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG, (const char *)&packet, 33, 152);
#endif
}
 
#endif
 
// MESSAGE COMMAND_LONG UNPACKING
 
 
/**
* @brief Get field target_system from command_long message
*
* @return System which should execute the command
*/
static inline uint8_t mavlink_msg_command_long_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 30);
}
 
/**
* @brief Get field target_component from command_long message
*
* @return Component which should execute the command, 0 for all components
*/
static inline uint8_t mavlink_msg_command_long_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 31);
}
 
/**
* @brief Get field command from command_long message
*
* @return Command ID, as defined by MAV_CMD enum.
*/
static inline uint16_t mavlink_msg_command_long_get_command(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 28);
}
 
/**
* @brief Get field confirmation from command_long message
*
* @return 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
*/
static inline uint8_t mavlink_msg_command_long_get_confirmation(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 32);
}
 
/**
* @brief Get field param1 from command_long message
*
* @return Parameter 1, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param1(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field param2 from command_long message
*
* @return Parameter 2, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param2(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field param3 from command_long message
*
* @return Parameter 3, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param3(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field param4 from command_long message
*
* @return Parameter 4, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param4(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field param5 from command_long message
*
* @return Parameter 5, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param5(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field param6 from command_long message
*
* @return Parameter 6, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param6(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Get field param7 from command_long message
*
* @return Parameter 7, as defined by MAV_CMD enum.
*/
static inline float mavlink_msg_command_long_get_param7(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
 
/**
* @brief Decode a command_long message into a struct
*
* @param msg The message to decode
* @param command_long C-struct to decode the message contents into
*/
static inline void mavlink_msg_command_long_decode(const mavlink_message_t* msg, mavlink_command_long_t* command_long)
{
#if MAVLINK_NEED_BYTE_SWAP
command_long->param1 = mavlink_msg_command_long_get_param1(msg);
command_long->param2 = mavlink_msg_command_long_get_param2(msg);
command_long->param3 = mavlink_msg_command_long_get_param3(msg);
command_long->param4 = mavlink_msg_command_long_get_param4(msg);
command_long->param5 = mavlink_msg_command_long_get_param5(msg);
command_long->param6 = mavlink_msg_command_long_get_param6(msg);
command_long->param7 = mavlink_msg_command_long_get_param7(msg);
command_long->command = mavlink_msg_command_long_get_command(msg);
command_long->target_system = mavlink_msg_command_long_get_target_system(msg);
command_long->target_component = mavlink_msg_command_long_get_target_component(msg);
command_long->confirmation = mavlink_msg_command_long_get_confirmation(msg);
#else
memcpy(command_long, _MAV_PAYLOAD(msg), 33);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_data_stream.h
0,0 → 1,188
// MESSAGE DATA_STREAM PACKING
 
#define MAVLINK_MSG_ID_DATA_STREAM 67
 
typedef struct __mavlink_data_stream_t
{
uint16_t message_rate; ///< The requested interval between two messages of this type
uint8_t stream_id; ///< The ID of the requested data stream
uint8_t on_off; ///< 1 stream is enabled, 0 stream is stopped.
} mavlink_data_stream_t;
 
#define MAVLINK_MSG_ID_DATA_STREAM_LEN 4
#define MAVLINK_MSG_ID_67_LEN 4
 
 
 
#define MAVLINK_MESSAGE_INFO_DATA_STREAM { \
"DATA_STREAM", \
3, \
{ { "message_rate", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_data_stream_t, message_rate) }, \
{ "stream_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_data_stream_t, stream_id) }, \
{ "on_off", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_data_stream_t, on_off) }, \
} \
}
 
 
/**
* @brief Pack a data_stream message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param stream_id The ID of the requested data stream
* @param message_rate The requested interval between two messages of this type
* @param on_off 1 stream is enabled, 0 stream is stopped.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_data_stream_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t stream_id, uint16_t message_rate, uint8_t on_off)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, message_rate);
_mav_put_uint8_t(buf, 2, stream_id);
_mav_put_uint8_t(buf, 3, on_off);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_data_stream_t packet;
packet.message_rate = message_rate;
packet.stream_id = stream_id;
packet.on_off = on_off;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
 
msg->msgid = MAVLINK_MSG_ID_DATA_STREAM;
return mavlink_finalize_message(msg, system_id, component_id, 4, 21);
}
 
/**
* @brief Pack a data_stream message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param stream_id The ID of the requested data stream
* @param message_rate The requested interval between two messages of this type
* @param on_off 1 stream is enabled, 0 stream is stopped.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_data_stream_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t stream_id,uint16_t message_rate,uint8_t on_off)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, message_rate);
_mav_put_uint8_t(buf, 2, stream_id);
_mav_put_uint8_t(buf, 3, on_off);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_data_stream_t packet;
packet.message_rate = message_rate;
packet.stream_id = stream_id;
packet.on_off = on_off;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
 
msg->msgid = MAVLINK_MSG_ID_DATA_STREAM;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 4, 21);
}
 
/**
* @brief Encode a data_stream struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param data_stream C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_data_stream_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_data_stream_t* data_stream)
{
return mavlink_msg_data_stream_pack(system_id, component_id, msg, data_stream->stream_id, data_stream->message_rate, data_stream->on_off);
}
 
/**
* @brief Send a data_stream message
* @param chan MAVLink channel to send the message
*
* @param stream_id The ID of the requested data stream
* @param message_rate The requested interval between two messages of this type
* @param on_off 1 stream is enabled, 0 stream is stopped.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_data_stream_send(mavlink_channel_t chan, uint8_t stream_id, uint16_t message_rate, uint8_t on_off)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, message_rate);
_mav_put_uint8_t(buf, 2, stream_id);
_mav_put_uint8_t(buf, 3, on_off);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_STREAM, buf, 4, 21);
#else
mavlink_data_stream_t packet;
packet.message_rate = message_rate;
packet.stream_id = stream_id;
packet.on_off = on_off;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_STREAM, (const char *)&packet, 4, 21);
#endif
}
 
#endif
 
// MESSAGE DATA_STREAM UNPACKING
 
 
/**
* @brief Get field stream_id from data_stream message
*
* @return The ID of the requested data stream
*/
static inline uint8_t mavlink_msg_data_stream_get_stream_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
 
/**
* @brief Get field message_rate from data_stream message
*
* @return The requested interval between two messages of this type
*/
static inline uint16_t mavlink_msg_data_stream_get_message_rate(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
 
/**
* @brief Get field on_off from data_stream message
*
* @return 1 stream is enabled, 0 stream is stopped.
*/
static inline uint8_t mavlink_msg_data_stream_get_on_off(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
 
/**
* @brief Decode a data_stream message into a struct
*
* @param msg The message to decode
* @param data_stream C-struct to decode the message contents into
*/
static inline void mavlink_msg_data_stream_decode(const mavlink_message_t* msg, mavlink_data_stream_t* data_stream)
{
#if MAVLINK_NEED_BYTE_SWAP
data_stream->message_rate = mavlink_msg_data_stream_get_message_rate(msg);
data_stream->stream_id = mavlink_msg_data_stream_get_stream_id(msg);
data_stream->on_off = mavlink_msg_data_stream_get_on_off(msg);
#else
memcpy(data_stream, _MAV_PAYLOAD(msg), 4);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_debug.h
0,0 → 1,188
// MESSAGE DEBUG PACKING
 
#define MAVLINK_MSG_ID_DEBUG 254
 
typedef struct __mavlink_debug_t
{
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
float value; ///< DEBUG value
uint8_t ind; ///< index of debug variable
} mavlink_debug_t;
 
#define MAVLINK_MSG_ID_DEBUG_LEN 9
#define MAVLINK_MSG_ID_254_LEN 9
 
 
 
#define MAVLINK_MESSAGE_INFO_DEBUG { \
"DEBUG", \
3, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_debug_t, time_boot_ms) }, \
{ "value", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_debug_t, value) }, \
{ "ind", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_debug_t, ind) }, \
} \
}
 
 
/**
* @brief Pack a debug message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param ind index of debug variable
* @param value DEBUG value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_debug_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, uint8_t ind, float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_uint8_t(buf, 8, ind);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
#else
mavlink_debug_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
packet.ind = ind;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
#endif
 
msg->msgid = MAVLINK_MSG_ID_DEBUG;
return mavlink_finalize_message(msg, system_id, component_id, 9, 46);
}
 
/**
* @brief Pack a debug message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param ind index of debug variable
* @param value DEBUG value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_debug_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,uint8_t ind,float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_uint8_t(buf, 8, ind);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
#else
mavlink_debug_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
packet.ind = ind;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
#endif
 
msg->msgid = MAVLINK_MSG_ID_DEBUG;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 9, 46);
}
 
/**
* @brief Encode a debug struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param debug C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_debug_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_debug_t* debug)
{
return mavlink_msg_debug_pack(system_id, component_id, msg, debug->time_boot_ms, debug->ind, debug->value);
}
 
/**
* @brief Send a debug message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param ind index of debug variable
* @param value DEBUG value
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_debug_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t ind, float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_uint8_t(buf, 8, ind);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, buf, 9, 46);
#else
mavlink_debug_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
packet.ind = ind;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, (const char *)&packet, 9, 46);
#endif
}
 
#endif
 
// MESSAGE DEBUG UNPACKING
 
 
/**
* @brief Get field time_boot_ms from debug message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_debug_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field ind from debug message
*
* @return index of debug variable
*/
static inline uint8_t mavlink_msg_debug_get_ind(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
}
 
/**
* @brief Get field value from debug message
*
* @return DEBUG value
*/
static inline float mavlink_msg_debug_get_value(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Decode a debug message into a struct
*
* @param msg The message to decode
* @param debug C-struct to decode the message contents into
*/
static inline void mavlink_msg_debug_decode(const mavlink_message_t* msg, mavlink_debug_t* debug)
{
#if MAVLINK_NEED_BYTE_SWAP
debug->time_boot_ms = mavlink_msg_debug_get_time_boot_ms(msg);
debug->value = mavlink_msg_debug_get_value(msg);
debug->ind = mavlink_msg_debug_get_ind(msg);
#else
memcpy(debug, _MAV_PAYLOAD(msg), 9);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_debug_vect.h
0,0 → 1,226
// MESSAGE DEBUG_VECT PACKING
 
#define MAVLINK_MSG_ID_DEBUG_VECT 250
 
typedef struct __mavlink_debug_vect_t
{
uint64_t time_usec; ///< Timestamp
float x; ///< x
float y; ///< y
float z; ///< z
char name[10]; ///< Name
} mavlink_debug_vect_t;
 
#define MAVLINK_MSG_ID_DEBUG_VECT_LEN 30
#define MAVLINK_MSG_ID_250_LEN 30
 
#define MAVLINK_MSG_DEBUG_VECT_FIELD_NAME_LEN 10
 
#define MAVLINK_MESSAGE_INFO_DEBUG_VECT { \
"DEBUG_VECT", \
5, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_debug_vect_t, time_usec) }, \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_debug_vect_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_debug_vect_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_debug_vect_t, z) }, \
{ "name", NULL, MAVLINK_TYPE_CHAR, 10, 20, offsetof(mavlink_debug_vect_t, name) }, \
} \
}
 
 
/**
* @brief Pack a debug_vect message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param name Name
* @param time_usec Timestamp
* @param x x
* @param y y
* @param z z
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_debug_vect_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const char *name, uint64_t time_usec, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_char_array(buf, 20, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 30);
#else
mavlink_debug_vect_t packet;
packet.time_usec = time_usec;
packet.x = x;
packet.y = y;
packet.z = z;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 30);
#endif
 
msg->msgid = MAVLINK_MSG_ID_DEBUG_VECT;
return mavlink_finalize_message(msg, system_id, component_id, 30, 49);
}
 
/**
* @brief Pack a debug_vect message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param name Name
* @param time_usec Timestamp
* @param x x
* @param y y
* @param z z
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_debug_vect_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
const char *name,uint64_t time_usec,float x,float y,float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_char_array(buf, 20, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 30);
#else
mavlink_debug_vect_t packet;
packet.time_usec = time_usec;
packet.x = x;
packet.y = y;
packet.z = z;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 30);
#endif
 
msg->msgid = MAVLINK_MSG_ID_DEBUG_VECT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 30, 49);
}
 
/**
* @brief Encode a debug_vect struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param debug_vect C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_debug_vect_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_debug_vect_t* debug_vect)
{
return mavlink_msg_debug_vect_pack(system_id, component_id, msg, debug_vect->name, debug_vect->time_usec, debug_vect->x, debug_vect->y, debug_vect->z);
}
 
/**
* @brief Send a debug_vect message
* @param chan MAVLink channel to send the message
*
* @param name Name
* @param time_usec Timestamp
* @param x x
* @param y y
* @param z z
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_debug_vect_send(mavlink_channel_t chan, const char *name, uint64_t time_usec, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_char_array(buf, 20, name, 10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG_VECT, buf, 30, 49);
#else
mavlink_debug_vect_t packet;
packet.time_usec = time_usec;
packet.x = x;
packet.y = y;
packet.z = z;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG_VECT, (const char *)&packet, 30, 49);
#endif
}
 
#endif
 
// MESSAGE DEBUG_VECT UNPACKING
 
 
/**
* @brief Get field name from debug_vect message
*
* @return Name
*/
static inline uint16_t mavlink_msg_debug_vect_get_name(const mavlink_message_t* msg, char *name)
{
return _MAV_RETURN_char_array(msg, name, 10, 20);
}
 
/**
* @brief Get field time_usec from debug_vect message
*
* @return Timestamp
*/
static inline uint64_t mavlink_msg_debug_vect_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field x from debug_vect message
*
* @return x
*/
static inline float mavlink_msg_debug_vect_get_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field y from debug_vect message
*
* @return y
*/
static inline float mavlink_msg_debug_vect_get_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field z from debug_vect message
*
* @return z
*/
static inline float mavlink_msg_debug_vect_get_z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Decode a debug_vect message into a struct
*
* @param msg The message to decode
* @param debug_vect C-struct to decode the message contents into
*/
static inline void mavlink_msg_debug_vect_decode(const mavlink_message_t* msg, mavlink_debug_vect_t* debug_vect)
{
#if MAVLINK_NEED_BYTE_SWAP
debug_vect->time_usec = mavlink_msg_debug_vect_get_time_usec(msg);
debug_vect->x = mavlink_msg_debug_vect_get_x(msg);
debug_vect->y = mavlink_msg_debug_vect_get_y(msg);
debug_vect->z = mavlink_msg_debug_vect_get_z(msg);
mavlink_msg_debug_vect_get_name(msg, debug_vect->name);
#else
memcpy(debug_vect, _MAV_PAYLOAD(msg), 30);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_global_position_int.h
0,0 → 1,320
// MESSAGE GLOBAL_POSITION_INT PACKING
 
#define MAVLINK_MSG_ID_GLOBAL_POSITION_INT 33
 
typedef struct __mavlink_global_position_int_t
{
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
int32_t lat; ///< Latitude, expressed as * 1E7
int32_t lon; ///< Longitude, expressed as * 1E7
int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters), above MSL
int32_t relative_alt; ///< Altitude above ground in meters, expressed as * 1000 (millimeters)
int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100
int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100
int16_t vz; ///< Ground Z Speed (Altitude), expressed as m/s * 100
uint16_t hdg; ///< Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
} mavlink_global_position_int_t;
 
#define MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN 28
#define MAVLINK_MSG_ID_33_LEN 28
 
 
 
#define MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT { \
"GLOBAL_POSITION_INT", \
9, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_global_position_int_t, time_boot_ms) }, \
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_global_position_int_t, lat) }, \
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_global_position_int_t, lon) }, \
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_global_position_int_t, alt) }, \
{ "relative_alt", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_global_position_int_t, relative_alt) }, \
{ "vx", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_global_position_int_t, vx) }, \
{ "vy", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_global_position_int_t, vy) }, \
{ "vz", NULL, MAVLINK_TYPE_INT16_T, 0, 24, offsetof(mavlink_global_position_int_t, vz) }, \
{ "hdg", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_global_position_int_t, hdg) }, \
} \
}
 
 
/**
* @brief Pack a global_position_int message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters), above MSL
* @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_position_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, int16_t vx, int16_t vy, int16_t vz, uint16_t hdg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, lat);
_mav_put_int32_t(buf, 8, lon);
_mav_put_int32_t(buf, 12, alt);
_mav_put_int32_t(buf, 16, relative_alt);
_mav_put_int16_t(buf, 20, vx);
_mav_put_int16_t(buf, 22, vy);
_mav_put_int16_t(buf, 24, vz);
_mav_put_uint16_t(buf, 26, hdg);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_global_position_int_t packet;
packet.time_boot_ms = time_boot_ms;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.relative_alt = relative_alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.hdg = hdg;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif
 
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_INT;
return mavlink_finalize_message(msg, system_id, component_id, 28, 104);
}
 
/**
* @brief Pack a global_position_int message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters), above MSL
* @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_position_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,int32_t lat,int32_t lon,int32_t alt,int32_t relative_alt,int16_t vx,int16_t vy,int16_t vz,uint16_t hdg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, lat);
_mav_put_int32_t(buf, 8, lon);
_mav_put_int32_t(buf, 12, alt);
_mav_put_int32_t(buf, 16, relative_alt);
_mav_put_int16_t(buf, 20, vx);
_mav_put_int16_t(buf, 22, vy);
_mav_put_int16_t(buf, 24, vz);
_mav_put_uint16_t(buf, 26, hdg);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_global_position_int_t packet;
packet.time_boot_ms = time_boot_ms;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.relative_alt = relative_alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.hdg = hdg;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif
 
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_INT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 104);
}
 
/**
* @brief Encode a global_position_int struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param global_position_int C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_global_position_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_global_position_int_t* global_position_int)
{
return mavlink_msg_global_position_int_pack(system_id, component_id, msg, global_position_int->time_boot_ms, global_position_int->lat, global_position_int->lon, global_position_int->alt, global_position_int->relative_alt, global_position_int->vx, global_position_int->vy, global_position_int->vz, global_position_int->hdg);
}
 
/**
* @brief Send a global_position_int message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters), above MSL
* @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_global_position_int_send(mavlink_channel_t chan, uint32_t time_boot_ms, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, int16_t vx, int16_t vy, int16_t vz, uint16_t hdg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, lat);
_mav_put_int32_t(buf, 8, lon);
_mav_put_int32_t(buf, 12, alt);
_mav_put_int32_t(buf, 16, relative_alt);
_mav_put_int16_t(buf, 20, vx);
_mav_put_int16_t(buf, 22, vy);
_mav_put_int16_t(buf, 24, vz);
_mav_put_uint16_t(buf, 26, hdg);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT, buf, 28, 104);
#else
mavlink_global_position_int_t packet;
packet.time_boot_ms = time_boot_ms;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.relative_alt = relative_alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.hdg = hdg;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT, (const char *)&packet, 28, 104);
#endif
}
 
#endif
 
// MESSAGE GLOBAL_POSITION_INT UNPACKING
 
 
/**
* @brief Get field time_boot_ms from global_position_int message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_global_position_int_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field lat from global_position_int message
*
* @return Latitude, expressed as * 1E7
*/
static inline int32_t mavlink_msg_global_position_int_get_lat(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 4);
}
 
/**
* @brief Get field lon from global_position_int message
*
* @return Longitude, expressed as * 1E7
*/
static inline int32_t mavlink_msg_global_position_int_get_lon(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 8);
}
 
/**
* @brief Get field alt from global_position_int message
*
* @return Altitude in meters, expressed as * 1000 (millimeters), above MSL
*/
static inline int32_t mavlink_msg_global_position_int_get_alt(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 12);
}
 
/**
* @brief Get field relative_alt from global_position_int message
*
* @return Altitude above ground in meters, expressed as * 1000 (millimeters)
*/
static inline int32_t mavlink_msg_global_position_int_get_relative_alt(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 16);
}
 
/**
* @brief Get field vx from global_position_int message
*
* @return Ground X Speed (Latitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_global_position_int_get_vx(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 20);
}
 
/**
* @brief Get field vy from global_position_int message
*
* @return Ground Y Speed (Longitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_global_position_int_get_vy(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 22);
}
 
/**
* @brief Get field vz from global_position_int message
*
* @return Ground Z Speed (Altitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_global_position_int_get_vz(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 24);
}
 
/**
* @brief Get field hdg from global_position_int message
*
* @return Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_global_position_int_get_hdg(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 26);
}
 
/**
* @brief Decode a global_position_int message into a struct
*
* @param msg The message to decode
* @param global_position_int C-struct to decode the message contents into
*/
static inline void mavlink_msg_global_position_int_decode(const mavlink_message_t* msg, mavlink_global_position_int_t* global_position_int)
{
#if MAVLINK_NEED_BYTE_SWAP
global_position_int->time_boot_ms = mavlink_msg_global_position_int_get_time_boot_ms(msg);
global_position_int->lat = mavlink_msg_global_position_int_get_lat(msg);
global_position_int->lon = mavlink_msg_global_position_int_get_lon(msg);
global_position_int->alt = mavlink_msg_global_position_int_get_alt(msg);
global_position_int->relative_alt = mavlink_msg_global_position_int_get_relative_alt(msg);
global_position_int->vx = mavlink_msg_global_position_int_get_vx(msg);
global_position_int->vy = mavlink_msg_global_position_int_get_vy(msg);
global_position_int->vz = mavlink_msg_global_position_int_get_vz(msg);
global_position_int->hdg = mavlink_msg_global_position_int_get_hdg(msg);
#else
memcpy(global_position_int, _MAV_PAYLOAD(msg), 28);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_global_position_setpoint_int.h
0,0 → 1,232
// MESSAGE GLOBAL_POSITION_SETPOINT_INT PACKING
 
#define MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT 52
 
typedef struct __mavlink_global_position_setpoint_int_t
{
int32_t latitude; ///< WGS84 Latitude position in degrees * 1E7
int32_t longitude; ///< WGS84 Longitude position in degrees * 1E7
int32_t altitude; ///< WGS84 Altitude in meters * 1000 (positive for up)
int16_t yaw; ///< Desired yaw angle in degrees * 100
uint8_t coordinate_frame; ///< Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
} mavlink_global_position_setpoint_int_t;
 
#define MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN 15
#define MAVLINK_MSG_ID_52_LEN 15
 
 
 
#define MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_SETPOINT_INT { \
"GLOBAL_POSITION_SETPOINT_INT", \
5, \
{ { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_global_position_setpoint_int_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_global_position_setpoint_int_t, longitude) }, \
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_global_position_setpoint_int_t, altitude) }, \
{ "yaw", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_global_position_setpoint_int_t, yaw) }, \
{ "coordinate_frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_global_position_setpoint_int_t, coordinate_frame) }, \
} \
}
 
 
/**
* @brief Pack a global_position_setpoint_int message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_position_setpoint_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t coordinate_frame, int32_t latitude, int32_t longitude, int32_t altitude, int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
#else
mavlink_global_position_setpoint_int_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
#endif
 
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT;
return mavlink_finalize_message(msg, system_id, component_id, 15, 141);
}
 
/**
* @brief Pack a global_position_setpoint_int message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_position_setpoint_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t coordinate_frame,int32_t latitude,int32_t longitude,int32_t altitude,int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
#else
mavlink_global_position_setpoint_int_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
#endif
 
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 15, 141);
}
 
/**
* @brief Encode a global_position_setpoint_int struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param global_position_setpoint_int C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_global_position_setpoint_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_global_position_setpoint_int_t* global_position_setpoint_int)
{
return mavlink_msg_global_position_setpoint_int_pack(system_id, component_id, msg, global_position_setpoint_int->coordinate_frame, global_position_setpoint_int->latitude, global_position_setpoint_int->longitude, global_position_setpoint_int->altitude, global_position_setpoint_int->yaw);
}
 
/**
* @brief Send a global_position_setpoint_int message
* @param chan MAVLink channel to send the message
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_global_position_setpoint_int_send(mavlink_channel_t chan, uint8_t coordinate_frame, int32_t latitude, int32_t longitude, int32_t altitude, int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT, buf, 15, 141);
#else
mavlink_global_position_setpoint_int_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT, (const char *)&packet, 15, 141);
#endif
}
 
#endif
 
// MESSAGE GLOBAL_POSITION_SETPOINT_INT UNPACKING
 
 
/**
* @brief Get field coordinate_frame from global_position_setpoint_int message
*
* @return Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
*/
static inline uint8_t mavlink_msg_global_position_setpoint_int_get_coordinate_frame(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 14);
}
 
/**
* @brief Get field latitude from global_position_setpoint_int message
*
* @return WGS84 Latitude position in degrees * 1E7
*/
static inline int32_t mavlink_msg_global_position_setpoint_int_get_latitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 0);
}
 
/**
* @brief Get field longitude from global_position_setpoint_int message
*
* @return WGS84 Longitude position in degrees * 1E7
*/
static inline int32_t mavlink_msg_global_position_setpoint_int_get_longitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 4);
}
 
/**
* @brief Get field altitude from global_position_setpoint_int message
*
* @return WGS84 Altitude in meters * 1000 (positive for up)
*/
static inline int32_t mavlink_msg_global_position_setpoint_int_get_altitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 8);
}
 
/**
* @brief Get field yaw from global_position_setpoint_int message
*
* @return Desired yaw angle in degrees * 100
*/
static inline int16_t mavlink_msg_global_position_setpoint_int_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 12);
}
 
/**
* @brief Decode a global_position_setpoint_int message into a struct
*
* @param msg The message to decode
* @param global_position_setpoint_int C-struct to decode the message contents into
*/
static inline void mavlink_msg_global_position_setpoint_int_decode(const mavlink_message_t* msg, mavlink_global_position_setpoint_int_t* global_position_setpoint_int)
{
#if MAVLINK_NEED_BYTE_SWAP
global_position_setpoint_int->latitude = mavlink_msg_global_position_setpoint_int_get_latitude(msg);
global_position_setpoint_int->longitude = mavlink_msg_global_position_setpoint_int_get_longitude(msg);
global_position_setpoint_int->altitude = mavlink_msg_global_position_setpoint_int_get_altitude(msg);
global_position_setpoint_int->yaw = mavlink_msg_global_position_setpoint_int_get_yaw(msg);
global_position_setpoint_int->coordinate_frame = mavlink_msg_global_position_setpoint_int_get_coordinate_frame(msg);
#else
memcpy(global_position_setpoint_int, _MAV_PAYLOAD(msg), 15);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_global_vision_position_estimate.h
0,0 → 1,276
// MESSAGE GLOBAL_VISION_POSITION_ESTIMATE PACKING
 
#define MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE 101
 
typedef struct __mavlink_global_vision_position_estimate_t
{
uint64_t usec; ///< Timestamp (milliseconds)
float x; ///< Global X position
float y; ///< Global Y position
float z; ///< Global Z position
float roll; ///< Roll angle in rad
float pitch; ///< Pitch angle in rad
float yaw; ///< Yaw angle in rad
} mavlink_global_vision_position_estimate_t;
 
#define MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN 32
#define MAVLINK_MSG_ID_101_LEN 32
 
 
 
#define MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE { \
"GLOBAL_VISION_POSITION_ESTIMATE", \
7, \
{ { "usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_global_vision_position_estimate_t, usec) }, \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_global_vision_position_estimate_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_global_vision_position_estimate_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_global_vision_position_estimate_t, z) }, \
{ "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_global_vision_position_estimate_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_global_vision_position_estimate_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_global_vision_position_estimate_t, yaw) }, \
} \
}
 
 
/**
* @brief Pack a global_vision_position_estimate message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param usec Timestamp (milliseconds)
* @param x Global X position
* @param y Global Y position
* @param z Global Z position
* @param roll Roll angle in rad
* @param pitch Pitch angle in rad
* @param yaw Yaw angle in rad
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_vision_position_estimate_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t usec, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_float(buf, 20, roll);
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_global_vision_position_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif
 
msg->msgid = MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE;
return mavlink_finalize_message(msg, system_id, component_id, 32, 102);
}
 
/**
* @brief Pack a global_vision_position_estimate message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param usec Timestamp (milliseconds)
* @param x Global X position
* @param y Global Y position
* @param z Global Z position
* @param roll Roll angle in rad
* @param pitch Pitch angle in rad
* @param yaw Yaw angle in rad
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_vision_position_estimate_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t usec,float x,float y,float z,float roll,float pitch,float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_float(buf, 20, roll);
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_global_vision_position_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif
 
msg->msgid = MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 32, 102);
}
 
/**
* @brief Encode a global_vision_position_estimate struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param global_vision_position_estimate C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_global_vision_position_estimate_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_global_vision_position_estimate_t* global_vision_position_estimate)
{
return mavlink_msg_global_vision_position_estimate_pack(system_id, component_id, msg, global_vision_position_estimate->usec, global_vision_position_estimate->x, global_vision_position_estimate->y, global_vision_position_estimate->z, global_vision_position_estimate->roll, global_vision_position_estimate->pitch, global_vision_position_estimate->yaw);
}
 
/**
* @brief Send a global_vision_position_estimate message
* @param chan MAVLink channel to send the message
*
* @param usec Timestamp (milliseconds)
* @param x Global X position
* @param y Global Y position
* @param z Global Z position
* @param roll Roll angle in rad
* @param pitch Pitch angle in rad
* @param yaw Yaw angle in rad
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_global_vision_position_estimate_send(mavlink_channel_t chan, uint64_t usec, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_float(buf, 20, roll);
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE, buf, 32, 102);
#else
mavlink_global_vision_position_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE, (const char *)&packet, 32, 102);
#endif
}
 
#endif
 
// MESSAGE GLOBAL_VISION_POSITION_ESTIMATE UNPACKING
 
 
/**
* @brief Get field usec from global_vision_position_estimate message
*
* @return Timestamp (milliseconds)
*/
static inline uint64_t mavlink_msg_global_vision_position_estimate_get_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field x from global_vision_position_estimate message
*
* @return Global X position
*/
static inline float mavlink_msg_global_vision_position_estimate_get_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field y from global_vision_position_estimate message
*
* @return Global Y position
*/
static inline float mavlink_msg_global_vision_position_estimate_get_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field z from global_vision_position_estimate message
*
* @return Global Z position
*/
static inline float mavlink_msg_global_vision_position_estimate_get_z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field roll from global_vision_position_estimate message
*
* @return Roll angle in rad
*/
static inline float mavlink_msg_global_vision_position_estimate_get_roll(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Get field pitch from global_vision_position_estimate message
*
* @return Pitch angle in rad
*/
static inline float mavlink_msg_global_vision_position_estimate_get_pitch(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
 
/**
* @brief Get field yaw from global_vision_position_estimate message
*
* @return Yaw angle in rad
*/
static inline float mavlink_msg_global_vision_position_estimate_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 28);
}
 
/**
* @brief Decode a global_vision_position_estimate message into a struct
*
* @param msg The message to decode
* @param global_vision_position_estimate C-struct to decode the message contents into
*/
static inline void mavlink_msg_global_vision_position_estimate_decode(const mavlink_message_t* msg, mavlink_global_vision_position_estimate_t* global_vision_position_estimate)
{
#if MAVLINK_NEED_BYTE_SWAP
global_vision_position_estimate->usec = mavlink_msg_global_vision_position_estimate_get_usec(msg);
global_vision_position_estimate->x = mavlink_msg_global_vision_position_estimate_get_x(msg);
global_vision_position_estimate->y = mavlink_msg_global_vision_position_estimate_get_y(msg);
global_vision_position_estimate->z = mavlink_msg_global_vision_position_estimate_get_z(msg);
global_vision_position_estimate->roll = mavlink_msg_global_vision_position_estimate_get_roll(msg);
global_vision_position_estimate->pitch = mavlink_msg_global_vision_position_estimate_get_pitch(msg);
global_vision_position_estimate->yaw = mavlink_msg_global_vision_position_estimate_get_yaw(msg);
#else
memcpy(global_vision_position_estimate, _MAV_PAYLOAD(msg), 32);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_gps_global_origin.h
0,0 → 1,188
// MESSAGE GPS_GLOBAL_ORIGIN PACKING
 
#define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN 49
 
typedef struct __mavlink_gps_global_origin_t
{
int32_t latitude; ///< Latitude (WGS84), expressed as * 1E7
int32_t longitude; ///< Longitude (WGS84), expressed as * 1E7
int32_t altitude; ///< Altitude(WGS84), expressed as * 1000
} mavlink_gps_global_origin_t;
 
#define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN 12
#define MAVLINK_MSG_ID_49_LEN 12
 
 
 
#define MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN { \
"GPS_GLOBAL_ORIGIN", \
3, \
{ { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_gps_global_origin_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_gps_global_origin_t, longitude) }, \
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_global_origin_t, altitude) }, \
} \
}
 
 
/**
* @brief Pack a gps_global_origin message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param latitude Latitude (WGS84), expressed as * 1E7
* @param longitude Longitude (WGS84), expressed as * 1E7
* @param altitude Altitude(WGS84), expressed as * 1000
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_global_origin_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
int32_t latitude, int32_t longitude, int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
#else
mavlink_gps_global_origin_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
#endif
 
msg->msgid = MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN;
return mavlink_finalize_message(msg, system_id, component_id, 12, 39);
}
 
/**
* @brief Pack a gps_global_origin message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param latitude Latitude (WGS84), expressed as * 1E7
* @param longitude Longitude (WGS84), expressed as * 1E7
* @param altitude Altitude(WGS84), expressed as * 1000
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_global_origin_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
int32_t latitude,int32_t longitude,int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
#else
mavlink_gps_global_origin_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
#endif
 
msg->msgid = MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 12, 39);
}
 
/**
* @brief Encode a gps_global_origin struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gps_global_origin C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gps_global_origin_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps_global_origin_t* gps_global_origin)
{
return mavlink_msg_gps_global_origin_pack(system_id, component_id, msg, gps_global_origin->latitude, gps_global_origin->longitude, gps_global_origin->altitude);
}
 
/**
* @brief Send a gps_global_origin message
* @param chan MAVLink channel to send the message
*
* @param latitude Latitude (WGS84), expressed as * 1E7
* @param longitude Longitude (WGS84), expressed as * 1E7
* @param altitude Altitude(WGS84), expressed as * 1000
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_gps_global_origin_send(mavlink_channel_t chan, int32_t latitude, int32_t longitude, int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, buf, 12, 39);
#else
mavlink_gps_global_origin_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, (const char *)&packet, 12, 39);
#endif
}
 
#endif
 
// MESSAGE GPS_GLOBAL_ORIGIN UNPACKING
 
 
/**
* @brief Get field latitude from gps_global_origin message
*
* @return Latitude (WGS84), expressed as * 1E7
*/
static inline int32_t mavlink_msg_gps_global_origin_get_latitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 0);
}
 
/**
* @brief Get field longitude from gps_global_origin message
*
* @return Longitude (WGS84), expressed as * 1E7
*/
static inline int32_t mavlink_msg_gps_global_origin_get_longitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 4);
}
 
/**
* @brief Get field altitude from gps_global_origin message
*
* @return Altitude(WGS84), expressed as * 1000
*/
static inline int32_t mavlink_msg_gps_global_origin_get_altitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 8);
}
 
/**
* @brief Decode a gps_global_origin message into a struct
*
* @param msg The message to decode
* @param gps_global_origin C-struct to decode the message contents into
*/
static inline void mavlink_msg_gps_global_origin_decode(const mavlink_message_t* msg, mavlink_gps_global_origin_t* gps_global_origin)
{
#if MAVLINK_NEED_BYTE_SWAP
gps_global_origin->latitude = mavlink_msg_gps_global_origin_get_latitude(msg);
gps_global_origin->longitude = mavlink_msg_gps_global_origin_get_longitude(msg);
gps_global_origin->altitude = mavlink_msg_gps_global_origin_get_altitude(msg);
#else
memcpy(gps_global_origin, _MAV_PAYLOAD(msg), 12);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_gps_raw_int.h
0,0 → 1,342
// MESSAGE GPS_RAW_INT PACKING
 
#define MAVLINK_MSG_ID_GPS_RAW_INT 24
 
typedef struct __mavlink_gps_raw_int_t
{
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
int32_t lat; ///< Latitude in 1E7 degrees
int32_t lon; ///< Longitude in 1E7 degrees
int32_t alt; ///< Altitude in 1E3 meters (millimeters) above MSL
uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
uint16_t epv; ///< GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: 65535
uint16_t cog; ///< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
uint8_t fix_type; ///< 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
uint8_t satellites_visible; ///< Number of satellites visible. If unknown, set to 255
} mavlink_gps_raw_int_t;
 
#define MAVLINK_MSG_ID_GPS_RAW_INT_LEN 30
#define MAVLINK_MSG_ID_24_LEN 30
 
 
 
#define MAVLINK_MESSAGE_INFO_GPS_RAW_INT { \
"GPS_RAW_INT", \
10, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_gps_raw_int_t, time_usec) }, \
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_raw_int_t, lat) }, \
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps_raw_int_t, lon) }, \
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_gps_raw_int_t, alt) }, \
{ "eph", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_gps_raw_int_t, eph) }, \
{ "epv", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_gps_raw_int_t, epv) }, \
{ "vel", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_gps_raw_int_t, vel) }, \
{ "cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_gps_raw_int_t, cog) }, \
{ "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_gps_raw_int_t, fix_type) }, \
{ "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_gps_raw_int_t, satellites_visible) }, \
} \
}
 
 
/**
* @brief Pack a gps_raw_int message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat Latitude in 1E7 degrees
* @param lon Longitude in 1E7 degrees
* @param alt Altitude in 1E3 meters (millimeters) above MSL
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param satellites_visible Number of satellites visible. If unknown, set to 255
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, uint16_t cog, uint8_t satellites_visible)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int32_t(buf, 8, lat);
_mav_put_int32_t(buf, 12, lon);
_mav_put_int32_t(buf, 16, alt);
_mav_put_uint16_t(buf, 20, eph);
_mav_put_uint16_t(buf, 22, epv);
_mav_put_uint16_t(buf, 24, vel);
_mav_put_uint16_t(buf, 26, cog);
_mav_put_uint8_t(buf, 28, fix_type);
_mav_put_uint8_t(buf, 29, satellites_visible);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 30);
#else
mavlink_gps_raw_int_t packet;
packet.time_usec = time_usec;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.eph = eph;
packet.epv = epv;
packet.vel = vel;
packet.cog = cog;
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 30);
#endif
 
msg->msgid = MAVLINK_MSG_ID_GPS_RAW_INT;
return mavlink_finalize_message(msg, system_id, component_id, 30, 24);
}
 
/**
* @brief Pack a gps_raw_int message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat Latitude in 1E7 degrees
* @param lon Longitude in 1E7 degrees
* @param alt Altitude in 1E3 meters (millimeters) above MSL
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param satellites_visible Number of satellites visible. If unknown, set to 255
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_raw_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_usec,uint8_t fix_type,int32_t lat,int32_t lon,int32_t alt,uint16_t eph,uint16_t epv,uint16_t vel,uint16_t cog,uint8_t satellites_visible)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int32_t(buf, 8, lat);
_mav_put_int32_t(buf, 12, lon);
_mav_put_int32_t(buf, 16, alt);
_mav_put_uint16_t(buf, 20, eph);
_mav_put_uint16_t(buf, 22, epv);
_mav_put_uint16_t(buf, 24, vel);
_mav_put_uint16_t(buf, 26, cog);
_mav_put_uint8_t(buf, 28, fix_type);
_mav_put_uint8_t(buf, 29, satellites_visible);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 30);
#else
mavlink_gps_raw_int_t packet;
packet.time_usec = time_usec;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.eph = eph;
packet.epv = epv;
packet.vel = vel;
packet.cog = cog;
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 30);
#endif
 
msg->msgid = MAVLINK_MSG_ID_GPS_RAW_INT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 30, 24);
}
 
/**
* @brief Encode a gps_raw_int struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gps_raw_int C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gps_raw_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps_raw_int_t* gps_raw_int)
{
return mavlink_msg_gps_raw_int_pack(system_id, component_id, msg, gps_raw_int->time_usec, gps_raw_int->fix_type, gps_raw_int->lat, gps_raw_int->lon, gps_raw_int->alt, gps_raw_int->eph, gps_raw_int->epv, gps_raw_int->vel, gps_raw_int->cog, gps_raw_int->satellites_visible);
}
 
/**
* @brief Send a gps_raw_int message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat Latitude in 1E7 degrees
* @param lon Longitude in 1E7 degrees
* @param alt Altitude in 1E3 meters (millimeters) above MSL
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param satellites_visible Number of satellites visible. If unknown, set to 255
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_gps_raw_int_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, uint16_t cog, uint8_t satellites_visible)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int32_t(buf, 8, lat);
_mav_put_int32_t(buf, 12, lon);
_mav_put_int32_t(buf, 16, alt);
_mav_put_uint16_t(buf, 20, eph);
_mav_put_uint16_t(buf, 22, epv);
_mav_put_uint16_t(buf, 24, vel);
_mav_put_uint16_t(buf, 26, cog);
_mav_put_uint8_t(buf, 28, fix_type);
_mav_put_uint8_t(buf, 29, satellites_visible);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, buf, 30, 24);
#else
mavlink_gps_raw_int_t packet;
packet.time_usec = time_usec;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.eph = eph;
packet.epv = epv;
packet.vel = vel;
packet.cog = cog;
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, (const char *)&packet, 30, 24);
#endif
}
 
#endif
 
// MESSAGE GPS_RAW_INT UNPACKING
 
 
/**
* @brief Get field time_usec from gps_raw_int message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_gps_raw_int_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field fix_type from gps_raw_int message
*
* @return 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
*/
static inline uint8_t mavlink_msg_gps_raw_int_get_fix_type(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 28);
}
 
/**
* @brief Get field lat from gps_raw_int message
*
* @return Latitude in 1E7 degrees
*/
static inline int32_t mavlink_msg_gps_raw_int_get_lat(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 8);
}
 
/**
* @brief Get field lon from gps_raw_int message
*
* @return Longitude in 1E7 degrees
*/
static inline int32_t mavlink_msg_gps_raw_int_get_lon(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 12);
}
 
/**
* @brief Get field alt from gps_raw_int message
*
* @return Altitude in 1E3 meters (millimeters) above MSL
*/
static inline int32_t mavlink_msg_gps_raw_int_get_alt(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 16);
}
 
/**
* @brief Get field eph from gps_raw_int message
*
* @return GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_gps_raw_int_get_eph(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 20);
}
 
/**
* @brief Get field epv from gps_raw_int message
*
* @return GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_gps_raw_int_get_epv(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 22);
}
 
/**
* @brief Get field vel from gps_raw_int message
*
* @return GPS ground speed (m/s * 100). If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_gps_raw_int_get_vel(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 24);
}
 
/**
* @brief Get field cog from gps_raw_int message
*
* @return Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_gps_raw_int_get_cog(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 26);
}
 
/**
* @brief Get field satellites_visible from gps_raw_int message
*
* @return Number of satellites visible. If unknown, set to 255
*/
static inline uint8_t mavlink_msg_gps_raw_int_get_satellites_visible(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 29);
}
 
/**
* @brief Decode a gps_raw_int message into a struct
*
* @param msg The message to decode
* @param gps_raw_int C-struct to decode the message contents into
*/
static inline void mavlink_msg_gps_raw_int_decode(const mavlink_message_t* msg, mavlink_gps_raw_int_t* gps_raw_int)
{
#if MAVLINK_NEED_BYTE_SWAP
gps_raw_int->time_usec = mavlink_msg_gps_raw_int_get_time_usec(msg);
gps_raw_int->lat = mavlink_msg_gps_raw_int_get_lat(msg);
gps_raw_int->lon = mavlink_msg_gps_raw_int_get_lon(msg);
gps_raw_int->alt = mavlink_msg_gps_raw_int_get_alt(msg);
gps_raw_int->eph = mavlink_msg_gps_raw_int_get_eph(msg);
gps_raw_int->epv = mavlink_msg_gps_raw_int_get_epv(msg);
gps_raw_int->vel = mavlink_msg_gps_raw_int_get_vel(msg);
gps_raw_int->cog = mavlink_msg_gps_raw_int_get_cog(msg);
gps_raw_int->fix_type = mavlink_msg_gps_raw_int_get_fix_type(msg);
gps_raw_int->satellites_visible = mavlink_msg_gps_raw_int_get_satellites_visible(msg);
#else
memcpy(gps_raw_int, _MAV_PAYLOAD(msg), 30);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_gps_status.h
0,0 → 1,252
// MESSAGE GPS_STATUS PACKING
 
#define MAVLINK_MSG_ID_GPS_STATUS 25
 
typedef struct __mavlink_gps_status_t
{
uint8_t satellites_visible; ///< Number of satellites visible
uint8_t satellite_prn[20]; ///< Global satellite ID
uint8_t satellite_used[20]; ///< 0: Satellite not used, 1: used for localization
uint8_t satellite_elevation[20]; ///< Elevation (0: right on top of receiver, 90: on the horizon) of satellite
uint8_t satellite_azimuth[20]; ///< Direction of satellite, 0: 0 deg, 255: 360 deg.
uint8_t satellite_snr[20]; ///< Signal to noise ratio of satellite
} mavlink_gps_status_t;
 
#define MAVLINK_MSG_ID_GPS_STATUS_LEN 101
#define MAVLINK_MSG_ID_25_LEN 101
 
#define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_PRN_LEN 20
#define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_USED_LEN 20
#define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_ELEVATION_LEN 20
#define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_AZIMUTH_LEN 20
#define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_SNR_LEN 20
 
#define MAVLINK_MESSAGE_INFO_GPS_STATUS { \
"GPS_STATUS", \
6, \
{ { "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gps_status_t, satellites_visible) }, \
{ "satellite_prn", NULL, MAVLINK_TYPE_UINT8_T, 20, 1, offsetof(mavlink_gps_status_t, satellite_prn) }, \
{ "satellite_used", NULL, MAVLINK_TYPE_UINT8_T, 20, 21, offsetof(mavlink_gps_status_t, satellite_used) }, \
{ "satellite_elevation", NULL, MAVLINK_TYPE_UINT8_T, 20, 41, offsetof(mavlink_gps_status_t, satellite_elevation) }, \
{ "satellite_azimuth", NULL, MAVLINK_TYPE_UINT8_T, 20, 61, offsetof(mavlink_gps_status_t, satellite_azimuth) }, \
{ "satellite_snr", NULL, MAVLINK_TYPE_UINT8_T, 20, 81, offsetof(mavlink_gps_status_t, satellite_snr) }, \
} \
}
 
 
/**
* @brief Pack a gps_status message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param satellites_visible Number of satellites visible
* @param satellite_prn Global satellite ID
* @param satellite_used 0: Satellite not used, 1: used for localization
* @param satellite_elevation Elevation (0: right on top of receiver, 90: on the horizon) of satellite
* @param satellite_azimuth Direction of satellite, 0: 0 deg, 255: 360 deg.
* @param satellite_snr Signal to noise ratio of satellite
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t satellites_visible, const uint8_t *satellite_prn, const uint8_t *satellite_used, const uint8_t *satellite_elevation, const uint8_t *satellite_azimuth, const uint8_t *satellite_snr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[101];
_mav_put_uint8_t(buf, 0, satellites_visible);
_mav_put_uint8_t_array(buf, 1, satellite_prn, 20);
_mav_put_uint8_t_array(buf, 21, satellite_used, 20);
_mav_put_uint8_t_array(buf, 41, satellite_elevation, 20);
_mav_put_uint8_t_array(buf, 61, satellite_azimuth, 20);
_mav_put_uint8_t_array(buf, 81, satellite_snr, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 101);
#else
mavlink_gps_status_t packet;
packet.satellites_visible = satellites_visible;
mav_array_memcpy(packet.satellite_prn, satellite_prn, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_used, satellite_used, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_elevation, satellite_elevation, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_azimuth, satellite_azimuth, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_snr, satellite_snr, sizeof(uint8_t)*20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 101);
#endif
 
msg->msgid = MAVLINK_MSG_ID_GPS_STATUS;
return mavlink_finalize_message(msg, system_id, component_id, 101, 23);
}
 
/**
* @brief Pack a gps_status message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param satellites_visible Number of satellites visible
* @param satellite_prn Global satellite ID
* @param satellite_used 0: Satellite not used, 1: used for localization
* @param satellite_elevation Elevation (0: right on top of receiver, 90: on the horizon) of satellite
* @param satellite_azimuth Direction of satellite, 0: 0 deg, 255: 360 deg.
* @param satellite_snr Signal to noise ratio of satellite
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t satellites_visible,const uint8_t *satellite_prn,const uint8_t *satellite_used,const uint8_t *satellite_elevation,const uint8_t *satellite_azimuth,const uint8_t *satellite_snr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[101];
_mav_put_uint8_t(buf, 0, satellites_visible);
_mav_put_uint8_t_array(buf, 1, satellite_prn, 20);
_mav_put_uint8_t_array(buf, 21, satellite_used, 20);
_mav_put_uint8_t_array(buf, 41, satellite_elevation, 20);
_mav_put_uint8_t_array(buf, 61, satellite_azimuth, 20);
_mav_put_uint8_t_array(buf, 81, satellite_snr, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 101);
#else
mavlink_gps_status_t packet;
packet.satellites_visible = satellites_visible;
mav_array_memcpy(packet.satellite_prn, satellite_prn, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_used, satellite_used, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_elevation, satellite_elevation, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_azimuth, satellite_azimuth, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_snr, satellite_snr, sizeof(uint8_t)*20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 101);
#endif
 
msg->msgid = MAVLINK_MSG_ID_GPS_STATUS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 101, 23);
}
 
/**
* @brief Encode a gps_status struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gps_status C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gps_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps_status_t* gps_status)
{
return mavlink_msg_gps_status_pack(system_id, component_id, msg, gps_status->satellites_visible, gps_status->satellite_prn, gps_status->satellite_used, gps_status->satellite_elevation, gps_status->satellite_azimuth, gps_status->satellite_snr);
}
 
/**
* @brief Send a gps_status message
* @param chan MAVLink channel to send the message
*
* @param satellites_visible Number of satellites visible
* @param satellite_prn Global satellite ID
* @param satellite_used 0: Satellite not used, 1: used for localization
* @param satellite_elevation Elevation (0: right on top of receiver, 90: on the horizon) of satellite
* @param satellite_azimuth Direction of satellite, 0: 0 deg, 255: 360 deg.
* @param satellite_snr Signal to noise ratio of satellite
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_gps_status_send(mavlink_channel_t chan, uint8_t satellites_visible, const uint8_t *satellite_prn, const uint8_t *satellite_used, const uint8_t *satellite_elevation, const uint8_t *satellite_azimuth, const uint8_t *satellite_snr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[101];
_mav_put_uint8_t(buf, 0, satellites_visible);
_mav_put_uint8_t_array(buf, 1, satellite_prn, 20);
_mav_put_uint8_t_array(buf, 21, satellite_used, 20);
_mav_put_uint8_t_array(buf, 41, satellite_elevation, 20);
_mav_put_uint8_t_array(buf, 61, satellite_azimuth, 20);
_mav_put_uint8_t_array(buf, 81, satellite_snr, 20);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_STATUS, buf, 101, 23);
#else
mavlink_gps_status_t packet;
packet.satellites_visible = satellites_visible;
mav_array_memcpy(packet.satellite_prn, satellite_prn, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_used, satellite_used, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_elevation, satellite_elevation, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_azimuth, satellite_azimuth, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_snr, satellite_snr, sizeof(uint8_t)*20);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_STATUS, (const char *)&packet, 101, 23);
#endif
}
 
#endif
 
// MESSAGE GPS_STATUS UNPACKING
 
 
/**
* @brief Get field satellites_visible from gps_status message
*
* @return Number of satellites visible
*/
static inline uint8_t mavlink_msg_gps_status_get_satellites_visible(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
 
/**
* @brief Get field satellite_prn from gps_status message
*
* @return Global satellite ID
*/
static inline uint16_t mavlink_msg_gps_status_get_satellite_prn(const mavlink_message_t* msg, uint8_t *satellite_prn)
{
return _MAV_RETURN_uint8_t_array(msg, satellite_prn, 20, 1);
}
 
/**
* @brief Get field satellite_used from gps_status message
*
* @return 0: Satellite not used, 1: used for localization
*/
static inline uint16_t mavlink_msg_gps_status_get_satellite_used(const mavlink_message_t* msg, uint8_t *satellite_used)
{
return _MAV_RETURN_uint8_t_array(msg, satellite_used, 20, 21);
}
 
/**
* @brief Get field satellite_elevation from gps_status message
*
* @return Elevation (0: right on top of receiver, 90: on the horizon) of satellite
*/
static inline uint16_t mavlink_msg_gps_status_get_satellite_elevation(const mavlink_message_t* msg, uint8_t *satellite_elevation)
{
return _MAV_RETURN_uint8_t_array(msg, satellite_elevation, 20, 41);
}
 
/**
* @brief Get field satellite_azimuth from gps_status message
*
* @return Direction of satellite, 0: 0 deg, 255: 360 deg.
*/
static inline uint16_t mavlink_msg_gps_status_get_satellite_azimuth(const mavlink_message_t* msg, uint8_t *satellite_azimuth)
{
return _MAV_RETURN_uint8_t_array(msg, satellite_azimuth, 20, 61);
}
 
/**
* @brief Get field satellite_snr from gps_status message
*
* @return Signal to noise ratio of satellite
*/
static inline uint16_t mavlink_msg_gps_status_get_satellite_snr(const mavlink_message_t* msg, uint8_t *satellite_snr)
{
return _MAV_RETURN_uint8_t_array(msg, satellite_snr, 20, 81);
}
 
/**
* @brief Decode a gps_status message into a struct
*
* @param msg The message to decode
* @param gps_status C-struct to decode the message contents into
*/
static inline void mavlink_msg_gps_status_decode(const mavlink_message_t* msg, mavlink_gps_status_t* gps_status)
{
#if MAVLINK_NEED_BYTE_SWAP
gps_status->satellites_visible = mavlink_msg_gps_status_get_satellites_visible(msg);
mavlink_msg_gps_status_get_satellite_prn(msg, gps_status->satellite_prn);
mavlink_msg_gps_status_get_satellite_used(msg, gps_status->satellite_used);
mavlink_msg_gps_status_get_satellite_elevation(msg, gps_status->satellite_elevation);
mavlink_msg_gps_status_get_satellite_azimuth(msg, gps_status->satellite_azimuth);
mavlink_msg_gps_status_get_satellite_snr(msg, gps_status->satellite_snr);
#else
memcpy(gps_status, _MAV_PAYLOAD(msg), 101);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_heartbeat.h
0,0 → 1,251
// MESSAGE HEARTBEAT PACKING
 
#define MAVLINK_MSG_ID_HEARTBEAT 0
 
typedef struct __mavlink_heartbeat_t
{
uint32_t custom_mode; ///< A bitfield for use for autopilot-specific flags.
uint8_t type; ///< Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
uint8_t autopilot; ///< Autopilot type / class. defined in MAV_AUTOPILOT ENUM
uint8_t base_mode; ///< System mode bitfield, see MAV_MODE_FLAGS ENUM in mavlink/include/mavlink_types.h
uint8_t system_status; ///< System status flag, see MAV_STATE ENUM
uint8_t mavlink_version; ///< MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version
} mavlink_heartbeat_t;
 
#define MAVLINK_MSG_ID_HEARTBEAT_LEN 9
#define MAVLINK_MSG_ID_0_LEN 9
 
 
 
#define MAVLINK_MESSAGE_INFO_HEARTBEAT { \
"HEARTBEAT", \
6, \
{ { "custom_mode", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_heartbeat_t, custom_mode) }, \
{ "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_heartbeat_t, type) }, \
{ "autopilot", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_heartbeat_t, autopilot) }, \
{ "base_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_heartbeat_t, base_mode) }, \
{ "system_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_heartbeat_t, system_status) }, \
{ "mavlink_version", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_heartbeat_t, mavlink_version) }, \
} \
}
 
 
/**
* @brief Pack a heartbeat message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param type Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
* @param autopilot Autopilot type / class. defined in MAV_AUTOPILOT ENUM
* @param base_mode System mode bitfield, see MAV_MODE_FLAGS ENUM in mavlink/include/mavlink_types.h
* @param custom_mode A bitfield for use for autopilot-specific flags.
* @param system_status System status flag, see MAV_STATE ENUM
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_heartbeat_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t type, uint8_t autopilot, uint8_t base_mode, uint32_t custom_mode, uint8_t system_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint32_t(buf, 0, custom_mode);
_mav_put_uint8_t(buf, 4, type);
_mav_put_uint8_t(buf, 5, autopilot);
_mav_put_uint8_t(buf, 6, base_mode);
_mav_put_uint8_t(buf, 7, system_status);
_mav_put_uint8_t(buf, 8, 3);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
#else
mavlink_heartbeat_t packet;
packet.custom_mode = custom_mode;
packet.type = type;
packet.autopilot = autopilot;
packet.base_mode = base_mode;
packet.system_status = system_status;
packet.mavlink_version = 3;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
#endif
 
msg->msgid = MAVLINK_MSG_ID_HEARTBEAT;
return mavlink_finalize_message(msg, system_id, component_id, 9, 50);
}
 
/**
* @brief Pack a heartbeat message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param type Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
* @param autopilot Autopilot type / class. defined in MAV_AUTOPILOT ENUM
* @param base_mode System mode bitfield, see MAV_MODE_FLAGS ENUM in mavlink/include/mavlink_types.h
* @param custom_mode A bitfield for use for autopilot-specific flags.
* @param system_status System status flag, see MAV_STATE ENUM
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_heartbeat_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t type,uint8_t autopilot,uint8_t base_mode,uint32_t custom_mode,uint8_t system_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint32_t(buf, 0, custom_mode);
_mav_put_uint8_t(buf, 4, type);
_mav_put_uint8_t(buf, 5, autopilot);
_mav_put_uint8_t(buf, 6, base_mode);
_mav_put_uint8_t(buf, 7, system_status);
_mav_put_uint8_t(buf, 8, 3);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
#else
mavlink_heartbeat_t packet;
packet.custom_mode = custom_mode;
packet.type = type;
packet.autopilot = autopilot;
packet.base_mode = base_mode;
packet.system_status = system_status;
packet.mavlink_version = 3;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
#endif
 
msg->msgid = MAVLINK_MSG_ID_HEARTBEAT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 9, 50);
}
 
/**
* @brief Encode a heartbeat struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param heartbeat C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_heartbeat_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_heartbeat_t* heartbeat)
{
return mavlink_msg_heartbeat_pack(system_id, component_id, msg, heartbeat->type, heartbeat->autopilot, heartbeat->base_mode, heartbeat->custom_mode, heartbeat->system_status);
}
 
/**
* @brief Send a heartbeat message
* @param chan MAVLink channel to send the message
*
* @param type Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
* @param autopilot Autopilot type / class. defined in MAV_AUTOPILOT ENUM
* @param base_mode System mode bitfield, see MAV_MODE_FLAGS ENUM in mavlink/include/mavlink_types.h
* @param custom_mode A bitfield for use for autopilot-specific flags.
* @param system_status System status flag, see MAV_STATE ENUM
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_heartbeat_send(mavlink_channel_t chan, uint8_t type, uint8_t autopilot, uint8_t base_mode, uint32_t custom_mode, uint8_t system_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint32_t(buf, 0, custom_mode);
_mav_put_uint8_t(buf, 4, type);
_mav_put_uint8_t(buf, 5, autopilot);
_mav_put_uint8_t(buf, 6, base_mode);
_mav_put_uint8_t(buf, 7, system_status);
_mav_put_uint8_t(buf, 8, 3);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, buf, 9, 50);
#else
mavlink_heartbeat_t packet;
packet.custom_mode = custom_mode;
packet.type = type;
packet.autopilot = autopilot;
packet.base_mode = base_mode;
packet.system_status = system_status;
packet.mavlink_version = 3;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, (const char *)&packet, 9, 50);
#endif
}
 
#endif
 
// MESSAGE HEARTBEAT UNPACKING
 
 
/**
* @brief Get field type from heartbeat message
*
* @return Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
*/
static inline uint8_t mavlink_msg_heartbeat_get_type(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
 
/**
* @brief Get field autopilot from heartbeat message
*
* @return Autopilot type / class. defined in MAV_AUTOPILOT ENUM
*/
static inline uint8_t mavlink_msg_heartbeat_get_autopilot(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
 
/**
* @brief Get field base_mode from heartbeat message
*
* @return System mode bitfield, see MAV_MODE_FLAGS ENUM in mavlink/include/mavlink_types.h
*/
static inline uint8_t mavlink_msg_heartbeat_get_base_mode(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 6);
}
 
/**
* @brief Get field custom_mode from heartbeat message
*
* @return A bitfield for use for autopilot-specific flags.
*/
static inline uint32_t mavlink_msg_heartbeat_get_custom_mode(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field system_status from heartbeat message
*
* @return System status flag, see MAV_STATE ENUM
*/
static inline uint8_t mavlink_msg_heartbeat_get_system_status(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 7);
}
 
/**
* @brief Get field mavlink_version from heartbeat message
*
* @return MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version
*/
static inline uint8_t mavlink_msg_heartbeat_get_mavlink_version(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
}
 
/**
* @brief Decode a heartbeat message into a struct
*
* @param msg The message to decode
* @param heartbeat C-struct to decode the message contents into
*/
static inline void mavlink_msg_heartbeat_decode(const mavlink_message_t* msg, mavlink_heartbeat_t* heartbeat)
{
#if MAVLINK_NEED_BYTE_SWAP
heartbeat->custom_mode = mavlink_msg_heartbeat_get_custom_mode(msg);
heartbeat->type = mavlink_msg_heartbeat_get_type(msg);
heartbeat->autopilot = mavlink_msg_heartbeat_get_autopilot(msg);
heartbeat->base_mode = mavlink_msg_heartbeat_get_base_mode(msg);
heartbeat->system_status = mavlink_msg_heartbeat_get_system_status(msg);
heartbeat->mavlink_version = mavlink_msg_heartbeat_get_mavlink_version(msg);
#else
memcpy(heartbeat, _MAV_PAYLOAD(msg), 9);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_hil_controls.h
0,0 → 1,364
// MESSAGE HIL_CONTROLS PACKING
 
#define MAVLINK_MSG_ID_HIL_CONTROLS 91
 
typedef struct __mavlink_hil_controls_t
{
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
float roll_ailerons; ///< Control output -1 .. 1
float pitch_elevator; ///< Control output -1 .. 1
float yaw_rudder; ///< Control output -1 .. 1
float throttle; ///< Throttle 0 .. 1
float aux1; ///< Aux 1, -1 .. 1
float aux2; ///< Aux 2, -1 .. 1
float aux3; ///< Aux 3, -1 .. 1
float aux4; ///< Aux 4, -1 .. 1
uint8_t mode; ///< System mode (MAV_MODE)
uint8_t nav_mode; ///< Navigation mode (MAV_NAV_MODE)
} mavlink_hil_controls_t;
 
#define MAVLINK_MSG_ID_HIL_CONTROLS_LEN 42
#define MAVLINK_MSG_ID_91_LEN 42
 
 
 
#define MAVLINK_MESSAGE_INFO_HIL_CONTROLS { \
"HIL_CONTROLS", \
11, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_controls_t, time_usec) }, \
{ "roll_ailerons", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_hil_controls_t, roll_ailerons) }, \
{ "pitch_elevator", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_hil_controls_t, pitch_elevator) }, \
{ "yaw_rudder", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_hil_controls_t, yaw_rudder) }, \
{ "throttle", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_hil_controls_t, throttle) }, \
{ "aux1", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_hil_controls_t, aux1) }, \
{ "aux2", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_hil_controls_t, aux2) }, \
{ "aux3", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_hil_controls_t, aux3) }, \
{ "aux4", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_hil_controls_t, aux4) }, \
{ "mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_hil_controls_t, mode) }, \
{ "nav_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_hil_controls_t, nav_mode) }, \
} \
}
 
 
/**
* @brief Pack a hil_controls message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param roll_ailerons Control output -1 .. 1
* @param pitch_elevator Control output -1 .. 1
* @param yaw_rudder Control output -1 .. 1
* @param throttle Throttle 0 .. 1
* @param aux1 Aux 1, -1 .. 1
* @param aux2 Aux 2, -1 .. 1
* @param aux3 Aux 3, -1 .. 1
* @param aux4 Aux 4, -1 .. 1
* @param mode System mode (MAV_MODE)
* @param nav_mode Navigation mode (MAV_NAV_MODE)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_controls_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_usec, float roll_ailerons, float pitch_elevator, float yaw_rudder, float throttle, float aux1, float aux2, float aux3, float aux4, uint8_t mode, uint8_t nav_mode)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[42];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll_ailerons);
_mav_put_float(buf, 12, pitch_elevator);
_mav_put_float(buf, 16, yaw_rudder);
_mav_put_float(buf, 20, throttle);
_mav_put_float(buf, 24, aux1);
_mav_put_float(buf, 28, aux2);
_mav_put_float(buf, 32, aux3);
_mav_put_float(buf, 36, aux4);
_mav_put_uint8_t(buf, 40, mode);
_mav_put_uint8_t(buf, 41, nav_mode);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 42);
#else
mavlink_hil_controls_t packet;
packet.time_usec = time_usec;
packet.roll_ailerons = roll_ailerons;
packet.pitch_elevator = pitch_elevator;
packet.yaw_rudder = yaw_rudder;
packet.throttle = throttle;
packet.aux1 = aux1;
packet.aux2 = aux2;
packet.aux3 = aux3;
packet.aux4 = aux4;
packet.mode = mode;
packet.nav_mode = nav_mode;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 42);
#endif
 
msg->msgid = MAVLINK_MSG_ID_HIL_CONTROLS;
return mavlink_finalize_message(msg, system_id, component_id, 42, 63);
}
 
/**
* @brief Pack a hil_controls message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param roll_ailerons Control output -1 .. 1
* @param pitch_elevator Control output -1 .. 1
* @param yaw_rudder Control output -1 .. 1
* @param throttle Throttle 0 .. 1
* @param aux1 Aux 1, -1 .. 1
* @param aux2 Aux 2, -1 .. 1
* @param aux3 Aux 3, -1 .. 1
* @param aux4 Aux 4, -1 .. 1
* @param mode System mode (MAV_MODE)
* @param nav_mode Navigation mode (MAV_NAV_MODE)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_controls_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_usec,float roll_ailerons,float pitch_elevator,float yaw_rudder,float throttle,float aux1,float aux2,float aux3,float aux4,uint8_t mode,uint8_t nav_mode)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[42];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll_ailerons);
_mav_put_float(buf, 12, pitch_elevator);
_mav_put_float(buf, 16, yaw_rudder);
_mav_put_float(buf, 20, throttle);
_mav_put_float(buf, 24, aux1);
_mav_put_float(buf, 28, aux2);
_mav_put_float(buf, 32, aux3);
_mav_put_float(buf, 36, aux4);
_mav_put_uint8_t(buf, 40, mode);
_mav_put_uint8_t(buf, 41, nav_mode);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 42);
#else
mavlink_hil_controls_t packet;
packet.time_usec = time_usec;
packet.roll_ailerons = roll_ailerons;
packet.pitch_elevator = pitch_elevator;
packet.yaw_rudder = yaw_rudder;
packet.throttle = throttle;
packet.aux1 = aux1;
packet.aux2 = aux2;
packet.aux3 = aux3;
packet.aux4 = aux4;
packet.mode = mode;
packet.nav_mode = nav_mode;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 42);
#endif
 
msg->msgid = MAVLINK_MSG_ID_HIL_CONTROLS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 42, 63);
}
 
/**
* @brief Encode a hil_controls struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param hil_controls C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_hil_controls_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_controls_t* hil_controls)
{
return mavlink_msg_hil_controls_pack(system_id, component_id, msg, hil_controls->time_usec, hil_controls->roll_ailerons, hil_controls->pitch_elevator, hil_controls->yaw_rudder, hil_controls->throttle, hil_controls->aux1, hil_controls->aux2, hil_controls->aux3, hil_controls->aux4, hil_controls->mode, hil_controls->nav_mode);
}
 
/**
* @brief Send a hil_controls message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param roll_ailerons Control output -1 .. 1
* @param pitch_elevator Control output -1 .. 1
* @param yaw_rudder Control output -1 .. 1
* @param throttle Throttle 0 .. 1
* @param aux1 Aux 1, -1 .. 1
* @param aux2 Aux 2, -1 .. 1
* @param aux3 Aux 3, -1 .. 1
* @param aux4 Aux 4, -1 .. 1
* @param mode System mode (MAV_MODE)
* @param nav_mode Navigation mode (MAV_NAV_MODE)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_hil_controls_send(mavlink_channel_t chan, uint64_t time_usec, float roll_ailerons, float pitch_elevator, float yaw_rudder, float throttle, float aux1, float aux2, float aux3, float aux4, uint8_t mode, uint8_t nav_mode)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[42];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll_ailerons);
_mav_put_float(buf, 12, pitch_elevator);
_mav_put_float(buf, 16, yaw_rudder);
_mav_put_float(buf, 20, throttle);
_mav_put_float(buf, 24, aux1);
_mav_put_float(buf, 28, aux2);
_mav_put_float(buf, 32, aux3);
_mav_put_float(buf, 36, aux4);
_mav_put_uint8_t(buf, 40, mode);
_mav_put_uint8_t(buf, 41, nav_mode);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, buf, 42, 63);
#else
mavlink_hil_controls_t packet;
packet.time_usec = time_usec;
packet.roll_ailerons = roll_ailerons;
packet.pitch_elevator = pitch_elevator;
packet.yaw_rudder = yaw_rudder;
packet.throttle = throttle;
packet.aux1 = aux1;
packet.aux2 = aux2;
packet.aux3 = aux3;
packet.aux4 = aux4;
packet.mode = mode;
packet.nav_mode = nav_mode;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, (const char *)&packet, 42, 63);
#endif
}
 
#endif
 
// MESSAGE HIL_CONTROLS UNPACKING
 
 
/**
* @brief Get field time_usec from hil_controls message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_hil_controls_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field roll_ailerons from hil_controls message
*
* @return Control output -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_roll_ailerons(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field pitch_elevator from hil_controls message
*
* @return Control output -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_pitch_elevator(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field yaw_rudder from hil_controls message
*
* @return Control output -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_yaw_rudder(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field throttle from hil_controls message
*
* @return Throttle 0 .. 1
*/
static inline float mavlink_msg_hil_controls_get_throttle(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Get field aux1 from hil_controls message
*
* @return Aux 1, -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_aux1(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
 
/**
* @brief Get field aux2 from hil_controls message
*
* @return Aux 2, -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_aux2(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 28);
}
 
/**
* @brief Get field aux3 from hil_controls message
*
* @return Aux 3, -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_aux3(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 32);
}
 
/**
* @brief Get field aux4 from hil_controls message
*
* @return Aux 4, -1 .. 1
*/
static inline float mavlink_msg_hil_controls_get_aux4(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 36);
}
 
/**
* @brief Get field mode from hil_controls message
*
* @return System mode (MAV_MODE)
*/
static inline uint8_t mavlink_msg_hil_controls_get_mode(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 40);
}
 
/**
* @brief Get field nav_mode from hil_controls message
*
* @return Navigation mode (MAV_NAV_MODE)
*/
static inline uint8_t mavlink_msg_hil_controls_get_nav_mode(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 41);
}
 
/**
* @brief Decode a hil_controls message into a struct
*
* @param msg The message to decode
* @param hil_controls C-struct to decode the message contents into
*/
static inline void mavlink_msg_hil_controls_decode(const mavlink_message_t* msg, mavlink_hil_controls_t* hil_controls)
{
#if MAVLINK_NEED_BYTE_SWAP
hil_controls->time_usec = mavlink_msg_hil_controls_get_time_usec(msg);
hil_controls->roll_ailerons = mavlink_msg_hil_controls_get_roll_ailerons(msg);
hil_controls->pitch_elevator = mavlink_msg_hil_controls_get_pitch_elevator(msg);
hil_controls->yaw_rudder = mavlink_msg_hil_controls_get_yaw_rudder(msg);
hil_controls->throttle = mavlink_msg_hil_controls_get_throttle(msg);
hil_controls->aux1 = mavlink_msg_hil_controls_get_aux1(msg);
hil_controls->aux2 = mavlink_msg_hil_controls_get_aux2(msg);
hil_controls->aux3 = mavlink_msg_hil_controls_get_aux3(msg);
hil_controls->aux4 = mavlink_msg_hil_controls_get_aux4(msg);
hil_controls->mode = mavlink_msg_hil_controls_get_mode(msg);
hil_controls->nav_mode = mavlink_msg_hil_controls_get_nav_mode(msg);
#else
memcpy(hil_controls, _MAV_PAYLOAD(msg), 42);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_hil_rc_inputs_raw.h
0,0 → 1,430
// MESSAGE HIL_RC_INPUTS_RAW PACKING
 
#define MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW 92
 
typedef struct __mavlink_hil_rc_inputs_raw_t
{
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
uint16_t chan1_raw; ///< RC channel 1 value, in microseconds
uint16_t chan2_raw; ///< RC channel 2 value, in microseconds
uint16_t chan3_raw; ///< RC channel 3 value, in microseconds
uint16_t chan4_raw; ///< RC channel 4 value, in microseconds
uint16_t chan5_raw; ///< RC channel 5 value, in microseconds
uint16_t chan6_raw; ///< RC channel 6 value, in microseconds
uint16_t chan7_raw; ///< RC channel 7 value, in microseconds
uint16_t chan8_raw; ///< RC channel 8 value, in microseconds
uint16_t chan9_raw; ///< RC channel 9 value, in microseconds
uint16_t chan10_raw; ///< RC channel 10 value, in microseconds
uint16_t chan11_raw; ///< RC channel 11 value, in microseconds
uint16_t chan12_raw; ///< RC channel 12 value, in microseconds
uint8_t rssi; ///< Receive signal strength indicator, 0: 0%, 255: 100%
} mavlink_hil_rc_inputs_raw_t;
 
#define MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN 33
#define MAVLINK_MSG_ID_92_LEN 33
 
 
 
#define MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW { \
"HIL_RC_INPUTS_RAW", \
14, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_rc_inputs_raw_t, time_usec) }, \
{ "chan1_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_hil_rc_inputs_raw_t, chan1_raw) }, \
{ "chan2_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_hil_rc_inputs_raw_t, chan2_raw) }, \
{ "chan3_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_hil_rc_inputs_raw_t, chan3_raw) }, \
{ "chan4_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_hil_rc_inputs_raw_t, chan4_raw) }, \
{ "chan5_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_hil_rc_inputs_raw_t, chan5_raw) }, \
{ "chan6_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_hil_rc_inputs_raw_t, chan6_raw) }, \
{ "chan7_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_hil_rc_inputs_raw_t, chan7_raw) }, \
{ "chan8_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_hil_rc_inputs_raw_t, chan8_raw) }, \
{ "chan9_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_hil_rc_inputs_raw_t, chan9_raw) }, \
{ "chan10_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_hil_rc_inputs_raw_t, chan10_raw) }, \
{ "chan11_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_hil_rc_inputs_raw_t, chan11_raw) }, \
{ "chan12_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_hil_rc_inputs_raw_t, chan12_raw) }, \
{ "rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_hil_rc_inputs_raw_t, rssi) }, \
} \
}
 
 
/**
* @brief Pack a hil_rc_inputs_raw message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @param chan9_raw RC channel 9 value, in microseconds
* @param chan10_raw RC channel 10 value, in microseconds
* @param chan11_raw RC channel 11 value, in microseconds
* @param chan12_raw RC channel 12 value, in microseconds
* @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_usec, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint16_t chan9_raw, uint16_t chan10_raw, uint16_t chan11_raw, uint16_t chan12_raw, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 8, chan1_raw);
_mav_put_uint16_t(buf, 10, chan2_raw);
_mav_put_uint16_t(buf, 12, chan3_raw);
_mav_put_uint16_t(buf, 14, chan4_raw);
_mav_put_uint16_t(buf, 16, chan5_raw);
_mav_put_uint16_t(buf, 18, chan6_raw);
_mav_put_uint16_t(buf, 20, chan7_raw);
_mav_put_uint16_t(buf, 22, chan8_raw);
_mav_put_uint16_t(buf, 24, chan9_raw);
_mav_put_uint16_t(buf, 26, chan10_raw);
_mav_put_uint16_t(buf, 28, chan11_raw);
_mav_put_uint16_t(buf, 30, chan12_raw);
_mav_put_uint8_t(buf, 32, rssi);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 33);
#else
mavlink_hil_rc_inputs_raw_t packet;
packet.time_usec = time_usec;
packet.chan1_raw = chan1_raw;
packet.chan2_raw = chan2_raw;
packet.chan3_raw = chan3_raw;
packet.chan4_raw = chan4_raw;
packet.chan5_raw = chan5_raw;
packet.chan6_raw = chan6_raw;
packet.chan7_raw = chan7_raw;
packet.chan8_raw = chan8_raw;
packet.chan9_raw = chan9_raw;
packet.chan10_raw = chan10_raw;
packet.chan11_raw = chan11_raw;
packet.chan12_raw = chan12_raw;
packet.rssi = rssi;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 33);
#endif
 
msg->msgid = MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW;
return mavlink_finalize_message(msg, system_id, component_id, 33, 54);
}
 
/**
* @brief Pack a hil_rc_inputs_raw message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @param chan9_raw RC channel 9 value, in microseconds
* @param chan10_raw RC channel 10 value, in microseconds
* @param chan11_raw RC channel 11 value, in microseconds
* @param chan12_raw RC channel 12 value, in microseconds
* @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_usec,uint16_t chan1_raw,uint16_t chan2_raw,uint16_t chan3_raw,uint16_t chan4_raw,uint16_t chan5_raw,uint16_t chan6_raw,uint16_t chan7_raw,uint16_t chan8_raw,uint16_t chan9_raw,uint16_t chan10_raw,uint16_t chan11_raw,uint16_t chan12_raw,uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 8, chan1_raw);
_mav_put_uint16_t(buf, 10, chan2_raw);
_mav_put_uint16_t(buf, 12, chan3_raw);
_mav_put_uint16_t(buf, 14, chan4_raw);
_mav_put_uint16_t(buf, 16, chan5_raw);
_mav_put_uint16_t(buf, 18, chan6_raw);
_mav_put_uint16_t(buf, 20, chan7_raw);
_mav_put_uint16_t(buf, 22, chan8_raw);
_mav_put_uint16_t(buf, 24, chan9_raw);
_mav_put_uint16_t(buf, 26, chan10_raw);
_mav_put_uint16_t(buf, 28, chan11_raw);
_mav_put_uint16_t(buf, 30, chan12_raw);
_mav_put_uint8_t(buf, 32, rssi);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 33);
#else
mavlink_hil_rc_inputs_raw_t packet;
packet.time_usec = time_usec;
packet.chan1_raw = chan1_raw;
packet.chan2_raw = chan2_raw;
packet.chan3_raw = chan3_raw;
packet.chan4_raw = chan4_raw;
packet.chan5_raw = chan5_raw;
packet.chan6_raw = chan6_raw;
packet.chan7_raw = chan7_raw;
packet.chan8_raw = chan8_raw;
packet.chan9_raw = chan9_raw;
packet.chan10_raw = chan10_raw;
packet.chan11_raw = chan11_raw;
packet.chan12_raw = chan12_raw;
packet.rssi = rssi;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 33);
#endif
 
msg->msgid = MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 33, 54);
}
 
/**
* @brief Encode a hil_rc_inputs_raw struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param hil_rc_inputs_raw C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_rc_inputs_raw_t* hil_rc_inputs_raw)
{
return mavlink_msg_hil_rc_inputs_raw_pack(system_id, component_id, msg, hil_rc_inputs_raw->time_usec, hil_rc_inputs_raw->chan1_raw, hil_rc_inputs_raw->chan2_raw, hil_rc_inputs_raw->chan3_raw, hil_rc_inputs_raw->chan4_raw, hil_rc_inputs_raw->chan5_raw, hil_rc_inputs_raw->chan6_raw, hil_rc_inputs_raw->chan7_raw, hil_rc_inputs_raw->chan8_raw, hil_rc_inputs_raw->chan9_raw, hil_rc_inputs_raw->chan10_raw, hil_rc_inputs_raw->chan11_raw, hil_rc_inputs_raw->chan12_raw, hil_rc_inputs_raw->rssi);
}
 
/**
* @brief Send a hil_rc_inputs_raw message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @param chan9_raw RC channel 9 value, in microseconds
* @param chan10_raw RC channel 10 value, in microseconds
* @param chan11_raw RC channel 11 value, in microseconds
* @param chan12_raw RC channel 12 value, in microseconds
* @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_hil_rc_inputs_raw_send(mavlink_channel_t chan, uint64_t time_usec, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint16_t chan9_raw, uint16_t chan10_raw, uint16_t chan11_raw, uint16_t chan12_raw, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 8, chan1_raw);
_mav_put_uint16_t(buf, 10, chan2_raw);
_mav_put_uint16_t(buf, 12, chan3_raw);
_mav_put_uint16_t(buf, 14, chan4_raw);
_mav_put_uint16_t(buf, 16, chan5_raw);
_mav_put_uint16_t(buf, 18, chan6_raw);
_mav_put_uint16_t(buf, 20, chan7_raw);
_mav_put_uint16_t(buf, 22, chan8_raw);
_mav_put_uint16_t(buf, 24, chan9_raw);
_mav_put_uint16_t(buf, 26, chan10_raw);
_mav_put_uint16_t(buf, 28, chan11_raw);
_mav_put_uint16_t(buf, 30, chan12_raw);
_mav_put_uint8_t(buf, 32, rssi);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, buf, 33, 54);
#else
mavlink_hil_rc_inputs_raw_t packet;
packet.time_usec = time_usec;
packet.chan1_raw = chan1_raw;
packet.chan2_raw = chan2_raw;
packet.chan3_raw = chan3_raw;
packet.chan4_raw = chan4_raw;
packet.chan5_raw = chan5_raw;
packet.chan6_raw = chan6_raw;
packet.chan7_raw = chan7_raw;
packet.chan8_raw = chan8_raw;
packet.chan9_raw = chan9_raw;
packet.chan10_raw = chan10_raw;
packet.chan11_raw = chan11_raw;
packet.chan12_raw = chan12_raw;
packet.rssi = rssi;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, (const char *)&packet, 33, 54);
#endif
}
 
#endif
 
// MESSAGE HIL_RC_INPUTS_RAW UNPACKING
 
 
/**
* @brief Get field time_usec from hil_rc_inputs_raw message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_hil_rc_inputs_raw_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field chan1_raw from hil_rc_inputs_raw message
*
* @return RC channel 1 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan1_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 8);
}
 
/**
* @brief Get field chan2_raw from hil_rc_inputs_raw message
*
* @return RC channel 2 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan2_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 10);
}
 
/**
* @brief Get field chan3_raw from hil_rc_inputs_raw message
*
* @return RC channel 3 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan3_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 12);
}
 
/**
* @brief Get field chan4_raw from hil_rc_inputs_raw message
*
* @return RC channel 4 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan4_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 14);
}
 
/**
* @brief Get field chan5_raw from hil_rc_inputs_raw message
*
* @return RC channel 5 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan5_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 16);
}
 
/**
* @brief Get field chan6_raw from hil_rc_inputs_raw message
*
* @return RC channel 6 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan6_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 18);
}
 
/**
* @brief Get field chan7_raw from hil_rc_inputs_raw message
*
* @return RC channel 7 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan7_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 20);
}
 
/**
* @brief Get field chan8_raw from hil_rc_inputs_raw message
*
* @return RC channel 8 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan8_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 22);
}
 
/**
* @brief Get field chan9_raw from hil_rc_inputs_raw message
*
* @return RC channel 9 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan9_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 24);
}
 
/**
* @brief Get field chan10_raw from hil_rc_inputs_raw message
*
* @return RC channel 10 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan10_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 26);
}
 
/**
* @brief Get field chan11_raw from hil_rc_inputs_raw message
*
* @return RC channel 11 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan11_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 28);
}
 
/**
* @brief Get field chan12_raw from hil_rc_inputs_raw message
*
* @return RC channel 12 value, in microseconds
*/
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan12_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 30);
}
 
/**
* @brief Get field rssi from hil_rc_inputs_raw message
*
* @return Receive signal strength indicator, 0: 0%, 255: 100%
*/
static inline uint8_t mavlink_msg_hil_rc_inputs_raw_get_rssi(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 32);
}
 
/**
* @brief Decode a hil_rc_inputs_raw message into a struct
*
* @param msg The message to decode
* @param hil_rc_inputs_raw C-struct to decode the message contents into
*/
static inline void mavlink_msg_hil_rc_inputs_raw_decode(const mavlink_message_t* msg, mavlink_hil_rc_inputs_raw_t* hil_rc_inputs_raw)
{
#if MAVLINK_NEED_BYTE_SWAP
hil_rc_inputs_raw->time_usec = mavlink_msg_hil_rc_inputs_raw_get_time_usec(msg);
hil_rc_inputs_raw->chan1_raw = mavlink_msg_hil_rc_inputs_raw_get_chan1_raw(msg);
hil_rc_inputs_raw->chan2_raw = mavlink_msg_hil_rc_inputs_raw_get_chan2_raw(msg);
hil_rc_inputs_raw->chan3_raw = mavlink_msg_hil_rc_inputs_raw_get_chan3_raw(msg);
hil_rc_inputs_raw->chan4_raw = mavlink_msg_hil_rc_inputs_raw_get_chan4_raw(msg);
hil_rc_inputs_raw->chan5_raw = mavlink_msg_hil_rc_inputs_raw_get_chan5_raw(msg);
hil_rc_inputs_raw->chan6_raw = mavlink_msg_hil_rc_inputs_raw_get_chan6_raw(msg);
hil_rc_inputs_raw->chan7_raw = mavlink_msg_hil_rc_inputs_raw_get_chan7_raw(msg);
hil_rc_inputs_raw->chan8_raw = mavlink_msg_hil_rc_inputs_raw_get_chan8_raw(msg);
hil_rc_inputs_raw->chan9_raw = mavlink_msg_hil_rc_inputs_raw_get_chan9_raw(msg);
hil_rc_inputs_raw->chan10_raw = mavlink_msg_hil_rc_inputs_raw_get_chan10_raw(msg);
hil_rc_inputs_raw->chan11_raw = mavlink_msg_hil_rc_inputs_raw_get_chan11_raw(msg);
hil_rc_inputs_raw->chan12_raw = mavlink_msg_hil_rc_inputs_raw_get_chan12_raw(msg);
hil_rc_inputs_raw->rssi = mavlink_msg_hil_rc_inputs_raw_get_rssi(msg);
#else
memcpy(hil_rc_inputs_raw, _MAV_PAYLOAD(msg), 33);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_hil_state.h
0,0 → 1,474
// MESSAGE HIL_STATE PACKING
 
#define MAVLINK_MSG_ID_HIL_STATE 90
 
typedef struct __mavlink_hil_state_t
{
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
float roll; ///< Roll angle (rad)
float pitch; ///< Pitch angle (rad)
float yaw; ///< Yaw angle (rad)
float rollspeed; ///< Roll angular speed (rad/s)
float pitchspeed; ///< Pitch angular speed (rad/s)
float yawspeed; ///< Yaw angular speed (rad/s)
int32_t lat; ///< Latitude, expressed as * 1E7
int32_t lon; ///< Longitude, expressed as * 1E7
int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters)
int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100
int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100
int16_t vz; ///< Ground Z Speed (Altitude), expressed as m/s * 100
int16_t xacc; ///< X acceleration (mg)
int16_t yacc; ///< Y acceleration (mg)
int16_t zacc; ///< Z acceleration (mg)
} mavlink_hil_state_t;
 
#define MAVLINK_MSG_ID_HIL_STATE_LEN 56
#define MAVLINK_MSG_ID_90_LEN 56
 
 
 
#define MAVLINK_MESSAGE_INFO_HIL_STATE { \
"HIL_STATE", \
16, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_state_t, time_usec) }, \
{ "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_hil_state_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_hil_state_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_hil_state_t, yaw) }, \
{ "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_hil_state_t, rollspeed) }, \
{ "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_hil_state_t, pitchspeed) }, \
{ "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_hil_state_t, yawspeed) }, \
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 32, offsetof(mavlink_hil_state_t, lat) }, \
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 36, offsetof(mavlink_hil_state_t, lon) }, \
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 40, offsetof(mavlink_hil_state_t, alt) }, \
{ "vx", NULL, MAVLINK_TYPE_INT16_T, 0, 44, offsetof(mavlink_hil_state_t, vx) }, \
{ "vy", NULL, MAVLINK_TYPE_INT16_T, 0, 46, offsetof(mavlink_hil_state_t, vy) }, \
{ "vz", NULL, MAVLINK_TYPE_INT16_T, 0, 48, offsetof(mavlink_hil_state_t, vz) }, \
{ "xacc", NULL, MAVLINK_TYPE_INT16_T, 0, 50, offsetof(mavlink_hil_state_t, xacc) }, \
{ "yacc", NULL, MAVLINK_TYPE_INT16_T, 0, 52, offsetof(mavlink_hil_state_t, yacc) }, \
{ "zacc", NULL, MAVLINK_TYPE_INT16_T, 0, 54, offsetof(mavlink_hil_state_t, zacc) }, \
} \
}
 
 
/**
* @brief Pack a hil_state message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param xacc X acceleration (mg)
* @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_state_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_usec, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, int16_t xacc, int16_t yacc, int16_t zacc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[56];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll);
_mav_put_float(buf, 12, pitch);
_mav_put_float(buf, 16, yaw);
_mav_put_float(buf, 20, rollspeed);
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
_mav_put_int32_t(buf, 32, lat);
_mav_put_int32_t(buf, 36, lon);
_mav_put_int32_t(buf, 40, alt);
_mav_put_int16_t(buf, 44, vx);
_mav_put_int16_t(buf, 46, vy);
_mav_put_int16_t(buf, 48, vz);
_mav_put_int16_t(buf, 50, xacc);
_mav_put_int16_t(buf, 52, yacc);
_mav_put_int16_t(buf, 54, zacc);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 56);
#else
mavlink_hil_state_t packet;
packet.time_usec = time_usec;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 56);
#endif
 
msg->msgid = MAVLINK_MSG_ID_HIL_STATE;
return mavlink_finalize_message(msg, system_id, component_id, 56, 183);
}
 
/**
* @brief Pack a hil_state message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param xacc X acceleration (mg)
* @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_state_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_usec,float roll,float pitch,float yaw,float rollspeed,float pitchspeed,float yawspeed,int32_t lat,int32_t lon,int32_t alt,int16_t vx,int16_t vy,int16_t vz,int16_t xacc,int16_t yacc,int16_t zacc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[56];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll);
_mav_put_float(buf, 12, pitch);
_mav_put_float(buf, 16, yaw);
_mav_put_float(buf, 20, rollspeed);
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
_mav_put_int32_t(buf, 32, lat);
_mav_put_int32_t(buf, 36, lon);
_mav_put_int32_t(buf, 40, alt);
_mav_put_int16_t(buf, 44, vx);
_mav_put_int16_t(buf, 46, vy);
_mav_put_int16_t(buf, 48, vz);
_mav_put_int16_t(buf, 50, xacc);
_mav_put_int16_t(buf, 52, yacc);
_mav_put_int16_t(buf, 54, zacc);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 56);
#else
mavlink_hil_state_t packet;
packet.time_usec = time_usec;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 56);
#endif
 
msg->msgid = MAVLINK_MSG_ID_HIL_STATE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 56, 183);
}
 
/**
* @brief Encode a hil_state struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param hil_state C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_hil_state_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_state_t* hil_state)
{
return mavlink_msg_hil_state_pack(system_id, component_id, msg, hil_state->time_usec, hil_state->roll, hil_state->pitch, hil_state->yaw, hil_state->rollspeed, hil_state->pitchspeed, hil_state->yawspeed, hil_state->lat, hil_state->lon, hil_state->alt, hil_state->vx, hil_state->vy, hil_state->vz, hil_state->xacc, hil_state->yacc, hil_state->zacc);
}
 
/**
* @brief Send a hil_state message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param xacc X acceleration (mg)
* @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_hil_state_send(mavlink_channel_t chan, uint64_t time_usec, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, int16_t xacc, int16_t yacc, int16_t zacc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[56];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll);
_mav_put_float(buf, 12, pitch);
_mav_put_float(buf, 16, yaw);
_mav_put_float(buf, 20, rollspeed);
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
_mav_put_int32_t(buf, 32, lat);
_mav_put_int32_t(buf, 36, lon);
_mav_put_int32_t(buf, 40, alt);
_mav_put_int16_t(buf, 44, vx);
_mav_put_int16_t(buf, 46, vy);
_mav_put_int16_t(buf, 48, vz);
_mav_put_int16_t(buf, 50, xacc);
_mav_put_int16_t(buf, 52, yacc);
_mav_put_int16_t(buf, 54, zacc);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE, buf, 56, 183);
#else
mavlink_hil_state_t packet;
packet.time_usec = time_usec;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE, (const char *)&packet, 56, 183);
#endif
}
 
#endif
 
// MESSAGE HIL_STATE UNPACKING
 
 
/**
* @brief Get field time_usec from hil_state message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_hil_state_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field roll from hil_state message
*
* @return Roll angle (rad)
*/
static inline float mavlink_msg_hil_state_get_roll(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field pitch from hil_state message
*
* @return Pitch angle (rad)
*/
static inline float mavlink_msg_hil_state_get_pitch(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field yaw from hil_state message
*
* @return Yaw angle (rad)
*/
static inline float mavlink_msg_hil_state_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field rollspeed from hil_state message
*
* @return Roll angular speed (rad/s)
*/
static inline float mavlink_msg_hil_state_get_rollspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Get field pitchspeed from hil_state message
*
* @return Pitch angular speed (rad/s)
*/
static inline float mavlink_msg_hil_state_get_pitchspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
 
/**
* @brief Get field yawspeed from hil_state message
*
* @return Yaw angular speed (rad/s)
*/
static inline float mavlink_msg_hil_state_get_yawspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 28);
}
 
/**
* @brief Get field lat from hil_state message
*
* @return Latitude, expressed as * 1E7
*/
static inline int32_t mavlink_msg_hil_state_get_lat(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 32);
}
 
/**
* @brief Get field lon from hil_state message
*
* @return Longitude, expressed as * 1E7
*/
static inline int32_t mavlink_msg_hil_state_get_lon(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 36);
}
 
/**
* @brief Get field alt from hil_state message
*
* @return Altitude in meters, expressed as * 1000 (millimeters)
*/
static inline int32_t mavlink_msg_hil_state_get_alt(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 40);
}
 
/**
* @brief Get field vx from hil_state message
*
* @return Ground X Speed (Latitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_hil_state_get_vx(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 44);
}
 
/**
* @brief Get field vy from hil_state message
*
* @return Ground Y Speed (Longitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_hil_state_get_vy(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 46);
}
 
/**
* @brief Get field vz from hil_state message
*
* @return Ground Z Speed (Altitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_hil_state_get_vz(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 48);
}
 
/**
* @brief Get field xacc from hil_state message
*
* @return X acceleration (mg)
*/
static inline int16_t mavlink_msg_hil_state_get_xacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 50);
}
 
/**
* @brief Get field yacc from hil_state message
*
* @return Y acceleration (mg)
*/
static inline int16_t mavlink_msg_hil_state_get_yacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 52);
}
 
/**
* @brief Get field zacc from hil_state message
*
* @return Z acceleration (mg)
*/
static inline int16_t mavlink_msg_hil_state_get_zacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 54);
}
 
/**
* @brief Decode a hil_state message into a struct
*
* @param msg The message to decode
* @param hil_state C-struct to decode the message contents into
*/
static inline void mavlink_msg_hil_state_decode(const mavlink_message_t* msg, mavlink_hil_state_t* hil_state)
{
#if MAVLINK_NEED_BYTE_SWAP
hil_state->time_usec = mavlink_msg_hil_state_get_time_usec(msg);
hil_state->roll = mavlink_msg_hil_state_get_roll(msg);
hil_state->pitch = mavlink_msg_hil_state_get_pitch(msg);
hil_state->yaw = mavlink_msg_hil_state_get_yaw(msg);
hil_state->rollspeed = mavlink_msg_hil_state_get_rollspeed(msg);
hil_state->pitchspeed = mavlink_msg_hil_state_get_pitchspeed(msg);
hil_state->yawspeed = mavlink_msg_hil_state_get_yawspeed(msg);
hil_state->lat = mavlink_msg_hil_state_get_lat(msg);
hil_state->lon = mavlink_msg_hil_state_get_lon(msg);
hil_state->alt = mavlink_msg_hil_state_get_alt(msg);
hil_state->vx = mavlink_msg_hil_state_get_vx(msg);
hil_state->vy = mavlink_msg_hil_state_get_vy(msg);
hil_state->vz = mavlink_msg_hil_state_get_vz(msg);
hil_state->xacc = mavlink_msg_hil_state_get_xacc(msg);
hil_state->yacc = mavlink_msg_hil_state_get_yacc(msg);
hil_state->zacc = mavlink_msg_hil_state_get_zacc(msg);
#else
memcpy(hil_state, _MAV_PAYLOAD(msg), 56);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_local_position_ned.h
0,0 → 1,276
// MESSAGE LOCAL_POSITION_NED PACKING
 
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED 32
 
typedef struct __mavlink_local_position_ned_t
{
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
float x; ///< X Position
float y; ///< Y Position
float z; ///< Z Position
float vx; ///< X Speed
float vy; ///< Y Speed
float vz; ///< Z Speed
} mavlink_local_position_ned_t;
 
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN 28
#define MAVLINK_MSG_ID_32_LEN 28
 
 
 
#define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED { \
"LOCAL_POSITION_NED", \
7, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_local_position_ned_t, time_boot_ms) }, \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_local_position_ned_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_local_position_ned_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_local_position_ned_t, z) }, \
{ "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_local_position_ned_t, vx) }, \
{ "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_local_position_ned_t, vy) }, \
{ "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_local_position_ned_t, vz) }, \
} \
}
 
 
/**
* @brief Pack a local_position_ned message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param x X Position
* @param y Y Position
* @param z Z Position
* @param vx X Speed
* @param vy Y Speed
* @param vz Z Speed
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_position_ned_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, float x, float y, float z, float vx, float vy, float vz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
_mav_put_float(buf, 12, z);
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_local_position_ned_t packet;
packet.time_boot_ms = time_boot_ms;
packet.x = x;
packet.y = y;
packet.z = z;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif
 
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_NED;
return mavlink_finalize_message(msg, system_id, component_id, 28, 185);
}
 
/**
* @brief Pack a local_position_ned message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param x X Position
* @param y Y Position
* @param z Z Position
* @param vx X Speed
* @param vy Y Speed
* @param vz Z Speed
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_position_ned_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,float x,float y,float z,float vx,float vy,float vz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
_mav_put_float(buf, 12, z);
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_local_position_ned_t packet;
packet.time_boot_ms = time_boot_ms;
packet.x = x;
packet.y = y;
packet.z = z;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif
 
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_NED;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 185);
}
 
/**
* @brief Encode a local_position_ned struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param local_position_ned C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_local_position_ned_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_local_position_ned_t* local_position_ned)
{
return mavlink_msg_local_position_ned_pack(system_id, component_id, msg, local_position_ned->time_boot_ms, local_position_ned->x, local_position_ned->y, local_position_ned->z, local_position_ned->vx, local_position_ned->vy, local_position_ned->vz);
}
 
/**
* @brief Send a local_position_ned message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param x X Position
* @param y Y Position
* @param z Z Position
* @param vx X Speed
* @param vy Y Speed
* @param vz Z Speed
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_local_position_ned_send(mavlink_channel_t chan, uint32_t time_boot_ms, float x, float y, float z, float vx, float vy, float vz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
_mav_put_float(buf, 12, z);
_mav_put_float(buf, 16, vx);
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, buf, 28, 185);
#else
mavlink_local_position_ned_t packet;
packet.time_boot_ms = time_boot_ms;
packet.x = x;
packet.y = y;
packet.z = z;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, (const char *)&packet, 28, 185);
#endif
}
 
#endif
 
// MESSAGE LOCAL_POSITION_NED UNPACKING
 
 
/**
* @brief Get field time_boot_ms from local_position_ned message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_local_position_ned_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field x from local_position_ned message
*
* @return X Position
*/
static inline float mavlink_msg_local_position_ned_get_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field y from local_position_ned message
*
* @return Y Position
*/
static inline float mavlink_msg_local_position_ned_get_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field z from local_position_ned message
*
* @return Z Position
*/
static inline float mavlink_msg_local_position_ned_get_z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field vx from local_position_ned message
*
* @return X Speed
*/
static inline float mavlink_msg_local_position_ned_get_vx(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field vy from local_position_ned message
*
* @return Y Speed
*/
static inline float mavlink_msg_local_position_ned_get_vy(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Get field vz from local_position_ned message
*
* @return Z Speed
*/
static inline float mavlink_msg_local_position_ned_get_vz(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
 
/**
* @brief Decode a local_position_ned message into a struct
*
* @param msg The message to decode
* @param local_position_ned C-struct to decode the message contents into
*/
static inline void mavlink_msg_local_position_ned_decode(const mavlink_message_t* msg, mavlink_local_position_ned_t* local_position_ned)
{
#if MAVLINK_NEED_BYTE_SWAP
local_position_ned->time_boot_ms = mavlink_msg_local_position_ned_get_time_boot_ms(msg);
local_position_ned->x = mavlink_msg_local_position_ned_get_x(msg);
local_position_ned->y = mavlink_msg_local_position_ned_get_y(msg);
local_position_ned->z = mavlink_msg_local_position_ned_get_z(msg);
local_position_ned->vx = mavlink_msg_local_position_ned_get_vx(msg);
local_position_ned->vy = mavlink_msg_local_position_ned_get_vy(msg);
local_position_ned->vz = mavlink_msg_local_position_ned_get_vz(msg);
#else
memcpy(local_position_ned, _MAV_PAYLOAD(msg), 28);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_local_position_ned_system_global_offset.h
0,0 → 1,276
// MESSAGE LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET PACKING
 
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET 89
 
typedef struct __mavlink_local_position_ned_system_global_offset_t
{
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
float x; ///< X Position
float y; ///< Y Position
float z; ///< Z Position
float roll; ///< Roll
float pitch; ///< Pitch
float yaw; ///< Yaw
} mavlink_local_position_ned_system_global_offset_t;
 
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN 28
#define MAVLINK_MSG_ID_89_LEN 28
 
 
 
#define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET { \
"LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", \
7, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_local_position_ned_system_global_offset_t, time_boot_ms) }, \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_local_position_ned_system_global_offset_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_local_position_ned_system_global_offset_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_local_position_ned_system_global_offset_t, z) }, \
{ "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_local_position_ned_system_global_offset_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_local_position_ned_system_global_offset_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_local_position_ned_system_global_offset_t, yaw) }, \
} \
}
 
 
/**
* @brief Pack a local_position_ned_system_global_offset message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param x X Position
* @param y Y Position
* @param z Z Position
* @param roll Roll
* @param pitch Pitch
* @param yaw Yaw
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
_mav_put_float(buf, 12, z);
_mav_put_float(buf, 16, roll);
_mav_put_float(buf, 20, pitch);
_mav_put_float(buf, 24, yaw);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_local_position_ned_system_global_offset_t packet;
packet.time_boot_ms = time_boot_ms;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif
 
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET;
return mavlink_finalize_message(msg, system_id, component_id, 28, 231);
}
 
/**
* @brief Pack a local_position_ned_system_global_offset message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param x X Position
* @param y Y Position
* @param z Z Position
* @param roll Roll
* @param pitch Pitch
* @param yaw Yaw
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,float x,float y,float z,float roll,float pitch,float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
_mav_put_float(buf, 12, z);
_mav_put_float(buf, 16, roll);
_mav_put_float(buf, 20, pitch);
_mav_put_float(buf, 24, yaw);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
#else
mavlink_local_position_ned_system_global_offset_t packet;
packet.time_boot_ms = time_boot_ms;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
#endif
 
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 231);
}
 
/**
* @brief Encode a local_position_ned_system_global_offset struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param local_position_ned_system_global_offset C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_local_position_ned_system_global_offset_t* local_position_ned_system_global_offset)
{
return mavlink_msg_local_position_ned_system_global_offset_pack(system_id, component_id, msg, local_position_ned_system_global_offset->time_boot_ms, local_position_ned_system_global_offset->x, local_position_ned_system_global_offset->y, local_position_ned_system_global_offset->z, local_position_ned_system_global_offset->roll, local_position_ned_system_global_offset->pitch, local_position_ned_system_global_offset->yaw);
}
 
/**
* @brief Send a local_position_ned_system_global_offset message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param x X Position
* @param y Y Position
* @param z Z Position
* @param roll Roll
* @param pitch Pitch
* @param yaw Yaw
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_local_position_ned_system_global_offset_send(mavlink_channel_t chan, uint32_t time_boot_ms, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
_mav_put_float(buf, 12, z);
_mav_put_float(buf, 16, roll);
_mav_put_float(buf, 20, pitch);
_mav_put_float(buf, 24, yaw);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, buf, 28, 231);
#else
mavlink_local_position_ned_system_global_offset_t packet;
packet.time_boot_ms = time_boot_ms;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, (const char *)&packet, 28, 231);
#endif
}
 
#endif
 
// MESSAGE LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET UNPACKING
 
 
/**
* @brief Get field time_boot_ms from local_position_ned_system_global_offset message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_local_position_ned_system_global_offset_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field x from local_position_ned_system_global_offset message
*
* @return X Position
*/
static inline float mavlink_msg_local_position_ned_system_global_offset_get_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field y from local_position_ned_system_global_offset message
*
* @return Y Position
*/
static inline float mavlink_msg_local_position_ned_system_global_offset_get_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field z from local_position_ned_system_global_offset message
*
* @return Z Position
*/
static inline float mavlink_msg_local_position_ned_system_global_offset_get_z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field roll from local_position_ned_system_global_offset message
*
* @return Roll
*/
static inline float mavlink_msg_local_position_ned_system_global_offset_get_roll(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field pitch from local_position_ned_system_global_offset message
*
* @return Pitch
*/
static inline float mavlink_msg_local_position_ned_system_global_offset_get_pitch(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Get field yaw from local_position_ned_system_global_offset message
*
* @return Yaw
*/
static inline float mavlink_msg_local_position_ned_system_global_offset_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
 
/**
* @brief Decode a local_position_ned_system_global_offset message into a struct
*
* @param msg The message to decode
* @param local_position_ned_system_global_offset C-struct to decode the message contents into
*/
static inline void mavlink_msg_local_position_ned_system_global_offset_decode(const mavlink_message_t* msg, mavlink_local_position_ned_system_global_offset_t* local_position_ned_system_global_offset)
{
#if MAVLINK_NEED_BYTE_SWAP
local_position_ned_system_global_offset->time_boot_ms = mavlink_msg_local_position_ned_system_global_offset_get_time_boot_ms(msg);
local_position_ned_system_global_offset->x = mavlink_msg_local_position_ned_system_global_offset_get_x(msg);
local_position_ned_system_global_offset->y = mavlink_msg_local_position_ned_system_global_offset_get_y(msg);
local_position_ned_system_global_offset->z = mavlink_msg_local_position_ned_system_global_offset_get_z(msg);
local_position_ned_system_global_offset->roll = mavlink_msg_local_position_ned_system_global_offset_get_roll(msg);
local_position_ned_system_global_offset->pitch = mavlink_msg_local_position_ned_system_global_offset_get_pitch(msg);
local_position_ned_system_global_offset->yaw = mavlink_msg_local_position_ned_system_global_offset_get_yaw(msg);
#else
memcpy(local_position_ned_system_global_offset, _MAV_PAYLOAD(msg), 28);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_local_position_setpoint.h
0,0 → 1,232
// MESSAGE LOCAL_POSITION_SETPOINT PACKING
 
#define MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT 51
 
typedef struct __mavlink_local_position_setpoint_t
{
float x; ///< x position
float y; ///< y position
float z; ///< z position
float yaw; ///< Desired yaw angle
uint8_t coordinate_frame; ///< Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
} mavlink_local_position_setpoint_t;
 
#define MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN 17
#define MAVLINK_MSG_ID_51_LEN 17
 
 
 
#define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_SETPOINT { \
"LOCAL_POSITION_SETPOINT", \
5, \
{ { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_local_position_setpoint_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_local_position_setpoint_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_local_position_setpoint_t, z) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_local_position_setpoint_t, yaw) }, \
{ "coordinate_frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_local_position_setpoint_t, coordinate_frame) }, \
} \
}
 
 
/**
* @brief Pack a local_position_setpoint message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
* @param x x position
* @param y y position
* @param z z position
* @param yaw Desired yaw angle
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_position_setpoint_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t coordinate_frame, float x, float y, float z, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[17];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
_mav_put_float(buf, 12, yaw);
_mav_put_uint8_t(buf, 16, coordinate_frame);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 17);
#else
mavlink_local_position_setpoint_t packet;
packet.x = x;
packet.y = y;
packet.z = z;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 17);
#endif
 
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT;
return mavlink_finalize_message(msg, system_id, component_id, 17, 223);
}
 
/**
* @brief Pack a local_position_setpoint message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
* @param x x position
* @param y y position
* @param z z position
* @param yaw Desired yaw angle
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_local_position_setpoint_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t coordinate_frame,float x,float y,float z,float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[17];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
_mav_put_float(buf, 12, yaw);
_mav_put_uint8_t(buf, 16, coordinate_frame);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 17);
#else
mavlink_local_position_setpoint_t packet;
packet.x = x;
packet.y = y;
packet.z = z;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 17);
#endif
 
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 17, 223);
}
 
/**
* @brief Encode a local_position_setpoint struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param local_position_setpoint C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_local_position_setpoint_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_local_position_setpoint_t* local_position_setpoint)
{
return mavlink_msg_local_position_setpoint_pack(system_id, component_id, msg, local_position_setpoint->coordinate_frame, local_position_setpoint->x, local_position_setpoint->y, local_position_setpoint->z, local_position_setpoint->yaw);
}
 
/**
* @brief Send a local_position_setpoint message
* @param chan MAVLink channel to send the message
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
* @param x x position
* @param y y position
* @param z z position
* @param yaw Desired yaw angle
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_local_position_setpoint_send(mavlink_channel_t chan, uint8_t coordinate_frame, float x, float y, float z, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[17];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
_mav_put_float(buf, 12, yaw);
_mav_put_uint8_t(buf, 16, coordinate_frame);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, buf, 17, 223);
#else
mavlink_local_position_setpoint_t packet;
packet.x = x;
packet.y = y;
packet.z = z;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, (const char *)&packet, 17, 223);
#endif
}
 
#endif
 
// MESSAGE LOCAL_POSITION_SETPOINT UNPACKING
 
 
/**
* @brief Get field coordinate_frame from local_position_setpoint message
*
* @return Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
*/
static inline uint8_t mavlink_msg_local_position_setpoint_get_coordinate_frame(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 16);
}
 
/**
* @brief Get field x from local_position_setpoint message
*
* @return x position
*/
static inline float mavlink_msg_local_position_setpoint_get_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field y from local_position_setpoint message
*
* @return y position
*/
static inline float mavlink_msg_local_position_setpoint_get_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field z from local_position_setpoint message
*
* @return z position
*/
static inline float mavlink_msg_local_position_setpoint_get_z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field yaw from local_position_setpoint message
*
* @return Desired yaw angle
*/
static inline float mavlink_msg_local_position_setpoint_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Decode a local_position_setpoint message into a struct
*
* @param msg The message to decode
* @param local_position_setpoint C-struct to decode the message contents into
*/
static inline void mavlink_msg_local_position_setpoint_decode(const mavlink_message_t* msg, mavlink_local_position_setpoint_t* local_position_setpoint)
{
#if MAVLINK_NEED_BYTE_SWAP
local_position_setpoint->x = mavlink_msg_local_position_setpoint_get_x(msg);
local_position_setpoint->y = mavlink_msg_local_position_setpoint_get_y(msg);
local_position_setpoint->z = mavlink_msg_local_position_setpoint_get_z(msg);
local_position_setpoint->yaw = mavlink_msg_local_position_setpoint_get_yaw(msg);
local_position_setpoint->coordinate_frame = mavlink_msg_local_position_setpoint_get_coordinate_frame(msg);
#else
memcpy(local_position_setpoint, _MAV_PAYLOAD(msg), 17);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_manual_control.h
0,0 → 1,320
// MESSAGE MANUAL_CONTROL PACKING
 
#define MAVLINK_MSG_ID_MANUAL_CONTROL 69
 
typedef struct __mavlink_manual_control_t
{
float roll; ///< roll
float pitch; ///< pitch
float yaw; ///< yaw
float thrust; ///< thrust
uint8_t target; ///< The system to be controlled
uint8_t roll_manual; ///< roll control enabled auto:0, manual:1
uint8_t pitch_manual; ///< pitch auto:0, manual:1
uint8_t yaw_manual; ///< yaw auto:0, manual:1
uint8_t thrust_manual; ///< thrust auto:0, manual:1
} mavlink_manual_control_t;
 
#define MAVLINK_MSG_ID_MANUAL_CONTROL_LEN 21
#define MAVLINK_MSG_ID_69_LEN 21
 
 
 
#define MAVLINK_MESSAGE_INFO_MANUAL_CONTROL { \
"MANUAL_CONTROL", \
9, \
{ { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_manual_control_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_manual_control_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_manual_control_t, yaw) }, \
{ "thrust", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_manual_control_t, thrust) }, \
{ "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_manual_control_t, target) }, \
{ "roll_manual", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_manual_control_t, roll_manual) }, \
{ "pitch_manual", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_manual_control_t, pitch_manual) }, \
{ "yaw_manual", NULL, MAVLINK_TYPE_UINT8_T, 0, 19, offsetof(mavlink_manual_control_t, yaw_manual) }, \
{ "thrust_manual", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_manual_control_t, thrust_manual) }, \
} \
}
 
 
/**
* @brief Pack a manual_control message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target The system to be controlled
* @param roll roll
* @param pitch pitch
* @param yaw yaw
* @param thrust thrust
* @param roll_manual roll control enabled auto:0, manual:1
* @param pitch_manual pitch auto:0, manual:1
* @param yaw_manual yaw auto:0, manual:1
* @param thrust_manual thrust auto:0, manual:1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_manual_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target, float roll, float pitch, float yaw, float thrust, uint8_t roll_manual, uint8_t pitch_manual, uint8_t yaw_manual, uint8_t thrust_manual)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[21];
_mav_put_float(buf, 0, roll);
_mav_put_float(buf, 4, pitch);
_mav_put_float(buf, 8, yaw);
_mav_put_float(buf, 12, thrust);
_mav_put_uint8_t(buf, 16, target);
_mav_put_uint8_t(buf, 17, roll_manual);
_mav_put_uint8_t(buf, 18, pitch_manual);
_mav_put_uint8_t(buf, 19, yaw_manual);
_mav_put_uint8_t(buf, 20, thrust_manual);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 21);
#else
mavlink_manual_control_t packet;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.thrust = thrust;
packet.target = target;
packet.roll_manual = roll_manual;
packet.pitch_manual = pitch_manual;
packet.yaw_manual = yaw_manual;
packet.thrust_manual = thrust_manual;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 21);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MANUAL_CONTROL;
return mavlink_finalize_message(msg, system_id, component_id, 21, 52);
}
 
/**
* @brief Pack a manual_control message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target The system to be controlled
* @param roll roll
* @param pitch pitch
* @param yaw yaw
* @param thrust thrust
* @param roll_manual roll control enabled auto:0, manual:1
* @param pitch_manual pitch auto:0, manual:1
* @param yaw_manual yaw auto:0, manual:1
* @param thrust_manual thrust auto:0, manual:1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_manual_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target,float roll,float pitch,float yaw,float thrust,uint8_t roll_manual,uint8_t pitch_manual,uint8_t yaw_manual,uint8_t thrust_manual)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[21];
_mav_put_float(buf, 0, roll);
_mav_put_float(buf, 4, pitch);
_mav_put_float(buf, 8, yaw);
_mav_put_float(buf, 12, thrust);
_mav_put_uint8_t(buf, 16, target);
_mav_put_uint8_t(buf, 17, roll_manual);
_mav_put_uint8_t(buf, 18, pitch_manual);
_mav_put_uint8_t(buf, 19, yaw_manual);
_mav_put_uint8_t(buf, 20, thrust_manual);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 21);
#else
mavlink_manual_control_t packet;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.thrust = thrust;
packet.target = target;
packet.roll_manual = roll_manual;
packet.pitch_manual = pitch_manual;
packet.yaw_manual = yaw_manual;
packet.thrust_manual = thrust_manual;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 21);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MANUAL_CONTROL;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 21, 52);
}
 
/**
* @brief Encode a manual_control struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param manual_control C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_manual_control_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_manual_control_t* manual_control)
{
return mavlink_msg_manual_control_pack(system_id, component_id, msg, manual_control->target, manual_control->roll, manual_control->pitch, manual_control->yaw, manual_control->thrust, manual_control->roll_manual, manual_control->pitch_manual, manual_control->yaw_manual, manual_control->thrust_manual);
}
 
/**
* @brief Send a manual_control message
* @param chan MAVLink channel to send the message
*
* @param target The system to be controlled
* @param roll roll
* @param pitch pitch
* @param yaw yaw
* @param thrust thrust
* @param roll_manual roll control enabled auto:0, manual:1
* @param pitch_manual pitch auto:0, manual:1
* @param yaw_manual yaw auto:0, manual:1
* @param thrust_manual thrust auto:0, manual:1
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_manual_control_send(mavlink_channel_t chan, uint8_t target, float roll, float pitch, float yaw, float thrust, uint8_t roll_manual, uint8_t pitch_manual, uint8_t yaw_manual, uint8_t thrust_manual)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[21];
_mav_put_float(buf, 0, roll);
_mav_put_float(buf, 4, pitch);
_mav_put_float(buf, 8, yaw);
_mav_put_float(buf, 12, thrust);
_mav_put_uint8_t(buf, 16, target);
_mav_put_uint8_t(buf, 17, roll_manual);
_mav_put_uint8_t(buf, 18, pitch_manual);
_mav_put_uint8_t(buf, 19, yaw_manual);
_mav_put_uint8_t(buf, 20, thrust_manual);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, buf, 21, 52);
#else
mavlink_manual_control_t packet;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.thrust = thrust;
packet.target = target;
packet.roll_manual = roll_manual;
packet.pitch_manual = pitch_manual;
packet.yaw_manual = yaw_manual;
packet.thrust_manual = thrust_manual;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, (const char *)&packet, 21, 52);
#endif
}
 
#endif
 
// MESSAGE MANUAL_CONTROL UNPACKING
 
 
/**
* @brief Get field target from manual_control message
*
* @return The system to be controlled
*/
static inline uint8_t mavlink_msg_manual_control_get_target(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 16);
}
 
/**
* @brief Get field roll from manual_control message
*
* @return roll
*/
static inline float mavlink_msg_manual_control_get_roll(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field pitch from manual_control message
*
* @return pitch
*/
static inline float mavlink_msg_manual_control_get_pitch(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field yaw from manual_control message
*
* @return yaw
*/
static inline float mavlink_msg_manual_control_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field thrust from manual_control message
*
* @return thrust
*/
static inline float mavlink_msg_manual_control_get_thrust(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field roll_manual from manual_control message
*
* @return roll control enabled auto:0, manual:1
*/
static inline uint8_t mavlink_msg_manual_control_get_roll_manual(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 17);
}
 
/**
* @brief Get field pitch_manual from manual_control message
*
* @return pitch auto:0, manual:1
*/
static inline uint8_t mavlink_msg_manual_control_get_pitch_manual(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 18);
}
 
/**
* @brief Get field yaw_manual from manual_control message
*
* @return yaw auto:0, manual:1
*/
static inline uint8_t mavlink_msg_manual_control_get_yaw_manual(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 19);
}
 
/**
* @brief Get field thrust_manual from manual_control message
*
* @return thrust auto:0, manual:1
*/
static inline uint8_t mavlink_msg_manual_control_get_thrust_manual(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 20);
}
 
/**
* @brief Decode a manual_control message into a struct
*
* @param msg The message to decode
* @param manual_control C-struct to decode the message contents into
*/
static inline void mavlink_msg_manual_control_decode(const mavlink_message_t* msg, mavlink_manual_control_t* manual_control)
{
#if MAVLINK_NEED_BYTE_SWAP
manual_control->roll = mavlink_msg_manual_control_get_roll(msg);
manual_control->pitch = mavlink_msg_manual_control_get_pitch(msg);
manual_control->yaw = mavlink_msg_manual_control_get_yaw(msg);
manual_control->thrust = mavlink_msg_manual_control_get_thrust(msg);
manual_control->target = mavlink_msg_manual_control_get_target(msg);
manual_control->roll_manual = mavlink_msg_manual_control_get_roll_manual(msg);
manual_control->pitch_manual = mavlink_msg_manual_control_get_pitch_manual(msg);
manual_control->yaw_manual = mavlink_msg_manual_control_get_yaw_manual(msg);
manual_control->thrust_manual = mavlink_msg_manual_control_get_thrust_manual(msg);
#else
memcpy(manual_control, _MAV_PAYLOAD(msg), 21);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_memory_vect.h
0,0 → 1,204
// MESSAGE MEMORY_VECT PACKING
 
#define MAVLINK_MSG_ID_MEMORY_VECT 249
 
typedef struct __mavlink_memory_vect_t
{
uint16_t address; ///< Starting address of the debug variables
uint8_t ver; ///< Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below
uint8_t type; ///< Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14
int8_t value[32]; ///< Memory contents at specified address
} mavlink_memory_vect_t;
 
#define MAVLINK_MSG_ID_MEMORY_VECT_LEN 36
#define MAVLINK_MSG_ID_249_LEN 36
 
#define MAVLINK_MSG_MEMORY_VECT_FIELD_VALUE_LEN 32
 
#define MAVLINK_MESSAGE_INFO_MEMORY_VECT { \
"MEMORY_VECT", \
4, \
{ { "address", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_memory_vect_t, address) }, \
{ "ver", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_memory_vect_t, ver) }, \
{ "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_memory_vect_t, type) }, \
{ "value", NULL, MAVLINK_TYPE_INT8_T, 32, 4, offsetof(mavlink_memory_vect_t, value) }, \
} \
}
 
 
/**
* @brief Pack a memory_vect message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param address Starting address of the debug variables
* @param ver Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below
* @param type Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14
* @param value Memory contents at specified address
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_memory_vect_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint16_t address, uint8_t ver, uint8_t type, const int8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[36];
_mav_put_uint16_t(buf, 0, address);
_mav_put_uint8_t(buf, 2, ver);
_mav_put_uint8_t(buf, 3, type);
_mav_put_int8_t_array(buf, 4, value, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 36);
#else
mavlink_memory_vect_t packet;
packet.address = address;
packet.ver = ver;
packet.type = type;
mav_array_memcpy(packet.value, value, sizeof(int8_t)*32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 36);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MEMORY_VECT;
return mavlink_finalize_message(msg, system_id, component_id, 36, 204);
}
 
/**
* @brief Pack a memory_vect message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param address Starting address of the debug variables
* @param ver Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below
* @param type Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14
* @param value Memory contents at specified address
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_memory_vect_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint16_t address,uint8_t ver,uint8_t type,const int8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[36];
_mav_put_uint16_t(buf, 0, address);
_mav_put_uint8_t(buf, 2, ver);
_mav_put_uint8_t(buf, 3, type);
_mav_put_int8_t_array(buf, 4, value, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 36);
#else
mavlink_memory_vect_t packet;
packet.address = address;
packet.ver = ver;
packet.type = type;
mav_array_memcpy(packet.value, value, sizeof(int8_t)*32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 36);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MEMORY_VECT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 36, 204);
}
 
/**
* @brief Encode a memory_vect struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param memory_vect C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_memory_vect_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_memory_vect_t* memory_vect)
{
return mavlink_msg_memory_vect_pack(system_id, component_id, msg, memory_vect->address, memory_vect->ver, memory_vect->type, memory_vect->value);
}
 
/**
* @brief Send a memory_vect message
* @param chan MAVLink channel to send the message
*
* @param address Starting address of the debug variables
* @param ver Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below
* @param type Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14
* @param value Memory contents at specified address
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_memory_vect_send(mavlink_channel_t chan, uint16_t address, uint8_t ver, uint8_t type, const int8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[36];
_mav_put_uint16_t(buf, 0, address);
_mav_put_uint8_t(buf, 2, ver);
_mav_put_uint8_t(buf, 3, type);
_mav_put_int8_t_array(buf, 4, value, 32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, buf, 36, 204);
#else
mavlink_memory_vect_t packet;
packet.address = address;
packet.ver = ver;
packet.type = type;
mav_array_memcpy(packet.value, value, sizeof(int8_t)*32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, (const char *)&packet, 36, 204);
#endif
}
 
#endif
 
// MESSAGE MEMORY_VECT UNPACKING
 
 
/**
* @brief Get field address from memory_vect message
*
* @return Starting address of the debug variables
*/
static inline uint16_t mavlink_msg_memory_vect_get_address(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
 
/**
* @brief Get field ver from memory_vect message
*
* @return Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below
*/
static inline uint8_t mavlink_msg_memory_vect_get_ver(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
 
/**
* @brief Get field type from memory_vect message
*
* @return Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14
*/
static inline uint8_t mavlink_msg_memory_vect_get_type(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
 
/**
* @brief Get field value from memory_vect message
*
* @return Memory contents at specified address
*/
static inline uint16_t mavlink_msg_memory_vect_get_value(const mavlink_message_t* msg, int8_t *value)
{
return _MAV_RETURN_int8_t_array(msg, value, 32, 4);
}
 
/**
* @brief Decode a memory_vect message into a struct
*
* @param msg The message to decode
* @param memory_vect C-struct to decode the message contents into
*/
static inline void mavlink_msg_memory_vect_decode(const mavlink_message_t* msg, mavlink_memory_vect_t* memory_vect)
{
#if MAVLINK_NEED_BYTE_SWAP
memory_vect->address = mavlink_msg_memory_vect_get_address(msg);
memory_vect->ver = mavlink_msg_memory_vect_get_ver(msg);
memory_vect->type = mavlink_msg_memory_vect_get_type(msg);
mavlink_msg_memory_vect_get_value(msg, memory_vect->value);
#else
memcpy(memory_vect, _MAV_PAYLOAD(msg), 36);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_mission_ack.h
0,0 → 1,188
// MESSAGE MISSION_ACK PACKING
 
#define MAVLINK_MSG_ID_MISSION_ACK 47
 
typedef struct __mavlink_mission_ack_t
{
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
uint8_t type; ///< See MAV_MISSION_RESULT enum
} mavlink_mission_ack_t;
 
#define MAVLINK_MSG_ID_MISSION_ACK_LEN 3
#define MAVLINK_MSG_ID_47_LEN 3
 
 
 
#define MAVLINK_MESSAGE_INFO_MISSION_ACK { \
"MISSION_ACK", \
3, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_mission_ack_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_mission_ack_t, target_component) }, \
{ "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_mission_ack_t, type) }, \
} \
}
 
 
/**
* @brief Pack a mission_ack message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param type See MAV_MISSION_RESULT enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint8_t type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, type);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
#else
mavlink_mission_ack_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.type = type;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_ACK;
return mavlink_finalize_message(msg, system_id, component_id, 3, 153);
}
 
/**
* @brief Pack a mission_ack message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param type See MAV_MISSION_RESULT enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint8_t type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, type);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
#else
mavlink_mission_ack_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.type = type;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_ACK;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 3, 153);
}
 
/**
* @brief Encode a mission_ack struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_ack C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_ack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_ack_t* mission_ack)
{
return mavlink_msg_mission_ack_pack(system_id, component_id, msg, mission_ack->target_system, mission_ack->target_component, mission_ack->type);
}
 
/**
* @brief Send a mission_ack message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param type See MAV_MISSION_RESULT enum
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_mission_ack_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, type);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, buf, 3, 153);
#else
mavlink_mission_ack_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.type = type;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, (const char *)&packet, 3, 153);
#endif
}
 
#endif
 
// MESSAGE MISSION_ACK UNPACKING
 
 
/**
* @brief Get field target_system from mission_ack message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_ack_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
 
/**
* @brief Get field target_component from mission_ack message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_ack_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
 
/**
* @brief Get field type from mission_ack message
*
* @return See MAV_MISSION_RESULT enum
*/
static inline uint8_t mavlink_msg_mission_ack_get_type(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
 
/**
* @brief Decode a mission_ack message into a struct
*
* @param msg The message to decode
* @param mission_ack C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_ack_decode(const mavlink_message_t* msg, mavlink_mission_ack_t* mission_ack)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_ack->target_system = mavlink_msg_mission_ack_get_target_system(msg);
mission_ack->target_component = mavlink_msg_mission_ack_get_target_component(msg);
mission_ack->type = mavlink_msg_mission_ack_get_type(msg);
#else
memcpy(mission_ack, _MAV_PAYLOAD(msg), 3);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_mission_clear_all.h
0,0 → 1,166
// MESSAGE MISSION_CLEAR_ALL PACKING
 
#define MAVLINK_MSG_ID_MISSION_CLEAR_ALL 45
 
typedef struct __mavlink_mission_clear_all_t
{
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_mission_clear_all_t;
 
#define MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN 2
#define MAVLINK_MSG_ID_45_LEN 2
 
 
 
#define MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL { \
"MISSION_CLEAR_ALL", \
2, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_mission_clear_all_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_mission_clear_all_t, target_component) }, \
} \
}
 
 
/**
* @brief Pack a mission_clear_all message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_clear_all_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_clear_all_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
return mavlink_finalize_message(msg, system_id, component_id, 2, 232);
}
 
/**
* @brief Pack a mission_clear_all message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_clear_all_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_clear_all_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 232);
}
 
/**
* @brief Encode a mission_clear_all struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_clear_all C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_clear_all_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_clear_all_t* mission_clear_all)
{
return mavlink_msg_mission_clear_all_pack(system_id, component_id, msg, mission_clear_all->target_system, mission_clear_all->target_component);
}
 
/**
* @brief Send a mission_clear_all message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_mission_clear_all_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, buf, 2, 232);
#else
mavlink_mission_clear_all_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, (const char *)&packet, 2, 232);
#endif
}
 
#endif
 
// MESSAGE MISSION_CLEAR_ALL UNPACKING
 
 
/**
* @brief Get field target_system from mission_clear_all message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_clear_all_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
 
/**
* @brief Get field target_component from mission_clear_all message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_clear_all_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
 
/**
* @brief Decode a mission_clear_all message into a struct
*
* @param msg The message to decode
* @param mission_clear_all C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_clear_all_decode(const mavlink_message_t* msg, mavlink_mission_clear_all_t* mission_clear_all)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_clear_all->target_system = mavlink_msg_mission_clear_all_get_target_system(msg);
mission_clear_all->target_component = mavlink_msg_mission_clear_all_get_target_component(msg);
#else
memcpy(mission_clear_all, _MAV_PAYLOAD(msg), 2);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_mission_count.h
0,0 → 1,188
// MESSAGE MISSION_COUNT PACKING
 
#define MAVLINK_MSG_ID_MISSION_COUNT 44
 
typedef struct __mavlink_mission_count_t
{
uint16_t count; ///< Number of mission items in the sequence
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_mission_count_t;
 
#define MAVLINK_MSG_ID_MISSION_COUNT_LEN 4
#define MAVLINK_MSG_ID_44_LEN 4
 
 
 
#define MAVLINK_MESSAGE_INFO_MISSION_COUNT { \
"MISSION_COUNT", \
3, \
{ { "count", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_count_t, count) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_mission_count_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_mission_count_t, target_component) }, \
} \
}
 
 
/**
* @brief Pack a mission_count message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param count Number of mission items in the sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_count_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint16_t count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, count);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_mission_count_t packet;
packet.count = count;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_COUNT;
return mavlink_finalize_message(msg, system_id, component_id, 4, 221);
}
 
/**
* @brief Pack a mission_count message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param count Number of mission items in the sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_count_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint16_t count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, count);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_mission_count_t packet;
packet.count = count;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_COUNT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 4, 221);
}
 
/**
* @brief Encode a mission_count struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_count C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_count_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_count_t* mission_count)
{
return mavlink_msg_mission_count_pack(system_id, component_id, msg, mission_count->target_system, mission_count->target_component, mission_count->count);
}
 
/**
* @brief Send a mission_count message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param count Number of mission items in the sequence
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_mission_count_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, count);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, buf, 4, 221);
#else
mavlink_mission_count_t packet;
packet.count = count;
packet.target_system = target_system;
packet.target_component = target_component;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, (const char *)&packet, 4, 221);
#endif
}
 
#endif
 
// MESSAGE MISSION_COUNT UNPACKING
 
 
/**
* @brief Get field target_system from mission_count message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_count_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
 
/**
* @brief Get field target_component from mission_count message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_count_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
 
/**
* @brief Get field count from mission_count message
*
* @return Number of mission items in the sequence
*/
static inline uint16_t mavlink_msg_mission_count_get_count(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
 
/**
* @brief Decode a mission_count message into a struct
*
* @param msg The message to decode
* @param mission_count C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_count_decode(const mavlink_message_t* msg, mavlink_mission_count_t* mission_count)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_count->count = mavlink_msg_mission_count_get_count(msg);
mission_count->target_system = mavlink_msg_mission_count_get_target_system(msg);
mission_count->target_component = mavlink_msg_mission_count_get_target_component(msg);
#else
memcpy(mission_count, _MAV_PAYLOAD(msg), 4);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_mission_current.h
0,0 → 1,144
// MESSAGE MISSION_CURRENT PACKING
 
#define MAVLINK_MSG_ID_MISSION_CURRENT 42
 
typedef struct __mavlink_mission_current_t
{
uint16_t seq; ///< Sequence
} mavlink_mission_current_t;
 
#define MAVLINK_MSG_ID_MISSION_CURRENT_LEN 2
#define MAVLINK_MSG_ID_42_LEN 2
 
 
 
#define MAVLINK_MESSAGE_INFO_MISSION_CURRENT { \
"MISSION_CURRENT", \
1, \
{ { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_current_t, seq) }, \
} \
}
 
 
/**
* @brief Pack a mission_current message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_current_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint16_t(buf, 0, seq);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_current_t packet;
packet.seq = seq;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_CURRENT;
return mavlink_finalize_message(msg, system_id, component_id, 2, 28);
}
 
/**
* @brief Pack a mission_current message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_current_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint16_t(buf, 0, seq);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_current_t packet;
packet.seq = seq;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_CURRENT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 28);
}
 
/**
* @brief Encode a mission_current struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_current C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_current_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_current_t* mission_current)
{
return mavlink_msg_mission_current_pack(system_id, component_id, msg, mission_current->seq);
}
 
/**
* @brief Send a mission_current message
* @param chan MAVLink channel to send the message
*
* @param seq Sequence
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_mission_current_send(mavlink_channel_t chan, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint16_t(buf, 0, seq);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, buf, 2, 28);
#else
mavlink_mission_current_t packet;
packet.seq = seq;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, (const char *)&packet, 2, 28);
#endif
}
 
#endif
 
// MESSAGE MISSION_CURRENT UNPACKING
 
 
/**
* @brief Get field seq from mission_current message
*
* @return Sequence
*/
static inline uint16_t mavlink_msg_mission_current_get_seq(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
 
/**
* @brief Decode a mission_current message into a struct
*
* @param msg The message to decode
* @param mission_current C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_current_decode(const mavlink_message_t* msg, mavlink_mission_current_t* mission_current)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_current->seq = mavlink_msg_mission_current_get_seq(msg);
#else
memcpy(mission_current, _MAV_PAYLOAD(msg), 2);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_mission_item.h
0,0 → 1,430
// MESSAGE MISSION_ITEM PACKING
 
#define MAVLINK_MSG_ID_MISSION_ITEM 39
 
typedef struct __mavlink_mission_item_t
{
float param1; ///< PARAM1 / For NAV command MISSIONs: Radius in which the MISSION is accepted as reached, in meters
float param2; ///< PARAM2 / For NAV command MISSIONs: Time that the MAV should stay inside the PARAM1 radius before advancing, in milliseconds
float param3; ///< PARAM3 / For LOITER command MISSIONs: Orbit to circle around the MISSION, in meters. If positive the orbit direction should be clockwise, if negative the orbit direction should be counter-clockwise.
float param4; ///< PARAM4 / For NAV and LOITER command MISSIONs: Yaw orientation in degrees, [0..360] 0 = NORTH
float x; ///< PARAM5 / local: x position, global: latitude
float y; ///< PARAM6 / y position: global: longitude
float z; ///< PARAM7 / z position: global: altitude
uint16_t seq; ///< Sequence
uint16_t command; ///< The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
uint8_t frame; ///< The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
uint8_t current; ///< false:0, true:1
uint8_t autocontinue; ///< autocontinue to next wp
} mavlink_mission_item_t;
 
#define MAVLINK_MSG_ID_MISSION_ITEM_LEN 37
#define MAVLINK_MSG_ID_39_LEN 37
 
 
 
#define MAVLINK_MESSAGE_INFO_MISSION_ITEM { \
"MISSION_ITEM", \
14, \
{ { "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mission_item_t, param1) }, \
{ "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mission_item_t, param2) }, \
{ "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mission_item_t, param3) }, \
{ "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_mission_item_t, param4) }, \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_mission_item_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_mission_item_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_mission_item_t, z) }, \
{ "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_mission_item_t, seq) }, \
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_mission_item_t, command) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_mission_item_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_mission_item_t, target_component) }, \
{ "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_mission_item_t, frame) }, \
{ "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_mission_item_t, current) }, \
{ "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_mission_item_t, autocontinue) }, \
} \
}
 
 
/**
* @brief Pack a mission_item message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
* @param frame The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
* @param command The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
* @param current false:0, true:1
* @param autocontinue autocontinue to next wp
* @param param1 PARAM1 / For NAV command MISSIONs: Radius in which the MISSION is accepted as reached, in meters
* @param param2 PARAM2 / For NAV command MISSIONs: Time that the MAV should stay inside the PARAM1 radius before advancing, in milliseconds
* @param param3 PARAM3 / For LOITER command MISSIONs: Orbit to circle around the MISSION, in meters. If positive the orbit direction should be clockwise, if negative the orbit direction should be counter-clockwise.
* @param param4 PARAM4 / For NAV and LOITER command MISSIONs: Yaw orientation in degrees, [0..360] 0 = NORTH
* @param x PARAM5 / local: x position, global: latitude
* @param y PARAM6 / y position: global: longitude
* @param z PARAM7 / z position: global: altitude
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_item_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint16_t seq, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[37];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
_mav_put_float(buf, 12, param4);
_mav_put_float(buf, 16, x);
_mav_put_float(buf, 20, y);
_mav_put_float(buf, 24, z);
_mav_put_uint16_t(buf, 28, seq);
_mav_put_uint16_t(buf, 30, command);
_mav_put_uint8_t(buf, 32, target_system);
_mav_put_uint8_t(buf, 33, target_component);
_mav_put_uint8_t(buf, 34, frame);
_mav_put_uint8_t(buf, 35, current);
_mav_put_uint8_t(buf, 36, autocontinue);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 37);
#else
mavlink_mission_item_t packet;
packet.param1 = param1;
packet.param2 = param2;
packet.param3 = param3;
packet.param4 = param4;
packet.x = x;
packet.y = y;
packet.z = z;
packet.seq = seq;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.frame = frame;
packet.current = current;
packet.autocontinue = autocontinue;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 37);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM;
return mavlink_finalize_message(msg, system_id, component_id, 37, 254);
}
 
/**
* @brief Pack a mission_item message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
* @param frame The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
* @param command The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
* @param current false:0, true:1
* @param autocontinue autocontinue to next wp
* @param param1 PARAM1 / For NAV command MISSIONs: Radius in which the MISSION is accepted as reached, in meters
* @param param2 PARAM2 / For NAV command MISSIONs: Time that the MAV should stay inside the PARAM1 radius before advancing, in milliseconds
* @param param3 PARAM3 / For LOITER command MISSIONs: Orbit to circle around the MISSION, in meters. If positive the orbit direction should be clockwise, if negative the orbit direction should be counter-clockwise.
* @param param4 PARAM4 / For NAV and LOITER command MISSIONs: Yaw orientation in degrees, [0..360] 0 = NORTH
* @param x PARAM5 / local: x position, global: latitude
* @param y PARAM6 / y position: global: longitude
* @param z PARAM7 / z position: global: altitude
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_item_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint16_t seq,uint8_t frame,uint16_t command,uint8_t current,uint8_t autocontinue,float param1,float param2,float param3,float param4,float x,float y,float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[37];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
_mav_put_float(buf, 12, param4);
_mav_put_float(buf, 16, x);
_mav_put_float(buf, 20, y);
_mav_put_float(buf, 24, z);
_mav_put_uint16_t(buf, 28, seq);
_mav_put_uint16_t(buf, 30, command);
_mav_put_uint8_t(buf, 32, target_system);
_mav_put_uint8_t(buf, 33, target_component);
_mav_put_uint8_t(buf, 34, frame);
_mav_put_uint8_t(buf, 35, current);
_mav_put_uint8_t(buf, 36, autocontinue);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 37);
#else
mavlink_mission_item_t packet;
packet.param1 = param1;
packet.param2 = param2;
packet.param3 = param3;
packet.param4 = param4;
packet.x = x;
packet.y = y;
packet.z = z;
packet.seq = seq;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.frame = frame;
packet.current = current;
packet.autocontinue = autocontinue;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 37);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 37, 254);
}
 
/**
* @brief Encode a mission_item struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_item C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_item_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_item_t* mission_item)
{
return mavlink_msg_mission_item_pack(system_id, component_id, msg, mission_item->target_system, mission_item->target_component, mission_item->seq, mission_item->frame, mission_item->command, mission_item->current, mission_item->autocontinue, mission_item->param1, mission_item->param2, mission_item->param3, mission_item->param4, mission_item->x, mission_item->y, mission_item->z);
}
 
/**
* @brief Send a mission_item message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
* @param frame The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
* @param command The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
* @param current false:0, true:1
* @param autocontinue autocontinue to next wp
* @param param1 PARAM1 / For NAV command MISSIONs: Radius in which the MISSION is accepted as reached, in meters
* @param param2 PARAM2 / For NAV command MISSIONs: Time that the MAV should stay inside the PARAM1 radius before advancing, in milliseconds
* @param param3 PARAM3 / For LOITER command MISSIONs: Orbit to circle around the MISSION, in meters. If positive the orbit direction should be clockwise, if negative the orbit direction should be counter-clockwise.
* @param param4 PARAM4 / For NAV and LOITER command MISSIONs: Yaw orientation in degrees, [0..360] 0 = NORTH
* @param x PARAM5 / local: x position, global: latitude
* @param y PARAM6 / y position: global: longitude
* @param z PARAM7 / z position: global: altitude
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_mission_item_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[37];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
_mav_put_float(buf, 12, param4);
_mav_put_float(buf, 16, x);
_mav_put_float(buf, 20, y);
_mav_put_float(buf, 24, z);
_mav_put_uint16_t(buf, 28, seq);
_mav_put_uint16_t(buf, 30, command);
_mav_put_uint8_t(buf, 32, target_system);
_mav_put_uint8_t(buf, 33, target_component);
_mav_put_uint8_t(buf, 34, frame);
_mav_put_uint8_t(buf, 35, current);
_mav_put_uint8_t(buf, 36, autocontinue);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM, buf, 37, 254);
#else
mavlink_mission_item_t packet;
packet.param1 = param1;
packet.param2 = param2;
packet.param3 = param3;
packet.param4 = param4;
packet.x = x;
packet.y = y;
packet.z = z;
packet.seq = seq;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.frame = frame;
packet.current = current;
packet.autocontinue = autocontinue;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM, (const char *)&packet, 37, 254);
#endif
}
 
#endif
 
// MESSAGE MISSION_ITEM UNPACKING
 
 
/**
* @brief Get field target_system from mission_item message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_item_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 32);
}
 
/**
* @brief Get field target_component from mission_item message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_item_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 33);
}
 
/**
* @brief Get field seq from mission_item message
*
* @return Sequence
*/
static inline uint16_t mavlink_msg_mission_item_get_seq(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 28);
}
 
/**
* @brief Get field frame from mission_item message
*
* @return The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
*/
static inline uint8_t mavlink_msg_mission_item_get_frame(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 34);
}
 
/**
* @brief Get field command from mission_item message
*
* @return The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
*/
static inline uint16_t mavlink_msg_mission_item_get_command(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 30);
}
 
/**
* @brief Get field current from mission_item message
*
* @return false:0, true:1
*/
static inline uint8_t mavlink_msg_mission_item_get_current(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 35);
}
 
/**
* @brief Get field autocontinue from mission_item message
*
* @return autocontinue to next wp
*/
static inline uint8_t mavlink_msg_mission_item_get_autocontinue(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 36);
}
 
/**
* @brief Get field param1 from mission_item message
*
* @return PARAM1 / For NAV command MISSIONs: Radius in which the MISSION is accepted as reached, in meters
*/
static inline float mavlink_msg_mission_item_get_param1(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field param2 from mission_item message
*
* @return PARAM2 / For NAV command MISSIONs: Time that the MAV should stay inside the PARAM1 radius before advancing, in milliseconds
*/
static inline float mavlink_msg_mission_item_get_param2(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field param3 from mission_item message
*
* @return PARAM3 / For LOITER command MISSIONs: Orbit to circle around the MISSION, in meters. If positive the orbit direction should be clockwise, if negative the orbit direction should be counter-clockwise.
*/
static inline float mavlink_msg_mission_item_get_param3(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field param4 from mission_item message
*
* @return PARAM4 / For NAV and LOITER command MISSIONs: Yaw orientation in degrees, [0..360] 0 = NORTH
*/
static inline float mavlink_msg_mission_item_get_param4(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field x from mission_item message
*
* @return PARAM5 / local: x position, global: latitude
*/
static inline float mavlink_msg_mission_item_get_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field y from mission_item message
*
* @return PARAM6 / y position: global: longitude
*/
static inline float mavlink_msg_mission_item_get_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Get field z from mission_item message
*
* @return PARAM7 / z position: global: altitude
*/
static inline float mavlink_msg_mission_item_get_z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
 
/**
* @brief Decode a mission_item message into a struct
*
* @param msg The message to decode
* @param mission_item C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_item_decode(const mavlink_message_t* msg, mavlink_mission_item_t* mission_item)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_item->param1 = mavlink_msg_mission_item_get_param1(msg);
mission_item->param2 = mavlink_msg_mission_item_get_param2(msg);
mission_item->param3 = mavlink_msg_mission_item_get_param3(msg);
mission_item->param4 = mavlink_msg_mission_item_get_param4(msg);
mission_item->x = mavlink_msg_mission_item_get_x(msg);
mission_item->y = mavlink_msg_mission_item_get_y(msg);
mission_item->z = mavlink_msg_mission_item_get_z(msg);
mission_item->seq = mavlink_msg_mission_item_get_seq(msg);
mission_item->command = mavlink_msg_mission_item_get_command(msg);
mission_item->target_system = mavlink_msg_mission_item_get_target_system(msg);
mission_item->target_component = mavlink_msg_mission_item_get_target_component(msg);
mission_item->frame = mavlink_msg_mission_item_get_frame(msg);
mission_item->current = mavlink_msg_mission_item_get_current(msg);
mission_item->autocontinue = mavlink_msg_mission_item_get_autocontinue(msg);
#else
memcpy(mission_item, _MAV_PAYLOAD(msg), 37);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_mission_item_reached.h
0,0 → 1,144
// MESSAGE MISSION_ITEM_REACHED PACKING
 
#define MAVLINK_MSG_ID_MISSION_ITEM_REACHED 46
 
typedef struct __mavlink_mission_item_reached_t
{
uint16_t seq; ///< Sequence
} mavlink_mission_item_reached_t;
 
#define MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN 2
#define MAVLINK_MSG_ID_46_LEN 2
 
 
 
#define MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED { \
"MISSION_ITEM_REACHED", \
1, \
{ { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_item_reached_t, seq) }, \
} \
}
 
 
/**
* @brief Pack a mission_item_reached message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_item_reached_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint16_t(buf, 0, seq);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_item_reached_t packet;
packet.seq = seq;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED;
return mavlink_finalize_message(msg, system_id, component_id, 2, 11);
}
 
/**
* @brief Pack a mission_item_reached message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_item_reached_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint16_t(buf, 0, seq);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_item_reached_t packet;
packet.seq = seq;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 11);
}
 
/**
* @brief Encode a mission_item_reached struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_item_reached C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_item_reached_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_item_reached_t* mission_item_reached)
{
return mavlink_msg_mission_item_reached_pack(system_id, component_id, msg, mission_item_reached->seq);
}
 
/**
* @brief Send a mission_item_reached message
* @param chan MAVLink channel to send the message
*
* @param seq Sequence
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_mission_item_reached_send(mavlink_channel_t chan, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint16_t(buf, 0, seq);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_REACHED, buf, 2, 11);
#else
mavlink_mission_item_reached_t packet;
packet.seq = seq;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_REACHED, (const char *)&packet, 2, 11);
#endif
}
 
#endif
 
// MESSAGE MISSION_ITEM_REACHED UNPACKING
 
 
/**
* @brief Get field seq from mission_item_reached message
*
* @return Sequence
*/
static inline uint16_t mavlink_msg_mission_item_reached_get_seq(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
 
/**
* @brief Decode a mission_item_reached message into a struct
*
* @param msg The message to decode
* @param mission_item_reached C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_item_reached_decode(const mavlink_message_t* msg, mavlink_mission_item_reached_t* mission_item_reached)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_item_reached->seq = mavlink_msg_mission_item_reached_get_seq(msg);
#else
memcpy(mission_item_reached, _MAV_PAYLOAD(msg), 2);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_mission_request.h
0,0 → 1,188
// MESSAGE MISSION_REQUEST PACKING
 
#define MAVLINK_MSG_ID_MISSION_REQUEST 40
 
typedef struct __mavlink_mission_request_t
{
uint16_t seq; ///< Sequence
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_mission_request_t;
 
#define MAVLINK_MSG_ID_MISSION_REQUEST_LEN 4
#define MAVLINK_MSG_ID_40_LEN 4
 
 
 
#define MAVLINK_MESSAGE_INFO_MISSION_REQUEST { \
"MISSION_REQUEST", \
3, \
{ { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_request_t, seq) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_mission_request_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_mission_request_t, target_component) }, \
} \
}
 
 
/**
* @brief Pack a mission_request message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_request_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_mission_request_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST;
return mavlink_finalize_message(msg, system_id, component_id, 4, 230);
}
 
/**
* @brief Pack a mission_request message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_request_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_mission_request_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 4, 230);
}
 
/**
* @brief Encode a mission_request struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_request C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_request_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_request_t* mission_request)
{
return mavlink_msg_mission_request_pack(system_id, component_id, msg, mission_request->target_system, mission_request->target_component, mission_request->seq);
}
 
/**
* @brief Send a mission_request message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_mission_request_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST, buf, 4, 230);
#else
mavlink_mission_request_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST, (const char *)&packet, 4, 230);
#endif
}
 
#endif
 
// MESSAGE MISSION_REQUEST UNPACKING
 
 
/**
* @brief Get field target_system from mission_request message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_request_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
 
/**
* @brief Get field target_component from mission_request message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_request_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
 
/**
* @brief Get field seq from mission_request message
*
* @return Sequence
*/
static inline uint16_t mavlink_msg_mission_request_get_seq(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
 
/**
* @brief Decode a mission_request message into a struct
*
* @param msg The message to decode
* @param mission_request C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_request_decode(const mavlink_message_t* msg, mavlink_mission_request_t* mission_request)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_request->seq = mavlink_msg_mission_request_get_seq(msg);
mission_request->target_system = mavlink_msg_mission_request_get_target_system(msg);
mission_request->target_component = mavlink_msg_mission_request_get_target_component(msg);
#else
memcpy(mission_request, _MAV_PAYLOAD(msg), 4);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_mission_request_list.h
0,0 → 1,166
// MESSAGE MISSION_REQUEST_LIST PACKING
 
#define MAVLINK_MSG_ID_MISSION_REQUEST_LIST 43
 
typedef struct __mavlink_mission_request_list_t
{
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_mission_request_list_t;
 
#define MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN 2
#define MAVLINK_MSG_ID_43_LEN 2
 
 
 
#define MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST { \
"MISSION_REQUEST_LIST", \
2, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_mission_request_list_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_mission_request_list_t, target_component) }, \
} \
}
 
 
/**
* @brief Pack a mission_request_list message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_request_list_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST_LIST;
return mavlink_finalize_message(msg, system_id, component_id, 2, 132);
}
 
/**
* @brief Pack a mission_request_list message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_request_list_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_mission_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST_LIST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 132);
}
 
/**
* @brief Encode a mission_request_list struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_request_list C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_request_list_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_request_list_t* mission_request_list)
{
return mavlink_msg_mission_request_list_pack(system_id, component_id, msg, mission_request_list->target_system, mission_request_list->target_component);
}
 
/**
* @brief Send a mission_request_list message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_mission_request_list_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_LIST, buf, 2, 132);
#else
mavlink_mission_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_LIST, (const char *)&packet, 2, 132);
#endif
}
 
#endif
 
// MESSAGE MISSION_REQUEST_LIST UNPACKING
 
 
/**
* @brief Get field target_system from mission_request_list message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_request_list_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
 
/**
* @brief Get field target_component from mission_request_list message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_request_list_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
 
/**
* @brief Decode a mission_request_list message into a struct
*
* @param msg The message to decode
* @param mission_request_list C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_request_list_decode(const mavlink_message_t* msg, mavlink_mission_request_list_t* mission_request_list)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_request_list->target_system = mavlink_msg_mission_request_list_get_target_system(msg);
mission_request_list->target_component = mavlink_msg_mission_request_list_get_target_component(msg);
#else
memcpy(mission_request_list, _MAV_PAYLOAD(msg), 2);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_mission_request_partial_list.h
0,0 → 1,210
// MESSAGE MISSION_REQUEST_PARTIAL_LIST PACKING
 
#define MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST 37
 
typedef struct __mavlink_mission_request_partial_list_t
{
int16_t start_index; ///< Start index, 0 by default
int16_t end_index; ///< End index, -1 by default (-1: send list to end). Else a valid index of the list
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_mission_request_partial_list_t;
 
#define MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN 6
#define MAVLINK_MSG_ID_37_LEN 6
 
 
 
#define MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST { \
"MISSION_REQUEST_PARTIAL_LIST", \
4, \
{ { "start_index", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_mission_request_partial_list_t, start_index) }, \
{ "end_index", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_mission_request_partial_list_t, end_index) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_mission_request_partial_list_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_mission_request_partial_list_t, target_component) }, \
} \
}
 
 
/**
* @brief Pack a mission_request_partial_list message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param start_index Start index, 0 by default
* @param end_index End index, -1 by default (-1: send list to end). Else a valid index of the list
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_request_partial_list_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, int16_t start_index, int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
#else
mavlink_mission_request_partial_list_t packet;
packet.start_index = start_index;
packet.end_index = end_index;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST;
return mavlink_finalize_message(msg, system_id, component_id, 6, 212);
}
 
/**
* @brief Pack a mission_request_partial_list message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param start_index Start index, 0 by default
* @param end_index End index, -1 by default (-1: send list to end). Else a valid index of the list
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_request_partial_list_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,int16_t start_index,int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
#else
mavlink_mission_request_partial_list_t packet;
packet.start_index = start_index;
packet.end_index = end_index;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 6, 212);
}
 
/**
* @brief Encode a mission_request_partial_list struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_request_partial_list C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_request_partial_list_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_request_partial_list_t* mission_request_partial_list)
{
return mavlink_msg_mission_request_partial_list_pack(system_id, component_id, msg, mission_request_partial_list->target_system, mission_request_partial_list->target_component, mission_request_partial_list->start_index, mission_request_partial_list->end_index);
}
 
/**
* @brief Send a mission_request_partial_list message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param start_index Start index, 0 by default
* @param end_index End index, -1 by default (-1: send list to end). Else a valid index of the list
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_mission_request_partial_list_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int16_t start_index, int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST, buf, 6, 212);
#else
mavlink_mission_request_partial_list_t packet;
packet.start_index = start_index;
packet.end_index = end_index;
packet.target_system = target_system;
packet.target_component = target_component;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST, (const char *)&packet, 6, 212);
#endif
}
 
#endif
 
// MESSAGE MISSION_REQUEST_PARTIAL_LIST UNPACKING
 
 
/**
* @brief Get field target_system from mission_request_partial_list message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_request_partial_list_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
 
/**
* @brief Get field target_component from mission_request_partial_list message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_request_partial_list_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
 
/**
* @brief Get field start_index from mission_request_partial_list message
*
* @return Start index, 0 by default
*/
static inline int16_t mavlink_msg_mission_request_partial_list_get_start_index(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 0);
}
 
/**
* @brief Get field end_index from mission_request_partial_list message
*
* @return End index, -1 by default (-1: send list to end). Else a valid index of the list
*/
static inline int16_t mavlink_msg_mission_request_partial_list_get_end_index(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 2);
}
 
/**
* @brief Decode a mission_request_partial_list message into a struct
*
* @param msg The message to decode
* @param mission_request_partial_list C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_request_partial_list_decode(const mavlink_message_t* msg, mavlink_mission_request_partial_list_t* mission_request_partial_list)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_request_partial_list->start_index = mavlink_msg_mission_request_partial_list_get_start_index(msg);
mission_request_partial_list->end_index = mavlink_msg_mission_request_partial_list_get_end_index(msg);
mission_request_partial_list->target_system = mavlink_msg_mission_request_partial_list_get_target_system(msg);
mission_request_partial_list->target_component = mavlink_msg_mission_request_partial_list_get_target_component(msg);
#else
memcpy(mission_request_partial_list, _MAV_PAYLOAD(msg), 6);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_mission_set_current.h
0,0 → 1,188
// MESSAGE MISSION_SET_CURRENT PACKING
 
#define MAVLINK_MSG_ID_MISSION_SET_CURRENT 41
 
typedef struct __mavlink_mission_set_current_t
{
uint16_t seq; ///< Sequence
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_mission_set_current_t;
 
#define MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN 4
#define MAVLINK_MSG_ID_41_LEN 4
 
 
 
#define MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT { \
"MISSION_SET_CURRENT", \
3, \
{ { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_set_current_t, seq) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_mission_set_current_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_mission_set_current_t, target_component) }, \
} \
}
 
 
/**
* @brief Pack a mission_set_current message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_set_current_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_mission_set_current_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_SET_CURRENT;
return mavlink_finalize_message(msg, system_id, component_id, 4, 28);
}
 
/**
* @brief Pack a mission_set_current message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_set_current_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
#else
mavlink_mission_set_current_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_SET_CURRENT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 4, 28);
}
 
/**
* @brief Encode a mission_set_current struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_set_current C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_set_current_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_set_current_t* mission_set_current)
{
return mavlink_msg_mission_set_current_pack(system_id, component_id, msg, mission_set_current->target_system, mission_set_current->target_component, mission_set_current->seq);
}
 
/**
* @brief Send a mission_set_current message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param seq Sequence
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_mission_set_current_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT, buf, 4, 28);
#else
mavlink_mission_set_current_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT, (const char *)&packet, 4, 28);
#endif
}
 
#endif
 
// MESSAGE MISSION_SET_CURRENT UNPACKING
 
 
/**
* @brief Get field target_system from mission_set_current message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_set_current_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
 
/**
* @brief Get field target_component from mission_set_current message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_set_current_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
 
/**
* @brief Get field seq from mission_set_current message
*
* @return Sequence
*/
static inline uint16_t mavlink_msg_mission_set_current_get_seq(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
 
/**
* @brief Decode a mission_set_current message into a struct
*
* @param msg The message to decode
* @param mission_set_current C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_set_current_decode(const mavlink_message_t* msg, mavlink_mission_set_current_t* mission_set_current)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_set_current->seq = mavlink_msg_mission_set_current_get_seq(msg);
mission_set_current->target_system = mavlink_msg_mission_set_current_get_target_system(msg);
mission_set_current->target_component = mavlink_msg_mission_set_current_get_target_component(msg);
#else
memcpy(mission_set_current, _MAV_PAYLOAD(msg), 4);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_mission_write_partial_list.h
0,0 → 1,210
// MESSAGE MISSION_WRITE_PARTIAL_LIST PACKING
 
#define MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST 38
 
typedef struct __mavlink_mission_write_partial_list_t
{
int16_t start_index; ///< Start index, 0 by default and smaller / equal to the largest index of the current onboard list.
int16_t end_index; ///< End index, equal or greater than start index.
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_mission_write_partial_list_t;
 
#define MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN 6
#define MAVLINK_MSG_ID_38_LEN 6
 
 
 
#define MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST { \
"MISSION_WRITE_PARTIAL_LIST", \
4, \
{ { "start_index", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_mission_write_partial_list_t, start_index) }, \
{ "end_index", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_mission_write_partial_list_t, end_index) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_mission_write_partial_list_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_mission_write_partial_list_t, target_component) }, \
} \
}
 
 
/**
* @brief Pack a mission_write_partial_list message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param start_index Start index, 0 by default and smaller / equal to the largest index of the current onboard list.
* @param end_index End index, equal or greater than start index.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_write_partial_list_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, int16_t start_index, int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
#else
mavlink_mission_write_partial_list_t packet;
packet.start_index = start_index;
packet.end_index = end_index;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST;
return mavlink_finalize_message(msg, system_id, component_id, 6, 9);
}
 
/**
* @brief Pack a mission_write_partial_list message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param start_index Start index, 0 by default and smaller / equal to the largest index of the current onboard list.
* @param end_index End index, equal or greater than start index.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_write_partial_list_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,int16_t start_index,int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
#else
mavlink_mission_write_partial_list_t packet;
packet.start_index = start_index;
packet.end_index = end_index;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
#endif
 
msg->msgid = MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 6, 9);
}
 
/**
* @brief Encode a mission_write_partial_list struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param mission_write_partial_list C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mission_write_partial_list_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_write_partial_list_t* mission_write_partial_list)
{
return mavlink_msg_mission_write_partial_list_pack(system_id, component_id, msg, mission_write_partial_list->target_system, mission_write_partial_list->target_component, mission_write_partial_list->start_index, mission_write_partial_list->end_index);
}
 
/**
* @brief Send a mission_write_partial_list message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param start_index Start index, 0 by default and smaller / equal to the largest index of the current onboard list.
* @param end_index End index, equal or greater than start index.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_mission_write_partial_list_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int16_t start_index, int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST, buf, 6, 9);
#else
mavlink_mission_write_partial_list_t packet;
packet.start_index = start_index;
packet.end_index = end_index;
packet.target_system = target_system;
packet.target_component = target_component;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST, (const char *)&packet, 6, 9);
#endif
}
 
#endif
 
// MESSAGE MISSION_WRITE_PARTIAL_LIST UNPACKING
 
 
/**
* @brief Get field target_system from mission_write_partial_list message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_write_partial_list_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
 
/**
* @brief Get field target_component from mission_write_partial_list message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_mission_write_partial_list_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
 
/**
* @brief Get field start_index from mission_write_partial_list message
*
* @return Start index, 0 by default and smaller / equal to the largest index of the current onboard list.
*/
static inline int16_t mavlink_msg_mission_write_partial_list_get_start_index(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 0);
}
 
/**
* @brief Get field end_index from mission_write_partial_list message
*
* @return End index, equal or greater than start index.
*/
static inline int16_t mavlink_msg_mission_write_partial_list_get_end_index(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 2);
}
 
/**
* @brief Decode a mission_write_partial_list message into a struct
*
* @param msg The message to decode
* @param mission_write_partial_list C-struct to decode the message contents into
*/
static inline void mavlink_msg_mission_write_partial_list_decode(const mavlink_message_t* msg, mavlink_mission_write_partial_list_t* mission_write_partial_list)
{
#if MAVLINK_NEED_BYTE_SWAP
mission_write_partial_list->start_index = mavlink_msg_mission_write_partial_list_get_start_index(msg);
mission_write_partial_list->end_index = mavlink_msg_mission_write_partial_list_get_end_index(msg);
mission_write_partial_list->target_system = mavlink_msg_mission_write_partial_list_get_target_system(msg);
mission_write_partial_list->target_component = mavlink_msg_mission_write_partial_list_get_target_component(msg);
#else
memcpy(mission_write_partial_list, _MAV_PAYLOAD(msg), 6);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_named_value_float.h
0,0 → 1,182
// MESSAGE NAMED_VALUE_FLOAT PACKING
 
#define MAVLINK_MSG_ID_NAMED_VALUE_FLOAT 251
 
typedef struct __mavlink_named_value_float_t
{
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
float value; ///< Floating point value
char name[10]; ///< Name of the debug variable
} mavlink_named_value_float_t;
 
#define MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN 18
#define MAVLINK_MSG_ID_251_LEN 18
 
#define MAVLINK_MSG_NAMED_VALUE_FLOAT_FIELD_NAME_LEN 10
 
#define MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT { \
"NAMED_VALUE_FLOAT", \
3, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_named_value_float_t, time_boot_ms) }, \
{ "value", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_named_value_float_t, value) }, \
{ "name", NULL, MAVLINK_TYPE_CHAR, 10, 8, offsetof(mavlink_named_value_float_t, name) }, \
} \
}
 
 
/**
* @brief Pack a named_value_float message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param name Name of the debug variable
* @param value Floating point value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_named_value_float_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, const char *name, float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_char_array(buf, 8, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
#else
mavlink_named_value_float_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
#endif
 
msg->msgid = MAVLINK_MSG_ID_NAMED_VALUE_FLOAT;
return mavlink_finalize_message(msg, system_id, component_id, 18, 170);
}
 
/**
* @brief Pack a named_value_float message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param name Name of the debug variable
* @param value Floating point value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_named_value_float_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,const char *name,float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_char_array(buf, 8, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
#else
mavlink_named_value_float_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
#endif
 
msg->msgid = MAVLINK_MSG_ID_NAMED_VALUE_FLOAT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 18, 170);
}
 
/**
* @brief Encode a named_value_float struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param named_value_float C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_named_value_float_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_named_value_float_t* named_value_float)
{
return mavlink_msg_named_value_float_pack(system_id, component_id, msg, named_value_float->time_boot_ms, named_value_float->name, named_value_float->value);
}
 
/**
* @brief Send a named_value_float message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param name Name of the debug variable
* @param value Floating point value
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_named_value_float_send(mavlink_channel_t chan, uint32_t time_boot_ms, const char *name, float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_char_array(buf, 8, name, 10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT, buf, 18, 170);
#else
mavlink_named_value_float_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT, (const char *)&packet, 18, 170);
#endif
}
 
#endif
 
// MESSAGE NAMED_VALUE_FLOAT UNPACKING
 
 
/**
* @brief Get field time_boot_ms from named_value_float message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_named_value_float_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field name from named_value_float message
*
* @return Name of the debug variable
*/
static inline uint16_t mavlink_msg_named_value_float_get_name(const mavlink_message_t* msg, char *name)
{
return _MAV_RETURN_char_array(msg, name, 10, 8);
}
 
/**
* @brief Get field value from named_value_float message
*
* @return Floating point value
*/
static inline float mavlink_msg_named_value_float_get_value(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Decode a named_value_float message into a struct
*
* @param msg The message to decode
* @param named_value_float C-struct to decode the message contents into
*/
static inline void mavlink_msg_named_value_float_decode(const mavlink_message_t* msg, mavlink_named_value_float_t* named_value_float)
{
#if MAVLINK_NEED_BYTE_SWAP
named_value_float->time_boot_ms = mavlink_msg_named_value_float_get_time_boot_ms(msg);
named_value_float->value = mavlink_msg_named_value_float_get_value(msg);
mavlink_msg_named_value_float_get_name(msg, named_value_float->name);
#else
memcpy(named_value_float, _MAV_PAYLOAD(msg), 18);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_named_value_int.h
0,0 → 1,182
// MESSAGE NAMED_VALUE_INT PACKING
 
#define MAVLINK_MSG_ID_NAMED_VALUE_INT 252
 
typedef struct __mavlink_named_value_int_t
{
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
int32_t value; ///< Signed integer value
char name[10]; ///< Name of the debug variable
} mavlink_named_value_int_t;
 
#define MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN 18
#define MAVLINK_MSG_ID_252_LEN 18
 
#define MAVLINK_MSG_NAMED_VALUE_INT_FIELD_NAME_LEN 10
 
#define MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT { \
"NAMED_VALUE_INT", \
3, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_named_value_int_t, time_boot_ms) }, \
{ "value", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_named_value_int_t, value) }, \
{ "name", NULL, MAVLINK_TYPE_CHAR, 10, 8, offsetof(mavlink_named_value_int_t, name) }, \
} \
}
 
 
/**
* @brief Pack a named_value_int message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param name Name of the debug variable
* @param value Signed integer value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_named_value_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, const char *name, int32_t value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, value);
_mav_put_char_array(buf, 8, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
#else
mavlink_named_value_int_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
#endif
 
msg->msgid = MAVLINK_MSG_ID_NAMED_VALUE_INT;
return mavlink_finalize_message(msg, system_id, component_id, 18, 44);
}
 
/**
* @brief Pack a named_value_int message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param name Name of the debug variable
* @param value Signed integer value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_named_value_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,const char *name,int32_t value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, value);
_mav_put_char_array(buf, 8, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
#else
mavlink_named_value_int_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
#endif
 
msg->msgid = MAVLINK_MSG_ID_NAMED_VALUE_INT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 18, 44);
}
 
/**
* @brief Encode a named_value_int struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param named_value_int C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_named_value_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_named_value_int_t* named_value_int)
{
return mavlink_msg_named_value_int_pack(system_id, component_id, msg, named_value_int->time_boot_ms, named_value_int->name, named_value_int->value);
}
 
/**
* @brief Send a named_value_int message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param name Name of the debug variable
* @param value Signed integer value
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_named_value_int_send(mavlink_channel_t chan, uint32_t time_boot_ms, const char *name, int32_t value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, value);
_mav_put_char_array(buf, 8, name, 10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_INT, buf, 18, 44);
#else
mavlink_named_value_int_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_INT, (const char *)&packet, 18, 44);
#endif
}
 
#endif
 
// MESSAGE NAMED_VALUE_INT UNPACKING
 
 
/**
* @brief Get field time_boot_ms from named_value_int message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_named_value_int_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field name from named_value_int message
*
* @return Name of the debug variable
*/
static inline uint16_t mavlink_msg_named_value_int_get_name(const mavlink_message_t* msg, char *name)
{
return _MAV_RETURN_char_array(msg, name, 10, 8);
}
 
/**
* @brief Get field value from named_value_int message
*
* @return Signed integer value
*/
static inline int32_t mavlink_msg_named_value_int_get_value(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 4);
}
 
/**
* @brief Decode a named_value_int message into a struct
*
* @param msg The message to decode
* @param named_value_int C-struct to decode the message contents into
*/
static inline void mavlink_msg_named_value_int_decode(const mavlink_message_t* msg, mavlink_named_value_int_t* named_value_int)
{
#if MAVLINK_NEED_BYTE_SWAP
named_value_int->time_boot_ms = mavlink_msg_named_value_int_get_time_boot_ms(msg);
named_value_int->value = mavlink_msg_named_value_int_get_value(msg);
mavlink_msg_named_value_int_get_name(msg, named_value_int->name);
#else
memcpy(named_value_int, _MAV_PAYLOAD(msg), 18);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_nav_controller_output.h
0,0 → 1,298
// MESSAGE NAV_CONTROLLER_OUTPUT PACKING
 
#define MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT 62
 
typedef struct __mavlink_nav_controller_output_t
{
float nav_roll; ///< Current desired roll in degrees
float nav_pitch; ///< Current desired pitch in degrees
float alt_error; ///< Current altitude error in meters
float aspd_error; ///< Current airspeed error in meters/second
float xtrack_error; ///< Current crosstrack error on x-y plane in meters
int16_t nav_bearing; ///< Current desired heading in degrees
int16_t target_bearing; ///< Bearing to current MISSION/target in degrees
uint16_t wp_dist; ///< Distance to active MISSION in meters
} mavlink_nav_controller_output_t;
 
#define MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN 26
#define MAVLINK_MSG_ID_62_LEN 26
 
 
 
#define MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT { \
"NAV_CONTROLLER_OUTPUT", \
8, \
{ { "nav_roll", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_nav_controller_output_t, nav_roll) }, \
{ "nav_pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_nav_controller_output_t, nav_pitch) }, \
{ "alt_error", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_nav_controller_output_t, alt_error) }, \
{ "aspd_error", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_nav_controller_output_t, aspd_error) }, \
{ "xtrack_error", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_nav_controller_output_t, xtrack_error) }, \
{ "nav_bearing", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_nav_controller_output_t, nav_bearing) }, \
{ "target_bearing", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_nav_controller_output_t, target_bearing) }, \
{ "wp_dist", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_nav_controller_output_t, wp_dist) }, \
} \
}
 
 
/**
* @brief Pack a nav_controller_output message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param nav_roll Current desired roll in degrees
* @param nav_pitch Current desired pitch in degrees
* @param nav_bearing Current desired heading in degrees
* @param target_bearing Bearing to current MISSION/target in degrees
* @param wp_dist Distance to active MISSION in meters
* @param alt_error Current altitude error in meters
* @param aspd_error Current airspeed error in meters/second
* @param xtrack_error Current crosstrack error on x-y plane in meters
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_nav_controller_output_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
float nav_roll, float nav_pitch, int16_t nav_bearing, int16_t target_bearing, uint16_t wp_dist, float alt_error, float aspd_error, float xtrack_error)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
_mav_put_float(buf, 0, nav_roll);
_mav_put_float(buf, 4, nav_pitch);
_mav_put_float(buf, 8, alt_error);
_mav_put_float(buf, 12, aspd_error);
_mav_put_float(buf, 16, xtrack_error);
_mav_put_int16_t(buf, 20, nav_bearing);
_mav_put_int16_t(buf, 22, target_bearing);
_mav_put_uint16_t(buf, 24, wp_dist);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 26);
#else
mavlink_nav_controller_output_t packet;
packet.nav_roll = nav_roll;
packet.nav_pitch = nav_pitch;
packet.alt_error = alt_error;
packet.aspd_error = aspd_error;
packet.xtrack_error = xtrack_error;
packet.nav_bearing = nav_bearing;
packet.target_bearing = target_bearing;
packet.wp_dist = wp_dist;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 26);
#endif
 
msg->msgid = MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT;
return mavlink_finalize_message(msg, system_id, component_id, 26, 183);
}
 
/**
* @brief Pack a nav_controller_output message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param nav_roll Current desired roll in degrees
* @param nav_pitch Current desired pitch in degrees
* @param nav_bearing Current desired heading in degrees
* @param target_bearing Bearing to current MISSION/target in degrees
* @param wp_dist Distance to active MISSION in meters
* @param alt_error Current altitude error in meters
* @param aspd_error Current airspeed error in meters/second
* @param xtrack_error Current crosstrack error on x-y plane in meters
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_nav_controller_output_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
float nav_roll,float nav_pitch,int16_t nav_bearing,int16_t target_bearing,uint16_t wp_dist,float alt_error,float aspd_error,float xtrack_error)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
_mav_put_float(buf, 0, nav_roll);
_mav_put_float(buf, 4, nav_pitch);
_mav_put_float(buf, 8, alt_error);
_mav_put_float(buf, 12, aspd_error);
_mav_put_float(buf, 16, xtrack_error);
_mav_put_int16_t(buf, 20, nav_bearing);
_mav_put_int16_t(buf, 22, target_bearing);
_mav_put_uint16_t(buf, 24, wp_dist);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 26);
#else
mavlink_nav_controller_output_t packet;
packet.nav_roll = nav_roll;
packet.nav_pitch = nav_pitch;
packet.alt_error = alt_error;
packet.aspd_error = aspd_error;
packet.xtrack_error = xtrack_error;
packet.nav_bearing = nav_bearing;
packet.target_bearing = target_bearing;
packet.wp_dist = wp_dist;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 26);
#endif
 
msg->msgid = MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 26, 183);
}
 
/**
* @brief Encode a nav_controller_output struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param nav_controller_output C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_nav_controller_output_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_nav_controller_output_t* nav_controller_output)
{
return mavlink_msg_nav_controller_output_pack(system_id, component_id, msg, nav_controller_output->nav_roll, nav_controller_output->nav_pitch, nav_controller_output->nav_bearing, nav_controller_output->target_bearing, nav_controller_output->wp_dist, nav_controller_output->alt_error, nav_controller_output->aspd_error, nav_controller_output->xtrack_error);
}
 
/**
* @brief Send a nav_controller_output message
* @param chan MAVLink channel to send the message
*
* @param nav_roll Current desired roll in degrees
* @param nav_pitch Current desired pitch in degrees
* @param nav_bearing Current desired heading in degrees
* @param target_bearing Bearing to current MISSION/target in degrees
* @param wp_dist Distance to active MISSION in meters
* @param alt_error Current altitude error in meters
* @param aspd_error Current airspeed error in meters/second
* @param xtrack_error Current crosstrack error on x-y plane in meters
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_nav_controller_output_send(mavlink_channel_t chan, float nav_roll, float nav_pitch, int16_t nav_bearing, int16_t target_bearing, uint16_t wp_dist, float alt_error, float aspd_error, float xtrack_error)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
_mav_put_float(buf, 0, nav_roll);
_mav_put_float(buf, 4, nav_pitch);
_mav_put_float(buf, 8, alt_error);
_mav_put_float(buf, 12, aspd_error);
_mav_put_float(buf, 16, xtrack_error);
_mav_put_int16_t(buf, 20, nav_bearing);
_mav_put_int16_t(buf, 22, target_bearing);
_mav_put_uint16_t(buf, 24, wp_dist);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT, buf, 26, 183);
#else
mavlink_nav_controller_output_t packet;
packet.nav_roll = nav_roll;
packet.nav_pitch = nav_pitch;
packet.alt_error = alt_error;
packet.aspd_error = aspd_error;
packet.xtrack_error = xtrack_error;
packet.nav_bearing = nav_bearing;
packet.target_bearing = target_bearing;
packet.wp_dist = wp_dist;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT, (const char *)&packet, 26, 183);
#endif
}
 
#endif
 
// MESSAGE NAV_CONTROLLER_OUTPUT UNPACKING
 
 
/**
* @brief Get field nav_roll from nav_controller_output message
*
* @return Current desired roll in degrees
*/
static inline float mavlink_msg_nav_controller_output_get_nav_roll(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field nav_pitch from nav_controller_output message
*
* @return Current desired pitch in degrees
*/
static inline float mavlink_msg_nav_controller_output_get_nav_pitch(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field nav_bearing from nav_controller_output message
*
* @return Current desired heading in degrees
*/
static inline int16_t mavlink_msg_nav_controller_output_get_nav_bearing(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 20);
}
 
/**
* @brief Get field target_bearing from nav_controller_output message
*
* @return Bearing to current MISSION/target in degrees
*/
static inline int16_t mavlink_msg_nav_controller_output_get_target_bearing(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 22);
}
 
/**
* @brief Get field wp_dist from nav_controller_output message
*
* @return Distance to active MISSION in meters
*/
static inline uint16_t mavlink_msg_nav_controller_output_get_wp_dist(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 24);
}
 
/**
* @brief Get field alt_error from nav_controller_output message
*
* @return Current altitude error in meters
*/
static inline float mavlink_msg_nav_controller_output_get_alt_error(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field aspd_error from nav_controller_output message
*
* @return Current airspeed error in meters/second
*/
static inline float mavlink_msg_nav_controller_output_get_aspd_error(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field xtrack_error from nav_controller_output message
*
* @return Current crosstrack error on x-y plane in meters
*/
static inline float mavlink_msg_nav_controller_output_get_xtrack_error(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Decode a nav_controller_output message into a struct
*
* @param msg The message to decode
* @param nav_controller_output C-struct to decode the message contents into
*/
static inline void mavlink_msg_nav_controller_output_decode(const mavlink_message_t* msg, mavlink_nav_controller_output_t* nav_controller_output)
{
#if MAVLINK_NEED_BYTE_SWAP
nav_controller_output->nav_roll = mavlink_msg_nav_controller_output_get_nav_roll(msg);
nav_controller_output->nav_pitch = mavlink_msg_nav_controller_output_get_nav_pitch(msg);
nav_controller_output->alt_error = mavlink_msg_nav_controller_output_get_alt_error(msg);
nav_controller_output->aspd_error = mavlink_msg_nav_controller_output_get_aspd_error(msg);
nav_controller_output->xtrack_error = mavlink_msg_nav_controller_output_get_xtrack_error(msg);
nav_controller_output->nav_bearing = mavlink_msg_nav_controller_output_get_nav_bearing(msg);
nav_controller_output->target_bearing = mavlink_msg_nav_controller_output_get_target_bearing(msg);
nav_controller_output->wp_dist = mavlink_msg_nav_controller_output_get_wp_dist(msg);
#else
memcpy(nav_controller_output, _MAV_PAYLOAD(msg), 26);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_optical_flow.h
0,0 → 1,298
// MESSAGE OPTICAL_FLOW PACKING
 
#define MAVLINK_MSG_ID_OPTICAL_FLOW 100
 
typedef struct __mavlink_optical_flow_t
{
uint64_t time_usec; ///< Timestamp (UNIX)
float flow_comp_m_x; ///< Flow in meters in x-sensor direction, angular-speed compensated
float flow_comp_m_y; ///< Flow in meters in y-sensor direction, angular-speed compensated
float ground_distance; ///< Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
int16_t flow_x; ///< Flow in pixels in x-sensor direction
int16_t flow_y; ///< Flow in pixels in y-sensor direction
uint8_t sensor_id; ///< Sensor ID
uint8_t quality; ///< Optical flow quality / confidence. 0: bad, 255: maximum quality
} mavlink_optical_flow_t;
 
#define MAVLINK_MSG_ID_OPTICAL_FLOW_LEN 26
#define MAVLINK_MSG_ID_100_LEN 26
 
 
 
#define MAVLINK_MESSAGE_INFO_OPTICAL_FLOW { \
"OPTICAL_FLOW", \
8, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_optical_flow_t, time_usec) }, \
{ "flow_comp_m_x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_optical_flow_t, flow_comp_m_x) }, \
{ "flow_comp_m_y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_optical_flow_t, flow_comp_m_y) }, \
{ "ground_distance", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_optical_flow_t, ground_distance) }, \
{ "flow_x", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_optical_flow_t, flow_x) }, \
{ "flow_y", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_optical_flow_t, flow_y) }, \
{ "sensor_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_optical_flow_t, sensor_id) }, \
{ "quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_optical_flow_t, quality) }, \
} \
}
 
 
/**
* @brief Pack a optical_flow message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (UNIX)
* @param sensor_id Sensor ID
* @param flow_x Flow in pixels in x-sensor direction
* @param flow_y Flow in pixels in y-sensor direction
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
* @param ground_distance Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_optical_flow_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_usec, uint8_t sensor_id, int16_t flow_x, int16_t flow_y, float flow_comp_m_x, float flow_comp_m_y, uint8_t quality, float ground_distance)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, flow_comp_m_x);
_mav_put_float(buf, 12, flow_comp_m_y);
_mav_put_float(buf, 16, ground_distance);
_mav_put_int16_t(buf, 20, flow_x);
_mav_put_int16_t(buf, 22, flow_y);
_mav_put_uint8_t(buf, 24, sensor_id);
_mav_put_uint8_t(buf, 25, quality);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 26);
#else
mavlink_optical_flow_t packet;
packet.time_usec = time_usec;
packet.flow_comp_m_x = flow_comp_m_x;
packet.flow_comp_m_y = flow_comp_m_y;
packet.ground_distance = ground_distance;
packet.flow_x = flow_x;
packet.flow_y = flow_y;
packet.sensor_id = sensor_id;
packet.quality = quality;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 26);
#endif
 
msg->msgid = MAVLINK_MSG_ID_OPTICAL_FLOW;
return mavlink_finalize_message(msg, system_id, component_id, 26, 175);
}
 
/**
* @brief Pack a optical_flow message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (UNIX)
* @param sensor_id Sensor ID
* @param flow_x Flow in pixels in x-sensor direction
* @param flow_y Flow in pixels in y-sensor direction
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
* @param ground_distance Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_optical_flow_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_usec,uint8_t sensor_id,int16_t flow_x,int16_t flow_y,float flow_comp_m_x,float flow_comp_m_y,uint8_t quality,float ground_distance)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, flow_comp_m_x);
_mav_put_float(buf, 12, flow_comp_m_y);
_mav_put_float(buf, 16, ground_distance);
_mav_put_int16_t(buf, 20, flow_x);
_mav_put_int16_t(buf, 22, flow_y);
_mav_put_uint8_t(buf, 24, sensor_id);
_mav_put_uint8_t(buf, 25, quality);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 26);
#else
mavlink_optical_flow_t packet;
packet.time_usec = time_usec;
packet.flow_comp_m_x = flow_comp_m_x;
packet.flow_comp_m_y = flow_comp_m_y;
packet.ground_distance = ground_distance;
packet.flow_x = flow_x;
packet.flow_y = flow_y;
packet.sensor_id = sensor_id;
packet.quality = quality;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 26);
#endif
 
msg->msgid = MAVLINK_MSG_ID_OPTICAL_FLOW;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 26, 175);
}
 
/**
* @brief Encode a optical_flow struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param optical_flow C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_optical_flow_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_optical_flow_t* optical_flow)
{
return mavlink_msg_optical_flow_pack(system_id, component_id, msg, optical_flow->time_usec, optical_flow->sensor_id, optical_flow->flow_x, optical_flow->flow_y, optical_flow->flow_comp_m_x, optical_flow->flow_comp_m_y, optical_flow->quality, optical_flow->ground_distance);
}
 
/**
* @brief Send a optical_flow message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (UNIX)
* @param sensor_id Sensor ID
* @param flow_x Flow in pixels in x-sensor direction
* @param flow_y Flow in pixels in y-sensor direction
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
* @param ground_distance Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_optical_flow_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t sensor_id, int16_t flow_x, int16_t flow_y, float flow_comp_m_x, float flow_comp_m_y, uint8_t quality, float ground_distance)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, flow_comp_m_x);
_mav_put_float(buf, 12, flow_comp_m_y);
_mav_put_float(buf, 16, ground_distance);
_mav_put_int16_t(buf, 20, flow_x);
_mav_put_int16_t(buf, 22, flow_y);
_mav_put_uint8_t(buf, 24, sensor_id);
_mav_put_uint8_t(buf, 25, quality);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPTICAL_FLOW, buf, 26, 175);
#else
mavlink_optical_flow_t packet;
packet.time_usec = time_usec;
packet.flow_comp_m_x = flow_comp_m_x;
packet.flow_comp_m_y = flow_comp_m_y;
packet.ground_distance = ground_distance;
packet.flow_x = flow_x;
packet.flow_y = flow_y;
packet.sensor_id = sensor_id;
packet.quality = quality;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPTICAL_FLOW, (const char *)&packet, 26, 175);
#endif
}
 
#endif
 
// MESSAGE OPTICAL_FLOW UNPACKING
 
 
/**
* @brief Get field time_usec from optical_flow message
*
* @return Timestamp (UNIX)
*/
static inline uint64_t mavlink_msg_optical_flow_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field sensor_id from optical_flow message
*
* @return Sensor ID
*/
static inline uint8_t mavlink_msg_optical_flow_get_sensor_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 24);
}
 
/**
* @brief Get field flow_x from optical_flow message
*
* @return Flow in pixels in x-sensor direction
*/
static inline int16_t mavlink_msg_optical_flow_get_flow_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 20);
}
 
/**
* @brief Get field flow_y from optical_flow message
*
* @return Flow in pixels in y-sensor direction
*/
static inline int16_t mavlink_msg_optical_flow_get_flow_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 22);
}
 
/**
* @brief Get field flow_comp_m_x from optical_flow message
*
* @return Flow in meters in x-sensor direction, angular-speed compensated
*/
static inline float mavlink_msg_optical_flow_get_flow_comp_m_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field flow_comp_m_y from optical_flow message
*
* @return Flow in meters in y-sensor direction, angular-speed compensated
*/
static inline float mavlink_msg_optical_flow_get_flow_comp_m_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field quality from optical_flow message
*
* @return Optical flow quality / confidence. 0: bad, 255: maximum quality
*/
static inline uint8_t mavlink_msg_optical_flow_get_quality(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 25);
}
 
/**
* @brief Get field ground_distance from optical_flow message
*
* @return Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
*/
static inline float mavlink_msg_optical_flow_get_ground_distance(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Decode a optical_flow message into a struct
*
* @param msg The message to decode
* @param optical_flow C-struct to decode the message contents into
*/
static inline void mavlink_msg_optical_flow_decode(const mavlink_message_t* msg, mavlink_optical_flow_t* optical_flow)
{
#if MAVLINK_NEED_BYTE_SWAP
optical_flow->time_usec = mavlink_msg_optical_flow_get_time_usec(msg);
optical_flow->flow_comp_m_x = mavlink_msg_optical_flow_get_flow_comp_m_x(msg);
optical_flow->flow_comp_m_y = mavlink_msg_optical_flow_get_flow_comp_m_y(msg);
optical_flow->ground_distance = mavlink_msg_optical_flow_get_ground_distance(msg);
optical_flow->flow_x = mavlink_msg_optical_flow_get_flow_x(msg);
optical_flow->flow_y = mavlink_msg_optical_flow_get_flow_y(msg);
optical_flow->sensor_id = mavlink_msg_optical_flow_get_sensor_id(msg);
optical_flow->quality = mavlink_msg_optical_flow_get_quality(msg);
#else
memcpy(optical_flow, _MAV_PAYLOAD(msg), 26);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_param_request_list.h
0,0 → 1,166
// MESSAGE PARAM_REQUEST_LIST PACKING
 
#define MAVLINK_MSG_ID_PARAM_REQUEST_LIST 21
 
typedef struct __mavlink_param_request_list_t
{
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_param_request_list_t;
 
#define MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN 2
#define MAVLINK_MSG_ID_21_LEN 2
 
 
 
#define MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST { \
"PARAM_REQUEST_LIST", \
2, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_param_request_list_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_param_request_list_t, target_component) }, \
} \
}
 
 
/**
* @brief Pack a param_request_list message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_param_request_list_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_param_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
 
msg->msgid = MAVLINK_MSG_ID_PARAM_REQUEST_LIST;
return mavlink_finalize_message(msg, system_id, component_id, 2, 159);
}
 
/**
* @brief Pack a param_request_list message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_param_request_list_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
#else
mavlink_param_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
#endif
 
msg->msgid = MAVLINK_MSG_ID_PARAM_REQUEST_LIST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 159);
}
 
/**
* @brief Encode a param_request_list struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param param_request_list C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_param_request_list_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_param_request_list_t* param_request_list)
{
return mavlink_msg_param_request_list_pack(system_id, component_id, msg, param_request_list->target_system, param_request_list->target_component);
}
 
/**
* @brief Send a param_request_list message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_param_request_list_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_LIST, buf, 2, 159);
#else
mavlink_param_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_LIST, (const char *)&packet, 2, 159);
#endif
}
 
#endif
 
// MESSAGE PARAM_REQUEST_LIST UNPACKING
 
 
/**
* @brief Get field target_system from param_request_list message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_param_request_list_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
 
/**
* @brief Get field target_component from param_request_list message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_param_request_list_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
 
/**
* @brief Decode a param_request_list message into a struct
*
* @param msg The message to decode
* @param param_request_list C-struct to decode the message contents into
*/
static inline void mavlink_msg_param_request_list_decode(const mavlink_message_t* msg, mavlink_param_request_list_t* param_request_list)
{
#if MAVLINK_NEED_BYTE_SWAP
param_request_list->target_system = mavlink_msg_param_request_list_get_target_system(msg);
param_request_list->target_component = mavlink_msg_param_request_list_get_target_component(msg);
#else
memcpy(param_request_list, _MAV_PAYLOAD(msg), 2);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_param_request_read.h
0,0 → 1,204
// MESSAGE PARAM_REQUEST_READ PACKING
 
#define MAVLINK_MSG_ID_PARAM_REQUEST_READ 20
 
typedef struct __mavlink_param_request_read_t
{
int16_t param_index; ///< Parameter index. Send -1 to use the param ID field as identifier
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
char param_id[16]; ///< Onboard parameter id
} mavlink_param_request_read_t;
 
#define MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN 20
#define MAVLINK_MSG_ID_20_LEN 20
 
#define MAVLINK_MSG_PARAM_REQUEST_READ_FIELD_PARAM_ID_LEN 16
 
#define MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ { \
"PARAM_REQUEST_READ", \
4, \
{ { "param_index", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_param_request_read_t, param_index) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_param_request_read_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_param_request_read_t, target_component) }, \
{ "param_id", NULL, MAVLINK_TYPE_CHAR, 16, 4, offsetof(mavlink_param_request_read_t, param_id) }, \
} \
}
 
 
/**
* @brief Pack a param_request_read message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param param_id Onboard parameter id
* @param param_index Parameter index. Send -1 to use the param ID field as identifier
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_param_request_read_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, const char *param_id, int16_t param_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_int16_t(buf, 0, param_index);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_put_char_array(buf, 4, param_id, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
#else
mavlink_param_request_read_t packet;
packet.param_index = param_index;
packet.target_system = target_system;
packet.target_component = target_component;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
#endif
 
msg->msgid = MAVLINK_MSG_ID_PARAM_REQUEST_READ;
return mavlink_finalize_message(msg, system_id, component_id, 20, 214);
}
 
/**
* @brief Pack a param_request_read message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param param_id Onboard parameter id
* @param param_index Parameter index. Send -1 to use the param ID field as identifier
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_param_request_read_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,const char *param_id,int16_t param_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_int16_t(buf, 0, param_index);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_put_char_array(buf, 4, param_id, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
#else
mavlink_param_request_read_t packet;
packet.param_index = param_index;
packet.target_system = target_system;
packet.target_component = target_component;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
#endif
 
msg->msgid = MAVLINK_MSG_ID_PARAM_REQUEST_READ;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 20, 214);
}
 
/**
* @brief Encode a param_request_read struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param param_request_read C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_param_request_read_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_param_request_read_t* param_request_read)
{
return mavlink_msg_param_request_read_pack(system_id, component_id, msg, param_request_read->target_system, param_request_read->target_component, param_request_read->param_id, param_request_read->param_index);
}
 
/**
* @brief Send a param_request_read message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param param_id Onboard parameter id
* @param param_index Parameter index. Send -1 to use the param ID field as identifier
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_param_request_read_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, const char *param_id, int16_t param_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_int16_t(buf, 0, param_index);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_put_char_array(buf, 4, param_id, 16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_READ, buf, 20, 214);
#else
mavlink_param_request_read_t packet;
packet.param_index = param_index;
packet.target_system = target_system;
packet.target_component = target_component;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_READ, (const char *)&packet, 20, 214);
#endif
}
 
#endif
 
// MESSAGE PARAM_REQUEST_READ UNPACKING
 
 
/**
* @brief Get field target_system from param_request_read message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_param_request_read_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
 
/**
* @brief Get field target_component from param_request_read message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_param_request_read_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
 
/**
* @brief Get field param_id from param_request_read message
*
* @return Onboard parameter id
*/
static inline uint16_t mavlink_msg_param_request_read_get_param_id(const mavlink_message_t* msg, char *param_id)
{
return _MAV_RETURN_char_array(msg, param_id, 16, 4);
}
 
/**
* @brief Get field param_index from param_request_read message
*
* @return Parameter index. Send -1 to use the param ID field as identifier
*/
static inline int16_t mavlink_msg_param_request_read_get_param_index(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 0);
}
 
/**
* @brief Decode a param_request_read message into a struct
*
* @param msg The message to decode
* @param param_request_read C-struct to decode the message contents into
*/
static inline void mavlink_msg_param_request_read_decode(const mavlink_message_t* msg, mavlink_param_request_read_t* param_request_read)
{
#if MAVLINK_NEED_BYTE_SWAP
param_request_read->param_index = mavlink_msg_param_request_read_get_param_index(msg);
param_request_read->target_system = mavlink_msg_param_request_read_get_target_system(msg);
param_request_read->target_component = mavlink_msg_param_request_read_get_target_component(msg);
mavlink_msg_param_request_read_get_param_id(msg, param_request_read->param_id);
#else
memcpy(param_request_read, _MAV_PAYLOAD(msg), 20);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_param_set.h
0,0 → 1,226
// MESSAGE PARAM_SET PACKING
 
#define MAVLINK_MSG_ID_PARAM_SET 23
 
typedef struct __mavlink_param_set_t
{
float param_value; ///< Onboard parameter value
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
char param_id[16]; ///< Onboard parameter id
uint8_t param_type; ///< Onboard parameter type: see MAV_VAR enum
} mavlink_param_set_t;
 
#define MAVLINK_MSG_ID_PARAM_SET_LEN 23
#define MAVLINK_MSG_ID_23_LEN 23
 
#define MAVLINK_MSG_PARAM_SET_FIELD_PARAM_ID_LEN 16
 
#define MAVLINK_MESSAGE_INFO_PARAM_SET { \
"PARAM_SET", \
5, \
{ { "param_value", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_param_set_t, param_value) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_param_set_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_param_set_t, target_component) }, \
{ "param_id", NULL, MAVLINK_TYPE_CHAR, 16, 6, offsetof(mavlink_param_set_t, param_id) }, \
{ "param_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_param_set_t, param_type) }, \
} \
}
 
 
/**
* @brief Pack a param_set message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param param_id Onboard parameter id
* @param param_value Onboard parameter value
* @param param_type Onboard parameter type: see MAV_VAR enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_param_set_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, const char *param_id, float param_value, uint8_t param_type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[23];
_mav_put_float(buf, 0, param_value);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
_mav_put_uint8_t(buf, 22, param_type);
_mav_put_char_array(buf, 6, param_id, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 23);
#else
mavlink_param_set_t packet;
packet.param_value = param_value;
packet.target_system = target_system;
packet.target_component = target_component;
packet.param_type = param_type;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 23);
#endif
 
msg->msgid = MAVLINK_MSG_ID_PARAM_SET;
return mavlink_finalize_message(msg, system_id, component_id, 23, 168);
}
 
/**
* @brief Pack a param_set message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param param_id Onboard parameter id
* @param param_value Onboard parameter value
* @param param_type Onboard parameter type: see MAV_VAR enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_param_set_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,const char *param_id,float param_value,uint8_t param_type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[23];
_mav_put_float(buf, 0, param_value);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
_mav_put_uint8_t(buf, 22, param_type);
_mav_put_char_array(buf, 6, param_id, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 23);
#else
mavlink_param_set_t packet;
packet.param_value = param_value;
packet.target_system = target_system;
packet.target_component = target_component;
packet.param_type = param_type;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 23);
#endif
 
msg->msgid = MAVLINK_MSG_ID_PARAM_SET;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 23, 168);
}
 
/**
* @brief Encode a param_set struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param param_set C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_param_set_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_param_set_t* param_set)
{
return mavlink_msg_param_set_pack(system_id, component_id, msg, param_set->target_system, param_set->target_component, param_set->param_id, param_set->param_value, param_set->param_type);
}
 
/**
* @brief Send a param_set message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param param_id Onboard parameter id
* @param param_value Onboard parameter value
* @param param_type Onboard parameter type: see MAV_VAR enum
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_param_set_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, const char *param_id, float param_value, uint8_t param_type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[23];
_mav_put_float(buf, 0, param_value);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
_mav_put_uint8_t(buf, 22, param_type);
_mav_put_char_array(buf, 6, param_id, 16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_SET, buf, 23, 168);
#else
mavlink_param_set_t packet;
packet.param_value = param_value;
packet.target_system = target_system;
packet.target_component = target_component;
packet.param_type = param_type;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_SET, (const char *)&packet, 23, 168);
#endif
}
 
#endif
 
// MESSAGE PARAM_SET UNPACKING
 
 
/**
* @brief Get field target_system from param_set message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_param_set_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
 
/**
* @brief Get field target_component from param_set message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_param_set_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
 
/**
* @brief Get field param_id from param_set message
*
* @return Onboard parameter id
*/
static inline uint16_t mavlink_msg_param_set_get_param_id(const mavlink_message_t* msg, char *param_id)
{
return _MAV_RETURN_char_array(msg, param_id, 16, 6);
}
 
/**
* @brief Get field param_value from param_set message
*
* @return Onboard parameter value
*/
static inline float mavlink_msg_param_set_get_param_value(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field param_type from param_set message
*
* @return Onboard parameter type: see MAV_VAR enum
*/
static inline uint8_t mavlink_msg_param_set_get_param_type(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 22);
}
 
/**
* @brief Decode a param_set message into a struct
*
* @param msg The message to decode
* @param param_set C-struct to decode the message contents into
*/
static inline void mavlink_msg_param_set_decode(const mavlink_message_t* msg, mavlink_param_set_t* param_set)
{
#if MAVLINK_NEED_BYTE_SWAP
param_set->param_value = mavlink_msg_param_set_get_param_value(msg);
param_set->target_system = mavlink_msg_param_set_get_target_system(msg);
param_set->target_component = mavlink_msg_param_set_get_target_component(msg);
mavlink_msg_param_set_get_param_id(msg, param_set->param_id);
param_set->param_type = mavlink_msg_param_set_get_param_type(msg);
#else
memcpy(param_set, _MAV_PAYLOAD(msg), 23);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_param_value.h
0,0 → 1,226
// MESSAGE PARAM_VALUE PACKING
 
#define MAVLINK_MSG_ID_PARAM_VALUE 22
 
typedef struct __mavlink_param_value_t
{
float param_value; ///< Onboard parameter value
uint16_t param_count; ///< Total number of onboard parameters
uint16_t param_index; ///< Index of this onboard parameter
char param_id[16]; ///< Onboard parameter id
uint8_t param_type; ///< Onboard parameter type: see MAV_VAR enum
} mavlink_param_value_t;
 
#define MAVLINK_MSG_ID_PARAM_VALUE_LEN 25
#define MAVLINK_MSG_ID_22_LEN 25
 
#define MAVLINK_MSG_PARAM_VALUE_FIELD_PARAM_ID_LEN 16
 
#define MAVLINK_MESSAGE_INFO_PARAM_VALUE { \
"PARAM_VALUE", \
5, \
{ { "param_value", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_param_value_t, param_value) }, \
{ "param_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_param_value_t, param_count) }, \
{ "param_index", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_param_value_t, param_index) }, \
{ "param_id", NULL, MAVLINK_TYPE_CHAR, 16, 8, offsetof(mavlink_param_value_t, param_id) }, \
{ "param_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_param_value_t, param_type) }, \
} \
}
 
 
/**
* @brief Pack a param_value message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param param_id Onboard parameter id
* @param param_value Onboard parameter value
* @param param_type Onboard parameter type: see MAV_VAR enum
* @param param_count Total number of onboard parameters
* @param param_index Index of this onboard parameter
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_param_value_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const char *param_id, float param_value, uint8_t param_type, uint16_t param_count, uint16_t param_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[25];
_mav_put_float(buf, 0, param_value);
_mav_put_uint16_t(buf, 4, param_count);
_mav_put_uint16_t(buf, 6, param_index);
_mav_put_uint8_t(buf, 24, param_type);
_mav_put_char_array(buf, 8, param_id, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 25);
#else
mavlink_param_value_t packet;
packet.param_value = param_value;
packet.param_count = param_count;
packet.param_index = param_index;
packet.param_type = param_type;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 25);
#endif
 
msg->msgid = MAVLINK_MSG_ID_PARAM_VALUE;
return mavlink_finalize_message(msg, system_id, component_id, 25, 220);
}
 
/**
* @brief Pack a param_value message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param param_id Onboard parameter id
* @param param_value Onboard parameter value
* @param param_type Onboard parameter type: see MAV_VAR enum
* @param param_count Total number of onboard parameters
* @param param_index Index of this onboard parameter
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_param_value_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
const char *param_id,float param_value,uint8_t param_type,uint16_t param_count,uint16_t param_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[25];
_mav_put_float(buf, 0, param_value);
_mav_put_uint16_t(buf, 4, param_count);
_mav_put_uint16_t(buf, 6, param_index);
_mav_put_uint8_t(buf, 24, param_type);
_mav_put_char_array(buf, 8, param_id, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 25);
#else
mavlink_param_value_t packet;
packet.param_value = param_value;
packet.param_count = param_count;
packet.param_index = param_index;
packet.param_type = param_type;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 25);
#endif
 
msg->msgid = MAVLINK_MSG_ID_PARAM_VALUE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 25, 220);
}
 
/**
* @brief Encode a param_value struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param param_value C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_param_value_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_param_value_t* param_value)
{
return mavlink_msg_param_value_pack(system_id, component_id, msg, param_value->param_id, param_value->param_value, param_value->param_type, param_value->param_count, param_value->param_index);
}
 
/**
* @brief Send a param_value message
* @param chan MAVLink channel to send the message
*
* @param param_id Onboard parameter id
* @param param_value Onboard parameter value
* @param param_type Onboard parameter type: see MAV_VAR enum
* @param param_count Total number of onboard parameters
* @param param_index Index of this onboard parameter
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_param_value_send(mavlink_channel_t chan, const char *param_id, float param_value, uint8_t param_type, uint16_t param_count, uint16_t param_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[25];
_mav_put_float(buf, 0, param_value);
_mav_put_uint16_t(buf, 4, param_count);
_mav_put_uint16_t(buf, 6, param_index);
_mav_put_uint8_t(buf, 24, param_type);
_mav_put_char_array(buf, 8, param_id, 16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_VALUE, buf, 25, 220);
#else
mavlink_param_value_t packet;
packet.param_value = param_value;
packet.param_count = param_count;
packet.param_index = param_index;
packet.param_type = param_type;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_VALUE, (const char *)&packet, 25, 220);
#endif
}
 
#endif
 
// MESSAGE PARAM_VALUE UNPACKING
 
 
/**
* @brief Get field param_id from param_value message
*
* @return Onboard parameter id
*/
static inline uint16_t mavlink_msg_param_value_get_param_id(const mavlink_message_t* msg, char *param_id)
{
return _MAV_RETURN_char_array(msg, param_id, 16, 8);
}
 
/**
* @brief Get field param_value from param_value message
*
* @return Onboard parameter value
*/
static inline float mavlink_msg_param_value_get_param_value(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field param_type from param_value message
*
* @return Onboard parameter type: see MAV_VAR enum
*/
static inline uint8_t mavlink_msg_param_value_get_param_type(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 24);
}
 
/**
* @brief Get field param_count from param_value message
*
* @return Total number of onboard parameters
*/
static inline uint16_t mavlink_msg_param_value_get_param_count(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 4);
}
 
/**
* @brief Get field param_index from param_value message
*
* @return Index of this onboard parameter
*/
static inline uint16_t mavlink_msg_param_value_get_param_index(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 6);
}
 
/**
* @brief Decode a param_value message into a struct
*
* @param msg The message to decode
* @param param_value C-struct to decode the message contents into
*/
static inline void mavlink_msg_param_value_decode(const mavlink_message_t* msg, mavlink_param_value_t* param_value)
{
#if MAVLINK_NEED_BYTE_SWAP
param_value->param_value = mavlink_msg_param_value_get_param_value(msg);
param_value->param_count = mavlink_msg_param_value_get_param_count(msg);
param_value->param_index = mavlink_msg_param_value_get_param_index(msg);
mavlink_msg_param_value_get_param_id(msg, param_value->param_id);
param_value->param_type = mavlink_msg_param_value_get_param_type(msg);
#else
memcpy(param_value, _MAV_PAYLOAD(msg), 25);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_ping.h
0,0 → 1,210
// MESSAGE PING PACKING
 
#define MAVLINK_MSG_ID_PING 4
 
typedef struct __mavlink_ping_t
{
uint64_t time_usec; ///< Unix timestamp in microseconds
uint32_t seq; ///< PING sequence
uint8_t target_system; ///< 0: request ping from all receiving systems, if greater than 0: message is a ping response and number is the system id of the requesting system
uint8_t target_component; ///< 0: request ping from all receiving components, if greater than 0: message is a ping response and number is the system id of the requesting system
} mavlink_ping_t;
 
#define MAVLINK_MSG_ID_PING_LEN 14
#define MAVLINK_MSG_ID_4_LEN 14
 
 
 
#define MAVLINK_MESSAGE_INFO_PING { \
"PING", \
4, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_ping_t, time_usec) }, \
{ "seq", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_ping_t, seq) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_ping_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_ping_t, target_component) }, \
} \
}
 
 
/**
* @brief Pack a ping message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Unix timestamp in microseconds
* @param seq PING sequence
* @param target_system 0: request ping from all receiving systems, if greater than 0: message is a ping response and number is the system id of the requesting system
* @param target_component 0: request ping from all receiving components, if greater than 0: message is a ping response and number is the system id of the requesting system
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_ping_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_usec, uint32_t seq, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint32_t(buf, 8, seq);
_mav_put_uint8_t(buf, 12, target_system);
_mav_put_uint8_t(buf, 13, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 14);
#else
mavlink_ping_t packet;
packet.time_usec = time_usec;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 14);
#endif
 
msg->msgid = MAVLINK_MSG_ID_PING;
return mavlink_finalize_message(msg, system_id, component_id, 14, 237);
}
 
/**
* @brief Pack a ping message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Unix timestamp in microseconds
* @param seq PING sequence
* @param target_system 0: request ping from all receiving systems, if greater than 0: message is a ping response and number is the system id of the requesting system
* @param target_component 0: request ping from all receiving components, if greater than 0: message is a ping response and number is the system id of the requesting system
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_ping_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_usec,uint32_t seq,uint8_t target_system,uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint32_t(buf, 8, seq);
_mav_put_uint8_t(buf, 12, target_system);
_mav_put_uint8_t(buf, 13, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 14);
#else
mavlink_ping_t packet;
packet.time_usec = time_usec;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 14);
#endif
 
msg->msgid = MAVLINK_MSG_ID_PING;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 14, 237);
}
 
/**
* @brief Encode a ping struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param ping C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_ping_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_ping_t* ping)
{
return mavlink_msg_ping_pack(system_id, component_id, msg, ping->time_usec, ping->seq, ping->target_system, ping->target_component);
}
 
/**
* @brief Send a ping message
* @param chan MAVLink channel to send the message
*
* @param time_usec Unix timestamp in microseconds
* @param seq PING sequence
* @param target_system 0: request ping from all receiving systems, if greater than 0: message is a ping response and number is the system id of the requesting system
* @param target_component 0: request ping from all receiving components, if greater than 0: message is a ping response and number is the system id of the requesting system
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_ping_send(mavlink_channel_t chan, uint64_t time_usec, uint32_t seq, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint32_t(buf, 8, seq);
_mav_put_uint8_t(buf, 12, target_system);
_mav_put_uint8_t(buf, 13, target_component);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PING, buf, 14, 237);
#else
mavlink_ping_t packet;
packet.time_usec = time_usec;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PING, (const char *)&packet, 14, 237);
#endif
}
 
#endif
 
// MESSAGE PING UNPACKING
 
 
/**
* @brief Get field time_usec from ping message
*
* @return Unix timestamp in microseconds
*/
static inline uint64_t mavlink_msg_ping_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field seq from ping message
*
* @return PING sequence
*/
static inline uint32_t mavlink_msg_ping_get_seq(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 8);
}
 
/**
* @brief Get field target_system from ping message
*
* @return 0: request ping from all receiving systems, if greater than 0: message is a ping response and number is the system id of the requesting system
*/
static inline uint8_t mavlink_msg_ping_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 12);
}
 
/**
* @brief Get field target_component from ping message
*
* @return 0: request ping from all receiving components, if greater than 0: message is a ping response and number is the system id of the requesting system
*/
static inline uint8_t mavlink_msg_ping_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 13);
}
 
/**
* @brief Decode a ping message into a struct
*
* @param msg The message to decode
* @param ping C-struct to decode the message contents into
*/
static inline void mavlink_msg_ping_decode(const mavlink_message_t* msg, mavlink_ping_t* ping)
{
#if MAVLINK_NEED_BYTE_SWAP
ping->time_usec = mavlink_msg_ping_get_time_usec(msg);
ping->seq = mavlink_msg_ping_get_seq(msg);
ping->target_system = mavlink_msg_ping_get_target_system(msg);
ping->target_component = mavlink_msg_ping_get_target_component(msg);
#else
memcpy(ping, _MAV_PAYLOAD(msg), 14);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_raw_imu.h
0,0 → 1,342
// MESSAGE RAW_IMU PACKING
 
#define MAVLINK_MSG_ID_RAW_IMU 27
 
typedef struct __mavlink_raw_imu_t
{
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
int16_t xacc; ///< X acceleration (raw)
int16_t yacc; ///< Y acceleration (raw)
int16_t zacc; ///< Z acceleration (raw)
int16_t xgyro; ///< Angular speed around X axis (raw)
int16_t ygyro; ///< Angular speed around Y axis (raw)
int16_t zgyro; ///< Angular speed around Z axis (raw)
int16_t xmag; ///< X Magnetic field (raw)
int16_t ymag; ///< Y Magnetic field (raw)
int16_t zmag; ///< Z Magnetic field (raw)
} mavlink_raw_imu_t;
 
#define MAVLINK_MSG_ID_RAW_IMU_LEN 26
#define MAVLINK_MSG_ID_27_LEN 26
 
 
 
#define MAVLINK_MESSAGE_INFO_RAW_IMU { \
"RAW_IMU", \
10, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_raw_imu_t, time_usec) }, \
{ "xacc", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_raw_imu_t, xacc) }, \
{ "yacc", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_raw_imu_t, yacc) }, \
{ "zacc", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_raw_imu_t, zacc) }, \
{ "xgyro", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_raw_imu_t, xgyro) }, \
{ "ygyro", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_raw_imu_t, ygyro) }, \
{ "zgyro", NULL, MAVLINK_TYPE_INT16_T, 0, 18, offsetof(mavlink_raw_imu_t, zgyro) }, \
{ "xmag", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_raw_imu_t, xmag) }, \
{ "ymag", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_raw_imu_t, ymag) }, \
{ "zmag", NULL, MAVLINK_TYPE_INT16_T, 0, 24, offsetof(mavlink_raw_imu_t, zmag) }, \
} \
}
 
 
/**
* @brief Pack a raw_imu message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param xacc X acceleration (raw)
* @param yacc Y acceleration (raw)
* @param zacc Z acceleration (raw)
* @param xgyro Angular speed around X axis (raw)
* @param ygyro Angular speed around Y axis (raw)
* @param zgyro Angular speed around Z axis (raw)
* @param xmag X Magnetic field (raw)
* @param ymag Y Magnetic field (raw)
* @param zmag Z Magnetic field (raw)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_raw_imu_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_usec, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int16_t(buf, 8, xacc);
_mav_put_int16_t(buf, 10, yacc);
_mav_put_int16_t(buf, 12, zacc);
_mav_put_int16_t(buf, 14, xgyro);
_mav_put_int16_t(buf, 16, ygyro);
_mav_put_int16_t(buf, 18, zgyro);
_mav_put_int16_t(buf, 20, xmag);
_mav_put_int16_t(buf, 22, ymag);
_mav_put_int16_t(buf, 24, zmag);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 26);
#else
mavlink_raw_imu_t packet;
packet.time_usec = time_usec;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
packet.xgyro = xgyro;
packet.ygyro = ygyro;
packet.zgyro = zgyro;
packet.xmag = xmag;
packet.ymag = ymag;
packet.zmag = zmag;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 26);
#endif
 
msg->msgid = MAVLINK_MSG_ID_RAW_IMU;
return mavlink_finalize_message(msg, system_id, component_id, 26, 144);
}
 
/**
* @brief Pack a raw_imu message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param xacc X acceleration (raw)
* @param yacc Y acceleration (raw)
* @param zacc Z acceleration (raw)
* @param xgyro Angular speed around X axis (raw)
* @param ygyro Angular speed around Y axis (raw)
* @param zgyro Angular speed around Z axis (raw)
* @param xmag X Magnetic field (raw)
* @param ymag Y Magnetic field (raw)
* @param zmag Z Magnetic field (raw)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_raw_imu_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_usec,int16_t xacc,int16_t yacc,int16_t zacc,int16_t xgyro,int16_t ygyro,int16_t zgyro,int16_t xmag,int16_t ymag,int16_t zmag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int16_t(buf, 8, xacc);
_mav_put_int16_t(buf, 10, yacc);
_mav_put_int16_t(buf, 12, zacc);
_mav_put_int16_t(buf, 14, xgyro);
_mav_put_int16_t(buf, 16, ygyro);
_mav_put_int16_t(buf, 18, zgyro);
_mav_put_int16_t(buf, 20, xmag);
_mav_put_int16_t(buf, 22, ymag);
_mav_put_int16_t(buf, 24, zmag);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 26);
#else
mavlink_raw_imu_t packet;
packet.time_usec = time_usec;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
packet.xgyro = xgyro;
packet.ygyro = ygyro;
packet.zgyro = zgyro;
packet.xmag = xmag;
packet.ymag = ymag;
packet.zmag = zmag;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 26);
#endif
 
msg->msgid = MAVLINK_MSG_ID_RAW_IMU;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 26, 144);
}
 
/**
* @brief Encode a raw_imu struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param raw_imu C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_raw_imu_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_raw_imu_t* raw_imu)
{
return mavlink_msg_raw_imu_pack(system_id, component_id, msg, raw_imu->time_usec, raw_imu->xacc, raw_imu->yacc, raw_imu->zacc, raw_imu->xgyro, raw_imu->ygyro, raw_imu->zgyro, raw_imu->xmag, raw_imu->ymag, raw_imu->zmag);
}
 
/**
* @brief Send a raw_imu message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param xacc X acceleration (raw)
* @param yacc Y acceleration (raw)
* @param zacc Z acceleration (raw)
* @param xgyro Angular speed around X axis (raw)
* @param ygyro Angular speed around Y axis (raw)
* @param zgyro Angular speed around Z axis (raw)
* @param xmag X Magnetic field (raw)
* @param ymag Y Magnetic field (raw)
* @param zmag Z Magnetic field (raw)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_raw_imu_send(mavlink_channel_t chan, uint64_t time_usec, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int16_t(buf, 8, xacc);
_mav_put_int16_t(buf, 10, yacc);
_mav_put_int16_t(buf, 12, zacc);
_mav_put_int16_t(buf, 14, xgyro);
_mav_put_int16_t(buf, 16, ygyro);
_mav_put_int16_t(buf, 18, zgyro);
_mav_put_int16_t(buf, 20, xmag);
_mav_put_int16_t(buf, 22, ymag);
_mav_put_int16_t(buf, 24, zmag);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_IMU, buf, 26, 144);
#else
mavlink_raw_imu_t packet;
packet.time_usec = time_usec;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
packet.xgyro = xgyro;
packet.ygyro = ygyro;
packet.zgyro = zgyro;
packet.xmag = xmag;
packet.ymag = ymag;
packet.zmag = zmag;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_IMU, (const char *)&packet, 26, 144);
#endif
}
 
#endif
 
// MESSAGE RAW_IMU UNPACKING
 
 
/**
* @brief Get field time_usec from raw_imu message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_raw_imu_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field xacc from raw_imu message
*
* @return X acceleration (raw)
*/
static inline int16_t mavlink_msg_raw_imu_get_xacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 8);
}
 
/**
* @brief Get field yacc from raw_imu message
*
* @return Y acceleration (raw)
*/
static inline int16_t mavlink_msg_raw_imu_get_yacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 10);
}
 
/**
* @brief Get field zacc from raw_imu message
*
* @return Z acceleration (raw)
*/
static inline int16_t mavlink_msg_raw_imu_get_zacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 12);
}
 
/**
* @brief Get field xgyro from raw_imu message
*
* @return Angular speed around X axis (raw)
*/
static inline int16_t mavlink_msg_raw_imu_get_xgyro(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 14);
}
 
/**
* @brief Get field ygyro from raw_imu message
*
* @return Angular speed around Y axis (raw)
*/
static inline int16_t mavlink_msg_raw_imu_get_ygyro(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 16);
}
 
/**
* @brief Get field zgyro from raw_imu message
*
* @return Angular speed around Z axis (raw)
*/
static inline int16_t mavlink_msg_raw_imu_get_zgyro(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 18);
}
 
/**
* @brief Get field xmag from raw_imu message
*
* @return X Magnetic field (raw)
*/
static inline int16_t mavlink_msg_raw_imu_get_xmag(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 20);
}
 
/**
* @brief Get field ymag from raw_imu message
*
* @return Y Magnetic field (raw)
*/
static inline int16_t mavlink_msg_raw_imu_get_ymag(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 22);
}
 
/**
* @brief Get field zmag from raw_imu message
*
* @return Z Magnetic field (raw)
*/
static inline int16_t mavlink_msg_raw_imu_get_zmag(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 24);
}
 
/**
* @brief Decode a raw_imu message into a struct
*
* @param msg The message to decode
* @param raw_imu C-struct to decode the message contents into
*/
static inline void mavlink_msg_raw_imu_decode(const mavlink_message_t* msg, mavlink_raw_imu_t* raw_imu)
{
#if MAVLINK_NEED_BYTE_SWAP
raw_imu->time_usec = mavlink_msg_raw_imu_get_time_usec(msg);
raw_imu->xacc = mavlink_msg_raw_imu_get_xacc(msg);
raw_imu->yacc = mavlink_msg_raw_imu_get_yacc(msg);
raw_imu->zacc = mavlink_msg_raw_imu_get_zacc(msg);
raw_imu->xgyro = mavlink_msg_raw_imu_get_xgyro(msg);
raw_imu->ygyro = mavlink_msg_raw_imu_get_ygyro(msg);
raw_imu->zgyro = mavlink_msg_raw_imu_get_zgyro(msg);
raw_imu->xmag = mavlink_msg_raw_imu_get_xmag(msg);
raw_imu->ymag = mavlink_msg_raw_imu_get_ymag(msg);
raw_imu->zmag = mavlink_msg_raw_imu_get_zmag(msg);
#else
memcpy(raw_imu, _MAV_PAYLOAD(msg), 26);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_raw_pressure.h
0,0 → 1,232
// MESSAGE RAW_PRESSURE PACKING
 
#define MAVLINK_MSG_ID_RAW_PRESSURE 28
 
typedef struct __mavlink_raw_pressure_t
{
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
int16_t press_abs; ///< Absolute pressure (raw)
int16_t press_diff1; ///< Differential pressure 1 (raw)
int16_t press_diff2; ///< Differential pressure 2 (raw)
int16_t temperature; ///< Raw Temperature measurement (raw)
} mavlink_raw_pressure_t;
 
#define MAVLINK_MSG_ID_RAW_PRESSURE_LEN 16
#define MAVLINK_MSG_ID_28_LEN 16
 
 
 
#define MAVLINK_MESSAGE_INFO_RAW_PRESSURE { \
"RAW_PRESSURE", \
5, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_raw_pressure_t, time_usec) }, \
{ "press_abs", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_raw_pressure_t, press_abs) }, \
{ "press_diff1", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_raw_pressure_t, press_diff1) }, \
{ "press_diff2", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_raw_pressure_t, press_diff2) }, \
{ "temperature", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_raw_pressure_t, temperature) }, \
} \
}
 
 
/**
* @brief Pack a raw_pressure message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param press_abs Absolute pressure (raw)
* @param press_diff1 Differential pressure 1 (raw)
* @param press_diff2 Differential pressure 2 (raw)
* @param temperature Raw Temperature measurement (raw)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_raw_pressure_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_usec, int16_t press_abs, int16_t press_diff1, int16_t press_diff2, int16_t temperature)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[16];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int16_t(buf, 8, press_abs);
_mav_put_int16_t(buf, 10, press_diff1);
_mav_put_int16_t(buf, 12, press_diff2);
_mav_put_int16_t(buf, 14, temperature);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 16);
#else
mavlink_raw_pressure_t packet;
packet.time_usec = time_usec;
packet.press_abs = press_abs;
packet.press_diff1 = press_diff1;
packet.press_diff2 = press_diff2;
packet.temperature = temperature;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 16);
#endif
 
msg->msgid = MAVLINK_MSG_ID_RAW_PRESSURE;
return mavlink_finalize_message(msg, system_id, component_id, 16, 67);
}
 
/**
* @brief Pack a raw_pressure message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param press_abs Absolute pressure (raw)
* @param press_diff1 Differential pressure 1 (raw)
* @param press_diff2 Differential pressure 2 (raw)
* @param temperature Raw Temperature measurement (raw)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_raw_pressure_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_usec,int16_t press_abs,int16_t press_diff1,int16_t press_diff2,int16_t temperature)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[16];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int16_t(buf, 8, press_abs);
_mav_put_int16_t(buf, 10, press_diff1);
_mav_put_int16_t(buf, 12, press_diff2);
_mav_put_int16_t(buf, 14, temperature);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 16);
#else
mavlink_raw_pressure_t packet;
packet.time_usec = time_usec;
packet.press_abs = press_abs;
packet.press_diff1 = press_diff1;
packet.press_diff2 = press_diff2;
packet.temperature = temperature;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 16);
#endif
 
msg->msgid = MAVLINK_MSG_ID_RAW_PRESSURE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 16, 67);
}
 
/**
* @brief Encode a raw_pressure struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param raw_pressure C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_raw_pressure_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_raw_pressure_t* raw_pressure)
{
return mavlink_msg_raw_pressure_pack(system_id, component_id, msg, raw_pressure->time_usec, raw_pressure->press_abs, raw_pressure->press_diff1, raw_pressure->press_diff2, raw_pressure->temperature);
}
 
/**
* @brief Send a raw_pressure message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param press_abs Absolute pressure (raw)
* @param press_diff1 Differential pressure 1 (raw)
* @param press_diff2 Differential pressure 2 (raw)
* @param temperature Raw Temperature measurement (raw)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_raw_pressure_send(mavlink_channel_t chan, uint64_t time_usec, int16_t press_abs, int16_t press_diff1, int16_t press_diff2, int16_t temperature)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[16];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int16_t(buf, 8, press_abs);
_mav_put_int16_t(buf, 10, press_diff1);
_mav_put_int16_t(buf, 12, press_diff2);
_mav_put_int16_t(buf, 14, temperature);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_PRESSURE, buf, 16, 67);
#else
mavlink_raw_pressure_t packet;
packet.time_usec = time_usec;
packet.press_abs = press_abs;
packet.press_diff1 = press_diff1;
packet.press_diff2 = press_diff2;
packet.temperature = temperature;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_PRESSURE, (const char *)&packet, 16, 67);
#endif
}
 
#endif
 
// MESSAGE RAW_PRESSURE UNPACKING
 
 
/**
* @brief Get field time_usec from raw_pressure message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_raw_pressure_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field press_abs from raw_pressure message
*
* @return Absolute pressure (raw)
*/
static inline int16_t mavlink_msg_raw_pressure_get_press_abs(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 8);
}
 
/**
* @brief Get field press_diff1 from raw_pressure message
*
* @return Differential pressure 1 (raw)
*/
static inline int16_t mavlink_msg_raw_pressure_get_press_diff1(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 10);
}
 
/**
* @brief Get field press_diff2 from raw_pressure message
*
* @return Differential pressure 2 (raw)
*/
static inline int16_t mavlink_msg_raw_pressure_get_press_diff2(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 12);
}
 
/**
* @brief Get field temperature from raw_pressure message
*
* @return Raw Temperature measurement (raw)
*/
static inline int16_t mavlink_msg_raw_pressure_get_temperature(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 14);
}
 
/**
* @brief Decode a raw_pressure message into a struct
*
* @param msg The message to decode
* @param raw_pressure C-struct to decode the message contents into
*/
static inline void mavlink_msg_raw_pressure_decode(const mavlink_message_t* msg, mavlink_raw_pressure_t* raw_pressure)
{
#if MAVLINK_NEED_BYTE_SWAP
raw_pressure->time_usec = mavlink_msg_raw_pressure_get_time_usec(msg);
raw_pressure->press_abs = mavlink_msg_raw_pressure_get_press_abs(msg);
raw_pressure->press_diff1 = mavlink_msg_raw_pressure_get_press_diff1(msg);
raw_pressure->press_diff2 = mavlink_msg_raw_pressure_get_press_diff2(msg);
raw_pressure->temperature = mavlink_msg_raw_pressure_get_temperature(msg);
#else
memcpy(raw_pressure, _MAV_PAYLOAD(msg), 16);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_rc_channels_override.h
0,0 → 1,342
// MESSAGE RC_CHANNELS_OVERRIDE PACKING
 
#define MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE 70
 
typedef struct __mavlink_rc_channels_override_t
{
uint16_t chan1_raw; ///< RC channel 1 value, in microseconds
uint16_t chan2_raw; ///< RC channel 2 value, in microseconds
uint16_t chan3_raw; ///< RC channel 3 value, in microseconds
uint16_t chan4_raw; ///< RC channel 4 value, in microseconds
uint16_t chan5_raw; ///< RC channel 5 value, in microseconds
uint16_t chan6_raw; ///< RC channel 6 value, in microseconds
uint16_t chan7_raw; ///< RC channel 7 value, in microseconds
uint16_t chan8_raw; ///< RC channel 8 value, in microseconds
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_rc_channels_override_t;
 
#define MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN 18
#define MAVLINK_MSG_ID_70_LEN 18
 
 
 
#define MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE { \
"RC_CHANNELS_OVERRIDE", \
10, \
{ { "chan1_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_rc_channels_override_t, chan1_raw) }, \
{ "chan2_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_rc_channels_override_t, chan2_raw) }, \
{ "chan3_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_rc_channels_override_t, chan3_raw) }, \
{ "chan4_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_rc_channels_override_t, chan4_raw) }, \
{ "chan5_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_rc_channels_override_t, chan5_raw) }, \
{ "chan6_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_rc_channels_override_t, chan6_raw) }, \
{ "chan7_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_rc_channels_override_t, chan7_raw) }, \
{ "chan8_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_rc_channels_override_t, chan8_raw) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_rc_channels_override_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_rc_channels_override_t, target_component) }, \
} \
}
 
 
/**
* @brief Pack a rc_channels_override message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_rc_channels_override_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_uint16_t(buf, 0, chan1_raw);
_mav_put_uint16_t(buf, 2, chan2_raw);
_mav_put_uint16_t(buf, 4, chan3_raw);
_mav_put_uint16_t(buf, 6, chan4_raw);
_mav_put_uint16_t(buf, 8, chan5_raw);
_mav_put_uint16_t(buf, 10, chan6_raw);
_mav_put_uint16_t(buf, 12, chan7_raw);
_mav_put_uint16_t(buf, 14, chan8_raw);
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
#else
mavlink_rc_channels_override_t packet;
packet.chan1_raw = chan1_raw;
packet.chan2_raw = chan2_raw;
packet.chan3_raw = chan3_raw;
packet.chan4_raw = chan4_raw;
packet.chan5_raw = chan5_raw;
packet.chan6_raw = chan6_raw;
packet.chan7_raw = chan7_raw;
packet.chan8_raw = chan8_raw;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
#endif
 
msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE;
return mavlink_finalize_message(msg, system_id, component_id, 18, 124);
}
 
/**
* @brief Pack a rc_channels_override message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_rc_channels_override_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint16_t chan1_raw,uint16_t chan2_raw,uint16_t chan3_raw,uint16_t chan4_raw,uint16_t chan5_raw,uint16_t chan6_raw,uint16_t chan7_raw,uint16_t chan8_raw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_uint16_t(buf, 0, chan1_raw);
_mav_put_uint16_t(buf, 2, chan2_raw);
_mav_put_uint16_t(buf, 4, chan3_raw);
_mav_put_uint16_t(buf, 6, chan4_raw);
_mav_put_uint16_t(buf, 8, chan5_raw);
_mav_put_uint16_t(buf, 10, chan6_raw);
_mav_put_uint16_t(buf, 12, chan7_raw);
_mav_put_uint16_t(buf, 14, chan8_raw);
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
#else
mavlink_rc_channels_override_t packet;
packet.chan1_raw = chan1_raw;
packet.chan2_raw = chan2_raw;
packet.chan3_raw = chan3_raw;
packet.chan4_raw = chan4_raw;
packet.chan5_raw = chan5_raw;
packet.chan6_raw = chan6_raw;
packet.chan7_raw = chan7_raw;
packet.chan8_raw = chan8_raw;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
#endif
 
msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 18, 124);
}
 
/**
* @brief Encode a rc_channels_override struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param rc_channels_override C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_rc_channels_override_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_rc_channels_override_t* rc_channels_override)
{
return mavlink_msg_rc_channels_override_pack(system_id, component_id, msg, rc_channels_override->target_system, rc_channels_override->target_component, rc_channels_override->chan1_raw, rc_channels_override->chan2_raw, rc_channels_override->chan3_raw, rc_channels_override->chan4_raw, rc_channels_override->chan5_raw, rc_channels_override->chan6_raw, rc_channels_override->chan7_raw, rc_channels_override->chan8_raw);
}
 
/**
* @brief Send a rc_channels_override message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_rc_channels_override_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_uint16_t(buf, 0, chan1_raw);
_mav_put_uint16_t(buf, 2, chan2_raw);
_mav_put_uint16_t(buf, 4, chan3_raw);
_mav_put_uint16_t(buf, 6, chan4_raw);
_mav_put_uint16_t(buf, 8, chan5_raw);
_mav_put_uint16_t(buf, 10, chan6_raw);
_mav_put_uint16_t(buf, 12, chan7_raw);
_mav_put_uint16_t(buf, 14, chan8_raw);
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, buf, 18, 124);
#else
mavlink_rc_channels_override_t packet;
packet.chan1_raw = chan1_raw;
packet.chan2_raw = chan2_raw;
packet.chan3_raw = chan3_raw;
packet.chan4_raw = chan4_raw;
packet.chan5_raw = chan5_raw;
packet.chan6_raw = chan6_raw;
packet.chan7_raw = chan7_raw;
packet.chan8_raw = chan8_raw;
packet.target_system = target_system;
packet.target_component = target_component;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, (const char *)&packet, 18, 124);
#endif
}
 
#endif
 
// MESSAGE RC_CHANNELS_OVERRIDE UNPACKING
 
 
/**
* @brief Get field target_system from rc_channels_override message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_rc_channels_override_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 16);
}
 
/**
* @brief Get field target_component from rc_channels_override message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_rc_channels_override_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 17);
}
 
/**
* @brief Get field chan1_raw from rc_channels_override message
*
* @return RC channel 1 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan1_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
 
/**
* @brief Get field chan2_raw from rc_channels_override message
*
* @return RC channel 2 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan2_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 2);
}
 
/**
* @brief Get field chan3_raw from rc_channels_override message
*
* @return RC channel 3 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan3_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 4);
}
 
/**
* @brief Get field chan4_raw from rc_channels_override message
*
* @return RC channel 4 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan4_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 6);
}
 
/**
* @brief Get field chan5_raw from rc_channels_override message
*
* @return RC channel 5 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan5_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 8);
}
 
/**
* @brief Get field chan6_raw from rc_channels_override message
*
* @return RC channel 6 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan6_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 10);
}
 
/**
* @brief Get field chan7_raw from rc_channels_override message
*
* @return RC channel 7 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan7_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 12);
}
 
/**
* @brief Get field chan8_raw from rc_channels_override message
*
* @return RC channel 8 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan8_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 14);
}
 
/**
* @brief Decode a rc_channels_override message into a struct
*
* @param msg The message to decode
* @param rc_channels_override C-struct to decode the message contents into
*/
static inline void mavlink_msg_rc_channels_override_decode(const mavlink_message_t* msg, mavlink_rc_channels_override_t* rc_channels_override)
{
#if MAVLINK_NEED_BYTE_SWAP
rc_channels_override->chan1_raw = mavlink_msg_rc_channels_override_get_chan1_raw(msg);
rc_channels_override->chan2_raw = mavlink_msg_rc_channels_override_get_chan2_raw(msg);
rc_channels_override->chan3_raw = mavlink_msg_rc_channels_override_get_chan3_raw(msg);
rc_channels_override->chan4_raw = mavlink_msg_rc_channels_override_get_chan4_raw(msg);
rc_channels_override->chan5_raw = mavlink_msg_rc_channels_override_get_chan5_raw(msg);
rc_channels_override->chan6_raw = mavlink_msg_rc_channels_override_get_chan6_raw(msg);
rc_channels_override->chan7_raw = mavlink_msg_rc_channels_override_get_chan7_raw(msg);
rc_channels_override->chan8_raw = mavlink_msg_rc_channels_override_get_chan8_raw(msg);
rc_channels_override->target_system = mavlink_msg_rc_channels_override_get_target_system(msg);
rc_channels_override->target_component = mavlink_msg_rc_channels_override_get_target_component(msg);
#else
memcpy(rc_channels_override, _MAV_PAYLOAD(msg), 18);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_rc_channels_raw.h
0,0 → 1,364
// MESSAGE RC_CHANNELS_RAW PACKING
 
#define MAVLINK_MSG_ID_RC_CHANNELS_RAW 35
 
typedef struct __mavlink_rc_channels_raw_t
{
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
uint16_t chan1_raw; ///< RC channel 1 value, in microseconds
uint16_t chan2_raw; ///< RC channel 2 value, in microseconds
uint16_t chan3_raw; ///< RC channel 3 value, in microseconds
uint16_t chan4_raw; ///< RC channel 4 value, in microseconds
uint16_t chan5_raw; ///< RC channel 5 value, in microseconds
uint16_t chan6_raw; ///< RC channel 6 value, in microseconds
uint16_t chan7_raw; ///< RC channel 7 value, in microseconds
uint16_t chan8_raw; ///< RC channel 8 value, in microseconds
uint8_t port; ///< Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
uint8_t rssi; ///< Receive signal strength indicator, 0: 0%, 255: 100%
} mavlink_rc_channels_raw_t;
 
#define MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN 22
#define MAVLINK_MSG_ID_35_LEN 22
 
 
 
#define MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW { \
"RC_CHANNELS_RAW", \
11, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_rc_channels_raw_t, time_boot_ms) }, \
{ "chan1_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_rc_channels_raw_t, chan1_raw) }, \
{ "chan2_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_rc_channels_raw_t, chan2_raw) }, \
{ "chan3_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_rc_channels_raw_t, chan3_raw) }, \
{ "chan4_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_rc_channels_raw_t, chan4_raw) }, \
{ "chan5_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_rc_channels_raw_t, chan5_raw) }, \
{ "chan6_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_rc_channels_raw_t, chan6_raw) }, \
{ "chan7_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_rc_channels_raw_t, chan7_raw) }, \
{ "chan8_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_rc_channels_raw_t, chan8_raw) }, \
{ "port", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_rc_channels_raw_t, port) }, \
{ "rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 21, offsetof(mavlink_rc_channels_raw_t, rssi) }, \
} \
}
 
 
/**
* @brief Pack a rc_channels_raw message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_rc_channels_raw_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, uint8_t port, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_uint16_t(buf, 4, chan1_raw);
_mav_put_uint16_t(buf, 6, chan2_raw);
_mav_put_uint16_t(buf, 8, chan3_raw);
_mav_put_uint16_t(buf, 10, chan4_raw);
_mav_put_uint16_t(buf, 12, chan5_raw);
_mav_put_uint16_t(buf, 14, chan6_raw);
_mav_put_uint16_t(buf, 16, chan7_raw);
_mav_put_uint16_t(buf, 18, chan8_raw);
_mav_put_uint8_t(buf, 20, port);
_mav_put_uint8_t(buf, 21, rssi);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
#else
mavlink_rc_channels_raw_t packet;
packet.time_boot_ms = time_boot_ms;
packet.chan1_raw = chan1_raw;
packet.chan2_raw = chan2_raw;
packet.chan3_raw = chan3_raw;
packet.chan4_raw = chan4_raw;
packet.chan5_raw = chan5_raw;
packet.chan6_raw = chan6_raw;
packet.chan7_raw = chan7_raw;
packet.chan8_raw = chan8_raw;
packet.port = port;
packet.rssi = rssi;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
#endif
 
msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_RAW;
return mavlink_finalize_message(msg, system_id, component_id, 22, 244);
}
 
/**
* @brief Pack a rc_channels_raw message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_rc_channels_raw_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,uint8_t port,uint16_t chan1_raw,uint16_t chan2_raw,uint16_t chan3_raw,uint16_t chan4_raw,uint16_t chan5_raw,uint16_t chan6_raw,uint16_t chan7_raw,uint16_t chan8_raw,uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_uint16_t(buf, 4, chan1_raw);
_mav_put_uint16_t(buf, 6, chan2_raw);
_mav_put_uint16_t(buf, 8, chan3_raw);
_mav_put_uint16_t(buf, 10, chan4_raw);
_mav_put_uint16_t(buf, 12, chan5_raw);
_mav_put_uint16_t(buf, 14, chan6_raw);
_mav_put_uint16_t(buf, 16, chan7_raw);
_mav_put_uint16_t(buf, 18, chan8_raw);
_mav_put_uint8_t(buf, 20, port);
_mav_put_uint8_t(buf, 21, rssi);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
#else
mavlink_rc_channels_raw_t packet;
packet.time_boot_ms = time_boot_ms;
packet.chan1_raw = chan1_raw;
packet.chan2_raw = chan2_raw;
packet.chan3_raw = chan3_raw;
packet.chan4_raw = chan4_raw;
packet.chan5_raw = chan5_raw;
packet.chan6_raw = chan6_raw;
packet.chan7_raw = chan7_raw;
packet.chan8_raw = chan8_raw;
packet.port = port;
packet.rssi = rssi;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
#endif
 
msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_RAW;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 22, 244);
}
 
/**
* @brief Encode a rc_channels_raw struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param rc_channels_raw C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_rc_channels_raw_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_rc_channels_raw_t* rc_channels_raw)
{
return mavlink_msg_rc_channels_raw_pack(system_id, component_id, msg, rc_channels_raw->time_boot_ms, rc_channels_raw->port, rc_channels_raw->chan1_raw, rc_channels_raw->chan2_raw, rc_channels_raw->chan3_raw, rc_channels_raw->chan4_raw, rc_channels_raw->chan5_raw, rc_channels_raw->chan6_raw, rc_channels_raw->chan7_raw, rc_channels_raw->chan8_raw, rc_channels_raw->rssi);
}
 
/**
* @brief Send a rc_channels_raw message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_rc_channels_raw_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t port, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_uint16_t(buf, 4, chan1_raw);
_mav_put_uint16_t(buf, 6, chan2_raw);
_mav_put_uint16_t(buf, 8, chan3_raw);
_mav_put_uint16_t(buf, 10, chan4_raw);
_mav_put_uint16_t(buf, 12, chan5_raw);
_mav_put_uint16_t(buf, 14, chan6_raw);
_mav_put_uint16_t(buf, 16, chan7_raw);
_mav_put_uint16_t(buf, 18, chan8_raw);
_mav_put_uint8_t(buf, 20, port);
_mav_put_uint8_t(buf, 21, rssi);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_RAW, buf, 22, 244);
#else
mavlink_rc_channels_raw_t packet;
packet.time_boot_ms = time_boot_ms;
packet.chan1_raw = chan1_raw;
packet.chan2_raw = chan2_raw;
packet.chan3_raw = chan3_raw;
packet.chan4_raw = chan4_raw;
packet.chan5_raw = chan5_raw;
packet.chan6_raw = chan6_raw;
packet.chan7_raw = chan7_raw;
packet.chan8_raw = chan8_raw;
packet.port = port;
packet.rssi = rssi;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_RAW, (const char *)&packet, 22, 244);
#endif
}
 
#endif
 
// MESSAGE RC_CHANNELS_RAW UNPACKING
 
 
/**
* @brief Get field time_boot_ms from rc_channels_raw message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_rc_channels_raw_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field port from rc_channels_raw message
*
* @return Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
*/
static inline uint8_t mavlink_msg_rc_channels_raw_get_port(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 20);
}
 
/**
* @brief Get field chan1_raw from rc_channels_raw message
*
* @return RC channel 1 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan1_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 4);
}
 
/**
* @brief Get field chan2_raw from rc_channels_raw message
*
* @return RC channel 2 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan2_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 6);
}
 
/**
* @brief Get field chan3_raw from rc_channels_raw message
*
* @return RC channel 3 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan3_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 8);
}
 
/**
* @brief Get field chan4_raw from rc_channels_raw message
*
* @return RC channel 4 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan4_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 10);
}
 
/**
* @brief Get field chan5_raw from rc_channels_raw message
*
* @return RC channel 5 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan5_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 12);
}
 
/**
* @brief Get field chan6_raw from rc_channels_raw message
*
* @return RC channel 6 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan6_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 14);
}
 
/**
* @brief Get field chan7_raw from rc_channels_raw message
*
* @return RC channel 7 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan7_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 16);
}
 
/**
* @brief Get field chan8_raw from rc_channels_raw message
*
* @return RC channel 8 value, in microseconds
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan8_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 18);
}
 
/**
* @brief Get field rssi from rc_channels_raw message
*
* @return Receive signal strength indicator, 0: 0%, 255: 100%
*/
static inline uint8_t mavlink_msg_rc_channels_raw_get_rssi(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 21);
}
 
/**
* @brief Decode a rc_channels_raw message into a struct
*
* @param msg The message to decode
* @param rc_channels_raw C-struct to decode the message contents into
*/
static inline void mavlink_msg_rc_channels_raw_decode(const mavlink_message_t* msg, mavlink_rc_channels_raw_t* rc_channels_raw)
{
#if MAVLINK_NEED_BYTE_SWAP
rc_channels_raw->time_boot_ms = mavlink_msg_rc_channels_raw_get_time_boot_ms(msg);
rc_channels_raw->chan1_raw = mavlink_msg_rc_channels_raw_get_chan1_raw(msg);
rc_channels_raw->chan2_raw = mavlink_msg_rc_channels_raw_get_chan2_raw(msg);
rc_channels_raw->chan3_raw = mavlink_msg_rc_channels_raw_get_chan3_raw(msg);
rc_channels_raw->chan4_raw = mavlink_msg_rc_channels_raw_get_chan4_raw(msg);
rc_channels_raw->chan5_raw = mavlink_msg_rc_channels_raw_get_chan5_raw(msg);
rc_channels_raw->chan6_raw = mavlink_msg_rc_channels_raw_get_chan6_raw(msg);
rc_channels_raw->chan7_raw = mavlink_msg_rc_channels_raw_get_chan7_raw(msg);
rc_channels_raw->chan8_raw = mavlink_msg_rc_channels_raw_get_chan8_raw(msg);
rc_channels_raw->port = mavlink_msg_rc_channels_raw_get_port(msg);
rc_channels_raw->rssi = mavlink_msg_rc_channels_raw_get_rssi(msg);
#else
memcpy(rc_channels_raw, _MAV_PAYLOAD(msg), 22);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_rc_channels_scaled.h
0,0 → 1,364
// MESSAGE RC_CHANNELS_SCALED PACKING
 
#define MAVLINK_MSG_ID_RC_CHANNELS_SCALED 34
 
typedef struct __mavlink_rc_channels_scaled_t
{
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
int16_t chan1_scaled; ///< RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
int16_t chan2_scaled; ///< RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
int16_t chan3_scaled; ///< RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
int16_t chan4_scaled; ///< RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
int16_t chan5_scaled; ///< RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
int16_t chan6_scaled; ///< RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
int16_t chan7_scaled; ///< RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
int16_t chan8_scaled; ///< RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
uint8_t port; ///< Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
uint8_t rssi; ///< Receive signal strength indicator, 0: 0%, 255: 100%
} mavlink_rc_channels_scaled_t;
 
#define MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN 22
#define MAVLINK_MSG_ID_34_LEN 22
 
 
 
#define MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED { \
"RC_CHANNELS_SCALED", \
11, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_rc_channels_scaled_t, time_boot_ms) }, \
{ "chan1_scaled", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_rc_channels_scaled_t, chan1_scaled) }, \
{ "chan2_scaled", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_rc_channels_scaled_t, chan2_scaled) }, \
{ "chan3_scaled", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_rc_channels_scaled_t, chan3_scaled) }, \
{ "chan4_scaled", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_rc_channels_scaled_t, chan4_scaled) }, \
{ "chan5_scaled", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_rc_channels_scaled_t, chan5_scaled) }, \
{ "chan6_scaled", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_rc_channels_scaled_t, chan6_scaled) }, \
{ "chan7_scaled", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_rc_channels_scaled_t, chan7_scaled) }, \
{ "chan8_scaled", NULL, MAVLINK_TYPE_INT16_T, 0, 18, offsetof(mavlink_rc_channels_scaled_t, chan8_scaled) }, \
{ "port", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_rc_channels_scaled_t, port) }, \
{ "rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 21, offsetof(mavlink_rc_channels_scaled_t, rssi) }, \
} \
}
 
 
/**
* @brief Pack a rc_channels_scaled message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
* @param chan1_scaled RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan2_scaled RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan3_scaled RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan4_scaled RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan5_scaled RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan6_scaled RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan7_scaled RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan8_scaled RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_rc_channels_scaled_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, uint8_t port, int16_t chan1_scaled, int16_t chan2_scaled, int16_t chan3_scaled, int16_t chan4_scaled, int16_t chan5_scaled, int16_t chan6_scaled, int16_t chan7_scaled, int16_t chan8_scaled, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int16_t(buf, 4, chan1_scaled);
_mav_put_int16_t(buf, 6, chan2_scaled);
_mav_put_int16_t(buf, 8, chan3_scaled);
_mav_put_int16_t(buf, 10, chan4_scaled);
_mav_put_int16_t(buf, 12, chan5_scaled);
_mav_put_int16_t(buf, 14, chan6_scaled);
_mav_put_int16_t(buf, 16, chan7_scaled);
_mav_put_int16_t(buf, 18, chan8_scaled);
_mav_put_uint8_t(buf, 20, port);
_mav_put_uint8_t(buf, 21, rssi);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
#else
mavlink_rc_channels_scaled_t packet;
packet.time_boot_ms = time_boot_ms;
packet.chan1_scaled = chan1_scaled;
packet.chan2_scaled = chan2_scaled;
packet.chan3_scaled = chan3_scaled;
packet.chan4_scaled = chan4_scaled;
packet.chan5_scaled = chan5_scaled;
packet.chan6_scaled = chan6_scaled;
packet.chan7_scaled = chan7_scaled;
packet.chan8_scaled = chan8_scaled;
packet.port = port;
packet.rssi = rssi;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
#endif
 
msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_SCALED;
return mavlink_finalize_message(msg, system_id, component_id, 22, 237);
}
 
/**
* @brief Pack a rc_channels_scaled message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
* @param chan1_scaled RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan2_scaled RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan3_scaled RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan4_scaled RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan5_scaled RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan6_scaled RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan7_scaled RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan8_scaled RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_rc_channels_scaled_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,uint8_t port,int16_t chan1_scaled,int16_t chan2_scaled,int16_t chan3_scaled,int16_t chan4_scaled,int16_t chan5_scaled,int16_t chan6_scaled,int16_t chan7_scaled,int16_t chan8_scaled,uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int16_t(buf, 4, chan1_scaled);
_mav_put_int16_t(buf, 6, chan2_scaled);
_mav_put_int16_t(buf, 8, chan3_scaled);
_mav_put_int16_t(buf, 10, chan4_scaled);
_mav_put_int16_t(buf, 12, chan5_scaled);
_mav_put_int16_t(buf, 14, chan6_scaled);
_mav_put_int16_t(buf, 16, chan7_scaled);
_mav_put_int16_t(buf, 18, chan8_scaled);
_mav_put_uint8_t(buf, 20, port);
_mav_put_uint8_t(buf, 21, rssi);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
#else
mavlink_rc_channels_scaled_t packet;
packet.time_boot_ms = time_boot_ms;
packet.chan1_scaled = chan1_scaled;
packet.chan2_scaled = chan2_scaled;
packet.chan3_scaled = chan3_scaled;
packet.chan4_scaled = chan4_scaled;
packet.chan5_scaled = chan5_scaled;
packet.chan6_scaled = chan6_scaled;
packet.chan7_scaled = chan7_scaled;
packet.chan8_scaled = chan8_scaled;
packet.port = port;
packet.rssi = rssi;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
#endif
 
msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_SCALED;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 22, 237);
}
 
/**
* @brief Encode a rc_channels_scaled struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param rc_channels_scaled C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_rc_channels_scaled_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_rc_channels_scaled_t* rc_channels_scaled)
{
return mavlink_msg_rc_channels_scaled_pack(system_id, component_id, msg, rc_channels_scaled->time_boot_ms, rc_channels_scaled->port, rc_channels_scaled->chan1_scaled, rc_channels_scaled->chan2_scaled, rc_channels_scaled->chan3_scaled, rc_channels_scaled->chan4_scaled, rc_channels_scaled->chan5_scaled, rc_channels_scaled->chan6_scaled, rc_channels_scaled->chan7_scaled, rc_channels_scaled->chan8_scaled, rc_channels_scaled->rssi);
}
 
/**
* @brief Send a rc_channels_scaled message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
* @param chan1_scaled RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan2_scaled RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan3_scaled RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan4_scaled RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan5_scaled RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan6_scaled RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan7_scaled RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param chan8_scaled RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
* @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_rc_channels_scaled_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t port, int16_t chan1_scaled, int16_t chan2_scaled, int16_t chan3_scaled, int16_t chan4_scaled, int16_t chan5_scaled, int16_t chan6_scaled, int16_t chan7_scaled, int16_t chan8_scaled, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int16_t(buf, 4, chan1_scaled);
_mav_put_int16_t(buf, 6, chan2_scaled);
_mav_put_int16_t(buf, 8, chan3_scaled);
_mav_put_int16_t(buf, 10, chan4_scaled);
_mav_put_int16_t(buf, 12, chan5_scaled);
_mav_put_int16_t(buf, 14, chan6_scaled);
_mav_put_int16_t(buf, 16, chan7_scaled);
_mav_put_int16_t(buf, 18, chan8_scaled);
_mav_put_uint8_t(buf, 20, port);
_mav_put_uint8_t(buf, 21, rssi);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_SCALED, buf, 22, 237);
#else
mavlink_rc_channels_scaled_t packet;
packet.time_boot_ms = time_boot_ms;
packet.chan1_scaled = chan1_scaled;
packet.chan2_scaled = chan2_scaled;
packet.chan3_scaled = chan3_scaled;
packet.chan4_scaled = chan4_scaled;
packet.chan5_scaled = chan5_scaled;
packet.chan6_scaled = chan6_scaled;
packet.chan7_scaled = chan7_scaled;
packet.chan8_scaled = chan8_scaled;
packet.port = port;
packet.rssi = rssi;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_SCALED, (const char *)&packet, 22, 237);
#endif
}
 
#endif
 
// MESSAGE RC_CHANNELS_SCALED UNPACKING
 
 
/**
* @brief Get field time_boot_ms from rc_channels_scaled message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_rc_channels_scaled_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field port from rc_channels_scaled message
*
* @return Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
*/
static inline uint8_t mavlink_msg_rc_channels_scaled_get_port(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 20);
}
 
/**
* @brief Get field chan1_scaled from rc_channels_scaled message
*
* @return RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan1_scaled(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 4);
}
 
/**
* @brief Get field chan2_scaled from rc_channels_scaled message
*
* @return RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan2_scaled(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 6);
}
 
/**
* @brief Get field chan3_scaled from rc_channels_scaled message
*
* @return RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan3_scaled(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 8);
}
 
/**
* @brief Get field chan4_scaled from rc_channels_scaled message
*
* @return RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan4_scaled(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 10);
}
 
/**
* @brief Get field chan5_scaled from rc_channels_scaled message
*
* @return RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan5_scaled(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 12);
}
 
/**
* @brief Get field chan6_scaled from rc_channels_scaled message
*
* @return RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan6_scaled(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 14);
}
 
/**
* @brief Get field chan7_scaled from rc_channels_scaled message
*
* @return RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan7_scaled(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 16);
}
 
/**
* @brief Get field chan8_scaled from rc_channels_scaled message
*
* @return RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan8_scaled(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 18);
}
 
/**
* @brief Get field rssi from rc_channels_scaled message
*
* @return Receive signal strength indicator, 0: 0%, 255: 100%
*/
static inline uint8_t mavlink_msg_rc_channels_scaled_get_rssi(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 21);
}
 
/**
* @brief Decode a rc_channels_scaled message into a struct
*
* @param msg The message to decode
* @param rc_channels_scaled C-struct to decode the message contents into
*/
static inline void mavlink_msg_rc_channels_scaled_decode(const mavlink_message_t* msg, mavlink_rc_channels_scaled_t* rc_channels_scaled)
{
#if MAVLINK_NEED_BYTE_SWAP
rc_channels_scaled->time_boot_ms = mavlink_msg_rc_channels_scaled_get_time_boot_ms(msg);
rc_channels_scaled->chan1_scaled = mavlink_msg_rc_channels_scaled_get_chan1_scaled(msg);
rc_channels_scaled->chan2_scaled = mavlink_msg_rc_channels_scaled_get_chan2_scaled(msg);
rc_channels_scaled->chan3_scaled = mavlink_msg_rc_channels_scaled_get_chan3_scaled(msg);
rc_channels_scaled->chan4_scaled = mavlink_msg_rc_channels_scaled_get_chan4_scaled(msg);
rc_channels_scaled->chan5_scaled = mavlink_msg_rc_channels_scaled_get_chan5_scaled(msg);
rc_channels_scaled->chan6_scaled = mavlink_msg_rc_channels_scaled_get_chan6_scaled(msg);
rc_channels_scaled->chan7_scaled = mavlink_msg_rc_channels_scaled_get_chan7_scaled(msg);
rc_channels_scaled->chan8_scaled = mavlink_msg_rc_channels_scaled_get_chan8_scaled(msg);
rc_channels_scaled->port = mavlink_msg_rc_channels_scaled_get_port(msg);
rc_channels_scaled->rssi = mavlink_msg_rc_channels_scaled_get_rssi(msg);
#else
memcpy(rc_channels_scaled, _MAV_PAYLOAD(msg), 22);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_request_data_stream.h
0,0 → 1,232
// MESSAGE REQUEST_DATA_STREAM PACKING
 
#define MAVLINK_MSG_ID_REQUEST_DATA_STREAM 66
 
typedef struct __mavlink_request_data_stream_t
{
uint16_t req_message_rate; ///< The requested interval between two messages of this type
uint8_t target_system; ///< The target requested to send the message stream.
uint8_t target_component; ///< The target requested to send the message stream.
uint8_t req_stream_id; ///< The ID of the requested data stream
uint8_t start_stop; ///< 1 to start sending, 0 to stop sending.
} mavlink_request_data_stream_t;
 
#define MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN 6
#define MAVLINK_MSG_ID_66_LEN 6
 
 
 
#define MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM { \
"REQUEST_DATA_STREAM", \
5, \
{ { "req_message_rate", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_request_data_stream_t, req_message_rate) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_request_data_stream_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_request_data_stream_t, target_component) }, \
{ "req_stream_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_request_data_stream_t, req_stream_id) }, \
{ "start_stop", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_request_data_stream_t, start_stop) }, \
} \
}
 
 
/**
* @brief Pack a request_data_stream message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system The target requested to send the message stream.
* @param target_component The target requested to send the message stream.
* @param req_stream_id The ID of the requested data stream
* @param req_message_rate The requested interval between two messages of this type
* @param start_stop 1 to start sending, 0 to stop sending.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_request_data_stream_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint8_t req_stream_id, uint16_t req_message_rate, uint8_t start_stop)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_uint16_t(buf, 0, req_message_rate);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_put_uint8_t(buf, 4, req_stream_id);
_mav_put_uint8_t(buf, 5, start_stop);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
#else
mavlink_request_data_stream_t packet;
packet.req_message_rate = req_message_rate;
packet.target_system = target_system;
packet.target_component = target_component;
packet.req_stream_id = req_stream_id;
packet.start_stop = start_stop;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
#endif
 
msg->msgid = MAVLINK_MSG_ID_REQUEST_DATA_STREAM;
return mavlink_finalize_message(msg, system_id, component_id, 6, 148);
}
 
/**
* @brief Pack a request_data_stream message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system The target requested to send the message stream.
* @param target_component The target requested to send the message stream.
* @param req_stream_id The ID of the requested data stream
* @param req_message_rate The requested interval between two messages of this type
* @param start_stop 1 to start sending, 0 to stop sending.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_request_data_stream_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint8_t req_stream_id,uint16_t req_message_rate,uint8_t start_stop)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_uint16_t(buf, 0, req_message_rate);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_put_uint8_t(buf, 4, req_stream_id);
_mav_put_uint8_t(buf, 5, start_stop);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
#else
mavlink_request_data_stream_t packet;
packet.req_message_rate = req_message_rate;
packet.target_system = target_system;
packet.target_component = target_component;
packet.req_stream_id = req_stream_id;
packet.start_stop = start_stop;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
#endif
 
msg->msgid = MAVLINK_MSG_ID_REQUEST_DATA_STREAM;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 6, 148);
}
 
/**
* @brief Encode a request_data_stream struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param request_data_stream C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_request_data_stream_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_request_data_stream_t* request_data_stream)
{
return mavlink_msg_request_data_stream_pack(system_id, component_id, msg, request_data_stream->target_system, request_data_stream->target_component, request_data_stream->req_stream_id, request_data_stream->req_message_rate, request_data_stream->start_stop);
}
 
/**
* @brief Send a request_data_stream message
* @param chan MAVLink channel to send the message
*
* @param target_system The target requested to send the message stream.
* @param target_component The target requested to send the message stream.
* @param req_stream_id The ID of the requested data stream
* @param req_message_rate The requested interval between two messages of this type
* @param start_stop 1 to start sending, 0 to stop sending.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_request_data_stream_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t req_stream_id, uint16_t req_message_rate, uint8_t start_stop)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_uint16_t(buf, 0, req_message_rate);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_put_uint8_t(buf, 4, req_stream_id);
_mav_put_uint8_t(buf, 5, start_stop);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REQUEST_DATA_STREAM, buf, 6, 148);
#else
mavlink_request_data_stream_t packet;
packet.req_message_rate = req_message_rate;
packet.target_system = target_system;
packet.target_component = target_component;
packet.req_stream_id = req_stream_id;
packet.start_stop = start_stop;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REQUEST_DATA_STREAM, (const char *)&packet, 6, 148);
#endif
}
 
#endif
 
// MESSAGE REQUEST_DATA_STREAM UNPACKING
 
 
/**
* @brief Get field target_system from request_data_stream message
*
* @return The target requested to send the message stream.
*/
static inline uint8_t mavlink_msg_request_data_stream_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
 
/**
* @brief Get field target_component from request_data_stream message
*
* @return The target requested to send the message stream.
*/
static inline uint8_t mavlink_msg_request_data_stream_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
 
/**
* @brief Get field req_stream_id from request_data_stream message
*
* @return The ID of the requested data stream
*/
static inline uint8_t mavlink_msg_request_data_stream_get_req_stream_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
 
/**
* @brief Get field req_message_rate from request_data_stream message
*
* @return The requested interval between two messages of this type
*/
static inline uint16_t mavlink_msg_request_data_stream_get_req_message_rate(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
 
/**
* @brief Get field start_stop from request_data_stream message
*
* @return 1 to start sending, 0 to stop sending.
*/
static inline uint8_t mavlink_msg_request_data_stream_get_start_stop(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
 
/**
* @brief Decode a request_data_stream message into a struct
*
* @param msg The message to decode
* @param request_data_stream C-struct to decode the message contents into
*/
static inline void mavlink_msg_request_data_stream_decode(const mavlink_message_t* msg, mavlink_request_data_stream_t* request_data_stream)
{
#if MAVLINK_NEED_BYTE_SWAP
request_data_stream->req_message_rate = mavlink_msg_request_data_stream_get_req_message_rate(msg);
request_data_stream->target_system = mavlink_msg_request_data_stream_get_target_system(msg);
request_data_stream->target_component = mavlink_msg_request_data_stream_get_target_component(msg);
request_data_stream->req_stream_id = mavlink_msg_request_data_stream_get_req_stream_id(msg);
request_data_stream->start_stop = mavlink_msg_request_data_stream_get_start_stop(msg);
#else
memcpy(request_data_stream, _MAV_PAYLOAD(msg), 6);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint.h
0,0 → 1,232
// MESSAGE ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT PACKING
 
#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT 59
 
typedef struct __mavlink_roll_pitch_yaw_speed_thrust_setpoint_t
{
uint32_t time_boot_ms; ///< Timestamp in milliseconds since system boot
float roll_speed; ///< Desired roll angular speed in rad/s
float pitch_speed; ///< Desired pitch angular speed in rad/s
float yaw_speed; ///< Desired yaw angular speed in rad/s
float thrust; ///< Collective thrust, normalized to 0 .. 1
} mavlink_roll_pitch_yaw_speed_thrust_setpoint_t;
 
#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN 20
#define MAVLINK_MSG_ID_59_LEN 20
 
 
 
#define MAVLINK_MESSAGE_INFO_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT { \
"ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT", \
5, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_roll_pitch_yaw_speed_thrust_setpoint_t, time_boot_ms) }, \
{ "roll_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_roll_pitch_yaw_speed_thrust_setpoint_t, roll_speed) }, \
{ "pitch_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_roll_pitch_yaw_speed_thrust_setpoint_t, pitch_speed) }, \
{ "yaw_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_roll_pitch_yaw_speed_thrust_setpoint_t, yaw_speed) }, \
{ "thrust", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_roll_pitch_yaw_speed_thrust_setpoint_t, thrust) }, \
} \
}
 
 
/**
* @brief Pack a roll_pitch_yaw_speed_thrust_setpoint message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp in milliseconds since system boot
* @param roll_speed Desired roll angular speed in rad/s
* @param pitch_speed Desired pitch angular speed in rad/s
* @param yaw_speed Desired yaw angular speed in rad/s
* @param thrust Collective thrust, normalized to 0 .. 1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, float roll_speed, float pitch_speed, float yaw_speed, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll_speed);
_mav_put_float(buf, 8, pitch_speed);
_mav_put_float(buf, 12, yaw_speed);
_mav_put_float(buf, 16, thrust);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
#else
mavlink_roll_pitch_yaw_speed_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
packet.roll_speed = roll_speed;
packet.pitch_speed = pitch_speed;
packet.yaw_speed = yaw_speed;
packet.thrust = thrust;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
#endif
 
msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT;
return mavlink_finalize_message(msg, system_id, component_id, 20, 238);
}
 
/**
* @brief Pack a roll_pitch_yaw_speed_thrust_setpoint message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp in milliseconds since system boot
* @param roll_speed Desired roll angular speed in rad/s
* @param pitch_speed Desired pitch angular speed in rad/s
* @param yaw_speed Desired yaw angular speed in rad/s
* @param thrust Collective thrust, normalized to 0 .. 1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,float roll_speed,float pitch_speed,float yaw_speed,float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll_speed);
_mav_put_float(buf, 8, pitch_speed);
_mav_put_float(buf, 12, yaw_speed);
_mav_put_float(buf, 16, thrust);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
#else
mavlink_roll_pitch_yaw_speed_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
packet.roll_speed = roll_speed;
packet.pitch_speed = pitch_speed;
packet.yaw_speed = yaw_speed;
packet.thrust = thrust;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
#endif
 
msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 20, 238);
}
 
/**
* @brief Encode a roll_pitch_yaw_speed_thrust_setpoint struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param roll_pitch_yaw_speed_thrust_setpoint C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_roll_pitch_yaw_speed_thrust_setpoint_t* roll_pitch_yaw_speed_thrust_setpoint)
{
return mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_pack(system_id, component_id, msg, roll_pitch_yaw_speed_thrust_setpoint->time_boot_ms, roll_pitch_yaw_speed_thrust_setpoint->roll_speed, roll_pitch_yaw_speed_thrust_setpoint->pitch_speed, roll_pitch_yaw_speed_thrust_setpoint->yaw_speed, roll_pitch_yaw_speed_thrust_setpoint->thrust);
}
 
/**
* @brief Send a roll_pitch_yaw_speed_thrust_setpoint message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp in milliseconds since system boot
* @param roll_speed Desired roll angular speed in rad/s
* @param pitch_speed Desired pitch angular speed in rad/s
* @param yaw_speed Desired yaw angular speed in rad/s
* @param thrust Collective thrust, normalized to 0 .. 1
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_send(mavlink_channel_t chan, uint32_t time_boot_ms, float roll_speed, float pitch_speed, float yaw_speed, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll_speed);
_mav_put_float(buf, 8, pitch_speed);
_mav_put_float(buf, 12, yaw_speed);
_mav_put_float(buf, 16, thrust);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT, buf, 20, 238);
#else
mavlink_roll_pitch_yaw_speed_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
packet.roll_speed = roll_speed;
packet.pitch_speed = pitch_speed;
packet.yaw_speed = yaw_speed;
packet.thrust = thrust;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT, (const char *)&packet, 20, 238);
#endif
}
 
#endif
 
// MESSAGE ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT UNPACKING
 
 
/**
* @brief Get field time_boot_ms from roll_pitch_yaw_speed_thrust_setpoint message
*
* @return Timestamp in milliseconds since system boot
*/
static inline uint32_t mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field roll_speed from roll_pitch_yaw_speed_thrust_setpoint message
*
* @return Desired roll angular speed in rad/s
*/
static inline float mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_roll_speed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field pitch_speed from roll_pitch_yaw_speed_thrust_setpoint message
*
* @return Desired pitch angular speed in rad/s
*/
static inline float mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_pitch_speed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field yaw_speed from roll_pitch_yaw_speed_thrust_setpoint message
*
* @return Desired yaw angular speed in rad/s
*/
static inline float mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_yaw_speed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field thrust from roll_pitch_yaw_speed_thrust_setpoint message
*
* @return Collective thrust, normalized to 0 .. 1
*/
static inline float mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_thrust(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Decode a roll_pitch_yaw_speed_thrust_setpoint message into a struct
*
* @param msg The message to decode
* @param roll_pitch_yaw_speed_thrust_setpoint C-struct to decode the message contents into
*/
static inline void mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_decode(const mavlink_message_t* msg, mavlink_roll_pitch_yaw_speed_thrust_setpoint_t* roll_pitch_yaw_speed_thrust_setpoint)
{
#if MAVLINK_NEED_BYTE_SWAP
roll_pitch_yaw_speed_thrust_setpoint->time_boot_ms = mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_time_boot_ms(msg);
roll_pitch_yaw_speed_thrust_setpoint->roll_speed = mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_roll_speed(msg);
roll_pitch_yaw_speed_thrust_setpoint->pitch_speed = mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_pitch_speed(msg);
roll_pitch_yaw_speed_thrust_setpoint->yaw_speed = mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_yaw_speed(msg);
roll_pitch_yaw_speed_thrust_setpoint->thrust = mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_thrust(msg);
#else
memcpy(roll_pitch_yaw_speed_thrust_setpoint, _MAV_PAYLOAD(msg), 20);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_roll_pitch_yaw_thrust_setpoint.h
0,0 → 1,232
// MESSAGE ROLL_PITCH_YAW_THRUST_SETPOINT PACKING
 
#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT 58
 
typedef struct __mavlink_roll_pitch_yaw_thrust_setpoint_t
{
uint32_t time_boot_ms; ///< Timestamp in milliseconds since system boot
float roll; ///< Desired roll angle in radians
float pitch; ///< Desired pitch angle in radians
float yaw; ///< Desired yaw angle in radians
float thrust; ///< Collective thrust, normalized to 0 .. 1
} mavlink_roll_pitch_yaw_thrust_setpoint_t;
 
#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN 20
#define MAVLINK_MSG_ID_58_LEN 20
 
 
 
#define MAVLINK_MESSAGE_INFO_ROLL_PITCH_YAW_THRUST_SETPOINT { \
"ROLL_PITCH_YAW_THRUST_SETPOINT", \
5, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_roll_pitch_yaw_thrust_setpoint_t, time_boot_ms) }, \
{ "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_roll_pitch_yaw_thrust_setpoint_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_roll_pitch_yaw_thrust_setpoint_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_roll_pitch_yaw_thrust_setpoint_t, yaw) }, \
{ "thrust", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_roll_pitch_yaw_thrust_setpoint_t, thrust) }, \
} \
}
 
 
/**
* @brief Pack a roll_pitch_yaw_thrust_setpoint message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp in milliseconds since system boot
* @param roll Desired roll angle in radians
* @param pitch Desired pitch angle in radians
* @param yaw Desired yaw angle in radians
* @param thrust Collective thrust, normalized to 0 .. 1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_roll_pitch_yaw_thrust_setpoint_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, float roll, float pitch, float yaw, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
_mav_put_float(buf, 12, yaw);
_mav_put_float(buf, 16, thrust);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
#else
mavlink_roll_pitch_yaw_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.thrust = thrust;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
#endif
 
msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT;
return mavlink_finalize_message(msg, system_id, component_id, 20, 239);
}
 
/**
* @brief Pack a roll_pitch_yaw_thrust_setpoint message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp in milliseconds since system boot
* @param roll Desired roll angle in radians
* @param pitch Desired pitch angle in radians
* @param yaw Desired yaw angle in radians
* @param thrust Collective thrust, normalized to 0 .. 1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_roll_pitch_yaw_thrust_setpoint_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,float roll,float pitch,float yaw,float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
_mav_put_float(buf, 12, yaw);
_mav_put_float(buf, 16, thrust);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
#else
mavlink_roll_pitch_yaw_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.thrust = thrust;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
#endif
 
msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 20, 239);
}
 
/**
* @brief Encode a roll_pitch_yaw_thrust_setpoint struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param roll_pitch_yaw_thrust_setpoint C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_roll_pitch_yaw_thrust_setpoint_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_roll_pitch_yaw_thrust_setpoint_t* roll_pitch_yaw_thrust_setpoint)
{
return mavlink_msg_roll_pitch_yaw_thrust_setpoint_pack(system_id, component_id, msg, roll_pitch_yaw_thrust_setpoint->time_boot_ms, roll_pitch_yaw_thrust_setpoint->roll, roll_pitch_yaw_thrust_setpoint->pitch, roll_pitch_yaw_thrust_setpoint->yaw, roll_pitch_yaw_thrust_setpoint->thrust);
}
 
/**
* @brief Send a roll_pitch_yaw_thrust_setpoint message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp in milliseconds since system boot
* @param roll Desired roll angle in radians
* @param pitch Desired pitch angle in radians
* @param yaw Desired yaw angle in radians
* @param thrust Collective thrust, normalized to 0 .. 1
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_roll_pitch_yaw_thrust_setpoint_send(mavlink_channel_t chan, uint32_t time_boot_ms, float roll, float pitch, float yaw, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
_mav_put_float(buf, 12, yaw);
_mav_put_float(buf, 16, thrust);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT, buf, 20, 239);
#else
mavlink_roll_pitch_yaw_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.thrust = thrust;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT, (const char *)&packet, 20, 239);
#endif
}
 
#endif
 
// MESSAGE ROLL_PITCH_YAW_THRUST_SETPOINT UNPACKING
 
 
/**
* @brief Get field time_boot_ms from roll_pitch_yaw_thrust_setpoint message
*
* @return Timestamp in milliseconds since system boot
*/
static inline uint32_t mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field roll from roll_pitch_yaw_thrust_setpoint message
*
* @return Desired roll angle in radians
*/
static inline float mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_roll(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field pitch from roll_pitch_yaw_thrust_setpoint message
*
* @return Desired pitch angle in radians
*/
static inline float mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_pitch(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field yaw from roll_pitch_yaw_thrust_setpoint message
*
* @return Desired yaw angle in radians
*/
static inline float mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field thrust from roll_pitch_yaw_thrust_setpoint message
*
* @return Collective thrust, normalized to 0 .. 1
*/
static inline float mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_thrust(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Decode a roll_pitch_yaw_thrust_setpoint message into a struct
*
* @param msg The message to decode
* @param roll_pitch_yaw_thrust_setpoint C-struct to decode the message contents into
*/
static inline void mavlink_msg_roll_pitch_yaw_thrust_setpoint_decode(const mavlink_message_t* msg, mavlink_roll_pitch_yaw_thrust_setpoint_t* roll_pitch_yaw_thrust_setpoint)
{
#if MAVLINK_NEED_BYTE_SWAP
roll_pitch_yaw_thrust_setpoint->time_boot_ms = mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_time_boot_ms(msg);
roll_pitch_yaw_thrust_setpoint->roll = mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_roll(msg);
roll_pitch_yaw_thrust_setpoint->pitch = mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_pitch(msg);
roll_pitch_yaw_thrust_setpoint->yaw = mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_yaw(msg);
roll_pitch_yaw_thrust_setpoint->thrust = mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_thrust(msg);
#else
memcpy(roll_pitch_yaw_thrust_setpoint, _MAV_PAYLOAD(msg), 20);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_safety_allowed_area.h
0,0 → 1,276
// MESSAGE SAFETY_ALLOWED_AREA PACKING
 
#define MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA 55
 
typedef struct __mavlink_safety_allowed_area_t
{
float p1x; ///< x position 1 / Latitude 1
float p1y; ///< y position 1 / Longitude 1
float p1z; ///< z position 1 / Altitude 1
float p2x; ///< x position 2 / Latitude 2
float p2y; ///< y position 2 / Longitude 2
float p2z; ///< z position 2 / Altitude 2
uint8_t frame; ///< Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
} mavlink_safety_allowed_area_t;
 
#define MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN 25
#define MAVLINK_MSG_ID_55_LEN 25
 
 
 
#define MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA { \
"SAFETY_ALLOWED_AREA", \
7, \
{ { "p1x", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_safety_allowed_area_t, p1x) }, \
{ "p1y", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_safety_allowed_area_t, p1y) }, \
{ "p1z", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_safety_allowed_area_t, p1z) }, \
{ "p2x", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_safety_allowed_area_t, p2x) }, \
{ "p2y", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_safety_allowed_area_t, p2y) }, \
{ "p2z", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_safety_allowed_area_t, p2z) }, \
{ "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_safety_allowed_area_t, frame) }, \
} \
}
 
 
/**
* @brief Pack a safety_allowed_area message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param frame Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
* @param p1x x position 1 / Latitude 1
* @param p1y y position 1 / Longitude 1
* @param p1z z position 1 / Altitude 1
* @param p2x x position 2 / Latitude 2
* @param p2y y position 2 / Longitude 2
* @param p2z z position 2 / Altitude 2
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_safety_allowed_area_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t frame, float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[25];
_mav_put_float(buf, 0, p1x);
_mav_put_float(buf, 4, p1y);
_mav_put_float(buf, 8, p1z);
_mav_put_float(buf, 12, p2x);
_mav_put_float(buf, 16, p2y);
_mav_put_float(buf, 20, p2z);
_mav_put_uint8_t(buf, 24, frame);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 25);
#else
mavlink_safety_allowed_area_t packet;
packet.p1x = p1x;
packet.p1y = p1y;
packet.p1z = p1z;
packet.p2x = p2x;
packet.p2y = p2y;
packet.p2z = p2z;
packet.frame = frame;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 25);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA;
return mavlink_finalize_message(msg, system_id, component_id, 25, 3);
}
 
/**
* @brief Pack a safety_allowed_area message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param frame Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
* @param p1x x position 1 / Latitude 1
* @param p1y y position 1 / Longitude 1
* @param p1z z position 1 / Altitude 1
* @param p2x x position 2 / Latitude 2
* @param p2y y position 2 / Longitude 2
* @param p2z z position 2 / Altitude 2
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_safety_allowed_area_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t frame,float p1x,float p1y,float p1z,float p2x,float p2y,float p2z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[25];
_mav_put_float(buf, 0, p1x);
_mav_put_float(buf, 4, p1y);
_mav_put_float(buf, 8, p1z);
_mav_put_float(buf, 12, p2x);
_mav_put_float(buf, 16, p2y);
_mav_put_float(buf, 20, p2z);
_mav_put_uint8_t(buf, 24, frame);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 25);
#else
mavlink_safety_allowed_area_t packet;
packet.p1x = p1x;
packet.p1y = p1y;
packet.p1z = p1z;
packet.p2x = p2x;
packet.p2y = p2y;
packet.p2z = p2z;
packet.frame = frame;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 25);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 25, 3);
}
 
/**
* @brief Encode a safety_allowed_area struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param safety_allowed_area C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_safety_allowed_area_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_safety_allowed_area_t* safety_allowed_area)
{
return mavlink_msg_safety_allowed_area_pack(system_id, component_id, msg, safety_allowed_area->frame, safety_allowed_area->p1x, safety_allowed_area->p1y, safety_allowed_area->p1z, safety_allowed_area->p2x, safety_allowed_area->p2y, safety_allowed_area->p2z);
}
 
/**
* @brief Send a safety_allowed_area message
* @param chan MAVLink channel to send the message
*
* @param frame Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
* @param p1x x position 1 / Latitude 1
* @param p1y y position 1 / Longitude 1
* @param p1z z position 1 / Altitude 1
* @param p2x x position 2 / Latitude 2
* @param p2y y position 2 / Longitude 2
* @param p2z z position 2 / Altitude 2
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_safety_allowed_area_send(mavlink_channel_t chan, uint8_t frame, float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[25];
_mav_put_float(buf, 0, p1x);
_mav_put_float(buf, 4, p1y);
_mav_put_float(buf, 8, p1z);
_mav_put_float(buf, 12, p2x);
_mav_put_float(buf, 16, p2y);
_mav_put_float(buf, 20, p2z);
_mav_put_uint8_t(buf, 24, frame);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA, buf, 25, 3);
#else
mavlink_safety_allowed_area_t packet;
packet.p1x = p1x;
packet.p1y = p1y;
packet.p1z = p1z;
packet.p2x = p2x;
packet.p2y = p2y;
packet.p2z = p2z;
packet.frame = frame;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA, (const char *)&packet, 25, 3);
#endif
}
 
#endif
 
// MESSAGE SAFETY_ALLOWED_AREA UNPACKING
 
 
/**
* @brief Get field frame from safety_allowed_area message
*
* @return Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
*/
static inline uint8_t mavlink_msg_safety_allowed_area_get_frame(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 24);
}
 
/**
* @brief Get field p1x from safety_allowed_area message
*
* @return x position 1 / Latitude 1
*/
static inline float mavlink_msg_safety_allowed_area_get_p1x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field p1y from safety_allowed_area message
*
* @return y position 1 / Longitude 1
*/
static inline float mavlink_msg_safety_allowed_area_get_p1y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field p1z from safety_allowed_area message
*
* @return z position 1 / Altitude 1
*/
static inline float mavlink_msg_safety_allowed_area_get_p1z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field p2x from safety_allowed_area message
*
* @return x position 2 / Latitude 2
*/
static inline float mavlink_msg_safety_allowed_area_get_p2x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field p2y from safety_allowed_area message
*
* @return y position 2 / Longitude 2
*/
static inline float mavlink_msg_safety_allowed_area_get_p2y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field p2z from safety_allowed_area message
*
* @return z position 2 / Altitude 2
*/
static inline float mavlink_msg_safety_allowed_area_get_p2z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Decode a safety_allowed_area message into a struct
*
* @param msg The message to decode
* @param safety_allowed_area C-struct to decode the message contents into
*/
static inline void mavlink_msg_safety_allowed_area_decode(const mavlink_message_t* msg, mavlink_safety_allowed_area_t* safety_allowed_area)
{
#if MAVLINK_NEED_BYTE_SWAP
safety_allowed_area->p1x = mavlink_msg_safety_allowed_area_get_p1x(msg);
safety_allowed_area->p1y = mavlink_msg_safety_allowed_area_get_p1y(msg);
safety_allowed_area->p1z = mavlink_msg_safety_allowed_area_get_p1z(msg);
safety_allowed_area->p2x = mavlink_msg_safety_allowed_area_get_p2x(msg);
safety_allowed_area->p2y = mavlink_msg_safety_allowed_area_get_p2y(msg);
safety_allowed_area->p2z = mavlink_msg_safety_allowed_area_get_p2z(msg);
safety_allowed_area->frame = mavlink_msg_safety_allowed_area_get_frame(msg);
#else
memcpy(safety_allowed_area, _MAV_PAYLOAD(msg), 25);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_safety_set_allowed_area.h
0,0 → 1,320
// MESSAGE SAFETY_SET_ALLOWED_AREA PACKING
 
#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA 54
 
typedef struct __mavlink_safety_set_allowed_area_t
{
float p1x; ///< x position 1 / Latitude 1
float p1y; ///< y position 1 / Longitude 1
float p1z; ///< z position 1 / Altitude 1
float p2x; ///< x position 2 / Latitude 2
float p2y; ///< y position 2 / Longitude 2
float p2z; ///< z position 2 / Altitude 2
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
uint8_t frame; ///< Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
} mavlink_safety_set_allowed_area_t;
 
#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN 27
#define MAVLINK_MSG_ID_54_LEN 27
 
 
 
#define MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA { \
"SAFETY_SET_ALLOWED_AREA", \
9, \
{ { "p1x", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_safety_set_allowed_area_t, p1x) }, \
{ "p1y", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_safety_set_allowed_area_t, p1y) }, \
{ "p1z", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_safety_set_allowed_area_t, p1z) }, \
{ "p2x", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_safety_set_allowed_area_t, p2x) }, \
{ "p2y", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_safety_set_allowed_area_t, p2y) }, \
{ "p2z", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_safety_set_allowed_area_t, p2z) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_safety_set_allowed_area_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_safety_set_allowed_area_t, target_component) }, \
{ "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_safety_set_allowed_area_t, frame) }, \
} \
}
 
 
/**
* @brief Pack a safety_set_allowed_area message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param frame Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
* @param p1x x position 1 / Latitude 1
* @param p1y y position 1 / Longitude 1
* @param p1z z position 1 / Altitude 1
* @param p2x x position 2 / Latitude 2
* @param p2y y position 2 / Longitude 2
* @param p2z z position 2 / Altitude 2
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_safety_set_allowed_area_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint8_t frame, float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[27];
_mav_put_float(buf, 0, p1x);
_mav_put_float(buf, 4, p1y);
_mav_put_float(buf, 8, p1z);
_mav_put_float(buf, 12, p2x);
_mav_put_float(buf, 16, p2y);
_mav_put_float(buf, 20, p2z);
_mav_put_uint8_t(buf, 24, target_system);
_mav_put_uint8_t(buf, 25, target_component);
_mav_put_uint8_t(buf, 26, frame);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 27);
#else
mavlink_safety_set_allowed_area_t packet;
packet.p1x = p1x;
packet.p1y = p1y;
packet.p1z = p1z;
packet.p2x = p2x;
packet.p2y = p2y;
packet.p2z = p2z;
packet.target_system = target_system;
packet.target_component = target_component;
packet.frame = frame;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 27);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA;
return mavlink_finalize_message(msg, system_id, component_id, 27, 15);
}
 
/**
* @brief Pack a safety_set_allowed_area message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param frame Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
* @param p1x x position 1 / Latitude 1
* @param p1y y position 1 / Longitude 1
* @param p1z z position 1 / Altitude 1
* @param p2x x position 2 / Latitude 2
* @param p2y y position 2 / Longitude 2
* @param p2z z position 2 / Altitude 2
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_safety_set_allowed_area_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint8_t frame,float p1x,float p1y,float p1z,float p2x,float p2y,float p2z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[27];
_mav_put_float(buf, 0, p1x);
_mav_put_float(buf, 4, p1y);
_mav_put_float(buf, 8, p1z);
_mav_put_float(buf, 12, p2x);
_mav_put_float(buf, 16, p2y);
_mav_put_float(buf, 20, p2z);
_mav_put_uint8_t(buf, 24, target_system);
_mav_put_uint8_t(buf, 25, target_component);
_mav_put_uint8_t(buf, 26, frame);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 27);
#else
mavlink_safety_set_allowed_area_t packet;
packet.p1x = p1x;
packet.p1y = p1y;
packet.p1z = p1z;
packet.p2x = p2x;
packet.p2y = p2y;
packet.p2z = p2z;
packet.target_system = target_system;
packet.target_component = target_component;
packet.frame = frame;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 27);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 27, 15);
}
 
/**
* @brief Encode a safety_set_allowed_area struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param safety_set_allowed_area C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_safety_set_allowed_area_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_safety_set_allowed_area_t* safety_set_allowed_area)
{
return mavlink_msg_safety_set_allowed_area_pack(system_id, component_id, msg, safety_set_allowed_area->target_system, safety_set_allowed_area->target_component, safety_set_allowed_area->frame, safety_set_allowed_area->p1x, safety_set_allowed_area->p1y, safety_set_allowed_area->p1z, safety_set_allowed_area->p2x, safety_set_allowed_area->p2y, safety_set_allowed_area->p2z);
}
 
/**
* @brief Send a safety_set_allowed_area message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param frame Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
* @param p1x x position 1 / Latitude 1
* @param p1y y position 1 / Longitude 1
* @param p1z z position 1 / Altitude 1
* @param p2x x position 2 / Latitude 2
* @param p2y y position 2 / Longitude 2
* @param p2z z position 2 / Altitude 2
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_safety_set_allowed_area_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t frame, float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[27];
_mav_put_float(buf, 0, p1x);
_mav_put_float(buf, 4, p1y);
_mav_put_float(buf, 8, p1z);
_mav_put_float(buf, 12, p2x);
_mav_put_float(buf, 16, p2y);
_mav_put_float(buf, 20, p2z);
_mav_put_uint8_t(buf, 24, target_system);
_mav_put_uint8_t(buf, 25, target_component);
_mav_put_uint8_t(buf, 26, frame);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, buf, 27, 15);
#else
mavlink_safety_set_allowed_area_t packet;
packet.p1x = p1x;
packet.p1y = p1y;
packet.p1z = p1z;
packet.p2x = p2x;
packet.p2y = p2y;
packet.p2z = p2z;
packet.target_system = target_system;
packet.target_component = target_component;
packet.frame = frame;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, (const char *)&packet, 27, 15);
#endif
}
 
#endif
 
// MESSAGE SAFETY_SET_ALLOWED_AREA UNPACKING
 
 
/**
* @brief Get field target_system from safety_set_allowed_area message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_safety_set_allowed_area_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 24);
}
 
/**
* @brief Get field target_component from safety_set_allowed_area message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_safety_set_allowed_area_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 25);
}
 
/**
* @brief Get field frame from safety_set_allowed_area message
*
* @return Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
*/
static inline uint8_t mavlink_msg_safety_set_allowed_area_get_frame(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 26);
}
 
/**
* @brief Get field p1x from safety_set_allowed_area message
*
* @return x position 1 / Latitude 1
*/
static inline float mavlink_msg_safety_set_allowed_area_get_p1x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field p1y from safety_set_allowed_area message
*
* @return y position 1 / Longitude 1
*/
static inline float mavlink_msg_safety_set_allowed_area_get_p1y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field p1z from safety_set_allowed_area message
*
* @return z position 1 / Altitude 1
*/
static inline float mavlink_msg_safety_set_allowed_area_get_p1z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field p2x from safety_set_allowed_area message
*
* @return x position 2 / Latitude 2
*/
static inline float mavlink_msg_safety_set_allowed_area_get_p2x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field p2y from safety_set_allowed_area message
*
* @return y position 2 / Longitude 2
*/
static inline float mavlink_msg_safety_set_allowed_area_get_p2y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field p2z from safety_set_allowed_area message
*
* @return z position 2 / Altitude 2
*/
static inline float mavlink_msg_safety_set_allowed_area_get_p2z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Decode a safety_set_allowed_area message into a struct
*
* @param msg The message to decode
* @param safety_set_allowed_area C-struct to decode the message contents into
*/
static inline void mavlink_msg_safety_set_allowed_area_decode(const mavlink_message_t* msg, mavlink_safety_set_allowed_area_t* safety_set_allowed_area)
{
#if MAVLINK_NEED_BYTE_SWAP
safety_set_allowed_area->p1x = mavlink_msg_safety_set_allowed_area_get_p1x(msg);
safety_set_allowed_area->p1y = mavlink_msg_safety_set_allowed_area_get_p1y(msg);
safety_set_allowed_area->p1z = mavlink_msg_safety_set_allowed_area_get_p1z(msg);
safety_set_allowed_area->p2x = mavlink_msg_safety_set_allowed_area_get_p2x(msg);
safety_set_allowed_area->p2y = mavlink_msg_safety_set_allowed_area_get_p2y(msg);
safety_set_allowed_area->p2z = mavlink_msg_safety_set_allowed_area_get_p2z(msg);
safety_set_allowed_area->target_system = mavlink_msg_safety_set_allowed_area_get_target_system(msg);
safety_set_allowed_area->target_component = mavlink_msg_safety_set_allowed_area_get_target_component(msg);
safety_set_allowed_area->frame = mavlink_msg_safety_set_allowed_area_get_frame(msg);
#else
memcpy(safety_set_allowed_area, _MAV_PAYLOAD(msg), 27);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_scaled_imu.h
0,0 → 1,342
// MESSAGE SCALED_IMU PACKING
 
#define MAVLINK_MSG_ID_SCALED_IMU 26
 
typedef struct __mavlink_scaled_imu_t
{
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
int16_t xacc; ///< X acceleration (mg)
int16_t yacc; ///< Y acceleration (mg)
int16_t zacc; ///< Z acceleration (mg)
int16_t xgyro; ///< Angular speed around X axis (millirad /sec)
int16_t ygyro; ///< Angular speed around Y axis (millirad /sec)
int16_t zgyro; ///< Angular speed around Z axis (millirad /sec)
int16_t xmag; ///< X Magnetic field (milli tesla)
int16_t ymag; ///< Y Magnetic field (milli tesla)
int16_t zmag; ///< Z Magnetic field (milli tesla)
} mavlink_scaled_imu_t;
 
#define MAVLINK_MSG_ID_SCALED_IMU_LEN 22
#define MAVLINK_MSG_ID_26_LEN 22
 
 
 
#define MAVLINK_MESSAGE_INFO_SCALED_IMU { \
"SCALED_IMU", \
10, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_scaled_imu_t, time_boot_ms) }, \
{ "xacc", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_scaled_imu_t, xacc) }, \
{ "yacc", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_scaled_imu_t, yacc) }, \
{ "zacc", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_scaled_imu_t, zacc) }, \
{ "xgyro", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_scaled_imu_t, xgyro) }, \
{ "ygyro", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_scaled_imu_t, ygyro) }, \
{ "zgyro", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_scaled_imu_t, zgyro) }, \
{ "xmag", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_scaled_imu_t, xmag) }, \
{ "ymag", NULL, MAVLINK_TYPE_INT16_T, 0, 18, offsetof(mavlink_scaled_imu_t, ymag) }, \
{ "zmag", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_scaled_imu_t, zmag) }, \
} \
}
 
 
/**
* @brief Pack a scaled_imu message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param xacc X acceleration (mg)
* @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg)
* @param xgyro Angular speed around X axis (millirad /sec)
* @param ygyro Angular speed around Y axis (millirad /sec)
* @param zgyro Angular speed around Z axis (millirad /sec)
* @param xmag X Magnetic field (milli tesla)
* @param ymag Y Magnetic field (milli tesla)
* @param zmag Z Magnetic field (milli tesla)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_scaled_imu_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int16_t(buf, 4, xacc);
_mav_put_int16_t(buf, 6, yacc);
_mav_put_int16_t(buf, 8, zacc);
_mav_put_int16_t(buf, 10, xgyro);
_mav_put_int16_t(buf, 12, ygyro);
_mav_put_int16_t(buf, 14, zgyro);
_mav_put_int16_t(buf, 16, xmag);
_mav_put_int16_t(buf, 18, ymag);
_mav_put_int16_t(buf, 20, zmag);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
#else
mavlink_scaled_imu_t packet;
packet.time_boot_ms = time_boot_ms;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
packet.xgyro = xgyro;
packet.ygyro = ygyro;
packet.zgyro = zgyro;
packet.xmag = xmag;
packet.ymag = ymag;
packet.zmag = zmag;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SCALED_IMU;
return mavlink_finalize_message(msg, system_id, component_id, 22, 170);
}
 
/**
* @brief Pack a scaled_imu message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param xacc X acceleration (mg)
* @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg)
* @param xgyro Angular speed around X axis (millirad /sec)
* @param ygyro Angular speed around Y axis (millirad /sec)
* @param zgyro Angular speed around Z axis (millirad /sec)
* @param xmag X Magnetic field (milli tesla)
* @param ymag Y Magnetic field (milli tesla)
* @param zmag Z Magnetic field (milli tesla)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_scaled_imu_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,int16_t xacc,int16_t yacc,int16_t zacc,int16_t xgyro,int16_t ygyro,int16_t zgyro,int16_t xmag,int16_t ymag,int16_t zmag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int16_t(buf, 4, xacc);
_mav_put_int16_t(buf, 6, yacc);
_mav_put_int16_t(buf, 8, zacc);
_mav_put_int16_t(buf, 10, xgyro);
_mav_put_int16_t(buf, 12, ygyro);
_mav_put_int16_t(buf, 14, zgyro);
_mav_put_int16_t(buf, 16, xmag);
_mav_put_int16_t(buf, 18, ymag);
_mav_put_int16_t(buf, 20, zmag);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
#else
mavlink_scaled_imu_t packet;
packet.time_boot_ms = time_boot_ms;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
packet.xgyro = xgyro;
packet.ygyro = ygyro;
packet.zgyro = zgyro;
packet.xmag = xmag;
packet.ymag = ymag;
packet.zmag = zmag;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SCALED_IMU;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 22, 170);
}
 
/**
* @brief Encode a scaled_imu struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param scaled_imu C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_scaled_imu_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_scaled_imu_t* scaled_imu)
{
return mavlink_msg_scaled_imu_pack(system_id, component_id, msg, scaled_imu->time_boot_ms, scaled_imu->xacc, scaled_imu->yacc, scaled_imu->zacc, scaled_imu->xgyro, scaled_imu->ygyro, scaled_imu->zgyro, scaled_imu->xmag, scaled_imu->ymag, scaled_imu->zmag);
}
 
/**
* @brief Send a scaled_imu message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param xacc X acceleration (mg)
* @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg)
* @param xgyro Angular speed around X axis (millirad /sec)
* @param ygyro Angular speed around Y axis (millirad /sec)
* @param zgyro Angular speed around Z axis (millirad /sec)
* @param xmag X Magnetic field (milli tesla)
* @param ymag Y Magnetic field (milli tesla)
* @param zmag Z Magnetic field (milli tesla)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_scaled_imu_send(mavlink_channel_t chan, uint32_t time_boot_ms, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int16_t(buf, 4, xacc);
_mav_put_int16_t(buf, 6, yacc);
_mav_put_int16_t(buf, 8, zacc);
_mav_put_int16_t(buf, 10, xgyro);
_mav_put_int16_t(buf, 12, ygyro);
_mav_put_int16_t(buf, 14, zgyro);
_mav_put_int16_t(buf, 16, xmag);
_mav_put_int16_t(buf, 18, ymag);
_mav_put_int16_t(buf, 20, zmag);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_IMU, buf, 22, 170);
#else
mavlink_scaled_imu_t packet;
packet.time_boot_ms = time_boot_ms;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
packet.xgyro = xgyro;
packet.ygyro = ygyro;
packet.zgyro = zgyro;
packet.xmag = xmag;
packet.ymag = ymag;
packet.zmag = zmag;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_IMU, (const char *)&packet, 22, 170);
#endif
}
 
#endif
 
// MESSAGE SCALED_IMU UNPACKING
 
 
/**
* @brief Get field time_boot_ms from scaled_imu message
*
* @return Timestamp (milliseconds since system boot)
*/
static inline uint32_t mavlink_msg_scaled_imu_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field xacc from scaled_imu message
*
* @return X acceleration (mg)
*/
static inline int16_t mavlink_msg_scaled_imu_get_xacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 4);
}
 
/**
* @brief Get field yacc from scaled_imu message
*
* @return Y acceleration (mg)
*/
static inline int16_t mavlink_msg_scaled_imu_get_yacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 6);
}
 
/**
* @brief Get field zacc from scaled_imu message
*
* @return Z acceleration (mg)
*/
static inline int16_t mavlink_msg_scaled_imu_get_zacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 8);
}
 
/**
* @brief Get field xgyro from scaled_imu message
*
* @return Angular speed around X axis (millirad /sec)
*/
static inline int16_t mavlink_msg_scaled_imu_get_xgyro(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 10);
}
 
/**
* @brief Get field ygyro from scaled_imu message
*
* @return Angular speed around Y axis (millirad /sec)
*/
static inline int16_t mavlink_msg_scaled_imu_get_ygyro(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 12);
}
 
/**
* @brief Get field zgyro from scaled_imu message
*
* @return Angular speed around Z axis (millirad /sec)
*/
static inline int16_t mavlink_msg_scaled_imu_get_zgyro(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 14);
}
 
/**
* @brief Get field xmag from scaled_imu message
*
* @return X Magnetic field (milli tesla)
*/
static inline int16_t mavlink_msg_scaled_imu_get_xmag(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 16);
}
 
/**
* @brief Get field ymag from scaled_imu message
*
* @return Y Magnetic field (milli tesla)
*/
static inline int16_t mavlink_msg_scaled_imu_get_ymag(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 18);
}
 
/**
* @brief Get field zmag from scaled_imu message
*
* @return Z Magnetic field (milli tesla)
*/
static inline int16_t mavlink_msg_scaled_imu_get_zmag(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 20);
}
 
/**
* @brief Decode a scaled_imu message into a struct
*
* @param msg The message to decode
* @param scaled_imu C-struct to decode the message contents into
*/
static inline void mavlink_msg_scaled_imu_decode(const mavlink_message_t* msg, mavlink_scaled_imu_t* scaled_imu)
{
#if MAVLINK_NEED_BYTE_SWAP
scaled_imu->time_boot_ms = mavlink_msg_scaled_imu_get_time_boot_ms(msg);
scaled_imu->xacc = mavlink_msg_scaled_imu_get_xacc(msg);
scaled_imu->yacc = mavlink_msg_scaled_imu_get_yacc(msg);
scaled_imu->zacc = mavlink_msg_scaled_imu_get_zacc(msg);
scaled_imu->xgyro = mavlink_msg_scaled_imu_get_xgyro(msg);
scaled_imu->ygyro = mavlink_msg_scaled_imu_get_ygyro(msg);
scaled_imu->zgyro = mavlink_msg_scaled_imu_get_zgyro(msg);
scaled_imu->xmag = mavlink_msg_scaled_imu_get_xmag(msg);
scaled_imu->ymag = mavlink_msg_scaled_imu_get_ymag(msg);
scaled_imu->zmag = mavlink_msg_scaled_imu_get_zmag(msg);
#else
memcpy(scaled_imu, _MAV_PAYLOAD(msg), 22);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_scaled_pressure.h
0,0 → 1,210
// MESSAGE SCALED_PRESSURE PACKING
 
#define MAVLINK_MSG_ID_SCALED_PRESSURE 29
 
typedef struct __mavlink_scaled_pressure_t
{
uint32_t time_boot_ms; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
float press_abs; ///< Absolute pressure (hectopascal)
float press_diff; ///< Differential pressure 1 (hectopascal)
int16_t temperature; ///< Temperature measurement (0.01 degrees celsius)
} mavlink_scaled_pressure_t;
 
#define MAVLINK_MSG_ID_SCALED_PRESSURE_LEN 14
#define MAVLINK_MSG_ID_29_LEN 14
 
 
 
#define MAVLINK_MESSAGE_INFO_SCALED_PRESSURE { \
"SCALED_PRESSURE", \
4, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_scaled_pressure_t, time_boot_ms) }, \
{ "press_abs", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_scaled_pressure_t, press_abs) }, \
{ "press_diff", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_scaled_pressure_t, press_diff) }, \
{ "temperature", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_scaled_pressure_t, temperature) }, \
} \
}
 
 
/**
* @brief Pack a scaled_pressure message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param press_abs Absolute pressure (hectopascal)
* @param press_diff Differential pressure 1 (hectopascal)
* @param temperature Temperature measurement (0.01 degrees celsius)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_scaled_pressure_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, float press_abs, float press_diff, int16_t temperature)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, press_abs);
_mav_put_float(buf, 8, press_diff);
_mav_put_int16_t(buf, 12, temperature);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 14);
#else
mavlink_scaled_pressure_t packet;
packet.time_boot_ms = time_boot_ms;
packet.press_abs = press_abs;
packet.press_diff = press_diff;
packet.temperature = temperature;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 14);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SCALED_PRESSURE;
return mavlink_finalize_message(msg, system_id, component_id, 14, 115);
}
 
/**
* @brief Pack a scaled_pressure message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param press_abs Absolute pressure (hectopascal)
* @param press_diff Differential pressure 1 (hectopascal)
* @param temperature Temperature measurement (0.01 degrees celsius)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_scaled_pressure_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,float press_abs,float press_diff,int16_t temperature)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, press_abs);
_mav_put_float(buf, 8, press_diff);
_mav_put_int16_t(buf, 12, temperature);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 14);
#else
mavlink_scaled_pressure_t packet;
packet.time_boot_ms = time_boot_ms;
packet.press_abs = press_abs;
packet.press_diff = press_diff;
packet.temperature = temperature;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 14);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SCALED_PRESSURE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 14, 115);
}
 
/**
* @brief Encode a scaled_pressure struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param scaled_pressure C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_scaled_pressure_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_scaled_pressure_t* scaled_pressure)
{
return mavlink_msg_scaled_pressure_pack(system_id, component_id, msg, scaled_pressure->time_boot_ms, scaled_pressure->press_abs, scaled_pressure->press_diff, scaled_pressure->temperature);
}
 
/**
* @brief Send a scaled_pressure message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param press_abs Absolute pressure (hectopascal)
* @param press_diff Differential pressure 1 (hectopascal)
* @param temperature Temperature measurement (0.01 degrees celsius)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_scaled_pressure_send(mavlink_channel_t chan, uint32_t time_boot_ms, float press_abs, float press_diff, int16_t temperature)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, press_abs);
_mav_put_float(buf, 8, press_diff);
_mav_put_int16_t(buf, 12, temperature);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE, buf, 14, 115);
#else
mavlink_scaled_pressure_t packet;
packet.time_boot_ms = time_boot_ms;
packet.press_abs = press_abs;
packet.press_diff = press_diff;
packet.temperature = temperature;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE, (const char *)&packet, 14, 115);
#endif
}
 
#endif
 
// MESSAGE SCALED_PRESSURE UNPACKING
 
 
/**
* @brief Get field time_boot_ms from scaled_pressure message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint32_t mavlink_msg_scaled_pressure_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field press_abs from scaled_pressure message
*
* @return Absolute pressure (hectopascal)
*/
static inline float mavlink_msg_scaled_pressure_get_press_abs(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field press_diff from scaled_pressure message
*
* @return Differential pressure 1 (hectopascal)
*/
static inline float mavlink_msg_scaled_pressure_get_press_diff(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field temperature from scaled_pressure message
*
* @return Temperature measurement (0.01 degrees celsius)
*/
static inline int16_t mavlink_msg_scaled_pressure_get_temperature(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 12);
}
 
/**
* @brief Decode a scaled_pressure message into a struct
*
* @param msg The message to decode
* @param scaled_pressure C-struct to decode the message contents into
*/
static inline void mavlink_msg_scaled_pressure_decode(const mavlink_message_t* msg, mavlink_scaled_pressure_t* scaled_pressure)
{
#if MAVLINK_NEED_BYTE_SWAP
scaled_pressure->time_boot_ms = mavlink_msg_scaled_pressure_get_time_boot_ms(msg);
scaled_pressure->press_abs = mavlink_msg_scaled_pressure_get_press_abs(msg);
scaled_pressure->press_diff = mavlink_msg_scaled_pressure_get_press_diff(msg);
scaled_pressure->temperature = mavlink_msg_scaled_pressure_get_temperature(msg);
#else
memcpy(scaled_pressure, _MAV_PAYLOAD(msg), 14);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_servo_output_raw.h
0,0 → 1,342
// MESSAGE SERVO_OUTPUT_RAW PACKING
 
#define MAVLINK_MSG_ID_SERVO_OUTPUT_RAW 36
 
typedef struct __mavlink_servo_output_raw_t
{
uint32_t time_usec; ///< Timestamp (since UNIX epoch or microseconds since system boot)
uint16_t servo1_raw; ///< Servo output 1 value, in microseconds
uint16_t servo2_raw; ///< Servo output 2 value, in microseconds
uint16_t servo3_raw; ///< Servo output 3 value, in microseconds
uint16_t servo4_raw; ///< Servo output 4 value, in microseconds
uint16_t servo5_raw; ///< Servo output 5 value, in microseconds
uint16_t servo6_raw; ///< Servo output 6 value, in microseconds
uint16_t servo7_raw; ///< Servo output 7 value, in microseconds
uint16_t servo8_raw; ///< Servo output 8 value, in microseconds
uint8_t port; ///< Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
} mavlink_servo_output_raw_t;
 
#define MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN 21
#define MAVLINK_MSG_ID_36_LEN 21
 
 
 
#define MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW { \
"SERVO_OUTPUT_RAW", \
10, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_servo_output_raw_t, time_usec) }, \
{ "servo1_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_servo_output_raw_t, servo1_raw) }, \
{ "servo2_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_servo_output_raw_t, servo2_raw) }, \
{ "servo3_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_servo_output_raw_t, servo3_raw) }, \
{ "servo4_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_servo_output_raw_t, servo4_raw) }, \
{ "servo5_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_servo_output_raw_t, servo5_raw) }, \
{ "servo6_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_servo_output_raw_t, servo6_raw) }, \
{ "servo7_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_servo_output_raw_t, servo7_raw) }, \
{ "servo8_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_servo_output_raw_t, servo8_raw) }, \
{ "port", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_servo_output_raw_t, port) }, \
} \
}
 
 
/**
* @brief Pack a servo_output_raw message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (since UNIX epoch or microseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
* @param servo1_raw Servo output 1 value, in microseconds
* @param servo2_raw Servo output 2 value, in microseconds
* @param servo3_raw Servo output 3 value, in microseconds
* @param servo4_raw Servo output 4 value, in microseconds
* @param servo5_raw Servo output 5 value, in microseconds
* @param servo6_raw Servo output 6 value, in microseconds
* @param servo7_raw Servo output 7 value, in microseconds
* @param servo8_raw Servo output 8 value, in microseconds
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_servo_output_raw_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_usec, uint8_t port, uint16_t servo1_raw, uint16_t servo2_raw, uint16_t servo3_raw, uint16_t servo4_raw, uint16_t servo5_raw, uint16_t servo6_raw, uint16_t servo7_raw, uint16_t servo8_raw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[21];
_mav_put_uint32_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 4, servo1_raw);
_mav_put_uint16_t(buf, 6, servo2_raw);
_mav_put_uint16_t(buf, 8, servo3_raw);
_mav_put_uint16_t(buf, 10, servo4_raw);
_mav_put_uint16_t(buf, 12, servo5_raw);
_mav_put_uint16_t(buf, 14, servo6_raw);
_mav_put_uint16_t(buf, 16, servo7_raw);
_mav_put_uint16_t(buf, 18, servo8_raw);
_mav_put_uint8_t(buf, 20, port);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 21);
#else
mavlink_servo_output_raw_t packet;
packet.time_usec = time_usec;
packet.servo1_raw = servo1_raw;
packet.servo2_raw = servo2_raw;
packet.servo3_raw = servo3_raw;
packet.servo4_raw = servo4_raw;
packet.servo5_raw = servo5_raw;
packet.servo6_raw = servo6_raw;
packet.servo7_raw = servo7_raw;
packet.servo8_raw = servo8_raw;
packet.port = port;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 21);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SERVO_OUTPUT_RAW;
return mavlink_finalize_message(msg, system_id, component_id, 21, 222);
}
 
/**
* @brief Pack a servo_output_raw message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (since UNIX epoch or microseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
* @param servo1_raw Servo output 1 value, in microseconds
* @param servo2_raw Servo output 2 value, in microseconds
* @param servo3_raw Servo output 3 value, in microseconds
* @param servo4_raw Servo output 4 value, in microseconds
* @param servo5_raw Servo output 5 value, in microseconds
* @param servo6_raw Servo output 6 value, in microseconds
* @param servo7_raw Servo output 7 value, in microseconds
* @param servo8_raw Servo output 8 value, in microseconds
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_servo_output_raw_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_usec,uint8_t port,uint16_t servo1_raw,uint16_t servo2_raw,uint16_t servo3_raw,uint16_t servo4_raw,uint16_t servo5_raw,uint16_t servo6_raw,uint16_t servo7_raw,uint16_t servo8_raw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[21];
_mav_put_uint32_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 4, servo1_raw);
_mav_put_uint16_t(buf, 6, servo2_raw);
_mav_put_uint16_t(buf, 8, servo3_raw);
_mav_put_uint16_t(buf, 10, servo4_raw);
_mav_put_uint16_t(buf, 12, servo5_raw);
_mav_put_uint16_t(buf, 14, servo6_raw);
_mav_put_uint16_t(buf, 16, servo7_raw);
_mav_put_uint16_t(buf, 18, servo8_raw);
_mav_put_uint8_t(buf, 20, port);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 21);
#else
mavlink_servo_output_raw_t packet;
packet.time_usec = time_usec;
packet.servo1_raw = servo1_raw;
packet.servo2_raw = servo2_raw;
packet.servo3_raw = servo3_raw;
packet.servo4_raw = servo4_raw;
packet.servo5_raw = servo5_raw;
packet.servo6_raw = servo6_raw;
packet.servo7_raw = servo7_raw;
packet.servo8_raw = servo8_raw;
packet.port = port;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 21);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SERVO_OUTPUT_RAW;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 21, 222);
}
 
/**
* @brief Encode a servo_output_raw struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param servo_output_raw C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_servo_output_raw_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_servo_output_raw_t* servo_output_raw)
{
return mavlink_msg_servo_output_raw_pack(system_id, component_id, msg, servo_output_raw->time_usec, servo_output_raw->port, servo_output_raw->servo1_raw, servo_output_raw->servo2_raw, servo_output_raw->servo3_raw, servo_output_raw->servo4_raw, servo_output_raw->servo5_raw, servo_output_raw->servo6_raw, servo_output_raw->servo7_raw, servo_output_raw->servo8_raw);
}
 
/**
* @brief Send a servo_output_raw message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (since UNIX epoch or microseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
* @param servo1_raw Servo output 1 value, in microseconds
* @param servo2_raw Servo output 2 value, in microseconds
* @param servo3_raw Servo output 3 value, in microseconds
* @param servo4_raw Servo output 4 value, in microseconds
* @param servo5_raw Servo output 5 value, in microseconds
* @param servo6_raw Servo output 6 value, in microseconds
* @param servo7_raw Servo output 7 value, in microseconds
* @param servo8_raw Servo output 8 value, in microseconds
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_servo_output_raw_send(mavlink_channel_t chan, uint32_t time_usec, uint8_t port, uint16_t servo1_raw, uint16_t servo2_raw, uint16_t servo3_raw, uint16_t servo4_raw, uint16_t servo5_raw, uint16_t servo6_raw, uint16_t servo7_raw, uint16_t servo8_raw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[21];
_mav_put_uint32_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 4, servo1_raw);
_mav_put_uint16_t(buf, 6, servo2_raw);
_mav_put_uint16_t(buf, 8, servo3_raw);
_mav_put_uint16_t(buf, 10, servo4_raw);
_mav_put_uint16_t(buf, 12, servo5_raw);
_mav_put_uint16_t(buf, 14, servo6_raw);
_mav_put_uint16_t(buf, 16, servo7_raw);
_mav_put_uint16_t(buf, 18, servo8_raw);
_mav_put_uint8_t(buf, 20, port);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW, buf, 21, 222);
#else
mavlink_servo_output_raw_t packet;
packet.time_usec = time_usec;
packet.servo1_raw = servo1_raw;
packet.servo2_raw = servo2_raw;
packet.servo3_raw = servo3_raw;
packet.servo4_raw = servo4_raw;
packet.servo5_raw = servo5_raw;
packet.servo6_raw = servo6_raw;
packet.servo7_raw = servo7_raw;
packet.servo8_raw = servo8_raw;
packet.port = port;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW, (const char *)&packet, 21, 222);
#endif
}
 
#endif
 
// MESSAGE SERVO_OUTPUT_RAW UNPACKING
 
 
/**
* @brief Get field time_usec from servo_output_raw message
*
* @return Timestamp (since UNIX epoch or microseconds since system boot)
*/
static inline uint32_t mavlink_msg_servo_output_raw_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field port from servo_output_raw message
*
* @return Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.
*/
static inline uint8_t mavlink_msg_servo_output_raw_get_port(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 20);
}
 
/**
* @brief Get field servo1_raw from servo_output_raw message
*
* @return Servo output 1 value, in microseconds
*/
static inline uint16_t mavlink_msg_servo_output_raw_get_servo1_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 4);
}
 
/**
* @brief Get field servo2_raw from servo_output_raw message
*
* @return Servo output 2 value, in microseconds
*/
static inline uint16_t mavlink_msg_servo_output_raw_get_servo2_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 6);
}
 
/**
* @brief Get field servo3_raw from servo_output_raw message
*
* @return Servo output 3 value, in microseconds
*/
static inline uint16_t mavlink_msg_servo_output_raw_get_servo3_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 8);
}
 
/**
* @brief Get field servo4_raw from servo_output_raw message
*
* @return Servo output 4 value, in microseconds
*/
static inline uint16_t mavlink_msg_servo_output_raw_get_servo4_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 10);
}
 
/**
* @brief Get field servo5_raw from servo_output_raw message
*
* @return Servo output 5 value, in microseconds
*/
static inline uint16_t mavlink_msg_servo_output_raw_get_servo5_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 12);
}
 
/**
* @brief Get field servo6_raw from servo_output_raw message
*
* @return Servo output 6 value, in microseconds
*/
static inline uint16_t mavlink_msg_servo_output_raw_get_servo6_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 14);
}
 
/**
* @brief Get field servo7_raw from servo_output_raw message
*
* @return Servo output 7 value, in microseconds
*/
static inline uint16_t mavlink_msg_servo_output_raw_get_servo7_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 16);
}
 
/**
* @brief Get field servo8_raw from servo_output_raw message
*
* @return Servo output 8 value, in microseconds
*/
static inline uint16_t mavlink_msg_servo_output_raw_get_servo8_raw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 18);
}
 
/**
* @brief Decode a servo_output_raw message into a struct
*
* @param msg The message to decode
* @param servo_output_raw C-struct to decode the message contents into
*/
static inline void mavlink_msg_servo_output_raw_decode(const mavlink_message_t* msg, mavlink_servo_output_raw_t* servo_output_raw)
{
#if MAVLINK_NEED_BYTE_SWAP
servo_output_raw->time_usec = mavlink_msg_servo_output_raw_get_time_usec(msg);
servo_output_raw->servo1_raw = mavlink_msg_servo_output_raw_get_servo1_raw(msg);
servo_output_raw->servo2_raw = mavlink_msg_servo_output_raw_get_servo2_raw(msg);
servo_output_raw->servo3_raw = mavlink_msg_servo_output_raw_get_servo3_raw(msg);
servo_output_raw->servo4_raw = mavlink_msg_servo_output_raw_get_servo4_raw(msg);
servo_output_raw->servo5_raw = mavlink_msg_servo_output_raw_get_servo5_raw(msg);
servo_output_raw->servo6_raw = mavlink_msg_servo_output_raw_get_servo6_raw(msg);
servo_output_raw->servo7_raw = mavlink_msg_servo_output_raw_get_servo7_raw(msg);
servo_output_raw->servo8_raw = mavlink_msg_servo_output_raw_get_servo8_raw(msg);
servo_output_raw->port = mavlink_msg_servo_output_raw_get_port(msg);
#else
memcpy(servo_output_raw, _MAV_PAYLOAD(msg), 21);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_set_global_position_setpoint_int.h
0,0 → 1,232
// MESSAGE SET_GLOBAL_POSITION_SETPOINT_INT PACKING
 
#define MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT 53
 
typedef struct __mavlink_set_global_position_setpoint_int_t
{
int32_t latitude; ///< WGS84 Latitude position in degrees * 1E7
int32_t longitude; ///< WGS84 Longitude position in degrees * 1E7
int32_t altitude; ///< WGS84 Altitude in meters * 1000 (positive for up)
int16_t yaw; ///< Desired yaw angle in degrees * 100
uint8_t coordinate_frame; ///< Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
} mavlink_set_global_position_setpoint_int_t;
 
#define MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN 15
#define MAVLINK_MSG_ID_53_LEN 15
 
 
 
#define MAVLINK_MESSAGE_INFO_SET_GLOBAL_POSITION_SETPOINT_INT { \
"SET_GLOBAL_POSITION_SETPOINT_INT", \
5, \
{ { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_set_global_position_setpoint_int_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_set_global_position_setpoint_int_t, longitude) }, \
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_set_global_position_setpoint_int_t, altitude) }, \
{ "yaw", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_set_global_position_setpoint_int_t, yaw) }, \
{ "coordinate_frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_set_global_position_setpoint_int_t, coordinate_frame) }, \
} \
}
 
 
/**
* @brief Pack a set_global_position_setpoint_int message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_global_position_setpoint_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t coordinate_frame, int32_t latitude, int32_t longitude, int32_t altitude, int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
#else
mavlink_set_global_position_setpoint_int_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT;
return mavlink_finalize_message(msg, system_id, component_id, 15, 33);
}
 
/**
* @brief Pack a set_global_position_setpoint_int message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_global_position_setpoint_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t coordinate_frame,int32_t latitude,int32_t longitude,int32_t altitude,int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
#else
mavlink_set_global_position_setpoint_int_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 15, 33);
}
 
/**
* @brief Encode a set_global_position_setpoint_int struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param set_global_position_setpoint_int C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_set_global_position_setpoint_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_global_position_setpoint_int_t* set_global_position_setpoint_int)
{
return mavlink_msg_set_global_position_setpoint_int_pack(system_id, component_id, msg, set_global_position_setpoint_int->coordinate_frame, set_global_position_setpoint_int->latitude, set_global_position_setpoint_int->longitude, set_global_position_setpoint_int->altitude, set_global_position_setpoint_int->yaw);
}
 
/**
* @brief Send a set_global_position_setpoint_int message
* @param chan MAVLink channel to send the message
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_set_global_position_setpoint_int_send(mavlink_channel_t chan, uint8_t coordinate_frame, int32_t latitude, int32_t longitude, int32_t altitude, int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT, buf, 15, 33);
#else
mavlink_set_global_position_setpoint_int_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT, (const char *)&packet, 15, 33);
#endif
}
 
#endif
 
// MESSAGE SET_GLOBAL_POSITION_SETPOINT_INT UNPACKING
 
 
/**
* @brief Get field coordinate_frame from set_global_position_setpoint_int message
*
* @return Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
*/
static inline uint8_t mavlink_msg_set_global_position_setpoint_int_get_coordinate_frame(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 14);
}
 
/**
* @brief Get field latitude from set_global_position_setpoint_int message
*
* @return WGS84 Latitude position in degrees * 1E7
*/
static inline int32_t mavlink_msg_set_global_position_setpoint_int_get_latitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 0);
}
 
/**
* @brief Get field longitude from set_global_position_setpoint_int message
*
* @return WGS84 Longitude position in degrees * 1E7
*/
static inline int32_t mavlink_msg_set_global_position_setpoint_int_get_longitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 4);
}
 
/**
* @brief Get field altitude from set_global_position_setpoint_int message
*
* @return WGS84 Altitude in meters * 1000 (positive for up)
*/
static inline int32_t mavlink_msg_set_global_position_setpoint_int_get_altitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 8);
}
 
/**
* @brief Get field yaw from set_global_position_setpoint_int message
*
* @return Desired yaw angle in degrees * 100
*/
static inline int16_t mavlink_msg_set_global_position_setpoint_int_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 12);
}
 
/**
* @brief Decode a set_global_position_setpoint_int message into a struct
*
* @param msg The message to decode
* @param set_global_position_setpoint_int C-struct to decode the message contents into
*/
static inline void mavlink_msg_set_global_position_setpoint_int_decode(const mavlink_message_t* msg, mavlink_set_global_position_setpoint_int_t* set_global_position_setpoint_int)
{
#if MAVLINK_NEED_BYTE_SWAP
set_global_position_setpoint_int->latitude = mavlink_msg_set_global_position_setpoint_int_get_latitude(msg);
set_global_position_setpoint_int->longitude = mavlink_msg_set_global_position_setpoint_int_get_longitude(msg);
set_global_position_setpoint_int->altitude = mavlink_msg_set_global_position_setpoint_int_get_altitude(msg);
set_global_position_setpoint_int->yaw = mavlink_msg_set_global_position_setpoint_int_get_yaw(msg);
set_global_position_setpoint_int->coordinate_frame = mavlink_msg_set_global_position_setpoint_int_get_coordinate_frame(msg);
#else
memcpy(set_global_position_setpoint_int, _MAV_PAYLOAD(msg), 15);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_set_gps_global_origin.h
0,0 → 1,210
// MESSAGE SET_GPS_GLOBAL_ORIGIN PACKING
 
#define MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN 48
 
typedef struct __mavlink_set_gps_global_origin_t
{
int32_t latitude; ///< global position * 1E7
int32_t longitude; ///< global position * 1E7
int32_t altitude; ///< global position * 1000
uint8_t target_system; ///< System ID
} mavlink_set_gps_global_origin_t;
 
#define MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN 13
#define MAVLINK_MSG_ID_48_LEN 13
 
 
 
#define MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN { \
"SET_GPS_GLOBAL_ORIGIN", \
4, \
{ { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_set_gps_global_origin_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_set_gps_global_origin_t, longitude) }, \
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_set_gps_global_origin_t, altitude) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_set_gps_global_origin_t, target_system) }, \
} \
}
 
 
/**
* @brief Pack a set_gps_global_origin message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param latitude global position * 1E7
* @param longitude global position * 1E7
* @param altitude global position * 1000
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[13];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_uint8_t(buf, 12, target_system);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 13);
#else
mavlink_set_gps_global_origin_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.target_system = target_system;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 13);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN;
return mavlink_finalize_message(msg, system_id, component_id, 13, 41);
}
 
/**
* @brief Pack a set_gps_global_origin message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param latitude global position * 1E7
* @param longitude global position * 1E7
* @param altitude global position * 1000
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_gps_global_origin_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,int32_t latitude,int32_t longitude,int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[13];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_uint8_t(buf, 12, target_system);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 13);
#else
mavlink_set_gps_global_origin_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.target_system = target_system;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 13);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 13, 41);
}
 
/**
* @brief Encode a set_gps_global_origin struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param set_gps_global_origin C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_set_gps_global_origin_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_gps_global_origin_t* set_gps_global_origin)
{
return mavlink_msg_set_gps_global_origin_pack(system_id, component_id, msg, set_gps_global_origin->target_system, set_gps_global_origin->latitude, set_gps_global_origin->longitude, set_gps_global_origin->altitude);
}
 
/**
* @brief Send a set_gps_global_origin message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param latitude global position * 1E7
* @param longitude global position * 1E7
* @param altitude global position * 1000
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_set_gps_global_origin_send(mavlink_channel_t chan, uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[13];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_uint8_t(buf, 12, target_system);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, buf, 13, 41);
#else
mavlink_set_gps_global_origin_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.target_system = target_system;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, (const char *)&packet, 13, 41);
#endif
}
 
#endif
 
// MESSAGE SET_GPS_GLOBAL_ORIGIN UNPACKING
 
 
/**
* @brief Get field target_system from set_gps_global_origin message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_set_gps_global_origin_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 12);
}
 
/**
* @brief Get field latitude from set_gps_global_origin message
*
* @return global position * 1E7
*/
static inline int32_t mavlink_msg_set_gps_global_origin_get_latitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 0);
}
 
/**
* @brief Get field longitude from set_gps_global_origin message
*
* @return global position * 1E7
*/
static inline int32_t mavlink_msg_set_gps_global_origin_get_longitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 4);
}
 
/**
* @brief Get field altitude from set_gps_global_origin message
*
* @return global position * 1000
*/
static inline int32_t mavlink_msg_set_gps_global_origin_get_altitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 8);
}
 
/**
* @brief Decode a set_gps_global_origin message into a struct
*
* @param msg The message to decode
* @param set_gps_global_origin C-struct to decode the message contents into
*/
static inline void mavlink_msg_set_gps_global_origin_decode(const mavlink_message_t* msg, mavlink_set_gps_global_origin_t* set_gps_global_origin)
{
#if MAVLINK_NEED_BYTE_SWAP
set_gps_global_origin->latitude = mavlink_msg_set_gps_global_origin_get_latitude(msg);
set_gps_global_origin->longitude = mavlink_msg_set_gps_global_origin_get_longitude(msg);
set_gps_global_origin->altitude = mavlink_msg_set_gps_global_origin_get_altitude(msg);
set_gps_global_origin->target_system = mavlink_msg_set_gps_global_origin_get_target_system(msg);
#else
memcpy(set_gps_global_origin, _MAV_PAYLOAD(msg), 13);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_set_local_position_setpoint.h
0,0 → 1,276
// MESSAGE SET_LOCAL_POSITION_SETPOINT PACKING
 
#define MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT 50
 
typedef struct __mavlink_set_local_position_setpoint_t
{
float x; ///< x position
float y; ///< y position
float z; ///< z position
float yaw; ///< Desired yaw angle
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
uint8_t coordinate_frame; ///< Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
} mavlink_set_local_position_setpoint_t;
 
#define MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN 19
#define MAVLINK_MSG_ID_50_LEN 19
 
 
 
#define MAVLINK_MESSAGE_INFO_SET_LOCAL_POSITION_SETPOINT { \
"SET_LOCAL_POSITION_SETPOINT", \
7, \
{ { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_set_local_position_setpoint_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_set_local_position_setpoint_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_set_local_position_setpoint_t, z) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_set_local_position_setpoint_t, yaw) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_set_local_position_setpoint_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_set_local_position_setpoint_t, target_component) }, \
{ "coordinate_frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_set_local_position_setpoint_t, coordinate_frame) }, \
} \
}
 
 
/**
* @brief Pack a set_local_position_setpoint message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
* @param x x position
* @param y y position
* @param z z position
* @param yaw Desired yaw angle
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_local_position_setpoint_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint8_t coordinate_frame, float x, float y, float z, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[19];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
_mav_put_float(buf, 12, yaw);
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
_mav_put_uint8_t(buf, 18, coordinate_frame);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 19);
#else
mavlink_set_local_position_setpoint_t packet;
packet.x = x;
packet.y = y;
packet.z = z;
packet.yaw = yaw;
packet.target_system = target_system;
packet.target_component = target_component;
packet.coordinate_frame = coordinate_frame;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 19);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT;
return mavlink_finalize_message(msg, system_id, component_id, 19, 214);
}
 
/**
* @brief Pack a set_local_position_setpoint message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
* @param x x position
* @param y y position
* @param z z position
* @param yaw Desired yaw angle
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_local_position_setpoint_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint8_t coordinate_frame,float x,float y,float z,float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[19];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
_mav_put_float(buf, 12, yaw);
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
_mav_put_uint8_t(buf, 18, coordinate_frame);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 19);
#else
mavlink_set_local_position_setpoint_t packet;
packet.x = x;
packet.y = y;
packet.z = z;
packet.yaw = yaw;
packet.target_system = target_system;
packet.target_component = target_component;
packet.coordinate_frame = coordinate_frame;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 19);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 19, 214);
}
 
/**
* @brief Encode a set_local_position_setpoint struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param set_local_position_setpoint C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_set_local_position_setpoint_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_local_position_setpoint_t* set_local_position_setpoint)
{
return mavlink_msg_set_local_position_setpoint_pack(system_id, component_id, msg, set_local_position_setpoint->target_system, set_local_position_setpoint->target_component, set_local_position_setpoint->coordinate_frame, set_local_position_setpoint->x, set_local_position_setpoint->y, set_local_position_setpoint->z, set_local_position_setpoint->yaw);
}
 
/**
* @brief Send a set_local_position_setpoint message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
* @param x x position
* @param y y position
* @param z z position
* @param yaw Desired yaw angle
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_set_local_position_setpoint_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t coordinate_frame, float x, float y, float z, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[19];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
_mav_put_float(buf, 12, yaw);
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
_mav_put_uint8_t(buf, 18, coordinate_frame);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT, buf, 19, 214);
#else
mavlink_set_local_position_setpoint_t packet;
packet.x = x;
packet.y = y;
packet.z = z;
packet.yaw = yaw;
packet.target_system = target_system;
packet.target_component = target_component;
packet.coordinate_frame = coordinate_frame;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT, (const char *)&packet, 19, 214);
#endif
}
 
#endif
 
// MESSAGE SET_LOCAL_POSITION_SETPOINT UNPACKING
 
 
/**
* @brief Get field target_system from set_local_position_setpoint message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_set_local_position_setpoint_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 16);
}
 
/**
* @brief Get field target_component from set_local_position_setpoint message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_set_local_position_setpoint_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 17);
}
 
/**
* @brief Get field coordinate_frame from set_local_position_setpoint message
*
* @return Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
*/
static inline uint8_t mavlink_msg_set_local_position_setpoint_get_coordinate_frame(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 18);
}
 
/**
* @brief Get field x from set_local_position_setpoint message
*
* @return x position
*/
static inline float mavlink_msg_set_local_position_setpoint_get_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field y from set_local_position_setpoint message
*
* @return y position
*/
static inline float mavlink_msg_set_local_position_setpoint_get_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field z from set_local_position_setpoint message
*
* @return z position
*/
static inline float mavlink_msg_set_local_position_setpoint_get_z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field yaw from set_local_position_setpoint message
*
* @return Desired yaw angle
*/
static inline float mavlink_msg_set_local_position_setpoint_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Decode a set_local_position_setpoint message into a struct
*
* @param msg The message to decode
* @param set_local_position_setpoint C-struct to decode the message contents into
*/
static inline void mavlink_msg_set_local_position_setpoint_decode(const mavlink_message_t* msg, mavlink_set_local_position_setpoint_t* set_local_position_setpoint)
{
#if MAVLINK_NEED_BYTE_SWAP
set_local_position_setpoint->x = mavlink_msg_set_local_position_setpoint_get_x(msg);
set_local_position_setpoint->y = mavlink_msg_set_local_position_setpoint_get_y(msg);
set_local_position_setpoint->z = mavlink_msg_set_local_position_setpoint_get_z(msg);
set_local_position_setpoint->yaw = mavlink_msg_set_local_position_setpoint_get_yaw(msg);
set_local_position_setpoint->target_system = mavlink_msg_set_local_position_setpoint_get_target_system(msg);
set_local_position_setpoint->target_component = mavlink_msg_set_local_position_setpoint_get_target_component(msg);
set_local_position_setpoint->coordinate_frame = mavlink_msg_set_local_position_setpoint_get_coordinate_frame(msg);
#else
memcpy(set_local_position_setpoint, _MAV_PAYLOAD(msg), 19);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_set_mode.h
0,0 → 1,188
// MESSAGE SET_MODE PACKING
 
#define MAVLINK_MSG_ID_SET_MODE 11
 
typedef struct __mavlink_set_mode_t
{
uint32_t custom_mode; ///< The new autopilot-specific mode. This field can be ignored by an autopilot.
uint8_t target_system; ///< The system setting the mode
uint8_t base_mode; ///< The new base mode
} mavlink_set_mode_t;
 
#define MAVLINK_MSG_ID_SET_MODE_LEN 6
#define MAVLINK_MSG_ID_11_LEN 6
 
 
 
#define MAVLINK_MESSAGE_INFO_SET_MODE { \
"SET_MODE", \
3, \
{ { "custom_mode", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_set_mode_t, custom_mode) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_set_mode_t, target_system) }, \
{ "base_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_set_mode_t, base_mode) }, \
} \
}
 
 
/**
* @brief Pack a set_mode message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system The system setting the mode
* @param base_mode The new base mode
* @param custom_mode The new autopilot-specific mode. This field can be ignored by an autopilot.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_mode_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t base_mode, uint32_t custom_mode)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_uint32_t(buf, 0, custom_mode);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, base_mode);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
#else
mavlink_set_mode_t packet;
packet.custom_mode = custom_mode;
packet.target_system = target_system;
packet.base_mode = base_mode;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_MODE;
return mavlink_finalize_message(msg, system_id, component_id, 6, 89);
}
 
/**
* @brief Pack a set_mode message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system The system setting the mode
* @param base_mode The new base mode
* @param custom_mode The new autopilot-specific mode. This field can be ignored by an autopilot.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_mode_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t base_mode,uint32_t custom_mode)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_uint32_t(buf, 0, custom_mode);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, base_mode);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
#else
mavlink_set_mode_t packet;
packet.custom_mode = custom_mode;
packet.target_system = target_system;
packet.base_mode = base_mode;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_MODE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 6, 89);
}
 
/**
* @brief Encode a set_mode struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param set_mode C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_set_mode_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_mode_t* set_mode)
{
return mavlink_msg_set_mode_pack(system_id, component_id, msg, set_mode->target_system, set_mode->base_mode, set_mode->custom_mode);
}
 
/**
* @brief Send a set_mode message
* @param chan MAVLink channel to send the message
*
* @param target_system The system setting the mode
* @param base_mode The new base mode
* @param custom_mode The new autopilot-specific mode. This field can be ignored by an autopilot.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_set_mode_send(mavlink_channel_t chan, uint8_t target_system, uint8_t base_mode, uint32_t custom_mode)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
_mav_put_uint32_t(buf, 0, custom_mode);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, base_mode);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_MODE, buf, 6, 89);
#else
mavlink_set_mode_t packet;
packet.custom_mode = custom_mode;
packet.target_system = target_system;
packet.base_mode = base_mode;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_MODE, (const char *)&packet, 6, 89);
#endif
}
 
#endif
 
// MESSAGE SET_MODE UNPACKING
 
 
/**
* @brief Get field target_system from set_mode message
*
* @return The system setting the mode
*/
static inline uint8_t mavlink_msg_set_mode_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
 
/**
* @brief Get field base_mode from set_mode message
*
* @return The new base mode
*/
static inline uint8_t mavlink_msg_set_mode_get_base_mode(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
 
/**
* @brief Get field custom_mode from set_mode message
*
* @return The new autopilot-specific mode. This field can be ignored by an autopilot.
*/
static inline uint32_t mavlink_msg_set_mode_get_custom_mode(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Decode a set_mode message into a struct
*
* @param msg The message to decode
* @param set_mode C-struct to decode the message contents into
*/
static inline void mavlink_msg_set_mode_decode(const mavlink_message_t* msg, mavlink_set_mode_t* set_mode)
{
#if MAVLINK_NEED_BYTE_SWAP
set_mode->custom_mode = mavlink_msg_set_mode_get_custom_mode(msg);
set_mode->target_system = mavlink_msg_set_mode_get_target_system(msg);
set_mode->base_mode = mavlink_msg_set_mode_get_base_mode(msg);
#else
memcpy(set_mode, _MAV_PAYLOAD(msg), 6);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_set_quad_motors_setpoint.h
0,0 → 1,232
// MESSAGE SET_QUAD_MOTORS_SETPOINT PACKING
 
#define MAVLINK_MSG_ID_SET_QUAD_MOTORS_SETPOINT 60
 
typedef struct __mavlink_set_quad_motors_setpoint_t
{
uint16_t motor_front_nw; ///< Front motor in + configuration, front left motor in x configuration
uint16_t motor_right_ne; ///< Right motor in + configuration, front right motor in x configuration
uint16_t motor_back_se; ///< Back motor in + configuration, back right motor in x configuration
uint16_t motor_left_sw; ///< Left motor in + configuration, back left motor in x configuration
uint8_t target_system; ///< System ID of the system that should set these motor commands
} mavlink_set_quad_motors_setpoint_t;
 
#define MAVLINK_MSG_ID_SET_QUAD_MOTORS_SETPOINT_LEN 9
#define MAVLINK_MSG_ID_60_LEN 9
 
 
 
#define MAVLINK_MESSAGE_INFO_SET_QUAD_MOTORS_SETPOINT { \
"SET_QUAD_MOTORS_SETPOINT", \
5, \
{ { "motor_front_nw", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_set_quad_motors_setpoint_t, motor_front_nw) }, \
{ "motor_right_ne", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_set_quad_motors_setpoint_t, motor_right_ne) }, \
{ "motor_back_se", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_set_quad_motors_setpoint_t, motor_back_se) }, \
{ "motor_left_sw", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_set_quad_motors_setpoint_t, motor_left_sw) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_set_quad_motors_setpoint_t, target_system) }, \
} \
}
 
 
/**
* @brief Pack a set_quad_motors_setpoint message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID of the system that should set these motor commands
* @param motor_front_nw Front motor in + configuration, front left motor in x configuration
* @param motor_right_ne Right motor in + configuration, front right motor in x configuration
* @param motor_back_se Back motor in + configuration, back right motor in x configuration
* @param motor_left_sw Left motor in + configuration, back left motor in x configuration
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_quad_motors_setpoint_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint16_t motor_front_nw, uint16_t motor_right_ne, uint16_t motor_back_se, uint16_t motor_left_sw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint16_t(buf, 0, motor_front_nw);
_mav_put_uint16_t(buf, 2, motor_right_ne);
_mav_put_uint16_t(buf, 4, motor_back_se);
_mav_put_uint16_t(buf, 6, motor_left_sw);
_mav_put_uint8_t(buf, 8, target_system);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
#else
mavlink_set_quad_motors_setpoint_t packet;
packet.motor_front_nw = motor_front_nw;
packet.motor_right_ne = motor_right_ne;
packet.motor_back_se = motor_back_se;
packet.motor_left_sw = motor_left_sw;
packet.target_system = target_system;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_QUAD_MOTORS_SETPOINT;
return mavlink_finalize_message(msg, system_id, component_id, 9, 30);
}
 
/**
* @brief Pack a set_quad_motors_setpoint message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID of the system that should set these motor commands
* @param motor_front_nw Front motor in + configuration, front left motor in x configuration
* @param motor_right_ne Right motor in + configuration, front right motor in x configuration
* @param motor_back_se Back motor in + configuration, back right motor in x configuration
* @param motor_left_sw Left motor in + configuration, back left motor in x configuration
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_quad_motors_setpoint_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint16_t motor_front_nw,uint16_t motor_right_ne,uint16_t motor_back_se,uint16_t motor_left_sw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint16_t(buf, 0, motor_front_nw);
_mav_put_uint16_t(buf, 2, motor_right_ne);
_mav_put_uint16_t(buf, 4, motor_back_se);
_mav_put_uint16_t(buf, 6, motor_left_sw);
_mav_put_uint8_t(buf, 8, target_system);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
#else
mavlink_set_quad_motors_setpoint_t packet;
packet.motor_front_nw = motor_front_nw;
packet.motor_right_ne = motor_right_ne;
packet.motor_back_se = motor_back_se;
packet.motor_left_sw = motor_left_sw;
packet.target_system = target_system;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_QUAD_MOTORS_SETPOINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 9, 30);
}
 
/**
* @brief Encode a set_quad_motors_setpoint struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param set_quad_motors_setpoint C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_set_quad_motors_setpoint_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_quad_motors_setpoint_t* set_quad_motors_setpoint)
{
return mavlink_msg_set_quad_motors_setpoint_pack(system_id, component_id, msg, set_quad_motors_setpoint->target_system, set_quad_motors_setpoint->motor_front_nw, set_quad_motors_setpoint->motor_right_ne, set_quad_motors_setpoint->motor_back_se, set_quad_motors_setpoint->motor_left_sw);
}
 
/**
* @brief Send a set_quad_motors_setpoint message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID of the system that should set these motor commands
* @param motor_front_nw Front motor in + configuration, front left motor in x configuration
* @param motor_right_ne Right motor in + configuration, front right motor in x configuration
* @param motor_back_se Back motor in + configuration, back right motor in x configuration
* @param motor_left_sw Left motor in + configuration, back left motor in x configuration
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_set_quad_motors_setpoint_send(mavlink_channel_t chan, uint8_t target_system, uint16_t motor_front_nw, uint16_t motor_right_ne, uint16_t motor_back_se, uint16_t motor_left_sw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
_mav_put_uint16_t(buf, 0, motor_front_nw);
_mav_put_uint16_t(buf, 2, motor_right_ne);
_mav_put_uint16_t(buf, 4, motor_back_se);
_mav_put_uint16_t(buf, 6, motor_left_sw);
_mav_put_uint8_t(buf, 8, target_system);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_QUAD_MOTORS_SETPOINT, buf, 9, 30);
#else
mavlink_set_quad_motors_setpoint_t packet;
packet.motor_front_nw = motor_front_nw;
packet.motor_right_ne = motor_right_ne;
packet.motor_back_se = motor_back_se;
packet.motor_left_sw = motor_left_sw;
packet.target_system = target_system;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_QUAD_MOTORS_SETPOINT, (const char *)&packet, 9, 30);
#endif
}
 
#endif
 
// MESSAGE SET_QUAD_MOTORS_SETPOINT UNPACKING
 
 
/**
* @brief Get field target_system from set_quad_motors_setpoint message
*
* @return System ID of the system that should set these motor commands
*/
static inline uint8_t mavlink_msg_set_quad_motors_setpoint_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
}
 
/**
* @brief Get field motor_front_nw from set_quad_motors_setpoint message
*
* @return Front motor in + configuration, front left motor in x configuration
*/
static inline uint16_t mavlink_msg_set_quad_motors_setpoint_get_motor_front_nw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
 
/**
* @brief Get field motor_right_ne from set_quad_motors_setpoint message
*
* @return Right motor in + configuration, front right motor in x configuration
*/
static inline uint16_t mavlink_msg_set_quad_motors_setpoint_get_motor_right_ne(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 2);
}
 
/**
* @brief Get field motor_back_se from set_quad_motors_setpoint message
*
* @return Back motor in + configuration, back right motor in x configuration
*/
static inline uint16_t mavlink_msg_set_quad_motors_setpoint_get_motor_back_se(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 4);
}
 
/**
* @brief Get field motor_left_sw from set_quad_motors_setpoint message
*
* @return Left motor in + configuration, back left motor in x configuration
*/
static inline uint16_t mavlink_msg_set_quad_motors_setpoint_get_motor_left_sw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 6);
}
 
/**
* @brief Decode a set_quad_motors_setpoint message into a struct
*
* @param msg The message to decode
* @param set_quad_motors_setpoint C-struct to decode the message contents into
*/
static inline void mavlink_msg_set_quad_motors_setpoint_decode(const mavlink_message_t* msg, mavlink_set_quad_motors_setpoint_t* set_quad_motors_setpoint)
{
#if MAVLINK_NEED_BYTE_SWAP
set_quad_motors_setpoint->motor_front_nw = mavlink_msg_set_quad_motors_setpoint_get_motor_front_nw(msg);
set_quad_motors_setpoint->motor_right_ne = mavlink_msg_set_quad_motors_setpoint_get_motor_right_ne(msg);
set_quad_motors_setpoint->motor_back_se = mavlink_msg_set_quad_motors_setpoint_get_motor_back_se(msg);
set_quad_motors_setpoint->motor_left_sw = mavlink_msg_set_quad_motors_setpoint_get_motor_left_sw(msg);
set_quad_motors_setpoint->target_system = mavlink_msg_set_quad_motors_setpoint_get_target_system(msg);
#else
memcpy(set_quad_motors_setpoint, _MAV_PAYLOAD(msg), 9);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust.h
0,0 → 1,236
// MESSAGE SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST PACKING
 
#define MAVLINK_MSG_ID_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST 61
 
typedef struct __mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t
{
int16_t roll[6]; ///< Desired roll angle in radians, scaled to int16 for 6 quadrotors: 0..5
int16_t pitch[6]; ///< Desired pitch angle in radians, scaled to int16 for 6 quadrotors: 0..5
int16_t yaw[6]; ///< Desired yaw angle in radians, scaled to int16 for 6 quadrotors: 0..5
uint16_t thrust[6]; ///< Collective thrust, scaled to uint16 for 6 quadrotors: 0..5
uint8_t target_systems[6]; ///< System IDs for 6 quadrotors: 0..5, the ID's are the MAVLink IDs
} mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t;
 
#define MAVLINK_MSG_ID_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST_LEN 54
#define MAVLINK_MSG_ID_61_LEN 54
 
#define MAVLINK_MSG_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST_FIELD_ROLL_LEN 6
#define MAVLINK_MSG_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST_FIELD_PITCH_LEN 6
#define MAVLINK_MSG_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST_FIELD_YAW_LEN 6
#define MAVLINK_MSG_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST_FIELD_THRUST_LEN 6
#define MAVLINK_MSG_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST_FIELD_TARGET_SYSTEMS_LEN 6
 
#define MAVLINK_MESSAGE_INFO_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST { \
"SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST", \
5, \
{ { "roll", NULL, MAVLINK_TYPE_INT16_T, 6, 0, offsetof(mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_INT16_T, 6, 12, offsetof(mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_INT16_T, 6, 24, offsetof(mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t, yaw) }, \
{ "thrust", NULL, MAVLINK_TYPE_UINT16_T, 6, 36, offsetof(mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t, thrust) }, \
{ "target_systems", NULL, MAVLINK_TYPE_UINT8_T, 6, 48, offsetof(mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t, target_systems) }, \
} \
}
 
 
/**
* @brief Pack a set_quad_swarm_roll_pitch_yaw_thrust message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_systems System IDs for 6 quadrotors: 0..5, the ID's are the MAVLink IDs
* @param roll Desired roll angle in radians, scaled to int16 for 6 quadrotors: 0..5
* @param pitch Desired pitch angle in radians, scaled to int16 for 6 quadrotors: 0..5
* @param yaw Desired yaw angle in radians, scaled to int16 for 6 quadrotors: 0..5
* @param thrust Collective thrust, scaled to uint16 for 6 quadrotors: 0..5
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const uint8_t *target_systems, const int16_t *roll, const int16_t *pitch, const int16_t *yaw, const uint16_t *thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[54];
 
_mav_put_int16_t_array(buf, 0, roll, 6);
_mav_put_int16_t_array(buf, 12, pitch, 6);
_mav_put_int16_t_array(buf, 24, yaw, 6);
_mav_put_uint16_t_array(buf, 36, thrust, 6);
_mav_put_uint8_t_array(buf, 48, target_systems, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 54);
#else
mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t packet;
 
mav_array_memcpy(packet.roll, roll, sizeof(int16_t)*6);
mav_array_memcpy(packet.pitch, pitch, sizeof(int16_t)*6);
mav_array_memcpy(packet.yaw, yaw, sizeof(int16_t)*6);
mav_array_memcpy(packet.thrust, thrust, sizeof(uint16_t)*6);
mav_array_memcpy(packet.target_systems, target_systems, sizeof(uint8_t)*6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 54);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST;
return mavlink_finalize_message(msg, system_id, component_id, 54, 200);
}
 
/**
* @brief Pack a set_quad_swarm_roll_pitch_yaw_thrust message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_systems System IDs for 6 quadrotors: 0..5, the ID's are the MAVLink IDs
* @param roll Desired roll angle in radians, scaled to int16 for 6 quadrotors: 0..5
* @param pitch Desired pitch angle in radians, scaled to int16 for 6 quadrotors: 0..5
* @param yaw Desired yaw angle in radians, scaled to int16 for 6 quadrotors: 0..5
* @param thrust Collective thrust, scaled to uint16 for 6 quadrotors: 0..5
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
const uint8_t *target_systems,const int16_t *roll,const int16_t *pitch,const int16_t *yaw,const uint16_t *thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[54];
 
_mav_put_int16_t_array(buf, 0, roll, 6);
_mav_put_int16_t_array(buf, 12, pitch, 6);
_mav_put_int16_t_array(buf, 24, yaw, 6);
_mav_put_uint16_t_array(buf, 36, thrust, 6);
_mav_put_uint8_t_array(buf, 48, target_systems, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 54);
#else
mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t packet;
 
mav_array_memcpy(packet.roll, roll, sizeof(int16_t)*6);
mav_array_memcpy(packet.pitch, pitch, sizeof(int16_t)*6);
mav_array_memcpy(packet.yaw, yaw, sizeof(int16_t)*6);
mav_array_memcpy(packet.thrust, thrust, sizeof(uint16_t)*6);
mav_array_memcpy(packet.target_systems, target_systems, sizeof(uint8_t)*6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 54);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 54, 200);
}
 
/**
* @brief Encode a set_quad_swarm_roll_pitch_yaw_thrust struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param set_quad_swarm_roll_pitch_yaw_thrust C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t* set_quad_swarm_roll_pitch_yaw_thrust)
{
return mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_pack(system_id, component_id, msg, set_quad_swarm_roll_pitch_yaw_thrust->target_systems, set_quad_swarm_roll_pitch_yaw_thrust->roll, set_quad_swarm_roll_pitch_yaw_thrust->pitch, set_quad_swarm_roll_pitch_yaw_thrust->yaw, set_quad_swarm_roll_pitch_yaw_thrust->thrust);
}
 
/**
* @brief Send a set_quad_swarm_roll_pitch_yaw_thrust message
* @param chan MAVLink channel to send the message
*
* @param target_systems System IDs for 6 quadrotors: 0..5, the ID's are the MAVLink IDs
* @param roll Desired roll angle in radians, scaled to int16 for 6 quadrotors: 0..5
* @param pitch Desired pitch angle in radians, scaled to int16 for 6 quadrotors: 0..5
* @param yaw Desired yaw angle in radians, scaled to int16 for 6 quadrotors: 0..5
* @param thrust Collective thrust, scaled to uint16 for 6 quadrotors: 0..5
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_send(mavlink_channel_t chan, const uint8_t *target_systems, const int16_t *roll, const int16_t *pitch, const int16_t *yaw, const uint16_t *thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[54];
 
_mav_put_int16_t_array(buf, 0, roll, 6);
_mav_put_int16_t_array(buf, 12, pitch, 6);
_mav_put_int16_t_array(buf, 24, yaw, 6);
_mav_put_uint16_t_array(buf, 36, thrust, 6);
_mav_put_uint8_t_array(buf, 48, target_systems, 6);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST, buf, 54, 200);
#else
mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t packet;
 
mav_array_memcpy(packet.roll, roll, sizeof(int16_t)*6);
mav_array_memcpy(packet.pitch, pitch, sizeof(int16_t)*6);
mav_array_memcpy(packet.yaw, yaw, sizeof(int16_t)*6);
mav_array_memcpy(packet.thrust, thrust, sizeof(uint16_t)*6);
mav_array_memcpy(packet.target_systems, target_systems, sizeof(uint8_t)*6);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST, (const char *)&packet, 54, 200);
#endif
}
 
#endif
 
// MESSAGE SET_QUAD_SWARM_ROLL_PITCH_YAW_THRUST UNPACKING
 
 
/**
* @brief Get field target_systems from set_quad_swarm_roll_pitch_yaw_thrust message
*
* @return System IDs for 6 quadrotors: 0..5, the ID's are the MAVLink IDs
*/
static inline uint16_t mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_get_target_systems(const mavlink_message_t* msg, uint8_t *target_systems)
{
return _MAV_RETURN_uint8_t_array(msg, target_systems, 6, 48);
}
 
/**
* @brief Get field roll from set_quad_swarm_roll_pitch_yaw_thrust message
*
* @return Desired roll angle in radians, scaled to int16 for 6 quadrotors: 0..5
*/
static inline uint16_t mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_get_roll(const mavlink_message_t* msg, int16_t *roll)
{
return _MAV_RETURN_int16_t_array(msg, roll, 6, 0);
}
 
/**
* @brief Get field pitch from set_quad_swarm_roll_pitch_yaw_thrust message
*
* @return Desired pitch angle in radians, scaled to int16 for 6 quadrotors: 0..5
*/
static inline uint16_t mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_get_pitch(const mavlink_message_t* msg, int16_t *pitch)
{
return _MAV_RETURN_int16_t_array(msg, pitch, 6, 12);
}
 
/**
* @brief Get field yaw from set_quad_swarm_roll_pitch_yaw_thrust message
*
* @return Desired yaw angle in radians, scaled to int16 for 6 quadrotors: 0..5
*/
static inline uint16_t mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_get_yaw(const mavlink_message_t* msg, int16_t *yaw)
{
return _MAV_RETURN_int16_t_array(msg, yaw, 6, 24);
}
 
/**
* @brief Get field thrust from set_quad_swarm_roll_pitch_yaw_thrust message
*
* @return Collective thrust, scaled to uint16 for 6 quadrotors: 0..5
*/
static inline uint16_t mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_get_thrust(const mavlink_message_t* msg, uint16_t *thrust)
{
return _MAV_RETURN_uint16_t_array(msg, thrust, 6, 36);
}
 
/**
* @brief Decode a set_quad_swarm_roll_pitch_yaw_thrust message into a struct
*
* @param msg The message to decode
* @param set_quad_swarm_roll_pitch_yaw_thrust C-struct to decode the message contents into
*/
static inline void mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_decode(const mavlink_message_t* msg, mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t* set_quad_swarm_roll_pitch_yaw_thrust)
{
#if MAVLINK_NEED_BYTE_SWAP
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_get_roll(msg, set_quad_swarm_roll_pitch_yaw_thrust->roll);
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_get_pitch(msg, set_quad_swarm_roll_pitch_yaw_thrust->pitch);
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_get_yaw(msg, set_quad_swarm_roll_pitch_yaw_thrust->yaw);
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_get_thrust(msg, set_quad_swarm_roll_pitch_yaw_thrust->thrust);
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_get_target_systems(msg, set_quad_swarm_roll_pitch_yaw_thrust->target_systems);
#else
memcpy(set_quad_swarm_roll_pitch_yaw_thrust, _MAV_PAYLOAD(msg), 54);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_set_roll_pitch_yaw_speed_thrust.h
0,0 → 1,254
// MESSAGE SET_ROLL_PITCH_YAW_SPEED_THRUST PACKING
 
#define MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_SPEED_THRUST 57
 
typedef struct __mavlink_set_roll_pitch_yaw_speed_thrust_t
{
float roll_speed; ///< Desired roll angular speed in rad/s
float pitch_speed; ///< Desired pitch angular speed in rad/s
float yaw_speed; ///< Desired yaw angular speed in rad/s
float thrust; ///< Collective thrust, normalized to 0 .. 1
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_set_roll_pitch_yaw_speed_thrust_t;
 
#define MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_SPEED_THRUST_LEN 18
#define MAVLINK_MSG_ID_57_LEN 18
 
 
 
#define MAVLINK_MESSAGE_INFO_SET_ROLL_PITCH_YAW_SPEED_THRUST { \
"SET_ROLL_PITCH_YAW_SPEED_THRUST", \
6, \
{ { "roll_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_set_roll_pitch_yaw_speed_thrust_t, roll_speed) }, \
{ "pitch_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_set_roll_pitch_yaw_speed_thrust_t, pitch_speed) }, \
{ "yaw_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_set_roll_pitch_yaw_speed_thrust_t, yaw_speed) }, \
{ "thrust", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_set_roll_pitch_yaw_speed_thrust_t, thrust) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_set_roll_pitch_yaw_speed_thrust_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_set_roll_pitch_yaw_speed_thrust_t, target_component) }, \
} \
}
 
 
/**
* @brief Pack a set_roll_pitch_yaw_speed_thrust message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param roll_speed Desired roll angular speed in rad/s
* @param pitch_speed Desired pitch angular speed in rad/s
* @param yaw_speed Desired yaw angular speed in rad/s
* @param thrust Collective thrust, normalized to 0 .. 1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_roll_pitch_yaw_speed_thrust_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, float roll_speed, float pitch_speed, float yaw_speed, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_float(buf, 0, roll_speed);
_mav_put_float(buf, 4, pitch_speed);
_mav_put_float(buf, 8, yaw_speed);
_mav_put_float(buf, 12, thrust);
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
#else
mavlink_set_roll_pitch_yaw_speed_thrust_t packet;
packet.roll_speed = roll_speed;
packet.pitch_speed = pitch_speed;
packet.yaw_speed = yaw_speed;
packet.thrust = thrust;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_SPEED_THRUST;
return mavlink_finalize_message(msg, system_id, component_id, 18, 24);
}
 
/**
* @brief Pack a set_roll_pitch_yaw_speed_thrust message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param roll_speed Desired roll angular speed in rad/s
* @param pitch_speed Desired pitch angular speed in rad/s
* @param yaw_speed Desired yaw angular speed in rad/s
* @param thrust Collective thrust, normalized to 0 .. 1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_roll_pitch_yaw_speed_thrust_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,float roll_speed,float pitch_speed,float yaw_speed,float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_float(buf, 0, roll_speed);
_mav_put_float(buf, 4, pitch_speed);
_mav_put_float(buf, 8, yaw_speed);
_mav_put_float(buf, 12, thrust);
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
#else
mavlink_set_roll_pitch_yaw_speed_thrust_t packet;
packet.roll_speed = roll_speed;
packet.pitch_speed = pitch_speed;
packet.yaw_speed = yaw_speed;
packet.thrust = thrust;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_SPEED_THRUST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 18, 24);
}
 
/**
* @brief Encode a set_roll_pitch_yaw_speed_thrust struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param set_roll_pitch_yaw_speed_thrust C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_set_roll_pitch_yaw_speed_thrust_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_roll_pitch_yaw_speed_thrust_t* set_roll_pitch_yaw_speed_thrust)
{
return mavlink_msg_set_roll_pitch_yaw_speed_thrust_pack(system_id, component_id, msg, set_roll_pitch_yaw_speed_thrust->target_system, set_roll_pitch_yaw_speed_thrust->target_component, set_roll_pitch_yaw_speed_thrust->roll_speed, set_roll_pitch_yaw_speed_thrust->pitch_speed, set_roll_pitch_yaw_speed_thrust->yaw_speed, set_roll_pitch_yaw_speed_thrust->thrust);
}
 
/**
* @brief Send a set_roll_pitch_yaw_speed_thrust message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param roll_speed Desired roll angular speed in rad/s
* @param pitch_speed Desired pitch angular speed in rad/s
* @param yaw_speed Desired yaw angular speed in rad/s
* @param thrust Collective thrust, normalized to 0 .. 1
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_set_roll_pitch_yaw_speed_thrust_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, float roll_speed, float pitch_speed, float yaw_speed, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_float(buf, 0, roll_speed);
_mav_put_float(buf, 4, pitch_speed);
_mav_put_float(buf, 8, yaw_speed);
_mav_put_float(buf, 12, thrust);
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_SPEED_THRUST, buf, 18, 24);
#else
mavlink_set_roll_pitch_yaw_speed_thrust_t packet;
packet.roll_speed = roll_speed;
packet.pitch_speed = pitch_speed;
packet.yaw_speed = yaw_speed;
packet.thrust = thrust;
packet.target_system = target_system;
packet.target_component = target_component;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_SPEED_THRUST, (const char *)&packet, 18, 24);
#endif
}
 
#endif
 
// MESSAGE SET_ROLL_PITCH_YAW_SPEED_THRUST UNPACKING
 
 
/**
* @brief Get field target_system from set_roll_pitch_yaw_speed_thrust message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 16);
}
 
/**
* @brief Get field target_component from set_roll_pitch_yaw_speed_thrust message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 17);
}
 
/**
* @brief Get field roll_speed from set_roll_pitch_yaw_speed_thrust message
*
* @return Desired roll angular speed in rad/s
*/
static inline float mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_roll_speed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field pitch_speed from set_roll_pitch_yaw_speed_thrust message
*
* @return Desired pitch angular speed in rad/s
*/
static inline float mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_pitch_speed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field yaw_speed from set_roll_pitch_yaw_speed_thrust message
*
* @return Desired yaw angular speed in rad/s
*/
static inline float mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_yaw_speed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field thrust from set_roll_pitch_yaw_speed_thrust message
*
* @return Collective thrust, normalized to 0 .. 1
*/
static inline float mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_thrust(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Decode a set_roll_pitch_yaw_speed_thrust message into a struct
*
* @param msg The message to decode
* @param set_roll_pitch_yaw_speed_thrust C-struct to decode the message contents into
*/
static inline void mavlink_msg_set_roll_pitch_yaw_speed_thrust_decode(const mavlink_message_t* msg, mavlink_set_roll_pitch_yaw_speed_thrust_t* set_roll_pitch_yaw_speed_thrust)
{
#if MAVLINK_NEED_BYTE_SWAP
set_roll_pitch_yaw_speed_thrust->roll_speed = mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_roll_speed(msg);
set_roll_pitch_yaw_speed_thrust->pitch_speed = mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_pitch_speed(msg);
set_roll_pitch_yaw_speed_thrust->yaw_speed = mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_yaw_speed(msg);
set_roll_pitch_yaw_speed_thrust->thrust = mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_thrust(msg);
set_roll_pitch_yaw_speed_thrust->target_system = mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_target_system(msg);
set_roll_pitch_yaw_speed_thrust->target_component = mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_target_component(msg);
#else
memcpy(set_roll_pitch_yaw_speed_thrust, _MAV_PAYLOAD(msg), 18);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_set_roll_pitch_yaw_thrust.h
0,0 → 1,254
// MESSAGE SET_ROLL_PITCH_YAW_THRUST PACKING
 
#define MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_THRUST 56
 
typedef struct __mavlink_set_roll_pitch_yaw_thrust_t
{
float roll; ///< Desired roll angle in radians
float pitch; ///< Desired pitch angle in radians
float yaw; ///< Desired yaw angle in radians
float thrust; ///< Collective thrust, normalized to 0 .. 1
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_set_roll_pitch_yaw_thrust_t;
 
#define MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_THRUST_LEN 18
#define MAVLINK_MSG_ID_56_LEN 18
 
 
 
#define MAVLINK_MESSAGE_INFO_SET_ROLL_PITCH_YAW_THRUST { \
"SET_ROLL_PITCH_YAW_THRUST", \
6, \
{ { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_set_roll_pitch_yaw_thrust_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_set_roll_pitch_yaw_thrust_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_set_roll_pitch_yaw_thrust_t, yaw) }, \
{ "thrust", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_set_roll_pitch_yaw_thrust_t, thrust) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_set_roll_pitch_yaw_thrust_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_set_roll_pitch_yaw_thrust_t, target_component) }, \
} \
}
 
 
/**
* @brief Pack a set_roll_pitch_yaw_thrust message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param roll Desired roll angle in radians
* @param pitch Desired pitch angle in radians
* @param yaw Desired yaw angle in radians
* @param thrust Collective thrust, normalized to 0 .. 1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_roll_pitch_yaw_thrust_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, float roll, float pitch, float yaw, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_float(buf, 0, roll);
_mav_put_float(buf, 4, pitch);
_mav_put_float(buf, 8, yaw);
_mav_put_float(buf, 12, thrust);
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
#else
mavlink_set_roll_pitch_yaw_thrust_t packet;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.thrust = thrust;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_THRUST;
return mavlink_finalize_message(msg, system_id, component_id, 18, 100);
}
 
/**
* @brief Pack a set_roll_pitch_yaw_thrust message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param roll Desired roll angle in radians
* @param pitch Desired pitch angle in radians
* @param yaw Desired yaw angle in radians
* @param thrust Collective thrust, normalized to 0 .. 1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_roll_pitch_yaw_thrust_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,float roll,float pitch,float yaw,float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_float(buf, 0, roll);
_mav_put_float(buf, 4, pitch);
_mav_put_float(buf, 8, yaw);
_mav_put_float(buf, 12, thrust);
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
#else
mavlink_set_roll_pitch_yaw_thrust_t packet;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.thrust = thrust;
packet.target_system = target_system;
packet.target_component = target_component;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_THRUST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 18, 100);
}
 
/**
* @brief Encode a set_roll_pitch_yaw_thrust struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param set_roll_pitch_yaw_thrust C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_set_roll_pitch_yaw_thrust_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_roll_pitch_yaw_thrust_t* set_roll_pitch_yaw_thrust)
{
return mavlink_msg_set_roll_pitch_yaw_thrust_pack(system_id, component_id, msg, set_roll_pitch_yaw_thrust->target_system, set_roll_pitch_yaw_thrust->target_component, set_roll_pitch_yaw_thrust->roll, set_roll_pitch_yaw_thrust->pitch, set_roll_pitch_yaw_thrust->yaw, set_roll_pitch_yaw_thrust->thrust);
}
 
/**
* @brief Send a set_roll_pitch_yaw_thrust message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param roll Desired roll angle in radians
* @param pitch Desired pitch angle in radians
* @param yaw Desired yaw angle in radians
* @param thrust Collective thrust, normalized to 0 .. 1
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_set_roll_pitch_yaw_thrust_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, float roll, float pitch, float yaw, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
_mav_put_float(buf, 0, roll);
_mav_put_float(buf, 4, pitch);
_mav_put_float(buf, 8, yaw);
_mav_put_float(buf, 12, thrust);
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_THRUST, buf, 18, 100);
#else
mavlink_set_roll_pitch_yaw_thrust_t packet;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
packet.thrust = thrust;
packet.target_system = target_system;
packet.target_component = target_component;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_THRUST, (const char *)&packet, 18, 100);
#endif
}
 
#endif
 
// MESSAGE SET_ROLL_PITCH_YAW_THRUST UNPACKING
 
 
/**
* @brief Get field target_system from set_roll_pitch_yaw_thrust message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_set_roll_pitch_yaw_thrust_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 16);
}
 
/**
* @brief Get field target_component from set_roll_pitch_yaw_thrust message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_set_roll_pitch_yaw_thrust_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 17);
}
 
/**
* @brief Get field roll from set_roll_pitch_yaw_thrust message
*
* @return Desired roll angle in radians
*/
static inline float mavlink_msg_set_roll_pitch_yaw_thrust_get_roll(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field pitch from set_roll_pitch_yaw_thrust message
*
* @return Desired pitch angle in radians
*/
static inline float mavlink_msg_set_roll_pitch_yaw_thrust_get_pitch(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field yaw from set_roll_pitch_yaw_thrust message
*
* @return Desired yaw angle in radians
*/
static inline float mavlink_msg_set_roll_pitch_yaw_thrust_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field thrust from set_roll_pitch_yaw_thrust message
*
* @return Collective thrust, normalized to 0 .. 1
*/
static inline float mavlink_msg_set_roll_pitch_yaw_thrust_get_thrust(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Decode a set_roll_pitch_yaw_thrust message into a struct
*
* @param msg The message to decode
* @param set_roll_pitch_yaw_thrust C-struct to decode the message contents into
*/
static inline void mavlink_msg_set_roll_pitch_yaw_thrust_decode(const mavlink_message_t* msg, mavlink_set_roll_pitch_yaw_thrust_t* set_roll_pitch_yaw_thrust)
{
#if MAVLINK_NEED_BYTE_SWAP
set_roll_pitch_yaw_thrust->roll = mavlink_msg_set_roll_pitch_yaw_thrust_get_roll(msg);
set_roll_pitch_yaw_thrust->pitch = mavlink_msg_set_roll_pitch_yaw_thrust_get_pitch(msg);
set_roll_pitch_yaw_thrust->yaw = mavlink_msg_set_roll_pitch_yaw_thrust_get_yaw(msg);
set_roll_pitch_yaw_thrust->thrust = mavlink_msg_set_roll_pitch_yaw_thrust_get_thrust(msg);
set_roll_pitch_yaw_thrust->target_system = mavlink_msg_set_roll_pitch_yaw_thrust_get_target_system(msg);
set_roll_pitch_yaw_thrust->target_component = mavlink_msg_set_roll_pitch_yaw_thrust_get_target_component(msg);
#else
memcpy(set_roll_pitch_yaw_thrust, _MAV_PAYLOAD(msg), 18);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_state_correction.h
0,0 → 1,320
// MESSAGE STATE_CORRECTION PACKING
 
#define MAVLINK_MSG_ID_STATE_CORRECTION 64
 
typedef struct __mavlink_state_correction_t
{
float xErr; ///< x position error
float yErr; ///< y position error
float zErr; ///< z position error
float rollErr; ///< roll error (radians)
float pitchErr; ///< pitch error (radians)
float yawErr; ///< yaw error (radians)
float vxErr; ///< x velocity
float vyErr; ///< y velocity
float vzErr; ///< z velocity
} mavlink_state_correction_t;
 
#define MAVLINK_MSG_ID_STATE_CORRECTION_LEN 36
#define MAVLINK_MSG_ID_64_LEN 36
 
 
 
#define MAVLINK_MESSAGE_INFO_STATE_CORRECTION { \
"STATE_CORRECTION", \
9, \
{ { "xErr", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_state_correction_t, xErr) }, \
{ "yErr", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_state_correction_t, yErr) }, \
{ "zErr", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_state_correction_t, zErr) }, \
{ "rollErr", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_state_correction_t, rollErr) }, \
{ "pitchErr", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_state_correction_t, pitchErr) }, \
{ "yawErr", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_state_correction_t, yawErr) }, \
{ "vxErr", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_state_correction_t, vxErr) }, \
{ "vyErr", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_state_correction_t, vyErr) }, \
{ "vzErr", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_state_correction_t, vzErr) }, \
} \
}
 
 
/**
* @brief Pack a state_correction message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param xErr x position error
* @param yErr y position error
* @param zErr z position error
* @param rollErr roll error (radians)
* @param pitchErr pitch error (radians)
* @param yawErr yaw error (radians)
* @param vxErr x velocity
* @param vyErr y velocity
* @param vzErr z velocity
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_state_correction_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
float xErr, float yErr, float zErr, float rollErr, float pitchErr, float yawErr, float vxErr, float vyErr, float vzErr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[36];
_mav_put_float(buf, 0, xErr);
_mav_put_float(buf, 4, yErr);
_mav_put_float(buf, 8, zErr);
_mav_put_float(buf, 12, rollErr);
_mav_put_float(buf, 16, pitchErr);
_mav_put_float(buf, 20, yawErr);
_mav_put_float(buf, 24, vxErr);
_mav_put_float(buf, 28, vyErr);
_mav_put_float(buf, 32, vzErr);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 36);
#else
mavlink_state_correction_t packet;
packet.xErr = xErr;
packet.yErr = yErr;
packet.zErr = zErr;
packet.rollErr = rollErr;
packet.pitchErr = pitchErr;
packet.yawErr = yawErr;
packet.vxErr = vxErr;
packet.vyErr = vyErr;
packet.vzErr = vzErr;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 36);
#endif
 
msg->msgid = MAVLINK_MSG_ID_STATE_CORRECTION;
return mavlink_finalize_message(msg, system_id, component_id, 36, 130);
}
 
/**
* @brief Pack a state_correction message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param xErr x position error
* @param yErr y position error
* @param zErr z position error
* @param rollErr roll error (radians)
* @param pitchErr pitch error (radians)
* @param yawErr yaw error (radians)
* @param vxErr x velocity
* @param vyErr y velocity
* @param vzErr z velocity
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_state_correction_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
float xErr,float yErr,float zErr,float rollErr,float pitchErr,float yawErr,float vxErr,float vyErr,float vzErr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[36];
_mav_put_float(buf, 0, xErr);
_mav_put_float(buf, 4, yErr);
_mav_put_float(buf, 8, zErr);
_mav_put_float(buf, 12, rollErr);
_mav_put_float(buf, 16, pitchErr);
_mav_put_float(buf, 20, yawErr);
_mav_put_float(buf, 24, vxErr);
_mav_put_float(buf, 28, vyErr);
_mav_put_float(buf, 32, vzErr);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 36);
#else
mavlink_state_correction_t packet;
packet.xErr = xErr;
packet.yErr = yErr;
packet.zErr = zErr;
packet.rollErr = rollErr;
packet.pitchErr = pitchErr;
packet.yawErr = yawErr;
packet.vxErr = vxErr;
packet.vyErr = vyErr;
packet.vzErr = vzErr;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 36);
#endif
 
msg->msgid = MAVLINK_MSG_ID_STATE_CORRECTION;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 36, 130);
}
 
/**
* @brief Encode a state_correction struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param state_correction C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_state_correction_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_state_correction_t* state_correction)
{
return mavlink_msg_state_correction_pack(system_id, component_id, msg, state_correction->xErr, state_correction->yErr, state_correction->zErr, state_correction->rollErr, state_correction->pitchErr, state_correction->yawErr, state_correction->vxErr, state_correction->vyErr, state_correction->vzErr);
}
 
/**
* @brief Send a state_correction message
* @param chan MAVLink channel to send the message
*
* @param xErr x position error
* @param yErr y position error
* @param zErr z position error
* @param rollErr roll error (radians)
* @param pitchErr pitch error (radians)
* @param yawErr yaw error (radians)
* @param vxErr x velocity
* @param vyErr y velocity
* @param vzErr z velocity
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_state_correction_send(mavlink_channel_t chan, float xErr, float yErr, float zErr, float rollErr, float pitchErr, float yawErr, float vxErr, float vyErr, float vzErr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[36];
_mav_put_float(buf, 0, xErr);
_mav_put_float(buf, 4, yErr);
_mav_put_float(buf, 8, zErr);
_mav_put_float(buf, 12, rollErr);
_mav_put_float(buf, 16, pitchErr);
_mav_put_float(buf, 20, yawErr);
_mav_put_float(buf, 24, vxErr);
_mav_put_float(buf, 28, vyErr);
_mav_put_float(buf, 32, vzErr);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATE_CORRECTION, buf, 36, 130);
#else
mavlink_state_correction_t packet;
packet.xErr = xErr;
packet.yErr = yErr;
packet.zErr = zErr;
packet.rollErr = rollErr;
packet.pitchErr = pitchErr;
packet.yawErr = yawErr;
packet.vxErr = vxErr;
packet.vyErr = vyErr;
packet.vzErr = vzErr;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATE_CORRECTION, (const char *)&packet, 36, 130);
#endif
}
 
#endif
 
// MESSAGE STATE_CORRECTION UNPACKING
 
 
/**
* @brief Get field xErr from state_correction message
*
* @return x position error
*/
static inline float mavlink_msg_state_correction_get_xErr(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field yErr from state_correction message
*
* @return y position error
*/
static inline float mavlink_msg_state_correction_get_yErr(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field zErr from state_correction message
*
* @return z position error
*/
static inline float mavlink_msg_state_correction_get_zErr(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field rollErr from state_correction message
*
* @return roll error (radians)
*/
static inline float mavlink_msg_state_correction_get_rollErr(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field pitchErr from state_correction message
*
* @return pitch error (radians)
*/
static inline float mavlink_msg_state_correction_get_pitchErr(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field yawErr from state_correction message
*
* @return yaw error (radians)
*/
static inline float mavlink_msg_state_correction_get_yawErr(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Get field vxErr from state_correction message
*
* @return x velocity
*/
static inline float mavlink_msg_state_correction_get_vxErr(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
 
/**
* @brief Get field vyErr from state_correction message
*
* @return y velocity
*/
static inline float mavlink_msg_state_correction_get_vyErr(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 28);
}
 
/**
* @brief Get field vzErr from state_correction message
*
* @return z velocity
*/
static inline float mavlink_msg_state_correction_get_vzErr(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 32);
}
 
/**
* @brief Decode a state_correction message into a struct
*
* @param msg The message to decode
* @param state_correction C-struct to decode the message contents into
*/
static inline void mavlink_msg_state_correction_decode(const mavlink_message_t* msg, mavlink_state_correction_t* state_correction)
{
#if MAVLINK_NEED_BYTE_SWAP
state_correction->xErr = mavlink_msg_state_correction_get_xErr(msg);
state_correction->yErr = mavlink_msg_state_correction_get_yErr(msg);
state_correction->zErr = mavlink_msg_state_correction_get_zErr(msg);
state_correction->rollErr = mavlink_msg_state_correction_get_rollErr(msg);
state_correction->pitchErr = mavlink_msg_state_correction_get_pitchErr(msg);
state_correction->yawErr = mavlink_msg_state_correction_get_yawErr(msg);
state_correction->vxErr = mavlink_msg_state_correction_get_vxErr(msg);
state_correction->vyErr = mavlink_msg_state_correction_get_vyErr(msg);
state_correction->vzErr = mavlink_msg_state_correction_get_vzErr(msg);
#else
memcpy(state_correction, _MAV_PAYLOAD(msg), 36);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_statustext.h
0,0 → 1,160
// MESSAGE STATUSTEXT PACKING
 
#define MAVLINK_MSG_ID_STATUSTEXT 253
 
typedef struct __mavlink_statustext_t
{
uint8_t severity; ///< Severity of status. Relies on the definitions within RFC-5424. See enum MAV_SEVERITY.
char text[50]; ///< Status text message, without null termination character
} mavlink_statustext_t;
 
#define MAVLINK_MSG_ID_STATUSTEXT_LEN 51
#define MAVLINK_MSG_ID_253_LEN 51
 
#define MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN 50
 
#define MAVLINK_MESSAGE_INFO_STATUSTEXT { \
"STATUSTEXT", \
2, \
{ { "severity", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_statustext_t, severity) }, \
{ "text", NULL, MAVLINK_TYPE_CHAR, 50, 1, offsetof(mavlink_statustext_t, text) }, \
} \
}
 
 
/**
* @brief Pack a statustext message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param severity Severity of status. Relies on the definitions within RFC-5424. See enum MAV_SEVERITY.
* @param text Status text message, without null termination character
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_statustext_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t severity, const char *text)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[51];
_mav_put_uint8_t(buf, 0, severity);
_mav_put_char_array(buf, 1, text, 50);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 51);
#else
mavlink_statustext_t packet;
packet.severity = severity;
mav_array_memcpy(packet.text, text, sizeof(char)*50);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 51);
#endif
 
msg->msgid = MAVLINK_MSG_ID_STATUSTEXT;
return mavlink_finalize_message(msg, system_id, component_id, 51, 83);
}
 
/**
* @brief Pack a statustext message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param severity Severity of status. Relies on the definitions within RFC-5424. See enum MAV_SEVERITY.
* @param text Status text message, without null termination character
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_statustext_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t severity,const char *text)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[51];
_mav_put_uint8_t(buf, 0, severity);
_mav_put_char_array(buf, 1, text, 50);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 51);
#else
mavlink_statustext_t packet;
packet.severity = severity;
mav_array_memcpy(packet.text, text, sizeof(char)*50);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 51);
#endif
 
msg->msgid = MAVLINK_MSG_ID_STATUSTEXT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 51, 83);
}
 
/**
* @brief Encode a statustext struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param statustext C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_statustext_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_statustext_t* statustext)
{
return mavlink_msg_statustext_pack(system_id, component_id, msg, statustext->severity, statustext->text);
}
 
/**
* @brief Send a statustext message
* @param chan MAVLink channel to send the message
*
* @param severity Severity of status. Relies on the definitions within RFC-5424. See enum MAV_SEVERITY.
* @param text Status text message, without null termination character
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_statustext_send(mavlink_channel_t chan, uint8_t severity, const char *text)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[51];
_mav_put_uint8_t(buf, 0, severity);
_mav_put_char_array(buf, 1, text, 50);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATUSTEXT, buf, 51, 83);
#else
mavlink_statustext_t packet;
packet.severity = severity;
mav_array_memcpy(packet.text, text, sizeof(char)*50);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATUSTEXT, (const char *)&packet, 51, 83);
#endif
}
 
#endif
 
// MESSAGE STATUSTEXT UNPACKING
 
 
/**
* @brief Get field severity from statustext message
*
* @return Severity of status. Relies on the definitions within RFC-5424. See enum MAV_SEVERITY.
*/
static inline uint8_t mavlink_msg_statustext_get_severity(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
 
/**
* @brief Get field text from statustext message
*
* @return Status text message, without null termination character
*/
static inline uint16_t mavlink_msg_statustext_get_text(const mavlink_message_t* msg, char *text)
{
return _MAV_RETURN_char_array(msg, text, 50, 1);
}
 
/**
* @brief Decode a statustext message into a struct
*
* @param msg The message to decode
* @param statustext C-struct to decode the message contents into
*/
static inline void mavlink_msg_statustext_decode(const mavlink_message_t* msg, mavlink_statustext_t* statustext)
{
#if MAVLINK_NEED_BYTE_SWAP
statustext->severity = mavlink_msg_statustext_get_severity(msg);
mavlink_msg_statustext_get_text(msg, statustext->text);
#else
memcpy(statustext, _MAV_PAYLOAD(msg), 51);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_sys_status.h
0,0 → 1,408
// MESSAGE SYS_STATUS PACKING
 
#define MAVLINK_MSG_ID_SYS_STATUS 1
 
typedef struct __mavlink_sys_status_t
{
uint32_t onboard_control_sensors_present; ///< Bitmask showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
uint32_t onboard_control_sensors_enabled; ///< Bitmask showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
uint32_t onboard_control_sensors_health; ///< Bitmask showing which onboard controllers and sensors are operational or have an error: Value of 0: not enabled. Value of 1: enabled. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
uint16_t load; ///< Maximum usage in percent of the mainloop time, (0%: 0, 100%: 1000) should be always below 1000
uint16_t voltage_battery; ///< Battery voltage, in millivolts (1 = 1 millivolt)
int16_t current_battery; ///< Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current
uint16_t drop_rate_comm; ///< Communication drops in percent, (0%: 0, 100%: 10'000), (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
uint16_t errors_comm; ///< Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
uint16_t errors_count1; ///< Autopilot-specific errors
uint16_t errors_count2; ///< Autopilot-specific errors
uint16_t errors_count3; ///< Autopilot-specific errors
uint16_t errors_count4; ///< Autopilot-specific errors
int8_t battery_remaining; ///< Remaining battery energy: (0%: 0, 100%: 100), -1: autopilot estimate the remaining battery
} mavlink_sys_status_t;
 
#define MAVLINK_MSG_ID_SYS_STATUS_LEN 31
#define MAVLINK_MSG_ID_1_LEN 31
 
 
 
#define MAVLINK_MESSAGE_INFO_SYS_STATUS { \
"SYS_STATUS", \
13, \
{ { "onboard_control_sensors_present", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_sys_status_t, onboard_control_sensors_present) }, \
{ "onboard_control_sensors_enabled", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_sys_status_t, onboard_control_sensors_enabled) }, \
{ "onboard_control_sensors_health", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_sys_status_t, onboard_control_sensors_health) }, \
{ "load", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_sys_status_t, load) }, \
{ "voltage_battery", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_sys_status_t, voltage_battery) }, \
{ "current_battery", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_sys_status_t, current_battery) }, \
{ "drop_rate_comm", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_sys_status_t, drop_rate_comm) }, \
{ "errors_comm", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_sys_status_t, errors_comm) }, \
{ "errors_count1", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_sys_status_t, errors_count1) }, \
{ "errors_count2", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_sys_status_t, errors_count2) }, \
{ "errors_count3", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_sys_status_t, errors_count3) }, \
{ "errors_count4", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_sys_status_t, errors_count4) }, \
{ "battery_remaining", NULL, MAVLINK_TYPE_INT8_T, 0, 30, offsetof(mavlink_sys_status_t, battery_remaining) }, \
} \
}
 
 
/**
* @brief Pack a sys_status message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param onboard_control_sensors_present Bitmask showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
* @param onboard_control_sensors_enabled Bitmask showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
* @param onboard_control_sensors_health Bitmask showing which onboard controllers and sensors are operational or have an error: Value of 0: not enabled. Value of 1: enabled. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
* @param load Maximum usage in percent of the mainloop time, (0%: 0, 100%: 1000) should be always below 1000
* @param voltage_battery Battery voltage, in millivolts (1 = 1 millivolt)
* @param current_battery Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current
* @param battery_remaining Remaining battery energy: (0%: 0, 100%: 100), -1: autopilot estimate the remaining battery
* @param drop_rate_comm Communication drops in percent, (0%: 0, 100%: 10'000), (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
* @param errors_comm Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
* @param errors_count1 Autopilot-specific errors
* @param errors_count2 Autopilot-specific errors
* @param errors_count3 Autopilot-specific errors
* @param errors_count4 Autopilot-specific errors
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_sys_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[31];
_mav_put_uint32_t(buf, 0, onboard_control_sensors_present);
_mav_put_uint32_t(buf, 4, onboard_control_sensors_enabled);
_mav_put_uint32_t(buf, 8, onboard_control_sensors_health);
_mav_put_uint16_t(buf, 12, load);
_mav_put_uint16_t(buf, 14, voltage_battery);
_mav_put_int16_t(buf, 16, current_battery);
_mav_put_uint16_t(buf, 18, drop_rate_comm);
_mav_put_uint16_t(buf, 20, errors_comm);
_mav_put_uint16_t(buf, 22, errors_count1);
_mav_put_uint16_t(buf, 24, errors_count2);
_mav_put_uint16_t(buf, 26, errors_count3);
_mav_put_uint16_t(buf, 28, errors_count4);
_mav_put_int8_t(buf, 30, battery_remaining);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 31);
#else
mavlink_sys_status_t packet;
packet.onboard_control_sensors_present = onboard_control_sensors_present;
packet.onboard_control_sensors_enabled = onboard_control_sensors_enabled;
packet.onboard_control_sensors_health = onboard_control_sensors_health;
packet.load = load;
packet.voltage_battery = voltage_battery;
packet.current_battery = current_battery;
packet.drop_rate_comm = drop_rate_comm;
packet.errors_comm = errors_comm;
packet.errors_count1 = errors_count1;
packet.errors_count2 = errors_count2;
packet.errors_count3 = errors_count3;
packet.errors_count4 = errors_count4;
packet.battery_remaining = battery_remaining;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 31);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SYS_STATUS;
return mavlink_finalize_message(msg, system_id, component_id, 31, 124);
}
 
/**
* @brief Pack a sys_status message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param onboard_control_sensors_present Bitmask showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
* @param onboard_control_sensors_enabled Bitmask showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
* @param onboard_control_sensors_health Bitmask showing which onboard controllers and sensors are operational or have an error: Value of 0: not enabled. Value of 1: enabled. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
* @param load Maximum usage in percent of the mainloop time, (0%: 0, 100%: 1000) should be always below 1000
* @param voltage_battery Battery voltage, in millivolts (1 = 1 millivolt)
* @param current_battery Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current
* @param battery_remaining Remaining battery energy: (0%: 0, 100%: 100), -1: autopilot estimate the remaining battery
* @param drop_rate_comm Communication drops in percent, (0%: 0, 100%: 10'000), (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
* @param errors_comm Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
* @param errors_count1 Autopilot-specific errors
* @param errors_count2 Autopilot-specific errors
* @param errors_count3 Autopilot-specific errors
* @param errors_count4 Autopilot-specific errors
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_sys_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t onboard_control_sensors_present,uint32_t onboard_control_sensors_enabled,uint32_t onboard_control_sensors_health,uint16_t load,uint16_t voltage_battery,int16_t current_battery,int8_t battery_remaining,uint16_t drop_rate_comm,uint16_t errors_comm,uint16_t errors_count1,uint16_t errors_count2,uint16_t errors_count3,uint16_t errors_count4)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[31];
_mav_put_uint32_t(buf, 0, onboard_control_sensors_present);
_mav_put_uint32_t(buf, 4, onboard_control_sensors_enabled);
_mav_put_uint32_t(buf, 8, onboard_control_sensors_health);
_mav_put_uint16_t(buf, 12, load);
_mav_put_uint16_t(buf, 14, voltage_battery);
_mav_put_int16_t(buf, 16, current_battery);
_mav_put_uint16_t(buf, 18, drop_rate_comm);
_mav_put_uint16_t(buf, 20, errors_comm);
_mav_put_uint16_t(buf, 22, errors_count1);
_mav_put_uint16_t(buf, 24, errors_count2);
_mav_put_uint16_t(buf, 26, errors_count3);
_mav_put_uint16_t(buf, 28, errors_count4);
_mav_put_int8_t(buf, 30, battery_remaining);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 31);
#else
mavlink_sys_status_t packet;
packet.onboard_control_sensors_present = onboard_control_sensors_present;
packet.onboard_control_sensors_enabled = onboard_control_sensors_enabled;
packet.onboard_control_sensors_health = onboard_control_sensors_health;
packet.load = load;
packet.voltage_battery = voltage_battery;
packet.current_battery = current_battery;
packet.drop_rate_comm = drop_rate_comm;
packet.errors_comm = errors_comm;
packet.errors_count1 = errors_count1;
packet.errors_count2 = errors_count2;
packet.errors_count3 = errors_count3;
packet.errors_count4 = errors_count4;
packet.battery_remaining = battery_remaining;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 31);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SYS_STATUS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 31, 124);
}
 
/**
* @brief Encode a sys_status struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param sys_status C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_sys_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_sys_status_t* sys_status)
{
return mavlink_msg_sys_status_pack(system_id, component_id, msg, sys_status->onboard_control_sensors_present, sys_status->onboard_control_sensors_enabled, sys_status->onboard_control_sensors_health, sys_status->load, sys_status->voltage_battery, sys_status->current_battery, sys_status->battery_remaining, sys_status->drop_rate_comm, sys_status->errors_comm, sys_status->errors_count1, sys_status->errors_count2, sys_status->errors_count3, sys_status->errors_count4);
}
 
/**
* @brief Send a sys_status message
* @param chan MAVLink channel to send the message
*
* @param onboard_control_sensors_present Bitmask showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
* @param onboard_control_sensors_enabled Bitmask showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
* @param onboard_control_sensors_health Bitmask showing which onboard controllers and sensors are operational or have an error: Value of 0: not enabled. Value of 1: enabled. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
* @param load Maximum usage in percent of the mainloop time, (0%: 0, 100%: 1000) should be always below 1000
* @param voltage_battery Battery voltage, in millivolts (1 = 1 millivolt)
* @param current_battery Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current
* @param battery_remaining Remaining battery energy: (0%: 0, 100%: 100), -1: autopilot estimate the remaining battery
* @param drop_rate_comm Communication drops in percent, (0%: 0, 100%: 10'000), (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
* @param errors_comm Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
* @param errors_count1 Autopilot-specific errors
* @param errors_count2 Autopilot-specific errors
* @param errors_count3 Autopilot-specific errors
* @param errors_count4 Autopilot-specific errors
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_sys_status_send(mavlink_channel_t chan, uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[31];
_mav_put_uint32_t(buf, 0, onboard_control_sensors_present);
_mav_put_uint32_t(buf, 4, onboard_control_sensors_enabled);
_mav_put_uint32_t(buf, 8, onboard_control_sensors_health);
_mav_put_uint16_t(buf, 12, load);
_mav_put_uint16_t(buf, 14, voltage_battery);
_mav_put_int16_t(buf, 16, current_battery);
_mav_put_uint16_t(buf, 18, drop_rate_comm);
_mav_put_uint16_t(buf, 20, errors_comm);
_mav_put_uint16_t(buf, 22, errors_count1);
_mav_put_uint16_t(buf, 24, errors_count2);
_mav_put_uint16_t(buf, 26, errors_count3);
_mav_put_uint16_t(buf, 28, errors_count4);
_mav_put_int8_t(buf, 30, battery_remaining);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYS_STATUS, buf, 31, 124);
#else
mavlink_sys_status_t packet;
packet.onboard_control_sensors_present = onboard_control_sensors_present;
packet.onboard_control_sensors_enabled = onboard_control_sensors_enabled;
packet.onboard_control_sensors_health = onboard_control_sensors_health;
packet.load = load;
packet.voltage_battery = voltage_battery;
packet.current_battery = current_battery;
packet.drop_rate_comm = drop_rate_comm;
packet.errors_comm = errors_comm;
packet.errors_count1 = errors_count1;
packet.errors_count2 = errors_count2;
packet.errors_count3 = errors_count3;
packet.errors_count4 = errors_count4;
packet.battery_remaining = battery_remaining;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYS_STATUS, (const char *)&packet, 31, 124);
#endif
}
 
#endif
 
// MESSAGE SYS_STATUS UNPACKING
 
 
/**
* @brief Get field onboard_control_sensors_present from sys_status message
*
* @return Bitmask showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
*/
static inline uint32_t mavlink_msg_sys_status_get_onboard_control_sensors_present(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
 
/**
* @brief Get field onboard_control_sensors_enabled from sys_status message
*
* @return Bitmask showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
*/
static inline uint32_t mavlink_msg_sys_status_get_onboard_control_sensors_enabled(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 4);
}
 
/**
* @brief Get field onboard_control_sensors_health from sys_status message
*
* @return Bitmask showing which onboard controllers and sensors are operational or have an error: Value of 0: not enabled. Value of 1: enabled. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control
*/
static inline uint32_t mavlink_msg_sys_status_get_onboard_control_sensors_health(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 8);
}
 
/**
* @brief Get field load from sys_status message
*
* @return Maximum usage in percent of the mainloop time, (0%: 0, 100%: 1000) should be always below 1000
*/
static inline uint16_t mavlink_msg_sys_status_get_load(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 12);
}
 
/**
* @brief Get field voltage_battery from sys_status message
*
* @return Battery voltage, in millivolts (1 = 1 millivolt)
*/
static inline uint16_t mavlink_msg_sys_status_get_voltage_battery(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 14);
}
 
/**
* @brief Get field current_battery from sys_status message
*
* @return Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current
*/
static inline int16_t mavlink_msg_sys_status_get_current_battery(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 16);
}
 
/**
* @brief Get field battery_remaining from sys_status message
*
* @return Remaining battery energy: (0%: 0, 100%: 100), -1: autopilot estimate the remaining battery
*/
static inline int8_t mavlink_msg_sys_status_get_battery_remaining(const mavlink_message_t* msg)
{
return _MAV_RETURN_int8_t(msg, 30);
}
 
/**
* @brief Get field drop_rate_comm from sys_status message
*
* @return Communication drops in percent, (0%: 0, 100%: 10'000), (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
*/
static inline uint16_t mavlink_msg_sys_status_get_drop_rate_comm(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 18);
}
 
/**
* @brief Get field errors_comm from sys_status message
*
* @return Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
*/
static inline uint16_t mavlink_msg_sys_status_get_errors_comm(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 20);
}
 
/**
* @brief Get field errors_count1 from sys_status message
*
* @return Autopilot-specific errors
*/
static inline uint16_t mavlink_msg_sys_status_get_errors_count1(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 22);
}
 
/**
* @brief Get field errors_count2 from sys_status message
*
* @return Autopilot-specific errors
*/
static inline uint16_t mavlink_msg_sys_status_get_errors_count2(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 24);
}
 
/**
* @brief Get field errors_count3 from sys_status message
*
* @return Autopilot-specific errors
*/
static inline uint16_t mavlink_msg_sys_status_get_errors_count3(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 26);
}
 
/**
* @brief Get field errors_count4 from sys_status message
*
* @return Autopilot-specific errors
*/
static inline uint16_t mavlink_msg_sys_status_get_errors_count4(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 28);
}
 
/**
* @brief Decode a sys_status message into a struct
*
* @param msg The message to decode
* @param sys_status C-struct to decode the message contents into
*/
static inline void mavlink_msg_sys_status_decode(const mavlink_message_t* msg, mavlink_sys_status_t* sys_status)
{
#if MAVLINK_NEED_BYTE_SWAP
sys_status->onboard_control_sensors_present = mavlink_msg_sys_status_get_onboard_control_sensors_present(msg);
sys_status->onboard_control_sensors_enabled = mavlink_msg_sys_status_get_onboard_control_sensors_enabled(msg);
sys_status->onboard_control_sensors_health = mavlink_msg_sys_status_get_onboard_control_sensors_health(msg);
sys_status->load = mavlink_msg_sys_status_get_load(msg);
sys_status->voltage_battery = mavlink_msg_sys_status_get_voltage_battery(msg);
sys_status->current_battery = mavlink_msg_sys_status_get_current_battery(msg);
sys_status->drop_rate_comm = mavlink_msg_sys_status_get_drop_rate_comm(msg);
sys_status->errors_comm = mavlink_msg_sys_status_get_errors_comm(msg);
sys_status->errors_count1 = mavlink_msg_sys_status_get_errors_count1(msg);
sys_status->errors_count2 = mavlink_msg_sys_status_get_errors_count2(msg);
sys_status->errors_count3 = mavlink_msg_sys_status_get_errors_count3(msg);
sys_status->errors_count4 = mavlink_msg_sys_status_get_errors_count4(msg);
sys_status->battery_remaining = mavlink_msg_sys_status_get_battery_remaining(msg);
#else
memcpy(sys_status, _MAV_PAYLOAD(msg), 31);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_system_time.h
0,0 → 1,166
// MESSAGE SYSTEM_TIME PACKING
 
#define MAVLINK_MSG_ID_SYSTEM_TIME 2
 
typedef struct __mavlink_system_time_t
{
uint64_t time_unix_usec; ///< Timestamp of the master clock in microseconds since UNIX epoch.
uint32_t time_boot_ms; ///< Timestamp of the component clock since boot time in milliseconds.
} mavlink_system_time_t;
 
#define MAVLINK_MSG_ID_SYSTEM_TIME_LEN 12
#define MAVLINK_MSG_ID_2_LEN 12
 
 
 
#define MAVLINK_MESSAGE_INFO_SYSTEM_TIME { \
"SYSTEM_TIME", \
2, \
{ { "time_unix_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_system_time_t, time_unix_usec) }, \
{ "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_system_time_t, time_boot_ms) }, \
} \
}
 
 
/**
* @brief Pack a system_time message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_unix_usec Timestamp of the master clock in microseconds since UNIX epoch.
* @param time_boot_ms Timestamp of the component clock since boot time in milliseconds.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_system_time_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_unix_usec, uint32_t time_boot_ms)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
_mav_put_uint64_t(buf, 0, time_unix_usec);
_mav_put_uint32_t(buf, 8, time_boot_ms);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
#else
mavlink_system_time_t packet;
packet.time_unix_usec = time_unix_usec;
packet.time_boot_ms = time_boot_ms;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SYSTEM_TIME;
return mavlink_finalize_message(msg, system_id, component_id, 12, 137);
}
 
/**
* @brief Pack a system_time message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_unix_usec Timestamp of the master clock in microseconds since UNIX epoch.
* @param time_boot_ms Timestamp of the component clock since boot time in milliseconds.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_system_time_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_unix_usec,uint32_t time_boot_ms)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
_mav_put_uint64_t(buf, 0, time_unix_usec);
_mav_put_uint32_t(buf, 8, time_boot_ms);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
#else
mavlink_system_time_t packet;
packet.time_unix_usec = time_unix_usec;
packet.time_boot_ms = time_boot_ms;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
#endif
 
msg->msgid = MAVLINK_MSG_ID_SYSTEM_TIME;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 12, 137);
}
 
/**
* @brief Encode a system_time struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param system_time C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_system_time_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_system_time_t* system_time)
{
return mavlink_msg_system_time_pack(system_id, component_id, msg, system_time->time_unix_usec, system_time->time_boot_ms);
}
 
/**
* @brief Send a system_time message
* @param chan MAVLink channel to send the message
*
* @param time_unix_usec Timestamp of the master clock in microseconds since UNIX epoch.
* @param time_boot_ms Timestamp of the component clock since boot time in milliseconds.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_system_time_send(mavlink_channel_t chan, uint64_t time_unix_usec, uint32_t time_boot_ms)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
_mav_put_uint64_t(buf, 0, time_unix_usec);
_mav_put_uint32_t(buf, 8, time_boot_ms);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYSTEM_TIME, buf, 12, 137);
#else
mavlink_system_time_t packet;
packet.time_unix_usec = time_unix_usec;
packet.time_boot_ms = time_boot_ms;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYSTEM_TIME, (const char *)&packet, 12, 137);
#endif
}
 
#endif
 
// MESSAGE SYSTEM_TIME UNPACKING
 
 
/**
* @brief Get field time_unix_usec from system_time message
*
* @return Timestamp of the master clock in microseconds since UNIX epoch.
*/
static inline uint64_t mavlink_msg_system_time_get_time_unix_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field time_boot_ms from system_time message
*
* @return Timestamp of the component clock since boot time in milliseconds.
*/
static inline uint32_t mavlink_msg_system_time_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 8);
}
 
/**
* @brief Decode a system_time message into a struct
*
* @param msg The message to decode
* @param system_time C-struct to decode the message contents into
*/
static inline void mavlink_msg_system_time_decode(const mavlink_message_t* msg, mavlink_system_time_t* system_time)
{
#if MAVLINK_NEED_BYTE_SWAP
system_time->time_unix_usec = mavlink_msg_system_time_get_time_unix_usec(msg);
system_time->time_boot_ms = mavlink_msg_system_time_get_time_boot_ms(msg);
#else
memcpy(system_time, _MAV_PAYLOAD(msg), 12);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_vfr_hud.h
0,0 → 1,254
// MESSAGE VFR_HUD PACKING
 
#define MAVLINK_MSG_ID_VFR_HUD 74
 
typedef struct __mavlink_vfr_hud_t
{
float airspeed; ///< Current airspeed in m/s
float groundspeed; ///< Current ground speed in m/s
float alt; ///< Current altitude (MSL), in meters
float climb; ///< Current climb rate in meters/second
int16_t heading; ///< Current heading in degrees, in compass units (0..360, 0=north)
uint16_t throttle; ///< Current throttle setting in integer percent, 0 to 100
} mavlink_vfr_hud_t;
 
#define MAVLINK_MSG_ID_VFR_HUD_LEN 20
#define MAVLINK_MSG_ID_74_LEN 20
 
 
 
#define MAVLINK_MESSAGE_INFO_VFR_HUD { \
"VFR_HUD", \
6, \
{ { "airspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_vfr_hud_t, airspeed) }, \
{ "groundspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_vfr_hud_t, groundspeed) }, \
{ "alt", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_vfr_hud_t, alt) }, \
{ "climb", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vfr_hud_t, climb) }, \
{ "heading", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_vfr_hud_t, heading) }, \
{ "throttle", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_vfr_hud_t, throttle) }, \
} \
}
 
 
/**
* @brief Pack a vfr_hud message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param airspeed Current airspeed in m/s
* @param groundspeed Current ground speed in m/s
* @param heading Current heading in degrees, in compass units (0..360, 0=north)
* @param throttle Current throttle setting in integer percent, 0 to 100
* @param alt Current altitude (MSL), in meters
* @param climb Current climb rate in meters/second
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_vfr_hud_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
float airspeed, float groundspeed, int16_t heading, uint16_t throttle, float alt, float climb)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_float(buf, 0, airspeed);
_mav_put_float(buf, 4, groundspeed);
_mav_put_float(buf, 8, alt);
_mav_put_float(buf, 12, climb);
_mav_put_int16_t(buf, 16, heading);
_mav_put_uint16_t(buf, 18, throttle);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
#else
mavlink_vfr_hud_t packet;
packet.airspeed = airspeed;
packet.groundspeed = groundspeed;
packet.alt = alt;
packet.climb = climb;
packet.heading = heading;
packet.throttle = throttle;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
#endif
 
msg->msgid = MAVLINK_MSG_ID_VFR_HUD;
return mavlink_finalize_message(msg, system_id, component_id, 20, 20);
}
 
/**
* @brief Pack a vfr_hud message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param airspeed Current airspeed in m/s
* @param groundspeed Current ground speed in m/s
* @param heading Current heading in degrees, in compass units (0..360, 0=north)
* @param throttle Current throttle setting in integer percent, 0 to 100
* @param alt Current altitude (MSL), in meters
* @param climb Current climb rate in meters/second
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_vfr_hud_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
float airspeed,float groundspeed,int16_t heading,uint16_t throttle,float alt,float climb)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_float(buf, 0, airspeed);
_mav_put_float(buf, 4, groundspeed);
_mav_put_float(buf, 8, alt);
_mav_put_float(buf, 12, climb);
_mav_put_int16_t(buf, 16, heading);
_mav_put_uint16_t(buf, 18, throttle);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
#else
mavlink_vfr_hud_t packet;
packet.airspeed = airspeed;
packet.groundspeed = groundspeed;
packet.alt = alt;
packet.climb = climb;
packet.heading = heading;
packet.throttle = throttle;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
#endif
 
msg->msgid = MAVLINK_MSG_ID_VFR_HUD;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 20, 20);
}
 
/**
* @brief Encode a vfr_hud struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param vfr_hud C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_vfr_hud_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vfr_hud_t* vfr_hud)
{
return mavlink_msg_vfr_hud_pack(system_id, component_id, msg, vfr_hud->airspeed, vfr_hud->groundspeed, vfr_hud->heading, vfr_hud->throttle, vfr_hud->alt, vfr_hud->climb);
}
 
/**
* @brief Send a vfr_hud message
* @param chan MAVLink channel to send the message
*
* @param airspeed Current airspeed in m/s
* @param groundspeed Current ground speed in m/s
* @param heading Current heading in degrees, in compass units (0..360, 0=north)
* @param throttle Current throttle setting in integer percent, 0 to 100
* @param alt Current altitude (MSL), in meters
* @param climb Current climb rate in meters/second
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_vfr_hud_send(mavlink_channel_t chan, float airspeed, float groundspeed, int16_t heading, uint16_t throttle, float alt, float climb)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_float(buf, 0, airspeed);
_mav_put_float(buf, 4, groundspeed);
_mav_put_float(buf, 8, alt);
_mav_put_float(buf, 12, climb);
_mav_put_int16_t(buf, 16, heading);
_mav_put_uint16_t(buf, 18, throttle);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VFR_HUD, buf, 20, 20);
#else
mavlink_vfr_hud_t packet;
packet.airspeed = airspeed;
packet.groundspeed = groundspeed;
packet.alt = alt;
packet.climb = climb;
packet.heading = heading;
packet.throttle = throttle;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VFR_HUD, (const char *)&packet, 20, 20);
#endif
}
 
#endif
 
// MESSAGE VFR_HUD UNPACKING
 
 
/**
* @brief Get field airspeed from vfr_hud message
*
* @return Current airspeed in m/s
*/
static inline float mavlink_msg_vfr_hud_get_airspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
 
/**
* @brief Get field groundspeed from vfr_hud message
*
* @return Current ground speed in m/s
*/
static inline float mavlink_msg_vfr_hud_get_groundspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
 
/**
* @brief Get field heading from vfr_hud message
*
* @return Current heading in degrees, in compass units (0..360, 0=north)
*/
static inline int16_t mavlink_msg_vfr_hud_get_heading(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 16);
}
 
/**
* @brief Get field throttle from vfr_hud message
*
* @return Current throttle setting in integer percent, 0 to 100
*/
static inline uint16_t mavlink_msg_vfr_hud_get_throttle(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 18);
}
 
/**
* @brief Get field alt from vfr_hud message
*
* @return Current altitude (MSL), in meters
*/
static inline float mavlink_msg_vfr_hud_get_alt(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field climb from vfr_hud message
*
* @return Current climb rate in meters/second
*/
static inline float mavlink_msg_vfr_hud_get_climb(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Decode a vfr_hud message into a struct
*
* @param msg The message to decode
* @param vfr_hud C-struct to decode the message contents into
*/
static inline void mavlink_msg_vfr_hud_decode(const mavlink_message_t* msg, mavlink_vfr_hud_t* vfr_hud)
{
#if MAVLINK_NEED_BYTE_SWAP
vfr_hud->airspeed = mavlink_msg_vfr_hud_get_airspeed(msg);
vfr_hud->groundspeed = mavlink_msg_vfr_hud_get_groundspeed(msg);
vfr_hud->alt = mavlink_msg_vfr_hud_get_alt(msg);
vfr_hud->climb = mavlink_msg_vfr_hud_get_climb(msg);
vfr_hud->heading = mavlink_msg_vfr_hud_get_heading(msg);
vfr_hud->throttle = mavlink_msg_vfr_hud_get_throttle(msg);
#else
memcpy(vfr_hud, _MAV_PAYLOAD(msg), 20);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_vicon_position_estimate.h
0,0 → 1,276
// MESSAGE VICON_POSITION_ESTIMATE PACKING
 
#define MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE 104
 
typedef struct __mavlink_vicon_position_estimate_t
{
uint64_t usec; ///< Timestamp (milliseconds)
float x; ///< Global X position
float y; ///< Global Y position
float z; ///< Global Z position
float roll; ///< Roll angle in rad
float pitch; ///< Pitch angle in rad
float yaw; ///< Yaw angle in rad
} mavlink_vicon_position_estimate_t;
 
#define MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN 32
#define MAVLINK_MSG_ID_104_LEN 32
 
 
 
#define MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE { \
"VICON_POSITION_ESTIMATE", \
7, \
{ { "usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_vicon_position_estimate_t, usec) }, \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_vicon_position_estimate_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vicon_position_estimate_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vicon_position_estimate_t, z) }, \
{ "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_vicon_position_estimate_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_vicon_position_estimate_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_vicon_position_estimate_t, yaw) }, \
} \
}
 
 
/**
* @brief Pack a vicon_position_estimate message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param usec Timestamp (milliseconds)
* @param x Global X position
* @param y Global Y position
* @param z Global Z position
* @param roll Roll angle in rad
* @param pitch Pitch angle in rad
* @param yaw Yaw angle in rad
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_vicon_position_estimate_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t usec, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_float(buf, 20, roll);
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_vicon_position_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif
 
msg->msgid = MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE;
return mavlink_finalize_message(msg, system_id, component_id, 32, 56);
}
 
/**
* @brief Pack a vicon_position_estimate message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param usec Timestamp (milliseconds)
* @param x Global X position
* @param y Global Y position
* @param z Global Z position
* @param roll Roll angle in rad
* @param pitch Pitch angle in rad
* @param yaw Yaw angle in rad
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_vicon_position_estimate_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t usec,float x,float y,float z,float roll,float pitch,float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_float(buf, 20, roll);
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_vicon_position_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif
 
msg->msgid = MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 32, 56);
}
 
/**
* @brief Encode a vicon_position_estimate struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param vicon_position_estimate C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_vicon_position_estimate_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vicon_position_estimate_t* vicon_position_estimate)
{
return mavlink_msg_vicon_position_estimate_pack(system_id, component_id, msg, vicon_position_estimate->usec, vicon_position_estimate->x, vicon_position_estimate->y, vicon_position_estimate->z, vicon_position_estimate->roll, vicon_position_estimate->pitch, vicon_position_estimate->yaw);
}
 
/**
* @brief Send a vicon_position_estimate message
* @param chan MAVLink channel to send the message
*
* @param usec Timestamp (milliseconds)
* @param x Global X position
* @param y Global Y position
* @param z Global Z position
* @param roll Roll angle in rad
* @param pitch Pitch angle in rad
* @param yaw Yaw angle in rad
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_vicon_position_estimate_send(mavlink_channel_t chan, uint64_t usec, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_float(buf, 20, roll);
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE, buf, 32, 56);
#else
mavlink_vicon_position_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE, (const char *)&packet, 32, 56);
#endif
}
 
#endif
 
// MESSAGE VICON_POSITION_ESTIMATE UNPACKING
 
 
/**
* @brief Get field usec from vicon_position_estimate message
*
* @return Timestamp (milliseconds)
*/
static inline uint64_t mavlink_msg_vicon_position_estimate_get_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field x from vicon_position_estimate message
*
* @return Global X position
*/
static inline float mavlink_msg_vicon_position_estimate_get_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field y from vicon_position_estimate message
*
* @return Global Y position
*/
static inline float mavlink_msg_vicon_position_estimate_get_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field z from vicon_position_estimate message
*
* @return Global Z position
*/
static inline float mavlink_msg_vicon_position_estimate_get_z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field roll from vicon_position_estimate message
*
* @return Roll angle in rad
*/
static inline float mavlink_msg_vicon_position_estimate_get_roll(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Get field pitch from vicon_position_estimate message
*
* @return Pitch angle in rad
*/
static inline float mavlink_msg_vicon_position_estimate_get_pitch(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
 
/**
* @brief Get field yaw from vicon_position_estimate message
*
* @return Yaw angle in rad
*/
static inline float mavlink_msg_vicon_position_estimate_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 28);
}
 
/**
* @brief Decode a vicon_position_estimate message into a struct
*
* @param msg The message to decode
* @param vicon_position_estimate C-struct to decode the message contents into
*/
static inline void mavlink_msg_vicon_position_estimate_decode(const mavlink_message_t* msg, mavlink_vicon_position_estimate_t* vicon_position_estimate)
{
#if MAVLINK_NEED_BYTE_SWAP
vicon_position_estimate->usec = mavlink_msg_vicon_position_estimate_get_usec(msg);
vicon_position_estimate->x = mavlink_msg_vicon_position_estimate_get_x(msg);
vicon_position_estimate->y = mavlink_msg_vicon_position_estimate_get_y(msg);
vicon_position_estimate->z = mavlink_msg_vicon_position_estimate_get_z(msg);
vicon_position_estimate->roll = mavlink_msg_vicon_position_estimate_get_roll(msg);
vicon_position_estimate->pitch = mavlink_msg_vicon_position_estimate_get_pitch(msg);
vicon_position_estimate->yaw = mavlink_msg_vicon_position_estimate_get_yaw(msg);
#else
memcpy(vicon_position_estimate, _MAV_PAYLOAD(msg), 32);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_vision_position_estimate.h
0,0 → 1,276
// MESSAGE VISION_POSITION_ESTIMATE PACKING
 
#define MAVLINK_MSG_ID_VISION_POSITION_ESTIMATE 102
 
typedef struct __mavlink_vision_position_estimate_t
{
uint64_t usec; ///< Timestamp (milliseconds)
float x; ///< Global X position
float y; ///< Global Y position
float z; ///< Global Z position
float roll; ///< Roll angle in rad
float pitch; ///< Pitch angle in rad
float yaw; ///< Yaw angle in rad
} mavlink_vision_position_estimate_t;
 
#define MAVLINK_MSG_ID_VISION_POSITION_ESTIMATE_LEN 32
#define MAVLINK_MSG_ID_102_LEN 32
 
 
 
#define MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE { \
"VISION_POSITION_ESTIMATE", \
7, \
{ { "usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_vision_position_estimate_t, usec) }, \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_vision_position_estimate_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vision_position_estimate_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vision_position_estimate_t, z) }, \
{ "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_vision_position_estimate_t, roll) }, \
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_vision_position_estimate_t, pitch) }, \
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_vision_position_estimate_t, yaw) }, \
} \
}
 
 
/**
* @brief Pack a vision_position_estimate message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param usec Timestamp (milliseconds)
* @param x Global X position
* @param y Global Y position
* @param z Global Z position
* @param roll Roll angle in rad
* @param pitch Pitch angle in rad
* @param yaw Yaw angle in rad
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_vision_position_estimate_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t usec, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_float(buf, 20, roll);
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_vision_position_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif
 
msg->msgid = MAVLINK_MSG_ID_VISION_POSITION_ESTIMATE;
return mavlink_finalize_message(msg, system_id, component_id, 32, 158);
}
 
/**
* @brief Pack a vision_position_estimate message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param usec Timestamp (milliseconds)
* @param x Global X position
* @param y Global Y position
* @param z Global Z position
* @param roll Roll angle in rad
* @param pitch Pitch angle in rad
* @param yaw Yaw angle in rad
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_vision_position_estimate_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t usec,float x,float y,float z,float roll,float pitch,float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_float(buf, 20, roll);
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
#else
mavlink_vision_position_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
#endif
 
msg->msgid = MAVLINK_MSG_ID_VISION_POSITION_ESTIMATE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 32, 158);
}
 
/**
* @brief Encode a vision_position_estimate struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param vision_position_estimate C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_vision_position_estimate_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vision_position_estimate_t* vision_position_estimate)
{
return mavlink_msg_vision_position_estimate_pack(system_id, component_id, msg, vision_position_estimate->usec, vision_position_estimate->x, vision_position_estimate->y, vision_position_estimate->z, vision_position_estimate->roll, vision_position_estimate->pitch, vision_position_estimate->yaw);
}
 
/**
* @brief Send a vision_position_estimate message
* @param chan MAVLink channel to send the message
*
* @param usec Timestamp (milliseconds)
* @param x Global X position
* @param y Global Y position
* @param z Global Z position
* @param roll Roll angle in rad
* @param pitch Pitch angle in rad
* @param yaw Yaw angle in rad
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_vision_position_estimate_send(mavlink_channel_t chan, uint64_t usec, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_float(buf, 20, roll);
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VISION_POSITION_ESTIMATE, buf, 32, 158);
#else
mavlink_vision_position_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
packet.roll = roll;
packet.pitch = pitch;
packet.yaw = yaw;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VISION_POSITION_ESTIMATE, (const char *)&packet, 32, 158);
#endif
}
 
#endif
 
// MESSAGE VISION_POSITION_ESTIMATE UNPACKING
 
 
/**
* @brief Get field usec from vision_position_estimate message
*
* @return Timestamp (milliseconds)
*/
static inline uint64_t mavlink_msg_vision_position_estimate_get_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field x from vision_position_estimate message
*
* @return Global X position
*/
static inline float mavlink_msg_vision_position_estimate_get_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field y from vision_position_estimate message
*
* @return Global Y position
*/
static inline float mavlink_msg_vision_position_estimate_get_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field z from vision_position_estimate message
*
* @return Global Z position
*/
static inline float mavlink_msg_vision_position_estimate_get_z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Get field roll from vision_position_estimate message
*
* @return Roll angle in rad
*/
static inline float mavlink_msg_vision_position_estimate_get_roll(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
 
/**
* @brief Get field pitch from vision_position_estimate message
*
* @return Pitch angle in rad
*/
static inline float mavlink_msg_vision_position_estimate_get_pitch(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
 
/**
* @brief Get field yaw from vision_position_estimate message
*
* @return Yaw angle in rad
*/
static inline float mavlink_msg_vision_position_estimate_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 28);
}
 
/**
* @brief Decode a vision_position_estimate message into a struct
*
* @param msg The message to decode
* @param vision_position_estimate C-struct to decode the message contents into
*/
static inline void mavlink_msg_vision_position_estimate_decode(const mavlink_message_t* msg, mavlink_vision_position_estimate_t* vision_position_estimate)
{
#if MAVLINK_NEED_BYTE_SWAP
vision_position_estimate->usec = mavlink_msg_vision_position_estimate_get_usec(msg);
vision_position_estimate->x = mavlink_msg_vision_position_estimate_get_x(msg);
vision_position_estimate->y = mavlink_msg_vision_position_estimate_get_y(msg);
vision_position_estimate->z = mavlink_msg_vision_position_estimate_get_z(msg);
vision_position_estimate->roll = mavlink_msg_vision_position_estimate_get_roll(msg);
vision_position_estimate->pitch = mavlink_msg_vision_position_estimate_get_pitch(msg);
vision_position_estimate->yaw = mavlink_msg_vision_position_estimate_get_yaw(msg);
#else
memcpy(vision_position_estimate, _MAV_PAYLOAD(msg), 32);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/mavlink_msg_vision_speed_estimate.h
0,0 → 1,210
// MESSAGE VISION_SPEED_ESTIMATE PACKING
 
#define MAVLINK_MSG_ID_VISION_SPEED_ESTIMATE 103
 
typedef struct __mavlink_vision_speed_estimate_t
{
uint64_t usec; ///< Timestamp (milliseconds)
float x; ///< Global X speed
float y; ///< Global Y speed
float z; ///< Global Z speed
} mavlink_vision_speed_estimate_t;
 
#define MAVLINK_MSG_ID_VISION_SPEED_ESTIMATE_LEN 20
#define MAVLINK_MSG_ID_103_LEN 20
 
 
 
#define MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE { \
"VISION_SPEED_ESTIMATE", \
4, \
{ { "usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_vision_speed_estimate_t, usec) }, \
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_vision_speed_estimate_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vision_speed_estimate_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vision_speed_estimate_t, z) }, \
} \
}
 
 
/**
* @brief Pack a vision_speed_estimate message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param usec Timestamp (milliseconds)
* @param x Global X speed
* @param y Global Y speed
* @param z Global Z speed
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_vision_speed_estimate_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t usec, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
#else
mavlink_vision_speed_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
#endif
 
msg->msgid = MAVLINK_MSG_ID_VISION_SPEED_ESTIMATE;
return mavlink_finalize_message(msg, system_id, component_id, 20, 208);
}
 
/**
* @brief Pack a vision_speed_estimate message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param usec Timestamp (milliseconds)
* @param x Global X speed
* @param y Global Y speed
* @param z Global Z speed
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_vision_speed_estimate_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t usec,float x,float y,float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
#else
mavlink_vision_speed_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
 
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
#endif
 
msg->msgid = MAVLINK_MSG_ID_VISION_SPEED_ESTIMATE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 20, 208);
}
 
/**
* @brief Encode a vision_speed_estimate struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param vision_speed_estimate C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_vision_speed_estimate_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vision_speed_estimate_t* vision_speed_estimate)
{
return mavlink_msg_vision_speed_estimate_pack(system_id, component_id, msg, vision_speed_estimate->usec, vision_speed_estimate->x, vision_speed_estimate->y, vision_speed_estimate->z);
}
 
/**
* @brief Send a vision_speed_estimate message
* @param chan MAVLink channel to send the message
*
* @param usec Timestamp (milliseconds)
* @param x Global X speed
* @param y Global Y speed
* @param z Global Z speed
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_vision_speed_estimate_send(mavlink_channel_t chan, uint64_t usec, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VISION_SPEED_ESTIMATE, buf, 20, 208);
#else
mavlink_vision_speed_estimate_t packet;
packet.usec = usec;
packet.x = x;
packet.y = y;
packet.z = z;
 
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VISION_SPEED_ESTIMATE, (const char *)&packet, 20, 208);
#endif
}
 
#endif
 
// MESSAGE VISION_SPEED_ESTIMATE UNPACKING
 
 
/**
* @brief Get field usec from vision_speed_estimate message
*
* @return Timestamp (milliseconds)
*/
static inline uint64_t mavlink_msg_vision_speed_estimate_get_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
 
/**
* @brief Get field x from vision_speed_estimate message
*
* @return Global X speed
*/
static inline float mavlink_msg_vision_speed_estimate_get_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
 
/**
* @brief Get field y from vision_speed_estimate message
*
* @return Global Y speed
*/
static inline float mavlink_msg_vision_speed_estimate_get_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
 
/**
* @brief Get field z from vision_speed_estimate message
*
* @return Global Z speed
*/
static inline float mavlink_msg_vision_speed_estimate_get_z(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
 
/**
* @brief Decode a vision_speed_estimate message into a struct
*
* @param msg The message to decode
* @param vision_speed_estimate C-struct to decode the message contents into
*/
static inline void mavlink_msg_vision_speed_estimate_decode(const mavlink_message_t* msg, mavlink_vision_speed_estimate_t* vision_speed_estimate)
{
#if MAVLINK_NEED_BYTE_SWAP
vision_speed_estimate->usec = mavlink_msg_vision_speed_estimate_get_usec(msg);
vision_speed_estimate->x = mavlink_msg_vision_speed_estimate_get_x(msg);
vision_speed_estimate->y = mavlink_msg_vision_speed_estimate_get_y(msg);
vision_speed_estimate->z = mavlink_msg_vision_speed_estimate_get_z(msg);
#else
memcpy(vision_speed_estimate, _MAV_PAYLOAD(msg), 20);
#endif
}
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/testsuite.h
0,0 → 1,4024
/** @file
* @brief MAVLink comm protocol testsuite generated from common.xml
* @see http://qgroundcontrol.org/mavlink/
*/
#ifndef COMMON_TESTSUITE_H
#define COMMON_TESTSUITE_H
 
#ifdef __cplusplus
extern "C" {
#endif
 
#ifndef MAVLINK_TEST_ALL
#define MAVLINK_TEST_ALL
 
static void mavlink_test_common(uint8_t, uint8_t, mavlink_message_t *last_msg);
 
static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
 
mavlink_test_common(system_id, component_id, last_msg);
}
#endif
 
 
 
 
static void mavlink_test_heartbeat(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_heartbeat_t packet_in = {
963497464,
17,
84,
151,
218,
3,
};
mavlink_heartbeat_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.custom_mode = packet_in.custom_mode;
packet1.type = packet_in.type;
packet1.autopilot = packet_in.autopilot;
packet1.base_mode = packet_in.base_mode;
packet1.system_status = packet_in.system_status;
packet1.mavlink_version = packet_in.mavlink_version;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_heartbeat_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_heartbeat_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_heartbeat_pack(system_id, component_id, &msg , packet1.type , packet1.autopilot , packet1.base_mode , packet1.custom_mode , packet1.system_status );
mavlink_msg_heartbeat_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_heartbeat_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.type , packet1.autopilot , packet1.base_mode , packet1.custom_mode , packet1.system_status );
mavlink_msg_heartbeat_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_heartbeat_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_heartbeat_send(MAVLINK_COMM_1 , packet1.type , packet1.autopilot , packet1.base_mode , packet1.custom_mode , packet1.system_status );
mavlink_msg_heartbeat_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_sys_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_sys_status_t packet_in = {
963497464,
963497672,
963497880,
17859,
17963,
18067,
18171,
18275,
18379,
18483,
18587,
18691,
223,
};
mavlink_sys_status_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.onboard_control_sensors_present = packet_in.onboard_control_sensors_present;
packet1.onboard_control_sensors_enabled = packet_in.onboard_control_sensors_enabled;
packet1.onboard_control_sensors_health = packet_in.onboard_control_sensors_health;
packet1.load = packet_in.load;
packet1.voltage_battery = packet_in.voltage_battery;
packet1.current_battery = packet_in.current_battery;
packet1.drop_rate_comm = packet_in.drop_rate_comm;
packet1.errors_comm = packet_in.errors_comm;
packet1.errors_count1 = packet_in.errors_count1;
packet1.errors_count2 = packet_in.errors_count2;
packet1.errors_count3 = packet_in.errors_count3;
packet1.errors_count4 = packet_in.errors_count4;
packet1.battery_remaining = packet_in.battery_remaining;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_sys_status_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_sys_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_sys_status_pack(system_id, component_id, &msg , packet1.onboard_control_sensors_present , packet1.onboard_control_sensors_enabled , packet1.onboard_control_sensors_health , packet1.load , packet1.voltage_battery , packet1.current_battery , packet1.battery_remaining , packet1.drop_rate_comm , packet1.errors_comm , packet1.errors_count1 , packet1.errors_count2 , packet1.errors_count3 , packet1.errors_count4 );
mavlink_msg_sys_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_sys_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.onboard_control_sensors_present , packet1.onboard_control_sensors_enabled , packet1.onboard_control_sensors_health , packet1.load , packet1.voltage_battery , packet1.current_battery , packet1.battery_remaining , packet1.drop_rate_comm , packet1.errors_comm , packet1.errors_count1 , packet1.errors_count2 , packet1.errors_count3 , packet1.errors_count4 );
mavlink_msg_sys_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_sys_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_sys_status_send(MAVLINK_COMM_1 , packet1.onboard_control_sensors_present , packet1.onboard_control_sensors_enabled , packet1.onboard_control_sensors_health , packet1.load , packet1.voltage_battery , packet1.current_battery , packet1.battery_remaining , packet1.drop_rate_comm , packet1.errors_comm , packet1.errors_count1 , packet1.errors_count2 , packet1.errors_count3 , packet1.errors_count4 );
mavlink_msg_sys_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_system_time(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_system_time_t packet_in = {
93372036854775807ULL,
963497880,
};
mavlink_system_time_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_unix_usec = packet_in.time_unix_usec;
packet1.time_boot_ms = packet_in.time_boot_ms;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_system_time_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_system_time_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_system_time_pack(system_id, component_id, &msg , packet1.time_unix_usec , packet1.time_boot_ms );
mavlink_msg_system_time_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_system_time_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_unix_usec , packet1.time_boot_ms );
mavlink_msg_system_time_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_system_time_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_system_time_send(MAVLINK_COMM_1 , packet1.time_unix_usec , packet1.time_boot_ms );
mavlink_msg_system_time_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_ping(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_ping_t packet_in = {
93372036854775807ULL,
963497880,
41,
108,
};
mavlink_ping_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_usec = packet_in.time_usec;
packet1.seq = packet_in.seq;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_ping_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_ping_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_ping_pack(system_id, component_id, &msg , packet1.time_usec , packet1.seq , packet1.target_system , packet1.target_component );
mavlink_msg_ping_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_ping_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.seq , packet1.target_system , packet1.target_component );
mavlink_msg_ping_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_ping_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_ping_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.seq , packet1.target_system , packet1.target_component );
mavlink_msg_ping_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_change_operator_control(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_change_operator_control_t packet_in = {
5,
72,
139,
"DEFGHIJKLMNOPQRSTUVWXYZA",
};
mavlink_change_operator_control_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.control_request = packet_in.control_request;
packet1.version = packet_in.version;
mav_array_memcpy(packet1.passkey, packet_in.passkey, sizeof(char)*25);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_change_operator_control_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_change_operator_control_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_change_operator_control_pack(system_id, component_id, &msg , packet1.target_system , packet1.control_request , packet1.version , packet1.passkey );
mavlink_msg_change_operator_control_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_change_operator_control_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.control_request , packet1.version , packet1.passkey );
mavlink_msg_change_operator_control_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_change_operator_control_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_change_operator_control_send(MAVLINK_COMM_1 , packet1.target_system , packet1.control_request , packet1.version , packet1.passkey );
mavlink_msg_change_operator_control_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_change_operator_control_ack(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_change_operator_control_ack_t packet_in = {
5,
72,
139,
};
mavlink_change_operator_control_ack_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.gcs_system_id = packet_in.gcs_system_id;
packet1.control_request = packet_in.control_request;
packet1.ack = packet_in.ack;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_change_operator_control_ack_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_change_operator_control_ack_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_change_operator_control_ack_pack(system_id, component_id, &msg , packet1.gcs_system_id , packet1.control_request , packet1.ack );
mavlink_msg_change_operator_control_ack_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_change_operator_control_ack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.gcs_system_id , packet1.control_request , packet1.ack );
mavlink_msg_change_operator_control_ack_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_change_operator_control_ack_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_change_operator_control_ack_send(MAVLINK_COMM_1 , packet1.gcs_system_id , packet1.control_request , packet1.ack );
mavlink_msg_change_operator_control_ack_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_auth_key(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_auth_key_t packet_in = {
"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDE",
};
mavlink_auth_key_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
mav_array_memcpy(packet1.key, packet_in.key, sizeof(char)*32);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_auth_key_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_auth_key_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_auth_key_pack(system_id, component_id, &msg , packet1.key );
mavlink_msg_auth_key_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_auth_key_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.key );
mavlink_msg_auth_key_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_auth_key_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_auth_key_send(MAVLINK_COMM_1 , packet1.key );
mavlink_msg_auth_key_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_set_mode(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_set_mode_t packet_in = {
963497464,
17,
84,
};
mavlink_set_mode_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.custom_mode = packet_in.custom_mode;
packet1.target_system = packet_in.target_system;
packet1.base_mode = packet_in.base_mode;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_mode_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_set_mode_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_mode_pack(system_id, component_id, &msg , packet1.target_system , packet1.base_mode , packet1.custom_mode );
mavlink_msg_set_mode_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_mode_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.base_mode , packet1.custom_mode );
mavlink_msg_set_mode_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_set_mode_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_mode_send(MAVLINK_COMM_1 , packet1.target_system , packet1.base_mode , packet1.custom_mode );
mavlink_msg_set_mode_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_param_request_read(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_param_request_read_t packet_in = {
17235,
139,
206,
"EFGHIJKLMNOPQRS",
};
mavlink_param_request_read_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.param_index = packet_in.param_index;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
mav_array_memcpy(packet1.param_id, packet_in.param_id, sizeof(char)*16);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_request_read_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_param_request_read_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_request_read_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_index );
mavlink_msg_param_request_read_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_request_read_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_index );
mavlink_msg_param_request_read_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_param_request_read_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_request_read_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_index );
mavlink_msg_param_request_read_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_param_request_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_param_request_list_t packet_in = {
5,
72,
};
mavlink_param_request_list_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_request_list_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_param_request_list_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_request_list_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_param_request_list_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_request_list_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_param_request_list_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_param_request_list_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_request_list_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
mavlink_msg_param_request_list_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_param_value(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_param_value_t packet_in = {
17.0,
17443,
17547,
"IJKLMNOPQRSTUVW",
77,
};
mavlink_param_value_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.param_value = packet_in.param_value;
packet1.param_count = packet_in.param_count;
packet1.param_index = packet_in.param_index;
packet1.param_type = packet_in.param_type;
mav_array_memcpy(packet1.param_id, packet_in.param_id, sizeof(char)*16);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_value_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_param_value_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_value_pack(system_id, component_id, &msg , packet1.param_id , packet1.param_value , packet1.param_type , packet1.param_count , packet1.param_index );
mavlink_msg_param_value_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_value_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.param_id , packet1.param_value , packet1.param_type , packet1.param_count , packet1.param_index );
mavlink_msg_param_value_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_param_value_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_value_send(MAVLINK_COMM_1 , packet1.param_id , packet1.param_value , packet1.param_type , packet1.param_count , packet1.param_index );
mavlink_msg_param_value_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_param_set(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_param_set_t packet_in = {
17.0,
17,
84,
"GHIJKLMNOPQRSTU",
199,
};
mavlink_param_set_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.param_value = packet_in.param_value;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.param_type = packet_in.param_type;
mav_array_memcpy(packet1.param_id, packet_in.param_id, sizeof(char)*16);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_set_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_param_set_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_set_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_value , packet1.param_type );
mavlink_msg_param_set_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_set_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_value , packet1.param_type );
mavlink_msg_param_set_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_param_set_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_param_set_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_value , packet1.param_type );
mavlink_msg_param_set_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_gps_raw_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gps_raw_int_t packet_in = {
93372036854775807ULL,
963497880,
963498088,
963498296,
18275,
18379,
18483,
18587,
89,
156,
};
mavlink_gps_raw_int_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_usec = packet_in.time_usec;
packet1.lat = packet_in.lat;
packet1.lon = packet_in.lon;
packet1.alt = packet_in.alt;
packet1.eph = packet_in.eph;
packet1.epv = packet_in.epv;
packet1.vel = packet_in.vel;
packet1.cog = packet_in.cog;
packet1.fix_type = packet_in.fix_type;
packet1.satellites_visible = packet_in.satellites_visible;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_raw_int_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gps_raw_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_raw_int_pack(system_id, component_id, &msg , packet1.time_usec , packet1.fix_type , packet1.lat , packet1.lon , packet1.alt , packet1.eph , packet1.epv , packet1.vel , packet1.cog , packet1.satellites_visible );
mavlink_msg_gps_raw_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_raw_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.fix_type , packet1.lat , packet1.lon , packet1.alt , packet1.eph , packet1.epv , packet1.vel , packet1.cog , packet1.satellites_visible );
mavlink_msg_gps_raw_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gps_raw_int_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_raw_int_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.fix_type , packet1.lat , packet1.lon , packet1.alt , packet1.eph , packet1.epv , packet1.vel , packet1.cog , packet1.satellites_visible );
mavlink_msg_gps_raw_int_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_gps_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gps_status_t packet_in = {
5,
{ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91 },
{ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151 },
{ 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211 },
{ 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
{ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75 },
};
mavlink_gps_status_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.satellites_visible = packet_in.satellites_visible;
mav_array_memcpy(packet1.satellite_prn, packet_in.satellite_prn, sizeof(uint8_t)*20);
mav_array_memcpy(packet1.satellite_used, packet_in.satellite_used, sizeof(uint8_t)*20);
mav_array_memcpy(packet1.satellite_elevation, packet_in.satellite_elevation, sizeof(uint8_t)*20);
mav_array_memcpy(packet1.satellite_azimuth, packet_in.satellite_azimuth, sizeof(uint8_t)*20);
mav_array_memcpy(packet1.satellite_snr, packet_in.satellite_snr, sizeof(uint8_t)*20);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_status_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gps_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_status_pack(system_id, component_id, &msg , packet1.satellites_visible , packet1.satellite_prn , packet1.satellite_used , packet1.satellite_elevation , packet1.satellite_azimuth , packet1.satellite_snr );
mavlink_msg_gps_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.satellites_visible , packet1.satellite_prn , packet1.satellite_used , packet1.satellite_elevation , packet1.satellite_azimuth , packet1.satellite_snr );
mavlink_msg_gps_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gps_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_status_send(MAVLINK_COMM_1 , packet1.satellites_visible , packet1.satellite_prn , packet1.satellite_used , packet1.satellite_elevation , packet1.satellite_azimuth , packet1.satellite_snr );
mavlink_msg_gps_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_scaled_imu(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_scaled_imu_t packet_in = {
963497464,
17443,
17547,
17651,
17755,
17859,
17963,
18067,
18171,
18275,
};
mavlink_scaled_imu_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.xacc = packet_in.xacc;
packet1.yacc = packet_in.yacc;
packet1.zacc = packet_in.zacc;
packet1.xgyro = packet_in.xgyro;
packet1.ygyro = packet_in.ygyro;
packet1.zgyro = packet_in.zgyro;
packet1.xmag = packet_in.xmag;
packet1.ymag = packet_in.ymag;
packet1.zmag = packet_in.zmag;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_scaled_imu_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_scaled_imu_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_scaled_imu_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
mavlink_msg_scaled_imu_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_scaled_imu_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
mavlink_msg_scaled_imu_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_scaled_imu_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_scaled_imu_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
mavlink_msg_scaled_imu_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_raw_imu(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_raw_imu_t packet_in = {
93372036854775807ULL,
17651,
17755,
17859,
17963,
18067,
18171,
18275,
18379,
18483,
};
mavlink_raw_imu_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_usec = packet_in.time_usec;
packet1.xacc = packet_in.xacc;
packet1.yacc = packet_in.yacc;
packet1.zacc = packet_in.zacc;
packet1.xgyro = packet_in.xgyro;
packet1.ygyro = packet_in.ygyro;
packet1.zgyro = packet_in.zgyro;
packet1.xmag = packet_in.xmag;
packet1.ymag = packet_in.ymag;
packet1.zmag = packet_in.zmag;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_raw_imu_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_raw_imu_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_raw_imu_pack(system_id, component_id, &msg , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
mavlink_msg_raw_imu_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_raw_imu_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
mavlink_msg_raw_imu_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_raw_imu_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_raw_imu_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
mavlink_msg_raw_imu_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_raw_pressure(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_raw_pressure_t packet_in = {
93372036854775807ULL,
17651,
17755,
17859,
17963,
};
mavlink_raw_pressure_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_usec = packet_in.time_usec;
packet1.press_abs = packet_in.press_abs;
packet1.press_diff1 = packet_in.press_diff1;
packet1.press_diff2 = packet_in.press_diff2;
packet1.temperature = packet_in.temperature;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_raw_pressure_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_raw_pressure_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_raw_pressure_pack(system_id, component_id, &msg , packet1.time_usec , packet1.press_abs , packet1.press_diff1 , packet1.press_diff2 , packet1.temperature );
mavlink_msg_raw_pressure_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_raw_pressure_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.press_abs , packet1.press_diff1 , packet1.press_diff2 , packet1.temperature );
mavlink_msg_raw_pressure_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_raw_pressure_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_raw_pressure_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.press_abs , packet1.press_diff1 , packet1.press_diff2 , packet1.temperature );
mavlink_msg_raw_pressure_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_scaled_pressure(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_scaled_pressure_t packet_in = {
963497464,
45.0,
73.0,
17859,
};
mavlink_scaled_pressure_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.press_abs = packet_in.press_abs;
packet1.press_diff = packet_in.press_diff;
packet1.temperature = packet_in.temperature;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_scaled_pressure_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_scaled_pressure_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_scaled_pressure_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.press_abs , packet1.press_diff , packet1.temperature );
mavlink_msg_scaled_pressure_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_scaled_pressure_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.press_abs , packet1.press_diff , packet1.temperature );
mavlink_msg_scaled_pressure_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_scaled_pressure_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_scaled_pressure_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.press_abs , packet1.press_diff , packet1.temperature );
mavlink_msg_scaled_pressure_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_attitude(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_attitude_t packet_in = {
963497464,
45.0,
73.0,
101.0,
129.0,
157.0,
185.0,
};
mavlink_attitude_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.roll = packet_in.roll;
packet1.pitch = packet_in.pitch;
packet1.yaw = packet_in.yaw;
packet1.rollspeed = packet_in.rollspeed;
packet1.pitchspeed = packet_in.pitchspeed;
packet1.yawspeed = packet_in.yawspeed;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_attitude_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_attitude_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_attitude_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed );
mavlink_msg_attitude_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_attitude_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed );
mavlink_msg_attitude_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_attitude_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_attitude_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed );
mavlink_msg_attitude_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_attitude_quaternion(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_attitude_quaternion_t packet_in = {
963497464,
45.0,
73.0,
101.0,
129.0,
157.0,
185.0,
213.0,
};
mavlink_attitude_quaternion_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.q1 = packet_in.q1;
packet1.q2 = packet_in.q2;
packet1.q3 = packet_in.q3;
packet1.q4 = packet_in.q4;
packet1.rollspeed = packet_in.rollspeed;
packet1.pitchspeed = packet_in.pitchspeed;
packet1.yawspeed = packet_in.yawspeed;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_attitude_quaternion_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_attitude_quaternion_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_attitude_quaternion_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.q1 , packet1.q2 , packet1.q3 , packet1.q4 , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed );
mavlink_msg_attitude_quaternion_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_attitude_quaternion_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.q1 , packet1.q2 , packet1.q3 , packet1.q4 , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed );
mavlink_msg_attitude_quaternion_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_attitude_quaternion_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_attitude_quaternion_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.q1 , packet1.q2 , packet1.q3 , packet1.q4 , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed );
mavlink_msg_attitude_quaternion_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_local_position_ned(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_local_position_ned_t packet_in = {
963497464,
45.0,
73.0,
101.0,
129.0,
157.0,
185.0,
};
mavlink_local_position_ned_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.x = packet_in.x;
packet1.y = packet_in.y;
packet1.z = packet_in.z;
packet1.vx = packet_in.vx;
packet1.vy = packet_in.vy;
packet1.vz = packet_in.vz;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_position_ned_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_local_position_ned_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_position_ned_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz );
mavlink_msg_local_position_ned_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_position_ned_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz );
mavlink_msg_local_position_ned_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_local_position_ned_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_position_ned_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz );
mavlink_msg_local_position_ned_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_global_position_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_global_position_int_t packet_in = {
963497464,
963497672,
963497880,
963498088,
963498296,
18275,
18379,
18483,
18587,
};
mavlink_global_position_int_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.lat = packet_in.lat;
packet1.lon = packet_in.lon;
packet1.alt = packet_in.alt;
packet1.relative_alt = packet_in.relative_alt;
packet1.vx = packet_in.vx;
packet1.vy = packet_in.vy;
packet1.vz = packet_in.vz;
packet1.hdg = packet_in.hdg;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_position_int_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_global_position_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_position_int_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.lat , packet1.lon , packet1.alt , packet1.relative_alt , packet1.vx , packet1.vy , packet1.vz , packet1.hdg );
mavlink_msg_global_position_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_position_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.lat , packet1.lon , packet1.alt , packet1.relative_alt , packet1.vx , packet1.vy , packet1.vz , packet1.hdg );
mavlink_msg_global_position_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_global_position_int_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_position_int_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.lat , packet1.lon , packet1.alt , packet1.relative_alt , packet1.vx , packet1.vy , packet1.vz , packet1.hdg );
mavlink_msg_global_position_int_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_rc_channels_scaled(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_rc_channels_scaled_t packet_in = {
963497464,
17443,
17547,
17651,
17755,
17859,
17963,
18067,
18171,
65,
132,
};
mavlink_rc_channels_scaled_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.chan1_scaled = packet_in.chan1_scaled;
packet1.chan2_scaled = packet_in.chan2_scaled;
packet1.chan3_scaled = packet_in.chan3_scaled;
packet1.chan4_scaled = packet_in.chan4_scaled;
packet1.chan5_scaled = packet_in.chan5_scaled;
packet1.chan6_scaled = packet_in.chan6_scaled;
packet1.chan7_scaled = packet_in.chan7_scaled;
packet1.chan8_scaled = packet_in.chan8_scaled;
packet1.port = packet_in.port;
packet1.rssi = packet_in.rssi;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_rc_channels_scaled_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_rc_channels_scaled_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_rc_channels_scaled_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.port , packet1.chan1_scaled , packet1.chan2_scaled , packet1.chan3_scaled , packet1.chan4_scaled , packet1.chan5_scaled , packet1.chan6_scaled , packet1.chan7_scaled , packet1.chan8_scaled , packet1.rssi );
mavlink_msg_rc_channels_scaled_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_rc_channels_scaled_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.port , packet1.chan1_scaled , packet1.chan2_scaled , packet1.chan3_scaled , packet1.chan4_scaled , packet1.chan5_scaled , packet1.chan6_scaled , packet1.chan7_scaled , packet1.chan8_scaled , packet1.rssi );
mavlink_msg_rc_channels_scaled_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_rc_channels_scaled_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_rc_channels_scaled_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.port , packet1.chan1_scaled , packet1.chan2_scaled , packet1.chan3_scaled , packet1.chan4_scaled , packet1.chan5_scaled , packet1.chan6_scaled , packet1.chan7_scaled , packet1.chan8_scaled , packet1.rssi );
mavlink_msg_rc_channels_scaled_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_rc_channels_raw(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_rc_channels_raw_t packet_in = {
963497464,
17443,
17547,
17651,
17755,
17859,
17963,
18067,
18171,
65,
132,
};
mavlink_rc_channels_raw_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.chan1_raw = packet_in.chan1_raw;
packet1.chan2_raw = packet_in.chan2_raw;
packet1.chan3_raw = packet_in.chan3_raw;
packet1.chan4_raw = packet_in.chan4_raw;
packet1.chan5_raw = packet_in.chan5_raw;
packet1.chan6_raw = packet_in.chan6_raw;
packet1.chan7_raw = packet_in.chan7_raw;
packet1.chan8_raw = packet_in.chan8_raw;
packet1.port = packet_in.port;
packet1.rssi = packet_in.rssi;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_rc_channels_raw_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_rc_channels_raw_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_rc_channels_raw_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.port , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.rssi );
mavlink_msg_rc_channels_raw_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_rc_channels_raw_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.port , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.rssi );
mavlink_msg_rc_channels_raw_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_rc_channels_raw_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_rc_channels_raw_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.port , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.rssi );
mavlink_msg_rc_channels_raw_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_servo_output_raw(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_servo_output_raw_t packet_in = {
963497464,
17443,
17547,
17651,
17755,
17859,
17963,
18067,
18171,
65,
};
mavlink_servo_output_raw_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_usec = packet_in.time_usec;
packet1.servo1_raw = packet_in.servo1_raw;
packet1.servo2_raw = packet_in.servo2_raw;
packet1.servo3_raw = packet_in.servo3_raw;
packet1.servo4_raw = packet_in.servo4_raw;
packet1.servo5_raw = packet_in.servo5_raw;
packet1.servo6_raw = packet_in.servo6_raw;
packet1.servo7_raw = packet_in.servo7_raw;
packet1.servo8_raw = packet_in.servo8_raw;
packet1.port = packet_in.port;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_servo_output_raw_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_servo_output_raw_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_servo_output_raw_pack(system_id, component_id, &msg , packet1.time_usec , packet1.port , packet1.servo1_raw , packet1.servo2_raw , packet1.servo3_raw , packet1.servo4_raw , packet1.servo5_raw , packet1.servo6_raw , packet1.servo7_raw , packet1.servo8_raw );
mavlink_msg_servo_output_raw_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_servo_output_raw_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.port , packet1.servo1_raw , packet1.servo2_raw , packet1.servo3_raw , packet1.servo4_raw , packet1.servo5_raw , packet1.servo6_raw , packet1.servo7_raw , packet1.servo8_raw );
mavlink_msg_servo_output_raw_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_servo_output_raw_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_servo_output_raw_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.port , packet1.servo1_raw , packet1.servo2_raw , packet1.servo3_raw , packet1.servo4_raw , packet1.servo5_raw , packet1.servo6_raw , packet1.servo7_raw , packet1.servo8_raw );
mavlink_msg_servo_output_raw_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_mission_request_partial_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mission_request_partial_list_t packet_in = {
17235,
17339,
17,
84,
};
mavlink_mission_request_partial_list_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.start_index = packet_in.start_index;
packet1.end_index = packet_in.end_index;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_request_partial_list_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mission_request_partial_list_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_request_partial_list_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.start_index , packet1.end_index );
mavlink_msg_mission_request_partial_list_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_request_partial_list_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.start_index , packet1.end_index );
mavlink_msg_mission_request_partial_list_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_mission_request_partial_list_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_request_partial_list_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.start_index , packet1.end_index );
mavlink_msg_mission_request_partial_list_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_mission_write_partial_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mission_write_partial_list_t packet_in = {
17235,
17339,
17,
84,
};
mavlink_mission_write_partial_list_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.start_index = packet_in.start_index;
packet1.end_index = packet_in.end_index;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_write_partial_list_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mission_write_partial_list_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_write_partial_list_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.start_index , packet1.end_index );
mavlink_msg_mission_write_partial_list_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_write_partial_list_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.start_index , packet1.end_index );
mavlink_msg_mission_write_partial_list_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_mission_write_partial_list_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_write_partial_list_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.start_index , packet1.end_index );
mavlink_msg_mission_write_partial_list_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_mission_item(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mission_item_t packet_in = {
17.0,
45.0,
73.0,
101.0,
129.0,
157.0,
185.0,
18691,
18795,
101,
168,
235,
46,
113,
};
mavlink_mission_item_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.param1 = packet_in.param1;
packet1.param2 = packet_in.param2;
packet1.param3 = packet_in.param3;
packet1.param4 = packet_in.param4;
packet1.x = packet_in.x;
packet1.y = packet_in.y;
packet1.z = packet_in.z;
packet1.seq = packet_in.seq;
packet1.command = packet_in.command;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.frame = packet_in.frame;
packet1.current = packet_in.current;
packet1.autocontinue = packet_in.autocontinue;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_item_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mission_item_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_item_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.seq , packet1.frame , packet1.command , packet1.current , packet1.autocontinue , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.x , packet1.y , packet1.z );
mavlink_msg_mission_item_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_item_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.seq , packet1.frame , packet1.command , packet1.current , packet1.autocontinue , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.x , packet1.y , packet1.z );
mavlink_msg_mission_item_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_mission_item_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_item_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.seq , packet1.frame , packet1.command , packet1.current , packet1.autocontinue , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.x , packet1.y , packet1.z );
mavlink_msg_mission_item_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_mission_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mission_request_t packet_in = {
17235,
139,
206,
};
mavlink_mission_request_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.seq = packet_in.seq;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_request_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mission_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_request_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.seq );
mavlink_msg_mission_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_request_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.seq );
mavlink_msg_mission_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_mission_request_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_request_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.seq );
mavlink_msg_mission_request_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_mission_set_current(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mission_set_current_t packet_in = {
17235,
139,
206,
};
mavlink_mission_set_current_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.seq = packet_in.seq;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_set_current_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mission_set_current_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_set_current_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.seq );
mavlink_msg_mission_set_current_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_set_current_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.seq );
mavlink_msg_mission_set_current_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_mission_set_current_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_set_current_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.seq );
mavlink_msg_mission_set_current_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_mission_current(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mission_current_t packet_in = {
17235,
};
mavlink_mission_current_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.seq = packet_in.seq;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_current_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mission_current_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_current_pack(system_id, component_id, &msg , packet1.seq );
mavlink_msg_mission_current_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_current_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.seq );
mavlink_msg_mission_current_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_mission_current_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_current_send(MAVLINK_COMM_1 , packet1.seq );
mavlink_msg_mission_current_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_mission_request_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mission_request_list_t packet_in = {
5,
72,
};
mavlink_mission_request_list_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_request_list_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mission_request_list_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_request_list_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_mission_request_list_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_request_list_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_mission_request_list_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_mission_request_list_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_request_list_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
mavlink_msg_mission_request_list_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_mission_count(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mission_count_t packet_in = {
17235,
139,
206,
};
mavlink_mission_count_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.count = packet_in.count;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_count_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mission_count_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_count_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.count );
mavlink_msg_mission_count_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_count_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.count );
mavlink_msg_mission_count_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_mission_count_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_count_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.count );
mavlink_msg_mission_count_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_mission_clear_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mission_clear_all_t packet_in = {
5,
72,
};
mavlink_mission_clear_all_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_clear_all_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mission_clear_all_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_clear_all_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_mission_clear_all_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_clear_all_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_mission_clear_all_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_mission_clear_all_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_clear_all_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
mavlink_msg_mission_clear_all_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_mission_item_reached(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mission_item_reached_t packet_in = {
17235,
};
mavlink_mission_item_reached_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.seq = packet_in.seq;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_item_reached_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mission_item_reached_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_item_reached_pack(system_id, component_id, &msg , packet1.seq );
mavlink_msg_mission_item_reached_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_item_reached_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.seq );
mavlink_msg_mission_item_reached_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_mission_item_reached_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_item_reached_send(MAVLINK_COMM_1 , packet1.seq );
mavlink_msg_mission_item_reached_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_mission_ack(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mission_ack_t packet_in = {
5,
72,
139,
};
mavlink_mission_ack_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.type = packet_in.type;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_ack_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mission_ack_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_ack_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.type );
mavlink_msg_mission_ack_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_ack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.type );
mavlink_msg_mission_ack_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_mission_ack_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mission_ack_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.type );
mavlink_msg_mission_ack_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_set_gps_global_origin(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_set_gps_global_origin_t packet_in = {
963497464,
963497672,
963497880,
41,
};
mavlink_set_gps_global_origin_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.latitude = packet_in.latitude;
packet1.longitude = packet_in.longitude;
packet1.altitude = packet_in.altitude;
packet1.target_system = packet_in.target_system;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_gps_global_origin_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_set_gps_global_origin_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_gps_global_origin_pack(system_id, component_id, &msg , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude );
mavlink_msg_set_gps_global_origin_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_gps_global_origin_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude );
mavlink_msg_set_gps_global_origin_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_set_gps_global_origin_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_gps_global_origin_send(MAVLINK_COMM_1 , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude );
mavlink_msg_set_gps_global_origin_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_gps_global_origin(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gps_global_origin_t packet_in = {
963497464,
963497672,
963497880,
};
mavlink_gps_global_origin_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.latitude = packet_in.latitude;
packet1.longitude = packet_in.longitude;
packet1.altitude = packet_in.altitude;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_global_origin_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gps_global_origin_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_global_origin_pack(system_id, component_id, &msg , packet1.latitude , packet1.longitude , packet1.altitude );
mavlink_msg_gps_global_origin_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_global_origin_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.latitude , packet1.longitude , packet1.altitude );
mavlink_msg_gps_global_origin_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gps_global_origin_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_global_origin_send(MAVLINK_COMM_1 , packet1.latitude , packet1.longitude , packet1.altitude );
mavlink_msg_gps_global_origin_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_set_local_position_setpoint(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_set_local_position_setpoint_t packet_in = {
17.0,
45.0,
73.0,
101.0,
53,
120,
187,
};
mavlink_set_local_position_setpoint_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.x = packet_in.x;
packet1.y = packet_in.y;
packet1.z = packet_in.z;
packet1.yaw = packet_in.yaw;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.coordinate_frame = packet_in.coordinate_frame;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_local_position_setpoint_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_set_local_position_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_local_position_setpoint_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.x , packet1.y , packet1.z , packet1.yaw );
mavlink_msg_set_local_position_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_local_position_setpoint_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.x , packet1.y , packet1.z , packet1.yaw );
mavlink_msg_set_local_position_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_set_local_position_setpoint_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_local_position_setpoint_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.x , packet1.y , packet1.z , packet1.yaw );
mavlink_msg_set_local_position_setpoint_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_local_position_setpoint(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_local_position_setpoint_t packet_in = {
17.0,
45.0,
73.0,
101.0,
53,
};
mavlink_local_position_setpoint_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.x = packet_in.x;
packet1.y = packet_in.y;
packet1.z = packet_in.z;
packet1.yaw = packet_in.yaw;
packet1.coordinate_frame = packet_in.coordinate_frame;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_position_setpoint_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_local_position_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_position_setpoint_pack(system_id, component_id, &msg , packet1.coordinate_frame , packet1.x , packet1.y , packet1.z , packet1.yaw );
mavlink_msg_local_position_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_position_setpoint_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.coordinate_frame , packet1.x , packet1.y , packet1.z , packet1.yaw );
mavlink_msg_local_position_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_local_position_setpoint_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_position_setpoint_send(MAVLINK_COMM_1 , packet1.coordinate_frame , packet1.x , packet1.y , packet1.z , packet1.yaw );
mavlink_msg_local_position_setpoint_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_global_position_setpoint_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_global_position_setpoint_int_t packet_in = {
963497464,
963497672,
963497880,
17859,
175,
};
mavlink_global_position_setpoint_int_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.latitude = packet_in.latitude;
packet1.longitude = packet_in.longitude;
packet1.altitude = packet_in.altitude;
packet1.yaw = packet_in.yaw;
packet1.coordinate_frame = packet_in.coordinate_frame;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_position_setpoint_int_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_global_position_setpoint_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_position_setpoint_int_pack(system_id, component_id, &msg , packet1.coordinate_frame , packet1.latitude , packet1.longitude , packet1.altitude , packet1.yaw );
mavlink_msg_global_position_setpoint_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_position_setpoint_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.coordinate_frame , packet1.latitude , packet1.longitude , packet1.altitude , packet1.yaw );
mavlink_msg_global_position_setpoint_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_global_position_setpoint_int_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_position_setpoint_int_send(MAVLINK_COMM_1 , packet1.coordinate_frame , packet1.latitude , packet1.longitude , packet1.altitude , packet1.yaw );
mavlink_msg_global_position_setpoint_int_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_set_global_position_setpoint_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_set_global_position_setpoint_int_t packet_in = {
963497464,
963497672,
963497880,
17859,
175,
};
mavlink_set_global_position_setpoint_int_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.latitude = packet_in.latitude;
packet1.longitude = packet_in.longitude;
packet1.altitude = packet_in.altitude;
packet1.yaw = packet_in.yaw;
packet1.coordinate_frame = packet_in.coordinate_frame;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_global_position_setpoint_int_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_set_global_position_setpoint_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_global_position_setpoint_int_pack(system_id, component_id, &msg , packet1.coordinate_frame , packet1.latitude , packet1.longitude , packet1.altitude , packet1.yaw );
mavlink_msg_set_global_position_setpoint_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_global_position_setpoint_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.coordinate_frame , packet1.latitude , packet1.longitude , packet1.altitude , packet1.yaw );
mavlink_msg_set_global_position_setpoint_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_set_global_position_setpoint_int_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_global_position_setpoint_int_send(MAVLINK_COMM_1 , packet1.coordinate_frame , packet1.latitude , packet1.longitude , packet1.altitude , packet1.yaw );
mavlink_msg_set_global_position_setpoint_int_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_safety_set_allowed_area(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_safety_set_allowed_area_t packet_in = {
17.0,
45.0,
73.0,
101.0,
129.0,
157.0,
77,
144,
211,
};
mavlink_safety_set_allowed_area_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.p1x = packet_in.p1x;
packet1.p1y = packet_in.p1y;
packet1.p1z = packet_in.p1z;
packet1.p2x = packet_in.p2x;
packet1.p2y = packet_in.p2y;
packet1.p2z = packet_in.p2z;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.frame = packet_in.frame;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_safety_set_allowed_area_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_safety_set_allowed_area_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_safety_set_allowed_area_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.frame , packet1.p1x , packet1.p1y , packet1.p1z , packet1.p2x , packet1.p2y , packet1.p2z );
mavlink_msg_safety_set_allowed_area_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_safety_set_allowed_area_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.frame , packet1.p1x , packet1.p1y , packet1.p1z , packet1.p2x , packet1.p2y , packet1.p2z );
mavlink_msg_safety_set_allowed_area_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_safety_set_allowed_area_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_safety_set_allowed_area_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.frame , packet1.p1x , packet1.p1y , packet1.p1z , packet1.p2x , packet1.p2y , packet1.p2z );
mavlink_msg_safety_set_allowed_area_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_safety_allowed_area(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_safety_allowed_area_t packet_in = {
17.0,
45.0,
73.0,
101.0,
129.0,
157.0,
77,
};
mavlink_safety_allowed_area_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.p1x = packet_in.p1x;
packet1.p1y = packet_in.p1y;
packet1.p1z = packet_in.p1z;
packet1.p2x = packet_in.p2x;
packet1.p2y = packet_in.p2y;
packet1.p2z = packet_in.p2z;
packet1.frame = packet_in.frame;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_safety_allowed_area_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_safety_allowed_area_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_safety_allowed_area_pack(system_id, component_id, &msg , packet1.frame , packet1.p1x , packet1.p1y , packet1.p1z , packet1.p2x , packet1.p2y , packet1.p2z );
mavlink_msg_safety_allowed_area_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_safety_allowed_area_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.frame , packet1.p1x , packet1.p1y , packet1.p1z , packet1.p2x , packet1.p2y , packet1.p2z );
mavlink_msg_safety_allowed_area_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_safety_allowed_area_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_safety_allowed_area_send(MAVLINK_COMM_1 , packet1.frame , packet1.p1x , packet1.p1y , packet1.p1z , packet1.p2x , packet1.p2y , packet1.p2z );
mavlink_msg_safety_allowed_area_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_set_roll_pitch_yaw_thrust(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_set_roll_pitch_yaw_thrust_t packet_in = {
17.0,
45.0,
73.0,
101.0,
53,
120,
};
mavlink_set_roll_pitch_yaw_thrust_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.roll = packet_in.roll;
packet1.pitch = packet_in.pitch;
packet1.yaw = packet_in.yaw;
packet1.thrust = packet_in.thrust;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_roll_pitch_yaw_thrust_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_set_roll_pitch_yaw_thrust_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_roll_pitch_yaw_thrust_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust );
mavlink_msg_set_roll_pitch_yaw_thrust_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_roll_pitch_yaw_thrust_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust );
mavlink_msg_set_roll_pitch_yaw_thrust_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_set_roll_pitch_yaw_thrust_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_roll_pitch_yaw_thrust_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust );
mavlink_msg_set_roll_pitch_yaw_thrust_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_set_roll_pitch_yaw_speed_thrust(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_set_roll_pitch_yaw_speed_thrust_t packet_in = {
17.0,
45.0,
73.0,
101.0,
53,
120,
};
mavlink_set_roll_pitch_yaw_speed_thrust_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.roll_speed = packet_in.roll_speed;
packet1.pitch_speed = packet_in.pitch_speed;
packet1.yaw_speed = packet_in.yaw_speed;
packet1.thrust = packet_in.thrust;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_roll_pitch_yaw_speed_thrust_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_set_roll_pitch_yaw_speed_thrust_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_roll_pitch_yaw_speed_thrust_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.roll_speed , packet1.pitch_speed , packet1.yaw_speed , packet1.thrust );
mavlink_msg_set_roll_pitch_yaw_speed_thrust_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_roll_pitch_yaw_speed_thrust_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.roll_speed , packet1.pitch_speed , packet1.yaw_speed , packet1.thrust );
mavlink_msg_set_roll_pitch_yaw_speed_thrust_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_set_roll_pitch_yaw_speed_thrust_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_roll_pitch_yaw_speed_thrust_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.roll_speed , packet1.pitch_speed , packet1.yaw_speed , packet1.thrust );
mavlink_msg_set_roll_pitch_yaw_speed_thrust_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_roll_pitch_yaw_thrust_setpoint(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_roll_pitch_yaw_thrust_setpoint_t packet_in = {
963497464,
45.0,
73.0,
101.0,
129.0,
};
mavlink_roll_pitch_yaw_thrust_setpoint_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.roll = packet_in.roll;
packet1.pitch = packet_in.pitch;
packet1.yaw = packet_in.yaw;
packet1.thrust = packet_in.thrust;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_roll_pitch_yaw_thrust_setpoint_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_roll_pitch_yaw_thrust_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_roll_pitch_yaw_thrust_setpoint_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust );
mavlink_msg_roll_pitch_yaw_thrust_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_roll_pitch_yaw_thrust_setpoint_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust );
mavlink_msg_roll_pitch_yaw_thrust_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_roll_pitch_yaw_thrust_setpoint_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_roll_pitch_yaw_thrust_setpoint_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust );
mavlink_msg_roll_pitch_yaw_thrust_setpoint_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_roll_pitch_yaw_speed_thrust_setpoint(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_roll_pitch_yaw_speed_thrust_setpoint_t packet_in = {
963497464,
45.0,
73.0,
101.0,
129.0,
};
mavlink_roll_pitch_yaw_speed_thrust_setpoint_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.roll_speed = packet_in.roll_speed;
packet1.pitch_speed = packet_in.pitch_speed;
packet1.yaw_speed = packet_in.yaw_speed;
packet1.thrust = packet_in.thrust;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.roll_speed , packet1.pitch_speed , packet1.yaw_speed , packet1.thrust );
mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.roll_speed , packet1.pitch_speed , packet1.yaw_speed , packet1.thrust );
mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.roll_speed , packet1.pitch_speed , packet1.yaw_speed , packet1.thrust );
mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_set_quad_motors_setpoint(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_set_quad_motors_setpoint_t packet_in = {
17235,
17339,
17443,
17547,
29,
};
mavlink_set_quad_motors_setpoint_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.motor_front_nw = packet_in.motor_front_nw;
packet1.motor_right_ne = packet_in.motor_right_ne;
packet1.motor_back_se = packet_in.motor_back_se;
packet1.motor_left_sw = packet_in.motor_left_sw;
packet1.target_system = packet_in.target_system;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_quad_motors_setpoint_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_set_quad_motors_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_quad_motors_setpoint_pack(system_id, component_id, &msg , packet1.target_system , packet1.motor_front_nw , packet1.motor_right_ne , packet1.motor_back_se , packet1.motor_left_sw );
mavlink_msg_set_quad_motors_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_quad_motors_setpoint_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.motor_front_nw , packet1.motor_right_ne , packet1.motor_back_se , packet1.motor_left_sw );
mavlink_msg_set_quad_motors_setpoint_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_set_quad_motors_setpoint_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_quad_motors_setpoint_send(MAVLINK_COMM_1 , packet1.target_system , packet1.motor_front_nw , packet1.motor_right_ne , packet1.motor_back_se , packet1.motor_left_sw );
mavlink_msg_set_quad_motors_setpoint_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_set_quad_swarm_roll_pitch_yaw_thrust(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t packet_in = {
{ 17235, 17236, 17237, 17238, 17239, 17240 },
{ 17859, 17860, 17861, 17862, 17863, 17864 },
{ 18483, 18484, 18485, 18486, 18487, 18488 },
{ 19107, 19108, 19109, 19110, 19111, 19112 },
{ 149, 150, 151, 152, 153, 154 },
};
mavlink_set_quad_swarm_roll_pitch_yaw_thrust_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
mav_array_memcpy(packet1.roll, packet_in.roll, sizeof(int16_t)*6);
mav_array_memcpy(packet1.pitch, packet_in.pitch, sizeof(int16_t)*6);
mav_array_memcpy(packet1.yaw, packet_in.yaw, sizeof(int16_t)*6);
mav_array_memcpy(packet1.thrust, packet_in.thrust, sizeof(uint16_t)*6);
mav_array_memcpy(packet1.target_systems, packet_in.target_systems, sizeof(uint8_t)*6);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_pack(system_id, component_id, &msg , packet1.target_systems , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust );
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_systems , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust );
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_send(MAVLINK_COMM_1 , packet1.target_systems , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust );
mavlink_msg_set_quad_swarm_roll_pitch_yaw_thrust_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_nav_controller_output(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_nav_controller_output_t packet_in = {
17.0,
45.0,
73.0,
101.0,
129.0,
18275,
18379,
18483,
};
mavlink_nav_controller_output_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.nav_roll = packet_in.nav_roll;
packet1.nav_pitch = packet_in.nav_pitch;
packet1.alt_error = packet_in.alt_error;
packet1.aspd_error = packet_in.aspd_error;
packet1.xtrack_error = packet_in.xtrack_error;
packet1.nav_bearing = packet_in.nav_bearing;
packet1.target_bearing = packet_in.target_bearing;
packet1.wp_dist = packet_in.wp_dist;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_nav_controller_output_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_nav_controller_output_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_nav_controller_output_pack(system_id, component_id, &msg , packet1.nav_roll , packet1.nav_pitch , packet1.nav_bearing , packet1.target_bearing , packet1.wp_dist , packet1.alt_error , packet1.aspd_error , packet1.xtrack_error );
mavlink_msg_nav_controller_output_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_nav_controller_output_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.nav_roll , packet1.nav_pitch , packet1.nav_bearing , packet1.target_bearing , packet1.wp_dist , packet1.alt_error , packet1.aspd_error , packet1.xtrack_error );
mavlink_msg_nav_controller_output_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_nav_controller_output_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_nav_controller_output_send(MAVLINK_COMM_1 , packet1.nav_roll , packet1.nav_pitch , packet1.nav_bearing , packet1.target_bearing , packet1.wp_dist , packet1.alt_error , packet1.aspd_error , packet1.xtrack_error );
mavlink_msg_nav_controller_output_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_state_correction(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_state_correction_t packet_in = {
17.0,
45.0,
73.0,
101.0,
129.0,
157.0,
185.0,
213.0,
241.0,
};
mavlink_state_correction_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.xErr = packet_in.xErr;
packet1.yErr = packet_in.yErr;
packet1.zErr = packet_in.zErr;
packet1.rollErr = packet_in.rollErr;
packet1.pitchErr = packet_in.pitchErr;
packet1.yawErr = packet_in.yawErr;
packet1.vxErr = packet_in.vxErr;
packet1.vyErr = packet_in.vyErr;
packet1.vzErr = packet_in.vzErr;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_state_correction_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_state_correction_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_state_correction_pack(system_id, component_id, &msg , packet1.xErr , packet1.yErr , packet1.zErr , packet1.rollErr , packet1.pitchErr , packet1.yawErr , packet1.vxErr , packet1.vyErr , packet1.vzErr );
mavlink_msg_state_correction_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_state_correction_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.xErr , packet1.yErr , packet1.zErr , packet1.rollErr , packet1.pitchErr , packet1.yawErr , packet1.vxErr , packet1.vyErr , packet1.vzErr );
mavlink_msg_state_correction_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_state_correction_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_state_correction_send(MAVLINK_COMM_1 , packet1.xErr , packet1.yErr , packet1.zErr , packet1.rollErr , packet1.pitchErr , packet1.yawErr , packet1.vxErr , packet1.vyErr , packet1.vzErr );
mavlink_msg_state_correction_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_request_data_stream(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_request_data_stream_t packet_in = {
17235,
139,
206,
17,
84,
};
mavlink_request_data_stream_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.req_message_rate = packet_in.req_message_rate;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.req_stream_id = packet_in.req_stream_id;
packet1.start_stop = packet_in.start_stop;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_request_data_stream_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_request_data_stream_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_request_data_stream_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.req_stream_id , packet1.req_message_rate , packet1.start_stop );
mavlink_msg_request_data_stream_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_request_data_stream_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.req_stream_id , packet1.req_message_rate , packet1.start_stop );
mavlink_msg_request_data_stream_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_request_data_stream_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_request_data_stream_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.req_stream_id , packet1.req_message_rate , packet1.start_stop );
mavlink_msg_request_data_stream_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_data_stream(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_data_stream_t packet_in = {
17235,
139,
206,
};
mavlink_data_stream_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.message_rate = packet_in.message_rate;
packet1.stream_id = packet_in.stream_id;
packet1.on_off = packet_in.on_off;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_data_stream_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_data_stream_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_data_stream_pack(system_id, component_id, &msg , packet1.stream_id , packet1.message_rate , packet1.on_off );
mavlink_msg_data_stream_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_data_stream_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.stream_id , packet1.message_rate , packet1.on_off );
mavlink_msg_data_stream_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_data_stream_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_data_stream_send(MAVLINK_COMM_1 , packet1.stream_id , packet1.message_rate , packet1.on_off );
mavlink_msg_data_stream_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_manual_control(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_manual_control_t packet_in = {
17.0,
45.0,
73.0,
101.0,
53,
120,
187,
254,
65,
};
mavlink_manual_control_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.roll = packet_in.roll;
packet1.pitch = packet_in.pitch;
packet1.yaw = packet_in.yaw;
packet1.thrust = packet_in.thrust;
packet1.target = packet_in.target;
packet1.roll_manual = packet_in.roll_manual;
packet1.pitch_manual = packet_in.pitch_manual;
packet1.yaw_manual = packet_in.yaw_manual;
packet1.thrust_manual = packet_in.thrust_manual;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_manual_control_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_manual_control_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_manual_control_pack(system_id, component_id, &msg , packet1.target , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust , packet1.roll_manual , packet1.pitch_manual , packet1.yaw_manual , packet1.thrust_manual );
mavlink_msg_manual_control_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_manual_control_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust , packet1.roll_manual , packet1.pitch_manual , packet1.yaw_manual , packet1.thrust_manual );
mavlink_msg_manual_control_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_manual_control_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_manual_control_send(MAVLINK_COMM_1 , packet1.target , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust , packet1.roll_manual , packet1.pitch_manual , packet1.yaw_manual , packet1.thrust_manual );
mavlink_msg_manual_control_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_rc_channels_override(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_rc_channels_override_t packet_in = {
17235,
17339,
17443,
17547,
17651,
17755,
17859,
17963,
53,
120,
};
mavlink_rc_channels_override_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.chan1_raw = packet_in.chan1_raw;
packet1.chan2_raw = packet_in.chan2_raw;
packet1.chan3_raw = packet_in.chan3_raw;
packet1.chan4_raw = packet_in.chan4_raw;
packet1.chan5_raw = packet_in.chan5_raw;
packet1.chan6_raw = packet_in.chan6_raw;
packet1.chan7_raw = packet_in.chan7_raw;
packet1.chan8_raw = packet_in.chan8_raw;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_rc_channels_override_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_rc_channels_override_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_rc_channels_override_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw );
mavlink_msg_rc_channels_override_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_rc_channels_override_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw );
mavlink_msg_rc_channels_override_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_rc_channels_override_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_rc_channels_override_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw );
mavlink_msg_rc_channels_override_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_vfr_hud(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_vfr_hud_t packet_in = {
17.0,
45.0,
73.0,
101.0,
18067,
18171,
};
mavlink_vfr_hud_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.airspeed = packet_in.airspeed;
packet1.groundspeed = packet_in.groundspeed;
packet1.alt = packet_in.alt;
packet1.climb = packet_in.climb;
packet1.heading = packet_in.heading;
packet1.throttle = packet_in.throttle;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vfr_hud_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_vfr_hud_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vfr_hud_pack(system_id, component_id, &msg , packet1.airspeed , packet1.groundspeed , packet1.heading , packet1.throttle , packet1.alt , packet1.climb );
mavlink_msg_vfr_hud_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vfr_hud_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.airspeed , packet1.groundspeed , packet1.heading , packet1.throttle , packet1.alt , packet1.climb );
mavlink_msg_vfr_hud_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_vfr_hud_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vfr_hud_send(MAVLINK_COMM_1 , packet1.airspeed , packet1.groundspeed , packet1.heading , packet1.throttle , packet1.alt , packet1.climb );
mavlink_msg_vfr_hud_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_command_long(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_command_long_t packet_in = {
17.0,
45.0,
73.0,
101.0,
129.0,
157.0,
185.0,
18691,
223,
34,
101,
};
mavlink_command_long_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.param1 = packet_in.param1;
packet1.param2 = packet_in.param2;
packet1.param3 = packet_in.param3;
packet1.param4 = packet_in.param4;
packet1.param5 = packet_in.param5;
packet1.param6 = packet_in.param6;
packet1.param7 = packet_in.param7;
packet1.command = packet_in.command;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.confirmation = packet_in.confirmation;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_command_long_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_command_long_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_command_long_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.command , packet1.confirmation , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.param5 , packet1.param6 , packet1.param7 );
mavlink_msg_command_long_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_command_long_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.command , packet1.confirmation , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.param5 , packet1.param6 , packet1.param7 );
mavlink_msg_command_long_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_command_long_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_command_long_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.command , packet1.confirmation , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.param5 , packet1.param6 , packet1.param7 );
mavlink_msg_command_long_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_command_ack(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_command_ack_t packet_in = {
17235,
139,
};
mavlink_command_ack_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.command = packet_in.command;
packet1.result = packet_in.result;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_command_ack_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_command_ack_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_command_ack_pack(system_id, component_id, &msg , packet1.command , packet1.result );
mavlink_msg_command_ack_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_command_ack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.command , packet1.result );
mavlink_msg_command_ack_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_command_ack_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_command_ack_send(MAVLINK_COMM_1 , packet1.command , packet1.result );
mavlink_msg_command_ack_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_local_position_ned_system_global_offset(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_local_position_ned_system_global_offset_t packet_in = {
963497464,
45.0,
73.0,
101.0,
129.0,
157.0,
185.0,
};
mavlink_local_position_ned_system_global_offset_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.x = packet_in.x;
packet1.y = packet_in.y;
packet1.z = packet_in.z;
packet1.roll = packet_in.roll;
packet1.pitch = packet_in.pitch;
packet1.yaw = packet_in.yaw;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_position_ned_system_global_offset_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_local_position_ned_system_global_offset_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_position_ned_system_global_offset_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
mavlink_msg_local_position_ned_system_global_offset_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_position_ned_system_global_offset_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
mavlink_msg_local_position_ned_system_global_offset_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_local_position_ned_system_global_offset_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_local_position_ned_system_global_offset_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
mavlink_msg_local_position_ned_system_global_offset_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_hil_state(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_hil_state_t packet_in = {
93372036854775807ULL,
73.0,
101.0,
129.0,
157.0,
185.0,
213.0,
963499128,
963499336,
963499544,
19523,
19627,
19731,
19835,
19939,
20043,
};
mavlink_hil_state_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_usec = packet_in.time_usec;
packet1.roll = packet_in.roll;
packet1.pitch = packet_in.pitch;
packet1.yaw = packet_in.yaw;
packet1.rollspeed = packet_in.rollspeed;
packet1.pitchspeed = packet_in.pitchspeed;
packet1.yawspeed = packet_in.yawspeed;
packet1.lat = packet_in.lat;
packet1.lon = packet_in.lon;
packet1.alt = packet_in.alt;
packet1.vx = packet_in.vx;
packet1.vy = packet_in.vy;
packet1.vz = packet_in.vz;
packet1.xacc = packet_in.xacc;
packet1.yacc = packet_in.yacc;
packet1.zacc = packet_in.zacc;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_hil_state_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_hil_state_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_hil_state_pack(system_id, component_id, &msg , packet1.time_usec , packet1.roll , packet1.pitch , packet1.yaw , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed , packet1.lat , packet1.lon , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.xacc , packet1.yacc , packet1.zacc );
mavlink_msg_hil_state_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_hil_state_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.roll , packet1.pitch , packet1.yaw , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed , packet1.lat , packet1.lon , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.xacc , packet1.yacc , packet1.zacc );
mavlink_msg_hil_state_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_hil_state_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_hil_state_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.roll , packet1.pitch , packet1.yaw , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed , packet1.lat , packet1.lon , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.xacc , packet1.yacc , packet1.zacc );
mavlink_msg_hil_state_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_hil_controls(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_hil_controls_t packet_in = {
93372036854775807ULL,
73.0,
101.0,
129.0,
157.0,
185.0,
213.0,
241.0,
269.0,
125,
192,
};
mavlink_hil_controls_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_usec = packet_in.time_usec;
packet1.roll_ailerons = packet_in.roll_ailerons;
packet1.pitch_elevator = packet_in.pitch_elevator;
packet1.yaw_rudder = packet_in.yaw_rudder;
packet1.throttle = packet_in.throttle;
packet1.aux1 = packet_in.aux1;
packet1.aux2 = packet_in.aux2;
packet1.aux3 = packet_in.aux3;
packet1.aux4 = packet_in.aux4;
packet1.mode = packet_in.mode;
packet1.nav_mode = packet_in.nav_mode;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_hil_controls_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_hil_controls_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_hil_controls_pack(system_id, component_id, &msg , packet1.time_usec , packet1.roll_ailerons , packet1.pitch_elevator , packet1.yaw_rudder , packet1.throttle , packet1.aux1 , packet1.aux2 , packet1.aux3 , packet1.aux4 , packet1.mode , packet1.nav_mode );
mavlink_msg_hil_controls_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_hil_controls_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.roll_ailerons , packet1.pitch_elevator , packet1.yaw_rudder , packet1.throttle , packet1.aux1 , packet1.aux2 , packet1.aux3 , packet1.aux4 , packet1.mode , packet1.nav_mode );
mavlink_msg_hil_controls_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_hil_controls_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_hil_controls_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.roll_ailerons , packet1.pitch_elevator , packet1.yaw_rudder , packet1.throttle , packet1.aux1 , packet1.aux2 , packet1.aux3 , packet1.aux4 , packet1.mode , packet1.nav_mode );
mavlink_msg_hil_controls_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_hil_rc_inputs_raw(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_hil_rc_inputs_raw_t packet_in = {
93372036854775807ULL,
17651,
17755,
17859,
17963,
18067,
18171,
18275,
18379,
18483,
18587,
18691,
18795,
101,
};
mavlink_hil_rc_inputs_raw_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_usec = packet_in.time_usec;
packet1.chan1_raw = packet_in.chan1_raw;
packet1.chan2_raw = packet_in.chan2_raw;
packet1.chan3_raw = packet_in.chan3_raw;
packet1.chan4_raw = packet_in.chan4_raw;
packet1.chan5_raw = packet_in.chan5_raw;
packet1.chan6_raw = packet_in.chan6_raw;
packet1.chan7_raw = packet_in.chan7_raw;
packet1.chan8_raw = packet_in.chan8_raw;
packet1.chan9_raw = packet_in.chan9_raw;
packet1.chan10_raw = packet_in.chan10_raw;
packet1.chan11_raw = packet_in.chan11_raw;
packet1.chan12_raw = packet_in.chan12_raw;
packet1.rssi = packet_in.rssi;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_hil_rc_inputs_raw_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_hil_rc_inputs_raw_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_hil_rc_inputs_raw_pack(system_id, component_id, &msg , packet1.time_usec , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.chan9_raw , packet1.chan10_raw , packet1.chan11_raw , packet1.chan12_raw , packet1.rssi );
mavlink_msg_hil_rc_inputs_raw_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_hil_rc_inputs_raw_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.chan9_raw , packet1.chan10_raw , packet1.chan11_raw , packet1.chan12_raw , packet1.rssi );
mavlink_msg_hil_rc_inputs_raw_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_hil_rc_inputs_raw_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_hil_rc_inputs_raw_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.chan9_raw , packet1.chan10_raw , packet1.chan11_raw , packet1.chan12_raw , packet1.rssi );
mavlink_msg_hil_rc_inputs_raw_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_optical_flow(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_optical_flow_t packet_in = {
93372036854775807ULL,
73.0,
101.0,
129.0,
18275,
18379,
77,
144,
};
mavlink_optical_flow_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_usec = packet_in.time_usec;
packet1.flow_comp_m_x = packet_in.flow_comp_m_x;
packet1.flow_comp_m_y = packet_in.flow_comp_m_y;
packet1.ground_distance = packet_in.ground_distance;
packet1.flow_x = packet_in.flow_x;
packet1.flow_y = packet_in.flow_y;
packet1.sensor_id = packet_in.sensor_id;
packet1.quality = packet_in.quality;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_optical_flow_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_optical_flow_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_optical_flow_pack(system_id, component_id, &msg , packet1.time_usec , packet1.sensor_id , packet1.flow_x , packet1.flow_y , packet1.flow_comp_m_x , packet1.flow_comp_m_y , packet1.quality , packet1.ground_distance );
mavlink_msg_optical_flow_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_optical_flow_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.sensor_id , packet1.flow_x , packet1.flow_y , packet1.flow_comp_m_x , packet1.flow_comp_m_y , packet1.quality , packet1.ground_distance );
mavlink_msg_optical_flow_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_optical_flow_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_optical_flow_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.sensor_id , packet1.flow_x , packet1.flow_y , packet1.flow_comp_m_x , packet1.flow_comp_m_y , packet1.quality , packet1.ground_distance );
mavlink_msg_optical_flow_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_global_vision_position_estimate(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_global_vision_position_estimate_t packet_in = {
93372036854775807ULL,
73.0,
101.0,
129.0,
157.0,
185.0,
213.0,
};
mavlink_global_vision_position_estimate_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.usec = packet_in.usec;
packet1.x = packet_in.x;
packet1.y = packet_in.y;
packet1.z = packet_in.z;
packet1.roll = packet_in.roll;
packet1.pitch = packet_in.pitch;
packet1.yaw = packet_in.yaw;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_vision_position_estimate_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_global_vision_position_estimate_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_vision_position_estimate_pack(system_id, component_id, &msg , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
mavlink_msg_global_vision_position_estimate_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_vision_position_estimate_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
mavlink_msg_global_vision_position_estimate_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_global_vision_position_estimate_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_global_vision_position_estimate_send(MAVLINK_COMM_1 , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
mavlink_msg_global_vision_position_estimate_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_vision_position_estimate(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_vision_position_estimate_t packet_in = {
93372036854775807ULL,
73.0,
101.0,
129.0,
157.0,
185.0,
213.0,
};
mavlink_vision_position_estimate_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.usec = packet_in.usec;
packet1.x = packet_in.x;
packet1.y = packet_in.y;
packet1.z = packet_in.z;
packet1.roll = packet_in.roll;
packet1.pitch = packet_in.pitch;
packet1.yaw = packet_in.yaw;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vision_position_estimate_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_vision_position_estimate_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vision_position_estimate_pack(system_id, component_id, &msg , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
mavlink_msg_vision_position_estimate_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vision_position_estimate_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
mavlink_msg_vision_position_estimate_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_vision_position_estimate_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vision_position_estimate_send(MAVLINK_COMM_1 , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
mavlink_msg_vision_position_estimate_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_vision_speed_estimate(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_vision_speed_estimate_t packet_in = {
93372036854775807ULL,
73.0,
101.0,
129.0,
};
mavlink_vision_speed_estimate_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.usec = packet_in.usec;
packet1.x = packet_in.x;
packet1.y = packet_in.y;
packet1.z = packet_in.z;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vision_speed_estimate_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_vision_speed_estimate_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vision_speed_estimate_pack(system_id, component_id, &msg , packet1.usec , packet1.x , packet1.y , packet1.z );
mavlink_msg_vision_speed_estimate_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vision_speed_estimate_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.usec , packet1.x , packet1.y , packet1.z );
mavlink_msg_vision_speed_estimate_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_vision_speed_estimate_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vision_speed_estimate_send(MAVLINK_COMM_1 , packet1.usec , packet1.x , packet1.y , packet1.z );
mavlink_msg_vision_speed_estimate_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_vicon_position_estimate(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_vicon_position_estimate_t packet_in = {
93372036854775807ULL,
73.0,
101.0,
129.0,
157.0,
185.0,
213.0,
};
mavlink_vicon_position_estimate_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.usec = packet_in.usec;
packet1.x = packet_in.x;
packet1.y = packet_in.y;
packet1.z = packet_in.z;
packet1.roll = packet_in.roll;
packet1.pitch = packet_in.pitch;
packet1.yaw = packet_in.yaw;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vicon_position_estimate_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_vicon_position_estimate_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vicon_position_estimate_pack(system_id, component_id, &msg , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
mavlink_msg_vicon_position_estimate_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vicon_position_estimate_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
mavlink_msg_vicon_position_estimate_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_vicon_position_estimate_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_vicon_position_estimate_send(MAVLINK_COMM_1 , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
mavlink_msg_vicon_position_estimate_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_memory_vect(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_memory_vect_t packet_in = {
17235,
139,
206,
{ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48 },
};
mavlink_memory_vect_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.address = packet_in.address;
packet1.ver = packet_in.ver;
packet1.type = packet_in.type;
mav_array_memcpy(packet1.value, packet_in.value, sizeof(int8_t)*32);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_memory_vect_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_memory_vect_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_memory_vect_pack(system_id, component_id, &msg , packet1.address , packet1.ver , packet1.type , packet1.value );
mavlink_msg_memory_vect_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_memory_vect_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.address , packet1.ver , packet1.type , packet1.value );
mavlink_msg_memory_vect_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_memory_vect_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_memory_vect_send(MAVLINK_COMM_1 , packet1.address , packet1.ver , packet1.type , packet1.value );
mavlink_msg_memory_vect_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_debug_vect(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_debug_vect_t packet_in = {
93372036854775807ULL,
73.0,
101.0,
129.0,
"UVWXYZABC",
};
mavlink_debug_vect_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_usec = packet_in.time_usec;
packet1.x = packet_in.x;
packet1.y = packet_in.y;
packet1.z = packet_in.z;
mav_array_memcpy(packet1.name, packet_in.name, sizeof(char)*10);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_debug_vect_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_debug_vect_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_debug_vect_pack(system_id, component_id, &msg , packet1.name , packet1.time_usec , packet1.x , packet1.y , packet1.z );
mavlink_msg_debug_vect_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_debug_vect_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.name , packet1.time_usec , packet1.x , packet1.y , packet1.z );
mavlink_msg_debug_vect_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_debug_vect_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_debug_vect_send(MAVLINK_COMM_1 , packet1.name , packet1.time_usec , packet1.x , packet1.y , packet1.z );
mavlink_msg_debug_vect_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_named_value_float(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_named_value_float_t packet_in = {
963497464,
45.0,
"IJKLMNOPQ",
};
mavlink_named_value_float_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.value = packet_in.value;
mav_array_memcpy(packet1.name, packet_in.name, sizeof(char)*10);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_named_value_float_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_named_value_float_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_named_value_float_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.name , packet1.value );
mavlink_msg_named_value_float_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_named_value_float_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.name , packet1.value );
mavlink_msg_named_value_float_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_named_value_float_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_named_value_float_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.name , packet1.value );
mavlink_msg_named_value_float_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_named_value_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_named_value_int_t packet_in = {
963497464,
963497672,
"IJKLMNOPQ",
};
mavlink_named_value_int_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.value = packet_in.value;
mav_array_memcpy(packet1.name, packet_in.name, sizeof(char)*10);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_named_value_int_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_named_value_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_named_value_int_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.name , packet1.value );
mavlink_msg_named_value_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_named_value_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.name , packet1.value );
mavlink_msg_named_value_int_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_named_value_int_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_named_value_int_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.name , packet1.value );
mavlink_msg_named_value_int_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_statustext(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_statustext_t packet_in = {
5,
"BCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWX",
};
mavlink_statustext_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.severity = packet_in.severity;
mav_array_memcpy(packet1.text, packet_in.text, sizeof(char)*50);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_statustext_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_statustext_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_statustext_pack(system_id, component_id, &msg , packet1.severity , packet1.text );
mavlink_msg_statustext_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_statustext_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.severity , packet1.text );
mavlink_msg_statustext_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_statustext_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_statustext_send(MAVLINK_COMM_1 , packet1.severity , packet1.text );
mavlink_msg_statustext_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_debug(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_debug_t packet_in = {
963497464,
45.0,
29,
};
mavlink_debug_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.time_boot_ms = packet_in.time_boot_ms;
packet1.value = packet_in.value;
packet1.ind = packet_in.ind;
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_debug_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_debug_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_debug_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.ind , packet1.value );
mavlink_msg_debug_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_debug_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.ind , packet1.value );
mavlink_msg_debug_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
 
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_debug_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_debug_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.ind , packet1.value );
mavlink_msg_debug_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
 
static void mavlink_test_common(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_test_heartbeat(system_id, component_id, last_msg);
mavlink_test_sys_status(system_id, component_id, last_msg);
mavlink_test_system_time(system_id, component_id, last_msg);
mavlink_test_ping(system_id, component_id, last_msg);
mavlink_test_change_operator_control(system_id, component_id, last_msg);
mavlink_test_change_operator_control_ack(system_id, component_id, last_msg);
mavlink_test_auth_key(system_id, component_id, last_msg);
mavlink_test_set_mode(system_id, component_id, last_msg);
mavlink_test_param_request_read(system_id, component_id, last_msg);
mavlink_test_param_request_list(system_id, component_id, last_msg);
mavlink_test_param_value(system_id, component_id, last_msg);
mavlink_test_param_set(system_id, component_id, last_msg);
mavlink_test_gps_raw_int(system_id, component_id, last_msg);
mavlink_test_gps_status(system_id, component_id, last_msg);
mavlink_test_scaled_imu(system_id, component_id, last_msg);
mavlink_test_raw_imu(system_id, component_id, last_msg);
mavlink_test_raw_pressure(system_id, component_id, last_msg);
mavlink_test_scaled_pressure(system_id, component_id, last_msg);
mavlink_test_attitude(system_id, component_id, last_msg);
mavlink_test_attitude_quaternion(system_id, component_id, last_msg);
mavlink_test_local_position_ned(system_id, component_id, last_msg);
mavlink_test_global_position_int(system_id, component_id, last_msg);
mavlink_test_rc_channels_scaled(system_id, component_id, last_msg);
mavlink_test_rc_channels_raw(system_id, component_id, last_msg);
mavlink_test_servo_output_raw(system_id, component_id, last_msg);
mavlink_test_mission_request_partial_list(system_id, component_id, last_msg);
mavlink_test_mission_write_partial_list(system_id, component_id, last_msg);
mavlink_test_mission_item(system_id, component_id, last_msg);
mavlink_test_mission_request(system_id, component_id, last_msg);
mavlink_test_mission_set_current(system_id, component_id, last_msg);
mavlink_test_mission_current(system_id, component_id, last_msg);
mavlink_test_mission_request_list(system_id, component_id, last_msg);
mavlink_test_mission_count(system_id, component_id, last_msg);
mavlink_test_mission_clear_all(system_id, component_id, last_msg);
mavlink_test_mission_item_reached(system_id, component_id, last_msg);
mavlink_test_mission_ack(system_id, component_id, last_msg);
mavlink_test_set_gps_global_origin(system_id, component_id, last_msg);
mavlink_test_gps_global_origin(system_id, component_id, last_msg);
mavlink_test_set_local_position_setpoint(system_id, component_id, last_msg);
mavlink_test_local_position_setpoint(system_id, component_id, last_msg);
mavlink_test_global_position_setpoint_int(system_id, component_id, last_msg);
mavlink_test_set_global_position_setpoint_int(system_id, component_id, last_msg);
mavlink_test_safety_set_allowed_area(system_id, component_id, last_msg);
mavlink_test_safety_allowed_area(system_id, component_id, last_msg);
mavlink_test_set_roll_pitch_yaw_thrust(system_id, component_id, last_msg);
mavlink_test_set_roll_pitch_yaw_speed_thrust(system_id, component_id, last_msg);
mavlink_test_roll_pitch_yaw_thrust_setpoint(system_id, component_id, last_msg);
mavlink_test_roll_pitch_yaw_speed_thrust_setpoint(system_id, component_id, last_msg);
mavlink_test_set_quad_motors_setpoint(system_id, component_id, last_msg);
mavlink_test_set_quad_swarm_roll_pitch_yaw_thrust(system_id, component_id, last_msg);
mavlink_test_nav_controller_output(system_id, component_id, last_msg);
mavlink_test_state_correction(system_id, component_id, last_msg);
mavlink_test_request_data_stream(system_id, component_id, last_msg);
mavlink_test_data_stream(system_id, component_id, last_msg);
mavlink_test_manual_control(system_id, component_id, last_msg);
mavlink_test_rc_channels_override(system_id, component_id, last_msg);
mavlink_test_vfr_hud(system_id, component_id, last_msg);
mavlink_test_command_long(system_id, component_id, last_msg);
mavlink_test_command_ack(system_id, component_id, last_msg);
mavlink_test_local_position_ned_system_global_offset(system_id, component_id, last_msg);
mavlink_test_hil_state(system_id, component_id, last_msg);
mavlink_test_hil_controls(system_id, component_id, last_msg);
mavlink_test_hil_rc_inputs_raw(system_id, component_id, last_msg);
mavlink_test_optical_flow(system_id, component_id, last_msg);
mavlink_test_global_vision_position_estimate(system_id, component_id, last_msg);
mavlink_test_vision_position_estimate(system_id, component_id, last_msg);
mavlink_test_vision_speed_estimate(system_id, component_id, last_msg);
mavlink_test_vicon_position_estimate(system_id, component_id, last_msg);
mavlink_test_memory_vect(system_id, component_id, last_msg);
mavlink_test_debug_vect(system_id, component_id, last_msg);
mavlink_test_named_value_float(system_id, component_id, last_msg);
mavlink_test_named_value_int(system_id, component_id, last_msg);
mavlink_test_statustext(system_id, component_id, last_msg);
mavlink_test_debug(system_id, component_id, last_msg);
}
 
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // COMMON_TESTSUITE_H
/C-OSD/arducam-osd/libraries/GCS_MAVLink/include/mavlink/v1.0/common/version.h
0,0 → 1,12
/** @file
* @brief MAVLink comm protocol built from common.xml
* @see http://pixhawk.ethz.ch/software/mavlink
*/
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
 
#define MAVLINK_BUILD_DATE "Mon Apr 30 11:40:12 2012"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 101
#endif // MAVLINK_VERSION_H