Commit 5744b130 authored by PX4BuildBot's avatar PX4BuildBot

autogenerated headers for rev...

autogenerated headers for rev https://github.com/mavlink/mavlink/tree/78ad63c98f9072bdd6e6c1607e10a2fa76f2f20b
parent efc2a1fa
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Sat Sep 05 2020"
#define MAVLINK_BUILD_DATE "Sun Sep 06 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Sat Sep 05 2020"
#define MAVLINK_BUILD_DATE "Sun Sep 06 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Sat Sep 05 2020"
#define MAVLINK_BUILD_DATE "Sun Sep 06 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Sat Sep 05 2020"
#define MAVLINK_BUILD_DATE "Sun Sep 06 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Sat Sep 05 2020"
#define MAVLINK_BUILD_DATE "Sun Sep 06 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 46
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Sat Sep 05 2020"
#define MAVLINK_BUILD_DATE "Sun Sep 06 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
<?xml version="1.0"?>
<mavlink>
<include>common.xml</include>
<enums>
<enum name="MAV_CMD">
<!-- 1-10000 reserved for common commands -->
<entry value="10001" name="MAV_CMD_DO_NOTHING">
<description>Does nothing.</description>
<param index="1">1 to arm, 0 to disarm</param>
</entry>
<!-- Unused Commands -->
<!--
<entry value="10002" name="MAV_CMD_CALIBRATE_RC">
<description>Initiate radio control calibration.</description>
</entry>
<entry value="10003" name="MAV_CMD_CALIBRATE_MAGNETOMETER">
<description>Stops recording data.</description>
</entry>
<entry value="10004" name="MAV_CMD_START_RECORDING">
<description>Start recording data.</description>
</entry>
<entry value="10005" name="MAV_CMD_PAUSE_RECORDING">
<description>Pauses recording data.</description>
</entry>
<entry value="10006" name="MAV_CMD_STOP_RECORDING">
<description>Stops recording data.</description>
</entry>
-->
<!-- Old MAVlink Common Actions -->
<entry value="10011" name="MAV_CMD_RETURN_TO_BASE">
<description>Return vehicle to base.</description>
<param index="1">0: return to base, 1: track mobile base</param>
</entry>
<entry value="10012" name="MAV_CMD_STOP_RETURN_TO_BASE">
<description>Stops the vehicle from returning to base and resumes flight. </description>
</entry>
<entry value="10013" name="MAV_CMD_TURN_LIGHT">
<description>Turns the vehicle's visible or infrared lights on or off.</description>
<param index="1">0: visible lights, 1: infrared lights</param>
<param index="2">0: turn on, 1: turn off</param>
</entry>
<entry value="10014" name="MAV_CMD_GET_MID_LEVEL_COMMANDS">
<description>Requests vehicle to send current mid-level commands to ground station.</description>
</entry>
<entry value="10015" name="MAV_CMD_MIDLEVEL_STORAGE">
<description>Requests storage of mid-level commands.</description>
<param index="1">Mid-level command storage: 0: read from flash/EEPROM, 1: write to flash/EEPROM</param>
</entry>
<!-- From SLUGS_ACTION Enum -->
</enum>
<enum name="SLUGS_MODE">
<description>Slugs-specific navigation modes.</description>
<entry value="0" name="SLUGS_MODE_NONE">
<description>No change to SLUGS mode.</description>
</entry>
<entry value="1" name="SLUGS_MODE_LIFTOFF">
<description>Vehicle is in liftoff mode.</description>
</entry>
<entry value="2" name="SLUGS_MODE_PASSTHROUGH">
<description>Vehicle is in passthrough mode, being controlled by a pilot.</description>
</entry>
<entry value="3" name="SLUGS_MODE_WAYPOINT">
<description>Vehicle is in waypoint mode, navigating to waypoints.</description>
</entry>
<entry value="4" name="SLUGS_MODE_MID_LEVEL">
<description>Vehicle is executing mid-level commands.</description>
</entry>
<entry value="5" name="SLUGS_MODE_RETURNING">
<description>Vehicle is returning to the home location.</description>
</entry>
<entry value="6" name="SLUGS_MODE_LANDING">
<description>Vehicle is landing.</description>
</entry>
<entry value="7" name="SLUGS_MODE_LOST">
<description>Lost connection with vehicle.</description>
</entry>
<entry value="8" name="SLUGS_MODE_SELECTIVE_PASSTHROUGH">
<description>Vehicle is in selective passthrough mode, where selected surfaces are being manually controlled.</description>
</entry>
<entry value="9" name="SLUGS_MODE_ISR">
<description>Vehicle is in ISR mode, performing reconaissance at a point specified by ISR_LOCATION message.</description>
</entry>
<entry value="10" name="SLUGS_MODE_LINE_PATROL">
<description>Vehicle is patrolling along lines between waypoints.</description>
</entry>
<entry value="11" name="SLUGS_MODE_GROUNDED">
<description>Vehicle is grounded or an error has occurred.</description>
</entry>
</enum>
<enum name="CONTROL_SURFACE_FLAG">
<description>These flags encode the control surfaces for selective passthrough mode. If a bit is set then the pilot console
has control of the surface, and if not then the autopilot has control of the surface.</description>
<entry value="128" name="CONTROL_SURFACE_FLAG_THROTTLE">
<description>0b10000000 Throttle control passes through to pilot console.</description>
</entry>
<entry value="64" name="CONTROL_SURFACE_FLAG_LEFT_AILERON">
<description>0b01000000 Left aileron control passes through to pilot console.</description>
</entry>
<entry value="32" name="CONTROL_SURFACE_FLAG_RIGHT_AILERON">
<description>0b00100000 Right aileron control passes through to pilot console.</description>
</entry>
<entry value="16" name="CONTROL_SURFACE_FLAG_RUDDER">
<description>0b00010000 Rudder control passes through to pilot console.</description>
</entry>
<entry value="8" name="CONTROL_SURFACE_FLAG_LEFT_ELEVATOR">
<description>0b00001000 Left elevator control passes through to pilot console.</description>
</entry>
<entry value="4" name="CONTROL_SURFACE_FLAG_RIGHT_ELEVATOR">
<description>0b00000100 Right elevator control passes through to pilot console.</description>
</entry>
<entry value="2" name="CONTROL_SURFACE_FLAG_LEFT_FLAP">
<description>0b00000010 Left flap control passes through to pilot console.</description>
</entry>
<entry value="1" name="CONTROL_SURFACE_FLAG_RIGHT_FLAP">
<description>0b00000001 Right flap control passes through to pilot console.</description>
</entry>
</enum>
</enums>
<!--
<enum name="WP_PROTOCOL_STATE" >
<description> Waypoint Protocol States </description>
<entry name = "WP_PROT_IDLE">
<entry name = "WP_PROT_LIST_REQUESTED">
<entry name = "WP_PROT_NUM_SENT">
<entry name = "WP_PROT_TX_WP">
<entry name = "WP_PROT_RX_WP">
<entry name = "WP_PROT_SENDING_WP_IDLE">
<entry name = "WP_PROT_GETTING_WP_IDLE">
</enum>
-->
<messages>
<message name="CPU_LOAD" id="170">
<description>Sensor and DSC control loads.</description>
<field name="sensLoad" type="uint8_t">Sensor DSC Load</field>
<field name="ctrlLoad" type="uint8_t">Control DSC Load</field>
<field name="batVolt" type="uint16_t" units="mV">Battery Voltage</field>
</message>
<message name="SENSOR_BIAS" id="172">
<description>Accelerometer and gyro biases.</description>
<field name="axBias" type="float" units="m/s">Accelerometer X bias</field>
<field name="ayBias" type="float" units="m/s">Accelerometer Y bias</field>
<field name="azBias" type="float" units="m/s">Accelerometer Z bias</field>
<field name="gxBias" type="float" units="rad/s">Gyro X bias</field>
<field name="gyBias" type="float" units="rad/s">Gyro Y bias</field>
<field name="gzBias" type="float" units="rad/s">Gyro Z bias</field>
</message>
<message name="DIAGNOSTIC" id="173">
<description>Configurable diagnostic messages.</description>
<field name="diagFl1" type="float">Diagnostic float 1</field>
<field name="diagFl2" type="float">Diagnostic float 2</field>
<field name="diagFl3" type="float">Diagnostic float 3</field>
<field name="diagSh1" type="int16_t">Diagnostic short 1</field>
<field name="diagSh2" type="int16_t">Diagnostic short 2</field>
<field name="diagSh3" type="int16_t">Diagnostic short 3</field>
</message>
<message name="SLUGS_NAVIGATION" id="176">
<description>Data used in the navigation algorithm.</description>
<field name="u_m" type="float" units="m/s">Measured Airspeed prior to the nav filter</field>
<field name="phi_c" type="float">Commanded Roll</field>
<field name="theta_c" type="float">Commanded Pitch</field>
<field name="psiDot_c" type="float">Commanded Turn rate</field>
<field name="ay_body" type="float">Y component of the body acceleration</field>
<field name="totalDist" type="float">Total Distance to Run on this leg of Navigation</field>
<field name="dist2Go" type="float">Remaining distance to Run on this leg of Navigation</field>
<field name="fromWP" type="uint8_t">Origin WP</field>
<field name="toWP" type="uint8_t">Destination WP</field>
<field name="h_c" type="uint16_t" units="dm">Commanded altitude (MSL)</field>
</message>
<message name="DATA_LOG" id="177">
<description>Configurable data log probes to be used inside Simulink</description>
<field name="fl_1" type="float">Log value 1 </field>
<field name="fl_2" type="float">Log value 2 </field>
<field name="fl_3" type="float">Log value 3 </field>
<field name="fl_4" type="float">Log value 4 </field>
<field name="fl_5" type="float">Log value 5 </field>
<field name="fl_6" type="float">Log value 6 </field>
</message>
<message name="GPS_DATE_TIME" id="179">
<description>Pilot console PWM messges.</description>
<field name="year" type="uint8_t">Year reported by Gps </field>
<field name="month" type="uint8_t">Month reported by Gps </field>
<field name="day" type="uint8_t">Day reported by Gps </field>
<field name="hour" type="uint8_t">Hour reported by Gps </field>
<field name="min" type="uint8_t">Min reported by Gps </field>
<field name="sec" type="uint8_t">Sec reported by Gps </field>
<field name="clockStat" type="uint8_t">Clock Status. See table 47 page 211 OEMStar Manual </field>
<field name="visSat" type="uint8_t">Visible satellites reported by Gps </field>
<field name="useSat" type="uint8_t">Used satellites in Solution </field>
<field name="GppGl" type="uint8_t">GPS+GLONASS satellites in Solution </field>
<field name="sigUsedMask" type="uint8_t">GPS and GLONASS usage mask (bit 0 GPS_used? bit_4 GLONASS_used?)</field>
<field name="percentUsed" type="uint8_t" units="%">Percent used GPS</field>
</message>
<message name="MID_LVL_CMDS" id="180">
<description>Mid Level commands sent from the GS to the autopilot. These are only sent when being operated in mid-level commands mode from the ground.</description>
<field name="target" type="uint8_t">The system setting the commands</field>
<field name="hCommand" type="float" units="m">Commanded altitude (MSL)</field>
<field name="uCommand" type="float" units="m/s">Commanded Airspeed</field>
<field name="rCommand" type="float" units="rad/s">Commanded Turnrate</field>
</message>
<message name="CTRL_SRFC_PT" id="181">
<description>This message sets the control surfaces for selective passthrough mode.</description>
<field name="target" type="uint8_t">The system setting the commands</field>
<field name="bitfieldPt" type="uint16_t" enum="CONTROL_SURFACE_FLAG" display="bitmask">Bitfield containing the passthrough configuration, see CONTROL_SURFACE_FLAG ENUM.</field>
</message>
<message name="SLUGS_CAMERA_ORDER" id="184">
<description>Orders generated to the SLUGS camera mount. </description>
<field name="target" type="uint8_t">The system reporting the action</field>
<field name="pan" type="int8_t">Order the mount to pan: -1 left, 0 No pan motion, +1 right</field>
<field name="tilt" type="int8_t">Order the mount to tilt: -1 down, 0 No tilt motion, +1 up</field>
<field name="zoom" type="int8_t">Order the zoom values 0 to 10</field>
<field name="moveHome" type="int8_t">Orders the camera mount to move home. The other fields are ignored when this field is set. 1: move home, 0 ignored</field>
</message>
<message name="CONTROL_SURFACE" id="185">
<description>Control for surface; pending and order to origin.</description>
<field name="target" type="uint8_t">The system setting the commands</field>
<field name="idSurface" type="uint8_t">ID control surface send 0: throttle 1: aileron 2: elevator 3: rudder</field>
<field name="mControl" type="float">Pending</field>
<field name="bControl" type="float">Order to origin</field>
</message>
<!-- Moved into MAV_CMD_RETURN_TO_BASE -->
<!--
<message name="SLUGS_RTB" id="187">
<description>Orders SLUGS to RTB. It also decides to either track a mobile or RTB </description>
<field name="target" type="uint8_t">The system ordered to RTB</field>
<field name="rtb" type="uint8_t">Order SLUGS to: 0: Stop RTB and resume flight; 1: RTB</field>
<field name="track_mobile" type="uint8_t">Order SLUGS to: 0: RTB to GS Location; 1: Track mobile </field>
</message>
-->
<message name="SLUGS_MOBILE_LOCATION" id="186">
<description>Transmits the last known position of the mobile GS to the UAV. Very relevant when Track Mobile is enabled</description>
<field name="target" type="uint8_t">The system reporting the action</field>
<field name="latitude" type="float" units="deg">Mobile Latitude</field>
<field name="longitude" type="float" units="deg">Mobile Longitude</field>
</message>
<message name="SLUGS_CONFIGURATION_CAMERA" id="188">
<description>Control for camara.</description>
<field name="target" type="uint8_t">The system setting the commands</field>
<field name="idOrder" type="uint8_t">ID 0: brightness 1: aperture 2: iris 3: ICR 4: backlight</field>
<field name="order" type="uint8_t"> 1: up/on 2: down/off 3: auto/reset/no action</field>
</message>
<message name="ISR_LOCATION" id="189">
<description>Transmits the position of watch</description>
<field name="target" type="uint8_t">The system reporting the action</field>
<field name="latitude" type="float" units="deg">ISR Latitude</field>
<field name="longitude" type="float" units="deg">ISR Longitude</field>
<field name="height" type="float">ISR Height</field>
<field name="option1" type="uint8_t">Option 1</field>
<field name="option2" type="uint8_t">Option 2</field>
<field name="option3" type="uint8_t">Option 3</field>
</message>
<!-- Removed to MAV_CMD_TURN_LIGHT -->
<!--
<message name="TURN_LIGHT" id="190">
<description>Transmits the order to turn on lights</description>
<field name="target" type="uint8_t">The system ordered to turn on lights</field>
<field name="type" type="uint8_t">Type lights 0: Visible; 1: Infrared</field>
<field name="turn" type="uint8_t">Order turn on lights 1: Turn on; 0: Turn off</field>
</message>
-->
<message name="VOLT_SENSOR" id="191">
<description>Transmits the readings from the voltage and current sensors</description>
<field name="r2Type" type="uint8_t">It is the value of reading 2: 0 - Current, 1 - Foreward Sonar, 2 - Back Sonar, 3 - RPM</field>
<field name="voltage" type="uint16_t">Voltage in uS of PWM. 0 uS = 0V, 20 uS = 21.5V </field>
<field name="reading2" type="uint16_t">Depends on the value of r2Type (0) Current consumption in uS of PWM, 20 uS = 90Amp (1) Distance in cm (2) Distance in cm (3) Absolute value</field>
</message>
<message name="PTZ_STATUS" id="192">
<description>Transmits the actual Pan, Tilt and Zoom values of the camera unit</description>
<field name="zoom" type="uint8_t">The actual Zoom Value</field>
<field name="pan" type="int16_t">The Pan value in 10ths of degree</field>
<field name="tilt" type="int16_t">The Tilt value in 10ths of degree</field>
</message>
<message name="UAV_STATUS" id="193">
<description>Transmits the actual status values UAV in flight</description>
<field name="target" type="uint8_t">The ID system reporting the action</field>
<field name="latitude" type="float" units="deg">Latitude UAV</field>
<field name="longitude" type="float" units="deg">Longitude UAV</field>
<field name="altitude" type="float" units="m">Altitude UAV</field>
<field name="speed" type="float" units="m/s">Speed UAV</field>
<field name="course" type="float">Course UAV</field>
</message>
<message name="STATUS_GPS" id="194">
<description>This contains the status of the GPS readings</description>
<field name="csFails" type="uint16_t">Number of times checksum has failed</field>
<field name="gpsQuality" type="uint8_t">The quality indicator, 0=fix not available or invalid, 1=GPS fix, 2=C/A differential GPS, 6=Dead reckoning mode, 7=Manual input mode (fixed position), 8=Simulator mode, 9= WAAS a</field>
<field name="msgsType" type="uint8_t"> Indicates if GN, GL or GP messages are being received</field>
<field name="posStatus" type="uint8_t"> A = data valid, V = data invalid</field>
<field name="magVar" type="float" units="deg">Magnetic variation</field>
<field name="magDir" type="int8_t"> Magnetic variation direction E/W. Easterly variation (E) subtracts from True course and Westerly variation (W) adds to True course</field>
<field name="modeInd" type="uint8_t"> Positioning system mode indicator. A - Autonomous;D-Differential; E-Estimated (dead reckoning) mode;M-Manual input; N-Data not valid</field>
</message>
<message name="NOVATEL_DIAG" id="195">
<description>Transmits the diagnostics data from the Novatel OEMStar GPS</description>
<field name="timeStatus" type="uint8_t">The Time Status. See Table 8 page 27 Novatel OEMStar Manual</field>
<field name="receiverStatus" type="uint32_t">Status Bitfield. See table 69 page 350 Novatel OEMstar Manual</field>
<field name="solStatus" type="uint8_t">solution Status. See table 44 page 197</field>
<field name="posType" type="uint8_t">position type. See table 43 page 196</field>
<field name="velType" type="uint8_t">velocity type. See table 43 page 196</field>
<field name="posSolAge" type="float" units="s">Age of the position solution</field>
<field name="csFails" type="uint16_t">Times the CRC has failed since boot</field>
</message>
<message name="SENSOR_DIAG" id="196">
<description>Diagnostic data Sensor MCU</description>
<field name="float1" type="float">Float field 1</field>
<field name="float2" type="float">Float field 2</field>
<field name="int1" type="int16_t">Int 16 field 1</field>
<field name="char1" type="int8_t">Int 8 field 1</field>
</message>
<message id="197" name="BOOT">
<description>The boot message indicates that a system is starting. The onboard software version allows to keep track of onboard soft/firmware revisions. This message allows the sensor and control MCUs to communicate version numbers on startup.</description>
<field type="uint32_t" name="version">The onboard software version</field>
</message>
</messages>
</mavlink>
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Sat Sep 05 2020"
#define MAVLINK_BUILD_DATE "Sun Sep 06 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22
......
/** @file
* @brief MAVLink comm protocol built from slugs.xml
* @see http://mavlink.org
*/
#pragma once
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_IDX 0
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
#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
#ifndef MAVLINK_COMMAND_24BIT
#define MAVLINK_COMMAND_24BIT 1
#endif
#include "version.h"
#include "slugs.h"
#endif // MAVLINK_H
#pragma once
// MESSAGE BOOT PACKING
#define MAVLINK_MSG_ID_BOOT 197
typedef struct __mavlink_boot_t {
uint32_t version; /*< The onboard software version*/
} mavlink_boot_t;
#define MAVLINK_MSG_ID_BOOT_LEN 4
#define MAVLINK_MSG_ID_BOOT_MIN_LEN 4
#define MAVLINK_MSG_ID_197_LEN 4
#define MAVLINK_MSG_ID_197_MIN_LEN 4
#define MAVLINK_MSG_ID_BOOT_CRC 39
#define MAVLINK_MSG_ID_197_CRC 39
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_BOOT { \
197, \
"BOOT", \
1, \
{ { "version", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_boot_t, version) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_BOOT { \
"BOOT", \
1, \
{ { "version", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_boot_t, version) }, \
} \
}
#endif
/**
* @brief Pack a boot 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 version The onboard software version
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_boot_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t version)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_BOOT_LEN];
_mav_put_uint32_t(buf, 0, version);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_BOOT_LEN);
#else
mavlink_boot_t packet;
packet.version = version;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_BOOT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_BOOT;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_BOOT_MIN_LEN, MAVLINK_MSG_ID_BOOT_LEN, MAVLINK_MSG_ID_BOOT_CRC);
}
/**
* @brief Pack a boot 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param version The onboard software version
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_boot_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t version)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_BOOT_LEN];
_mav_put_uint32_t(buf, 0, version);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_BOOT_LEN);
#else
mavlink_boot_t packet;
packet.version = version;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_BOOT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_BOOT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_BOOT_MIN_LEN, MAVLINK_MSG_ID_BOOT_LEN, MAVLINK_MSG_ID_BOOT_CRC);
}
/**
* @brief Encode a boot struct
*
* @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 boot C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_boot_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_boot_t* boot)
{
return mavlink_msg_boot_pack(system_id, component_id, msg, boot->version);
}
/**
* @brief Encode a boot struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param boot C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_boot_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_boot_t* boot)
{
return mavlink_msg_boot_pack_chan(system_id, component_id, chan, msg, boot->version);
}
/**
* @brief Send a boot message
* @param chan MAVLink channel to send the message
*
* @param version The onboard software version
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_boot_send(mavlink_channel_t chan, uint32_t version)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_BOOT_LEN];
_mav_put_uint32_t(buf, 0, version);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BOOT, buf, MAVLINK_MSG_ID_BOOT_MIN_LEN, MAVLINK_MSG_ID_BOOT_LEN, MAVLINK_MSG_ID_BOOT_CRC);
#else
mavlink_boot_t packet;
packet.version = version;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BOOT, (const char *)&packet, MAVLINK_MSG_ID_BOOT_MIN_LEN, MAVLINK_MSG_ID_BOOT_LEN, MAVLINK_MSG_ID_BOOT_CRC);
#endif
}
/**
* @brief Send a boot message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_boot_send_struct(mavlink_channel_t chan, const mavlink_boot_t* boot)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_boot_send(chan, boot->version);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BOOT, (const char *)boot, MAVLINK_MSG_ID_BOOT_MIN_LEN, MAVLINK_MSG_ID_BOOT_LEN, MAVLINK_MSG_ID_BOOT_CRC);
#endif
}
#if MAVLINK_MSG_ID_BOOT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_boot_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t version)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint32_t(buf, 0, version);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BOOT, buf, MAVLINK_MSG_ID_BOOT_MIN_LEN, MAVLINK_MSG_ID_BOOT_LEN, MAVLINK_MSG_ID_BOOT_CRC);
#else
mavlink_boot_t *packet = (mavlink_boot_t *)msgbuf;
packet->version = version;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BOOT, (const char *)packet, MAVLINK_MSG_ID_BOOT_MIN_LEN, MAVLINK_MSG_ID_BOOT_LEN, MAVLINK_MSG_ID_BOOT_CRC);
#endif
}
#endif
#endif
// MESSAGE BOOT UNPACKING
/**
* @brief Get field version from boot message
*
* @return The onboard software version
*/
static inline uint32_t mavlink_msg_boot_get_version(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Decode a boot message into a struct
*
* @param msg The message to decode
* @param boot C-struct to decode the message contents into
*/
static inline void mavlink_msg_boot_decode(const mavlink_message_t* msg, mavlink_boot_t* boot)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
boot->version = mavlink_msg_boot_get_version(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_BOOT_LEN? msg->len : MAVLINK_MSG_ID_BOOT_LEN;
memset(boot, 0, MAVLINK_MSG_ID_BOOT_LEN);
memcpy(boot, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE CONTROL_SURFACE PACKING
#define MAVLINK_MSG_ID_CONTROL_SURFACE 185
typedef struct __mavlink_control_surface_t {
float mControl; /*< Pending*/
float bControl; /*< Order to origin*/
uint8_t target; /*< The system setting the commands*/
uint8_t idSurface; /*< ID control surface send 0: throttle 1: aileron 2: elevator 3: rudder*/
} mavlink_control_surface_t;
#define MAVLINK_MSG_ID_CONTROL_SURFACE_LEN 10
#define MAVLINK_MSG_ID_CONTROL_SURFACE_MIN_LEN 10
#define MAVLINK_MSG_ID_185_LEN 10
#define MAVLINK_MSG_ID_185_MIN_LEN 10
#define MAVLINK_MSG_ID_CONTROL_SURFACE_CRC 113
#define MAVLINK_MSG_ID_185_CRC 113
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_CONTROL_SURFACE { \
185, \
"CONTROL_SURFACE", \
4, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_control_surface_t, target) }, \
{ "idSurface", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_control_surface_t, idSurface) }, \
{ "mControl", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_control_surface_t, mControl) }, \
{ "bControl", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_control_surface_t, bControl) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_CONTROL_SURFACE { \
"CONTROL_SURFACE", \
4, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_control_surface_t, target) }, \
{ "idSurface", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_control_surface_t, idSurface) }, \
{ "mControl", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_control_surface_t, mControl) }, \
{ "bControl", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_control_surface_t, bControl) }, \
} \
}
#endif
/**
* @brief Pack a control_surface 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 setting the commands
* @param idSurface ID control surface send 0: throttle 1: aileron 2: elevator 3: rudder
* @param mControl Pending
* @param bControl Order to origin
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_control_surface_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target, uint8_t idSurface, float mControl, float bControl)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_CONTROL_SURFACE_LEN];
_mav_put_float(buf, 0, mControl);
_mav_put_float(buf, 4, bControl);
_mav_put_uint8_t(buf, 8, target);
_mav_put_uint8_t(buf, 9, idSurface);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CONTROL_SURFACE_LEN);
#else
mavlink_control_surface_t packet;
packet.mControl = mControl;
packet.bControl = bControl;
packet.target = target;
packet.idSurface = idSurface;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CONTROL_SURFACE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_CONTROL_SURFACE;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CONTROL_SURFACE_MIN_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_CRC);
}
/**
* @brief Pack a control_surface 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param target The system setting the commands
* @param idSurface ID control surface send 0: throttle 1: aileron 2: elevator 3: rudder
* @param mControl Pending
* @param bControl Order to origin
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_control_surface_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target,uint8_t idSurface,float mControl,float bControl)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_CONTROL_SURFACE_LEN];
_mav_put_float(buf, 0, mControl);
_mav_put_float(buf, 4, bControl);
_mav_put_uint8_t(buf, 8, target);
_mav_put_uint8_t(buf, 9, idSurface);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CONTROL_SURFACE_LEN);
#else
mavlink_control_surface_t packet;
packet.mControl = mControl;
packet.bControl = bControl;
packet.target = target;
packet.idSurface = idSurface;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CONTROL_SURFACE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_CONTROL_SURFACE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CONTROL_SURFACE_MIN_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_CRC);
}
/**
* @brief Encode a control_surface struct
*
* @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 control_surface C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_control_surface_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_control_surface_t* control_surface)
{
return mavlink_msg_control_surface_pack(system_id, component_id, msg, control_surface->target, control_surface->idSurface, control_surface->mControl, control_surface->bControl);
}
/**
* @brief Encode a control_surface struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param control_surface C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_control_surface_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_control_surface_t* control_surface)
{
return mavlink_msg_control_surface_pack_chan(system_id, component_id, chan, msg, control_surface->target, control_surface->idSurface, control_surface->mControl, control_surface->bControl);
}
/**
* @brief Send a control_surface message
* @param chan MAVLink channel to send the message
*
* @param target The system setting the commands
* @param idSurface ID control surface send 0: throttle 1: aileron 2: elevator 3: rudder
* @param mControl Pending
* @param bControl Order to origin
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_control_surface_send(mavlink_channel_t chan, uint8_t target, uint8_t idSurface, float mControl, float bControl)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_CONTROL_SURFACE_LEN];
_mav_put_float(buf, 0, mControl);
_mav_put_float(buf, 4, bControl);
_mav_put_uint8_t(buf, 8, target);
_mav_put_uint8_t(buf, 9, idSurface);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_SURFACE, buf, MAVLINK_MSG_ID_CONTROL_SURFACE_MIN_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_CRC);
#else
mavlink_control_surface_t packet;
packet.mControl = mControl;
packet.bControl = bControl;
packet.target = target;
packet.idSurface = idSurface;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_SURFACE, (const char *)&packet, MAVLINK_MSG_ID_CONTROL_SURFACE_MIN_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_CRC);
#endif
}
/**
* @brief Send a control_surface message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_control_surface_send_struct(mavlink_channel_t chan, const mavlink_control_surface_t* control_surface)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_control_surface_send(chan, control_surface->target, control_surface->idSurface, control_surface->mControl, control_surface->bControl);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_SURFACE, (const char *)control_surface, MAVLINK_MSG_ID_CONTROL_SURFACE_MIN_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_CRC);
#endif
}
#if MAVLINK_MSG_ID_CONTROL_SURFACE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_control_surface_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target, uint8_t idSurface, float mControl, float bControl)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_float(buf, 0, mControl);
_mav_put_float(buf, 4, bControl);
_mav_put_uint8_t(buf, 8, target);
_mav_put_uint8_t(buf, 9, idSurface);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_SURFACE, buf, MAVLINK_MSG_ID_CONTROL_SURFACE_MIN_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_CRC);
#else
mavlink_control_surface_t *packet = (mavlink_control_surface_t *)msgbuf;
packet->mControl = mControl;
packet->bControl = bControl;
packet->target = target;
packet->idSurface = idSurface;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_SURFACE, (const char *)packet, MAVLINK_MSG_ID_CONTROL_SURFACE_MIN_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_LEN, MAVLINK_MSG_ID_CONTROL_SURFACE_CRC);
#endif
}
#endif
#endif
// MESSAGE CONTROL_SURFACE UNPACKING
/**
* @brief Get field target from control_surface message
*
* @return The system setting the commands
*/
static inline uint8_t mavlink_msg_control_surface_get_target(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
}
/**
* @brief Get field idSurface from control_surface message
*
* @return ID control surface send 0: throttle 1: aileron 2: elevator 3: rudder
*/
static inline uint8_t mavlink_msg_control_surface_get_idSurface(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 9);
}
/**
* @brief Get field mControl from control_surface message
*
* @return Pending
*/
static inline float mavlink_msg_control_surface_get_mControl(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field bControl from control_surface message
*
* @return Order to origin
*/
static inline float mavlink_msg_control_surface_get_bControl(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Decode a control_surface message into a struct
*
* @param msg The message to decode
* @param control_surface C-struct to decode the message contents into
*/
static inline void mavlink_msg_control_surface_decode(const mavlink_message_t* msg, mavlink_control_surface_t* control_surface)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
control_surface->mControl = mavlink_msg_control_surface_get_mControl(msg);
control_surface->bControl = mavlink_msg_control_surface_get_bControl(msg);
control_surface->target = mavlink_msg_control_surface_get_target(msg);
control_surface->idSurface = mavlink_msg_control_surface_get_idSurface(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_CONTROL_SURFACE_LEN? msg->len : MAVLINK_MSG_ID_CONTROL_SURFACE_LEN;
memset(control_surface, 0, MAVLINK_MSG_ID_CONTROL_SURFACE_LEN);
memcpy(control_surface, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE CPU_LOAD PACKING
#define MAVLINK_MSG_ID_CPU_LOAD 170
typedef struct __mavlink_cpu_load_t {
uint16_t batVolt; /*< [mV] Battery Voltage*/
uint8_t sensLoad; /*< Sensor DSC Load*/
uint8_t ctrlLoad; /*< Control DSC Load*/
} mavlink_cpu_load_t;
#define MAVLINK_MSG_ID_CPU_LOAD_LEN 4
#define MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN 4
#define MAVLINK_MSG_ID_170_LEN 4
#define MAVLINK_MSG_ID_170_MIN_LEN 4
#define MAVLINK_MSG_ID_CPU_LOAD_CRC 75
#define MAVLINK_MSG_ID_170_CRC 75
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_CPU_LOAD { \
170, \
"CPU_LOAD", \
3, \
{ { "sensLoad", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_cpu_load_t, sensLoad) }, \
{ "ctrlLoad", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_cpu_load_t, ctrlLoad) }, \
{ "batVolt", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_cpu_load_t, batVolt) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_CPU_LOAD { \
"CPU_LOAD", \
3, \
{ { "sensLoad", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_cpu_load_t, sensLoad) }, \
{ "ctrlLoad", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_cpu_load_t, ctrlLoad) }, \
{ "batVolt", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_cpu_load_t, batVolt) }, \
} \
}
#endif
/**
* @brief Pack a cpu_load 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 sensLoad Sensor DSC Load
* @param ctrlLoad Control DSC Load
* @param batVolt [mV] Battery Voltage
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_cpu_load_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t sensLoad, uint8_t ctrlLoad, uint16_t batVolt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_CPU_LOAD_LEN];
_mav_put_uint16_t(buf, 0, batVolt);
_mav_put_uint8_t(buf, 2, sensLoad);
_mav_put_uint8_t(buf, 3, ctrlLoad);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CPU_LOAD_LEN);
#else
mavlink_cpu_load_t packet;
packet.batVolt = batVolt;
packet.sensLoad = sensLoad;
packet.ctrlLoad = ctrlLoad;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CPU_LOAD_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_CPU_LOAD;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
}
/**
* @brief Pack a cpu_load 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param sensLoad Sensor DSC Load
* @param ctrlLoad Control DSC Load
* @param batVolt [mV] Battery Voltage
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_cpu_load_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t sensLoad,uint8_t ctrlLoad,uint16_t batVolt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_CPU_LOAD_LEN];
_mav_put_uint16_t(buf, 0, batVolt);
_mav_put_uint8_t(buf, 2, sensLoad);
_mav_put_uint8_t(buf, 3, ctrlLoad);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CPU_LOAD_LEN);
#else
mavlink_cpu_load_t packet;
packet.batVolt = batVolt;
packet.sensLoad = sensLoad;
packet.ctrlLoad = ctrlLoad;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CPU_LOAD_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_CPU_LOAD;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
}
/**
* @brief Encode a cpu_load struct
*
* @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 cpu_load C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_cpu_load_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_cpu_load_t* cpu_load)
{
return mavlink_msg_cpu_load_pack(system_id, component_id, msg, cpu_load->sensLoad, cpu_load->ctrlLoad, cpu_load->batVolt);
}
/**
* @brief Encode a cpu_load struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param cpu_load C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_cpu_load_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_cpu_load_t* cpu_load)
{
return mavlink_msg_cpu_load_pack_chan(system_id, component_id, chan, msg, cpu_load->sensLoad, cpu_load->ctrlLoad, cpu_load->batVolt);
}
/**
* @brief Send a cpu_load message
* @param chan MAVLink channel to send the message
*
* @param sensLoad Sensor DSC Load
* @param ctrlLoad Control DSC Load
* @param batVolt [mV] Battery Voltage
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_cpu_load_send(mavlink_channel_t chan, uint8_t sensLoad, uint8_t ctrlLoad, uint16_t batVolt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_CPU_LOAD_LEN];
_mav_put_uint16_t(buf, 0, batVolt);
_mav_put_uint8_t(buf, 2, sensLoad);
_mav_put_uint8_t(buf, 3, ctrlLoad);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CPU_LOAD, buf, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
#else
mavlink_cpu_load_t packet;
packet.batVolt = batVolt;
packet.sensLoad = sensLoad;
packet.ctrlLoad = ctrlLoad;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CPU_LOAD, (const char *)&packet, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
#endif
}
/**
* @brief Send a cpu_load message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_cpu_load_send_struct(mavlink_channel_t chan, const mavlink_cpu_load_t* cpu_load)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_cpu_load_send(chan, cpu_load->sensLoad, cpu_load->ctrlLoad, cpu_load->batVolt);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CPU_LOAD, (const char *)cpu_load, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
#endif
}
#if MAVLINK_MSG_ID_CPU_LOAD_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_cpu_load_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t sensLoad, uint8_t ctrlLoad, uint16_t batVolt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint16_t(buf, 0, batVolt);
_mav_put_uint8_t(buf, 2, sensLoad);
_mav_put_uint8_t(buf, 3, ctrlLoad);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CPU_LOAD, buf, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
#else
mavlink_cpu_load_t *packet = (mavlink_cpu_load_t *)msgbuf;
packet->batVolt = batVolt;
packet->sensLoad = sensLoad;
packet->ctrlLoad = ctrlLoad;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CPU_LOAD, (const char *)packet, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
#endif
}
#endif
#endif
// MESSAGE CPU_LOAD UNPACKING
/**
* @brief Get field sensLoad from cpu_load message
*
* @return Sensor DSC Load
*/
static inline uint8_t mavlink_msg_cpu_load_get_sensLoad(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field ctrlLoad from cpu_load message
*
* @return Control DSC Load
*/
static inline uint8_t mavlink_msg_cpu_load_get_ctrlLoad(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
/**
* @brief Get field batVolt from cpu_load message
*
* @return [mV] Battery Voltage
*/
static inline uint16_t mavlink_msg_cpu_load_get_batVolt(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
/**
* @brief Decode a cpu_load message into a struct
*
* @param msg The message to decode
* @param cpu_load C-struct to decode the message contents into
*/
static inline void mavlink_msg_cpu_load_decode(const mavlink_message_t* msg, mavlink_cpu_load_t* cpu_load)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
cpu_load->batVolt = mavlink_msg_cpu_load_get_batVolt(msg);
cpu_load->sensLoad = mavlink_msg_cpu_load_get_sensLoad(msg);
cpu_load->ctrlLoad = mavlink_msg_cpu_load_get_ctrlLoad(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_CPU_LOAD_LEN? msg->len : MAVLINK_MSG_ID_CPU_LOAD_LEN;
memset(cpu_load, 0, MAVLINK_MSG_ID_CPU_LOAD_LEN);
memcpy(cpu_load, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE CTRL_SRFC_PT PACKING
#define MAVLINK_MSG_ID_CTRL_SRFC_PT 181
typedef struct __mavlink_ctrl_srfc_pt_t {
uint16_t bitfieldPt; /*< Bitfield containing the passthrough configuration, see CONTROL_SURFACE_FLAG ENUM.*/
uint8_t target; /*< The system setting the commands*/
} mavlink_ctrl_srfc_pt_t;
#define MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN 3
#define MAVLINK_MSG_ID_CTRL_SRFC_PT_MIN_LEN 3
#define MAVLINK_MSG_ID_181_LEN 3
#define MAVLINK_MSG_ID_181_MIN_LEN 3
#define MAVLINK_MSG_ID_CTRL_SRFC_PT_CRC 104
#define MAVLINK_MSG_ID_181_CRC 104
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_CTRL_SRFC_PT { \
181, \
"CTRL_SRFC_PT", \
2, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_ctrl_srfc_pt_t, target) }, \
{ "bitfieldPt", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_ctrl_srfc_pt_t, bitfieldPt) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_CTRL_SRFC_PT { \
"CTRL_SRFC_PT", \
2, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_ctrl_srfc_pt_t, target) }, \
{ "bitfieldPt", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_ctrl_srfc_pt_t, bitfieldPt) }, \
} \
}
#endif
/**
* @brief Pack a ctrl_srfc_pt 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 setting the commands
* @param bitfieldPt Bitfield containing the passthrough configuration, see CONTROL_SURFACE_FLAG ENUM.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_ctrl_srfc_pt_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target, uint16_t bitfieldPt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN];
_mav_put_uint16_t(buf, 0, bitfieldPt);
_mav_put_uint8_t(buf, 2, target);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN);
#else
mavlink_ctrl_srfc_pt_t packet;
packet.bitfieldPt = bitfieldPt;
packet.target = target;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_CTRL_SRFC_PT;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CTRL_SRFC_PT_MIN_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_CRC);
}
/**
* @brief Pack a ctrl_srfc_pt 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param target The system setting the commands
* @param bitfieldPt Bitfield containing the passthrough configuration, see CONTROL_SURFACE_FLAG ENUM.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_ctrl_srfc_pt_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target,uint16_t bitfieldPt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN];
_mav_put_uint16_t(buf, 0, bitfieldPt);
_mav_put_uint8_t(buf, 2, target);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN);
#else
mavlink_ctrl_srfc_pt_t packet;
packet.bitfieldPt = bitfieldPt;
packet.target = target;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_CTRL_SRFC_PT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CTRL_SRFC_PT_MIN_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_CRC);
}
/**
* @brief Encode a ctrl_srfc_pt struct
*
* @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 ctrl_srfc_pt C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_ctrl_srfc_pt_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_ctrl_srfc_pt_t* ctrl_srfc_pt)
{
return mavlink_msg_ctrl_srfc_pt_pack(system_id, component_id, msg, ctrl_srfc_pt->target, ctrl_srfc_pt->bitfieldPt);
}
/**
* @brief Encode a ctrl_srfc_pt struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param ctrl_srfc_pt C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_ctrl_srfc_pt_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_ctrl_srfc_pt_t* ctrl_srfc_pt)
{
return mavlink_msg_ctrl_srfc_pt_pack_chan(system_id, component_id, chan, msg, ctrl_srfc_pt->target, ctrl_srfc_pt->bitfieldPt);
}
/**
* @brief Send a ctrl_srfc_pt message
* @param chan MAVLink channel to send the message
*
* @param target The system setting the commands
* @param bitfieldPt Bitfield containing the passthrough configuration, see CONTROL_SURFACE_FLAG ENUM.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_ctrl_srfc_pt_send(mavlink_channel_t chan, uint8_t target, uint16_t bitfieldPt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN];
_mav_put_uint16_t(buf, 0, bitfieldPt);
_mav_put_uint8_t(buf, 2, target);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CTRL_SRFC_PT, buf, MAVLINK_MSG_ID_CTRL_SRFC_PT_MIN_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_CRC);
#else
mavlink_ctrl_srfc_pt_t packet;
packet.bitfieldPt = bitfieldPt;
packet.target = target;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CTRL_SRFC_PT, (const char *)&packet, MAVLINK_MSG_ID_CTRL_SRFC_PT_MIN_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_CRC);
#endif
}
/**
* @brief Send a ctrl_srfc_pt message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_ctrl_srfc_pt_send_struct(mavlink_channel_t chan, const mavlink_ctrl_srfc_pt_t* ctrl_srfc_pt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_ctrl_srfc_pt_send(chan, ctrl_srfc_pt->target, ctrl_srfc_pt->bitfieldPt);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CTRL_SRFC_PT, (const char *)ctrl_srfc_pt, MAVLINK_MSG_ID_CTRL_SRFC_PT_MIN_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_CRC);
#endif
}
#if MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_ctrl_srfc_pt_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target, uint16_t bitfieldPt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint16_t(buf, 0, bitfieldPt);
_mav_put_uint8_t(buf, 2, target);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CTRL_SRFC_PT, buf, MAVLINK_MSG_ID_CTRL_SRFC_PT_MIN_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_CRC);
#else
mavlink_ctrl_srfc_pt_t *packet = (mavlink_ctrl_srfc_pt_t *)msgbuf;
packet->bitfieldPt = bitfieldPt;
packet->target = target;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CTRL_SRFC_PT, (const char *)packet, MAVLINK_MSG_ID_CTRL_SRFC_PT_MIN_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN, MAVLINK_MSG_ID_CTRL_SRFC_PT_CRC);
#endif
}
#endif
#endif
// MESSAGE CTRL_SRFC_PT UNPACKING
/**
* @brief Get field target from ctrl_srfc_pt message
*
* @return The system setting the commands
*/
static inline uint8_t mavlink_msg_ctrl_srfc_pt_get_target(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field bitfieldPt from ctrl_srfc_pt message
*
* @return Bitfield containing the passthrough configuration, see CONTROL_SURFACE_FLAG ENUM.
*/
static inline uint16_t mavlink_msg_ctrl_srfc_pt_get_bitfieldPt(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
/**
* @brief Decode a ctrl_srfc_pt message into a struct
*
* @param msg The message to decode
* @param ctrl_srfc_pt C-struct to decode the message contents into
*/
static inline void mavlink_msg_ctrl_srfc_pt_decode(const mavlink_message_t* msg, mavlink_ctrl_srfc_pt_t* ctrl_srfc_pt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
ctrl_srfc_pt->bitfieldPt = mavlink_msg_ctrl_srfc_pt_get_bitfieldPt(msg);
ctrl_srfc_pt->target = mavlink_msg_ctrl_srfc_pt_get_target(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN? msg->len : MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN;
memset(ctrl_srfc_pt, 0, MAVLINK_MSG_ID_CTRL_SRFC_PT_LEN);
memcpy(ctrl_srfc_pt, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE DATA_LOG PACKING
#define MAVLINK_MSG_ID_DATA_LOG 177
typedef struct __mavlink_data_log_t {
float fl_1; /*< Log value 1 */
float fl_2; /*< Log value 2 */
float fl_3; /*< Log value 3 */
float fl_4; /*< Log value 4 */
float fl_5; /*< Log value 5 */
float fl_6; /*< Log value 6 */
} mavlink_data_log_t;
#define MAVLINK_MSG_ID_DATA_LOG_LEN 24
#define MAVLINK_MSG_ID_DATA_LOG_MIN_LEN 24
#define MAVLINK_MSG_ID_177_LEN 24
#define MAVLINK_MSG_ID_177_MIN_LEN 24
#define MAVLINK_MSG_ID_DATA_LOG_CRC 167
#define MAVLINK_MSG_ID_177_CRC 167
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_DATA_LOG { \
177, \
"DATA_LOG", \
6, \
{ { "fl_1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_data_log_t, fl_1) }, \
{ "fl_2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_data_log_t, fl_2) }, \
{ "fl_3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_data_log_t, fl_3) }, \
{ "fl_4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_data_log_t, fl_4) }, \
{ "fl_5", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_data_log_t, fl_5) }, \
{ "fl_6", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_data_log_t, fl_6) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_DATA_LOG { \
"DATA_LOG", \
6, \
{ { "fl_1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_data_log_t, fl_1) }, \
{ "fl_2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_data_log_t, fl_2) }, \
{ "fl_3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_data_log_t, fl_3) }, \
{ "fl_4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_data_log_t, fl_4) }, \
{ "fl_5", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_data_log_t, fl_5) }, \
{ "fl_6", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_data_log_t, fl_6) }, \
} \
}
#endif
/**
* @brief Pack a data_log 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 fl_1 Log value 1
* @param fl_2 Log value 2
* @param fl_3 Log value 3
* @param fl_4 Log value 4
* @param fl_5 Log value 5
* @param fl_6 Log value 6
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_data_log_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
float fl_1, float fl_2, float fl_3, float fl_4, float fl_5, float fl_6)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_DATA_LOG_LEN];
_mav_put_float(buf, 0, fl_1);
_mav_put_float(buf, 4, fl_2);
_mav_put_float(buf, 8, fl_3);
_mav_put_float(buf, 12, fl_4);
_mav_put_float(buf, 16, fl_5);
_mav_put_float(buf, 20, fl_6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA_LOG_LEN);
#else
mavlink_data_log_t packet;
packet.fl_1 = fl_1;
packet.fl_2 = fl_2;
packet.fl_3 = fl_3;
packet.fl_4 = fl_4;
packet.fl_5 = fl_5;
packet.fl_6 = fl_6;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA_LOG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA_LOG;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA_LOG_MIN_LEN, MAVLINK_MSG_ID_DATA_LOG_LEN, MAVLINK_MSG_ID_DATA_LOG_CRC);
}
/**
* @brief Pack a data_log 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param fl_1 Log value 1
* @param fl_2 Log value 2
* @param fl_3 Log value 3
* @param fl_4 Log value 4
* @param fl_5 Log value 5
* @param fl_6 Log value 6
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_data_log_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
float fl_1,float fl_2,float fl_3,float fl_4,float fl_5,float fl_6)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_DATA_LOG_LEN];
_mav_put_float(buf, 0, fl_1);
_mav_put_float(buf, 4, fl_2);
_mav_put_float(buf, 8, fl_3);
_mav_put_float(buf, 12, fl_4);
_mav_put_float(buf, 16, fl_5);
_mav_put_float(buf, 20, fl_6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA_LOG_LEN);
#else
mavlink_data_log_t packet;
packet.fl_1 = fl_1;
packet.fl_2 = fl_2;
packet.fl_3 = fl_3;
packet.fl_4 = fl_4;
packet.fl_5 = fl_5;
packet.fl_6 = fl_6;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA_LOG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA_LOG;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DATA_LOG_MIN_LEN, MAVLINK_MSG_ID_DATA_LOG_LEN, MAVLINK_MSG_ID_DATA_LOG_CRC);
}
/**
* @brief Encode a data_log struct
*
* @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_log C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_data_log_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_data_log_t* data_log)
{
return mavlink_msg_data_log_pack(system_id, component_id, msg, data_log->fl_1, data_log->fl_2, data_log->fl_3, data_log->fl_4, data_log->fl_5, data_log->fl_6);
}
/**
* @brief Encode a data_log struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param data_log C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_data_log_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_data_log_t* data_log)
{
return mavlink_msg_data_log_pack_chan(system_id, component_id, chan, msg, data_log->fl_1, data_log->fl_2, data_log->fl_3, data_log->fl_4, data_log->fl_5, data_log->fl_6);
}
/**
* @brief Send a data_log message
* @param chan MAVLink channel to send the message
*
* @param fl_1 Log value 1
* @param fl_2 Log value 2
* @param fl_3 Log value 3
* @param fl_4 Log value 4
* @param fl_5 Log value 5
* @param fl_6 Log value 6
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_data_log_send(mavlink_channel_t chan, float fl_1, float fl_2, float fl_3, float fl_4, float fl_5, float fl_6)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_DATA_LOG_LEN];
_mav_put_float(buf, 0, fl_1);
_mav_put_float(buf, 4, fl_2);
_mav_put_float(buf, 8, fl_3);
_mav_put_float(buf, 12, fl_4);
_mav_put_float(buf, 16, fl_5);
_mav_put_float(buf, 20, fl_6);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_LOG, buf, MAVLINK_MSG_ID_DATA_LOG_MIN_LEN, MAVLINK_MSG_ID_DATA_LOG_LEN, MAVLINK_MSG_ID_DATA_LOG_CRC);
#else
mavlink_data_log_t packet;
packet.fl_1 = fl_1;
packet.fl_2 = fl_2;
packet.fl_3 = fl_3;
packet.fl_4 = fl_4;
packet.fl_5 = fl_5;
packet.fl_6 = fl_6;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_LOG, (const char *)&packet, MAVLINK_MSG_ID_DATA_LOG_MIN_LEN, MAVLINK_MSG_ID_DATA_LOG_LEN, MAVLINK_MSG_ID_DATA_LOG_CRC);
#endif
}
/**
* @brief Send a data_log message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_data_log_send_struct(mavlink_channel_t chan, const mavlink_data_log_t* data_log)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_data_log_send(chan, data_log->fl_1, data_log->fl_2, data_log->fl_3, data_log->fl_4, data_log->fl_5, data_log->fl_6);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_LOG, (const char *)data_log, MAVLINK_MSG_ID_DATA_LOG_MIN_LEN, MAVLINK_MSG_ID_DATA_LOG_LEN, MAVLINK_MSG_ID_DATA_LOG_CRC);
#endif
}
#if MAVLINK_MSG_ID_DATA_LOG_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_data_log_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float fl_1, float fl_2, float fl_3, float fl_4, float fl_5, float fl_6)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_float(buf, 0, fl_1);
_mav_put_float(buf, 4, fl_2);
_mav_put_float(buf, 8, fl_3);
_mav_put_float(buf, 12, fl_4);
_mav_put_float(buf, 16, fl_5);
_mav_put_float(buf, 20, fl_6);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_LOG, buf, MAVLINK_MSG_ID_DATA_LOG_MIN_LEN, MAVLINK_MSG_ID_DATA_LOG_LEN, MAVLINK_MSG_ID_DATA_LOG_CRC);
#else
mavlink_data_log_t *packet = (mavlink_data_log_t *)msgbuf;
packet->fl_1 = fl_1;
packet->fl_2 = fl_2;
packet->fl_3 = fl_3;
packet->fl_4 = fl_4;
packet->fl_5 = fl_5;
packet->fl_6 = fl_6;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_LOG, (const char *)packet, MAVLINK_MSG_ID_DATA_LOG_MIN_LEN, MAVLINK_MSG_ID_DATA_LOG_LEN, MAVLINK_MSG_ID_DATA_LOG_CRC);
#endif
}
#endif
#endif
// MESSAGE DATA_LOG UNPACKING
/**
* @brief Get field fl_1 from data_log message
*
* @return Log value 1
*/
static inline float mavlink_msg_data_log_get_fl_1(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field fl_2 from data_log message
*
* @return Log value 2
*/
static inline float mavlink_msg_data_log_get_fl_2(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field fl_3 from data_log message
*
* @return Log value 3
*/
static inline float mavlink_msg_data_log_get_fl_3(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field fl_4 from data_log message
*
* @return Log value 4
*/
static inline float mavlink_msg_data_log_get_fl_4(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field fl_5 from data_log message
*
* @return Log value 5
*/
static inline float mavlink_msg_data_log_get_fl_5(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field fl_6 from data_log message
*
* @return Log value 6
*/
static inline float mavlink_msg_data_log_get_fl_6(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Decode a data_log message into a struct
*
* @param msg The message to decode
* @param data_log C-struct to decode the message contents into
*/
static inline void mavlink_msg_data_log_decode(const mavlink_message_t* msg, mavlink_data_log_t* data_log)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
data_log->fl_1 = mavlink_msg_data_log_get_fl_1(msg);
data_log->fl_2 = mavlink_msg_data_log_get_fl_2(msg);
data_log->fl_3 = mavlink_msg_data_log_get_fl_3(msg);
data_log->fl_4 = mavlink_msg_data_log_get_fl_4(msg);
data_log->fl_5 = mavlink_msg_data_log_get_fl_5(msg);
data_log->fl_6 = mavlink_msg_data_log_get_fl_6(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_DATA_LOG_LEN? msg->len : MAVLINK_MSG_ID_DATA_LOG_LEN;
memset(data_log, 0, MAVLINK_MSG_ID_DATA_LOG_LEN);
memcpy(data_log, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE DIAGNOSTIC PACKING
#define MAVLINK_MSG_ID_DIAGNOSTIC 173
typedef struct __mavlink_diagnostic_t {
float diagFl1; /*< Diagnostic float 1*/
float diagFl2; /*< Diagnostic float 2*/
float diagFl3; /*< Diagnostic float 3*/
int16_t diagSh1; /*< Diagnostic short 1*/
int16_t diagSh2; /*< Diagnostic short 2*/
int16_t diagSh3; /*< Diagnostic short 3*/
} mavlink_diagnostic_t;
#define MAVLINK_MSG_ID_DIAGNOSTIC_LEN 18
#define MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN 18
#define MAVLINK_MSG_ID_173_LEN 18
#define MAVLINK_MSG_ID_173_MIN_LEN 18
#define MAVLINK_MSG_ID_DIAGNOSTIC_CRC 2
#define MAVLINK_MSG_ID_173_CRC 2
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_DIAGNOSTIC { \
173, \
"DIAGNOSTIC", \
6, \
{ { "diagFl1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_diagnostic_t, diagFl1) }, \
{ "diagFl2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_diagnostic_t, diagFl2) }, \
{ "diagFl3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_diagnostic_t, diagFl3) }, \
{ "diagSh1", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_diagnostic_t, diagSh1) }, \
{ "diagSh2", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_diagnostic_t, diagSh2) }, \
{ "diagSh3", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_diagnostic_t, diagSh3) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_DIAGNOSTIC { \
"DIAGNOSTIC", \
6, \
{ { "diagFl1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_diagnostic_t, diagFl1) }, \
{ "diagFl2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_diagnostic_t, diagFl2) }, \
{ "diagFl3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_diagnostic_t, diagFl3) }, \
{ "diagSh1", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_diagnostic_t, diagSh1) }, \
{ "diagSh2", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_diagnostic_t, diagSh2) }, \
{ "diagSh3", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_diagnostic_t, diagSh3) }, \
} \
}
#endif
/**
* @brief Pack a diagnostic 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 diagFl1 Diagnostic float 1
* @param diagFl2 Diagnostic float 2
* @param diagFl3 Diagnostic float 3
* @param diagSh1 Diagnostic short 1
* @param diagSh2 Diagnostic short 2
* @param diagSh3 Diagnostic short 3
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_diagnostic_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
float diagFl1, float diagFl2, float diagFl3, int16_t diagSh1, int16_t diagSh2, int16_t diagSh3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_DIAGNOSTIC_LEN];
_mav_put_float(buf, 0, diagFl1);
_mav_put_float(buf, 4, diagFl2);
_mav_put_float(buf, 8, diagFl3);
_mav_put_int16_t(buf, 12, diagSh1);
_mav_put_int16_t(buf, 14, diagSh2);
_mav_put_int16_t(buf, 16, diagSh3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DIAGNOSTIC_LEN);
#else
mavlink_diagnostic_t packet;
packet.diagFl1 = diagFl1;
packet.diagFl2 = diagFl2;
packet.diagFl3 = diagFl3;
packet.diagSh1 = diagSh1;
packet.diagSh2 = diagSh2;
packet.diagSh3 = diagSh3;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DIAGNOSTIC_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DIAGNOSTIC;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC);
}
/**
* @brief Pack a diagnostic 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param diagFl1 Diagnostic float 1
* @param diagFl2 Diagnostic float 2
* @param diagFl3 Diagnostic float 3
* @param diagSh1 Diagnostic short 1
* @param diagSh2 Diagnostic short 2
* @param diagSh3 Diagnostic short 3
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_diagnostic_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
float diagFl1,float diagFl2,float diagFl3,int16_t diagSh1,int16_t diagSh2,int16_t diagSh3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_DIAGNOSTIC_LEN];
_mav_put_float(buf, 0, diagFl1);
_mav_put_float(buf, 4, diagFl2);
_mav_put_float(buf, 8, diagFl3);
_mav_put_int16_t(buf, 12, diagSh1);
_mav_put_int16_t(buf, 14, diagSh2);
_mav_put_int16_t(buf, 16, diagSh3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DIAGNOSTIC_LEN);
#else
mavlink_diagnostic_t packet;
packet.diagFl1 = diagFl1;
packet.diagFl2 = diagFl2;
packet.diagFl3 = diagFl3;
packet.diagSh1 = diagSh1;
packet.diagSh2 = diagSh2;
packet.diagSh3 = diagSh3;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DIAGNOSTIC_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DIAGNOSTIC;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC);
}
/**
* @brief Encode a diagnostic struct
*
* @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 diagnostic C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_diagnostic_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_diagnostic_t* diagnostic)
{
return mavlink_msg_diagnostic_pack(system_id, component_id, msg, diagnostic->diagFl1, diagnostic->diagFl2, diagnostic->diagFl3, diagnostic->diagSh1, diagnostic->diagSh2, diagnostic->diagSh3);
}
/**
* @brief Encode a diagnostic struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param diagnostic C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_diagnostic_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_diagnostic_t* diagnostic)
{
return mavlink_msg_diagnostic_pack_chan(system_id, component_id, chan, msg, diagnostic->diagFl1, diagnostic->diagFl2, diagnostic->diagFl3, diagnostic->diagSh1, diagnostic->diagSh2, diagnostic->diagSh3);
}
/**
* @brief Send a diagnostic message
* @param chan MAVLink channel to send the message
*
* @param diagFl1 Diagnostic float 1
* @param diagFl2 Diagnostic float 2
* @param diagFl3 Diagnostic float 3
* @param diagSh1 Diagnostic short 1
* @param diagSh2 Diagnostic short 2
* @param diagSh3 Diagnostic short 3
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_diagnostic_send(mavlink_channel_t chan, float diagFl1, float diagFl2, float diagFl3, int16_t diagSh1, int16_t diagSh2, int16_t diagSh3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_DIAGNOSTIC_LEN];
_mav_put_float(buf, 0, diagFl1);
_mav_put_float(buf, 4, diagFl2);
_mav_put_float(buf, 8, diagFl3);
_mav_put_int16_t(buf, 12, diagSh1);
_mav_put_int16_t(buf, 14, diagSh2);
_mav_put_int16_t(buf, 16, diagSh3);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIAGNOSTIC, buf, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC);
#else
mavlink_diagnostic_t packet;
packet.diagFl1 = diagFl1;
packet.diagFl2 = diagFl2;
packet.diagFl3 = diagFl3;
packet.diagSh1 = diagSh1;
packet.diagSh2 = diagSh2;
packet.diagSh3 = diagSh3;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIAGNOSTIC, (const char *)&packet, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC);
#endif
}
/**
* @brief Send a diagnostic message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_diagnostic_send_struct(mavlink_channel_t chan, const mavlink_diagnostic_t* diagnostic)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_diagnostic_send(chan, diagnostic->diagFl1, diagnostic->diagFl2, diagnostic->diagFl3, diagnostic->diagSh1, diagnostic->diagSh2, diagnostic->diagSh3);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIAGNOSTIC, (const char *)diagnostic, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC);
#endif
}
#if MAVLINK_MSG_ID_DIAGNOSTIC_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_diagnostic_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float diagFl1, float diagFl2, float diagFl3, int16_t diagSh1, int16_t diagSh2, int16_t diagSh3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_float(buf, 0, diagFl1);
_mav_put_float(buf, 4, diagFl2);
_mav_put_float(buf, 8, diagFl3);
_mav_put_int16_t(buf, 12, diagSh1);
_mav_put_int16_t(buf, 14, diagSh2);
_mav_put_int16_t(buf, 16, diagSh3);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIAGNOSTIC, buf, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC);
#else
mavlink_diagnostic_t *packet = (mavlink_diagnostic_t *)msgbuf;
packet->diagFl1 = diagFl1;
packet->diagFl2 = diagFl2;
packet->diagFl3 = diagFl3;
packet->diagSh1 = diagSh1;
packet->diagSh2 = diagSh2;
packet->diagSh3 = diagSh3;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIAGNOSTIC, (const char *)packet, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC);
#endif
}
#endif
#endif
// MESSAGE DIAGNOSTIC UNPACKING
/**
* @brief Get field diagFl1 from diagnostic message
*
* @return Diagnostic float 1
*/
static inline float mavlink_msg_diagnostic_get_diagFl1(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field diagFl2 from diagnostic message
*
* @return Diagnostic float 2
*/
static inline float mavlink_msg_diagnostic_get_diagFl2(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field diagFl3 from diagnostic message
*
* @return Diagnostic float 3
*/
static inline float mavlink_msg_diagnostic_get_diagFl3(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field diagSh1 from diagnostic message
*
* @return Diagnostic short 1
*/
static inline int16_t mavlink_msg_diagnostic_get_diagSh1(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 12);
}
/**
* @brief Get field diagSh2 from diagnostic message
*
* @return Diagnostic short 2
*/
static inline int16_t mavlink_msg_diagnostic_get_diagSh2(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 14);
}
/**
* @brief Get field diagSh3 from diagnostic message
*
* @return Diagnostic short 3
*/
static inline int16_t mavlink_msg_diagnostic_get_diagSh3(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 16);
}
/**
* @brief Decode a diagnostic message into a struct
*
* @param msg The message to decode
* @param diagnostic C-struct to decode the message contents into
*/
static inline void mavlink_msg_diagnostic_decode(const mavlink_message_t* msg, mavlink_diagnostic_t* diagnostic)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
diagnostic->diagFl1 = mavlink_msg_diagnostic_get_diagFl1(msg);
diagnostic->diagFl2 = mavlink_msg_diagnostic_get_diagFl2(msg);
diagnostic->diagFl3 = mavlink_msg_diagnostic_get_diagFl3(msg);
diagnostic->diagSh1 = mavlink_msg_diagnostic_get_diagSh1(msg);
diagnostic->diagSh2 = mavlink_msg_diagnostic_get_diagSh2(msg);
diagnostic->diagSh3 = mavlink_msg_diagnostic_get_diagSh3(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_DIAGNOSTIC_LEN? msg->len : MAVLINK_MSG_ID_DIAGNOSTIC_LEN;
memset(diagnostic, 0, MAVLINK_MSG_ID_DIAGNOSTIC_LEN);
memcpy(diagnostic, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE GPS_DATE_TIME PACKING
#define MAVLINK_MSG_ID_GPS_DATE_TIME 179
typedef struct __mavlink_gps_date_time_t {
uint8_t year; /*< Year reported by Gps */
uint8_t month; /*< Month reported by Gps */
uint8_t day; /*< Day reported by Gps */
uint8_t hour; /*< Hour reported by Gps */
uint8_t min; /*< Min reported by Gps */
uint8_t sec; /*< Sec reported by Gps */
uint8_t clockStat; /*< Clock Status. See table 47 page 211 OEMStar Manual */
uint8_t visSat; /*< Visible satellites reported by Gps */
uint8_t useSat; /*< Used satellites in Solution */
uint8_t GppGl; /*< GPS+GLONASS satellites in Solution */
uint8_t sigUsedMask; /*< GPS and GLONASS usage mask (bit 0 GPS_used? bit_4 GLONASS_used?)*/
uint8_t percentUsed; /*< [%] Percent used GPS*/
} mavlink_gps_date_time_t;
#define MAVLINK_MSG_ID_GPS_DATE_TIME_LEN 12
#define MAVLINK_MSG_ID_GPS_DATE_TIME_MIN_LEN 12
#define MAVLINK_MSG_ID_179_LEN 12
#define MAVLINK_MSG_ID_179_MIN_LEN 12
#define MAVLINK_MSG_ID_GPS_DATE_TIME_CRC 132
#define MAVLINK_MSG_ID_179_CRC 132
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_GPS_DATE_TIME { \
179, \
"GPS_DATE_TIME", \
12, \
{ { "year", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gps_date_time_t, year) }, \
{ "month", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gps_date_time_t, month) }, \
{ "day", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gps_date_time_t, day) }, \
{ "hour", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_gps_date_time_t, hour) }, \
{ "min", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_gps_date_time_t, min) }, \
{ "sec", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_gps_date_time_t, sec) }, \
{ "clockStat", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_gps_date_time_t, clockStat) }, \
{ "visSat", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_gps_date_time_t, visSat) }, \
{ "useSat", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_gps_date_time_t, useSat) }, \
{ "GppGl", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_gps_date_time_t, GppGl) }, \
{ "sigUsedMask", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_gps_date_time_t, sigUsedMask) }, \
{ "percentUsed", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_gps_date_time_t, percentUsed) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_GPS_DATE_TIME { \
"GPS_DATE_TIME", \
12, \
{ { "year", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gps_date_time_t, year) }, \
{ "month", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gps_date_time_t, month) }, \
{ "day", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gps_date_time_t, day) }, \
{ "hour", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_gps_date_time_t, hour) }, \
{ "min", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_gps_date_time_t, min) }, \
{ "sec", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_gps_date_time_t, sec) }, \
{ "clockStat", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_gps_date_time_t, clockStat) }, \
{ "visSat", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_gps_date_time_t, visSat) }, \
{ "useSat", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_gps_date_time_t, useSat) }, \
{ "GppGl", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_gps_date_time_t, GppGl) }, \
{ "sigUsedMask", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_gps_date_time_t, sigUsedMask) }, \
{ "percentUsed", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_gps_date_time_t, percentUsed) }, \
} \
}
#endif
/**
* @brief Pack a gps_date_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 year Year reported by Gps
* @param month Month reported by Gps
* @param day Day reported by Gps
* @param hour Hour reported by Gps
* @param min Min reported by Gps
* @param sec Sec reported by Gps
* @param clockStat Clock Status. See table 47 page 211 OEMStar Manual
* @param visSat Visible satellites reported by Gps
* @param useSat Used satellites in Solution
* @param GppGl GPS+GLONASS satellites in Solution
* @param sigUsedMask GPS and GLONASS usage mask (bit 0 GPS_used? bit_4 GLONASS_used?)
* @param percentUsed [%] Percent used GPS
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_date_time_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t min, uint8_t sec, uint8_t clockStat, uint8_t visSat, uint8_t useSat, uint8_t GppGl, uint8_t sigUsedMask, uint8_t percentUsed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GPS_DATE_TIME_LEN];
_mav_put_uint8_t(buf, 0, year);
_mav_put_uint8_t(buf, 1, month);
_mav_put_uint8_t(buf, 2, day);
_mav_put_uint8_t(buf, 3, hour);
_mav_put_uint8_t(buf, 4, min);
_mav_put_uint8_t(buf, 5, sec);
_mav_put_uint8_t(buf, 6, clockStat);
_mav_put_uint8_t(buf, 7, visSat);
_mav_put_uint8_t(buf, 8, useSat);
_mav_put_uint8_t(buf, 9, GppGl);
_mav_put_uint8_t(buf, 10, sigUsedMask);
_mav_put_uint8_t(buf, 11, percentUsed);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_DATE_TIME_LEN);
#else
mavlink_gps_date_time_t packet;
packet.year = year;
packet.month = month;
packet.day = day;
packet.hour = hour;
packet.min = min;
packet.sec = sec;
packet.clockStat = clockStat;
packet.visSat = visSat;
packet.useSat = useSat;
packet.GppGl = GppGl;
packet.sigUsedMask = sigUsedMask;
packet.percentUsed = percentUsed;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_DATE_TIME_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_DATE_TIME;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS_DATE_TIME_MIN_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_CRC);
}
/**
* @brief Pack a gps_date_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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param year Year reported by Gps
* @param month Month reported by Gps
* @param day Day reported by Gps
* @param hour Hour reported by Gps
* @param min Min reported by Gps
* @param sec Sec reported by Gps
* @param clockStat Clock Status. See table 47 page 211 OEMStar Manual
* @param visSat Visible satellites reported by Gps
* @param useSat Used satellites in Solution
* @param GppGl GPS+GLONASS satellites in Solution
* @param sigUsedMask GPS and GLONASS usage mask (bit 0 GPS_used? bit_4 GLONASS_used?)
* @param percentUsed [%] Percent used GPS
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_date_time_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t year,uint8_t month,uint8_t day,uint8_t hour,uint8_t min,uint8_t sec,uint8_t clockStat,uint8_t visSat,uint8_t useSat,uint8_t GppGl,uint8_t sigUsedMask,uint8_t percentUsed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GPS_DATE_TIME_LEN];
_mav_put_uint8_t(buf, 0, year);
_mav_put_uint8_t(buf, 1, month);
_mav_put_uint8_t(buf, 2, day);
_mav_put_uint8_t(buf, 3, hour);
_mav_put_uint8_t(buf, 4, min);
_mav_put_uint8_t(buf, 5, sec);
_mav_put_uint8_t(buf, 6, clockStat);
_mav_put_uint8_t(buf, 7, visSat);
_mav_put_uint8_t(buf, 8, useSat);
_mav_put_uint8_t(buf, 9, GppGl);
_mav_put_uint8_t(buf, 10, sigUsedMask);
_mav_put_uint8_t(buf, 11, percentUsed);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_DATE_TIME_LEN);
#else
mavlink_gps_date_time_t packet;
packet.year = year;
packet.month = month;
packet.day = day;
packet.hour = hour;
packet.min = min;
packet.sec = sec;
packet.clockStat = clockStat;
packet.visSat = visSat;
packet.useSat = useSat;
packet.GppGl = GppGl;
packet.sigUsedMask = sigUsedMask;
packet.percentUsed = percentUsed;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_DATE_TIME_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_DATE_TIME;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS_DATE_TIME_MIN_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_CRC);
}
/**
* @brief Encode a gps_date_time struct
*
* @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_date_time C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gps_date_time_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps_date_time_t* gps_date_time)
{
return mavlink_msg_gps_date_time_pack(system_id, component_id, msg, gps_date_time->year, gps_date_time->month, gps_date_time->day, gps_date_time->hour, gps_date_time->min, gps_date_time->sec, gps_date_time->clockStat, gps_date_time->visSat, gps_date_time->useSat, gps_date_time->GppGl, gps_date_time->sigUsedMask, gps_date_time->percentUsed);
}
/**
* @brief Encode a gps_date_time struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param gps_date_time C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gps_date_time_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gps_date_time_t* gps_date_time)
{
return mavlink_msg_gps_date_time_pack_chan(system_id, component_id, chan, msg, gps_date_time->year, gps_date_time->month, gps_date_time->day, gps_date_time->hour, gps_date_time->min, gps_date_time->sec, gps_date_time->clockStat, gps_date_time->visSat, gps_date_time->useSat, gps_date_time->GppGl, gps_date_time->sigUsedMask, gps_date_time->percentUsed);
}
/**
* @brief Send a gps_date_time message
* @param chan MAVLink channel to send the message
*
* @param year Year reported by Gps
* @param month Month reported by Gps
* @param day Day reported by Gps
* @param hour Hour reported by Gps
* @param min Min reported by Gps
* @param sec Sec reported by Gps
* @param clockStat Clock Status. See table 47 page 211 OEMStar Manual
* @param visSat Visible satellites reported by Gps
* @param useSat Used satellites in Solution
* @param GppGl GPS+GLONASS satellites in Solution
* @param sigUsedMask GPS and GLONASS usage mask (bit 0 GPS_used? bit_4 GLONASS_used?)
* @param percentUsed [%] Percent used GPS
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gps_date_time_send(mavlink_channel_t chan, uint8_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t min, uint8_t sec, uint8_t clockStat, uint8_t visSat, uint8_t useSat, uint8_t GppGl, uint8_t sigUsedMask, uint8_t percentUsed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GPS_DATE_TIME_LEN];
_mav_put_uint8_t(buf, 0, year);
_mav_put_uint8_t(buf, 1, month);
_mav_put_uint8_t(buf, 2, day);
_mav_put_uint8_t(buf, 3, hour);
_mav_put_uint8_t(buf, 4, min);
_mav_put_uint8_t(buf, 5, sec);
_mav_put_uint8_t(buf, 6, clockStat);
_mav_put_uint8_t(buf, 7, visSat);
_mav_put_uint8_t(buf, 8, useSat);
_mav_put_uint8_t(buf, 9, GppGl);
_mav_put_uint8_t(buf, 10, sigUsedMask);
_mav_put_uint8_t(buf, 11, percentUsed);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_DATE_TIME, buf, MAVLINK_MSG_ID_GPS_DATE_TIME_MIN_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_CRC);
#else
mavlink_gps_date_time_t packet;
packet.year = year;
packet.month = month;
packet.day = day;
packet.hour = hour;
packet.min = min;
packet.sec = sec;
packet.clockStat = clockStat;
packet.visSat = visSat;
packet.useSat = useSat;
packet.GppGl = GppGl;
packet.sigUsedMask = sigUsedMask;
packet.percentUsed = percentUsed;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_DATE_TIME, (const char *)&packet, MAVLINK_MSG_ID_GPS_DATE_TIME_MIN_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_CRC);
#endif
}
/**
* @brief Send a gps_date_time message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_gps_date_time_send_struct(mavlink_channel_t chan, const mavlink_gps_date_time_t* gps_date_time)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_gps_date_time_send(chan, gps_date_time->year, gps_date_time->month, gps_date_time->day, gps_date_time->hour, gps_date_time->min, gps_date_time->sec, gps_date_time->clockStat, gps_date_time->visSat, gps_date_time->useSat, gps_date_time->GppGl, gps_date_time->sigUsedMask, gps_date_time->percentUsed);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_DATE_TIME, (const char *)gps_date_time, MAVLINK_MSG_ID_GPS_DATE_TIME_MIN_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_CRC);
#endif
}
#if MAVLINK_MSG_ID_GPS_DATE_TIME_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gps_date_time_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t min, uint8_t sec, uint8_t clockStat, uint8_t visSat, uint8_t useSat, uint8_t GppGl, uint8_t sigUsedMask, uint8_t percentUsed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, year);
_mav_put_uint8_t(buf, 1, month);
_mav_put_uint8_t(buf, 2, day);
_mav_put_uint8_t(buf, 3, hour);
_mav_put_uint8_t(buf, 4, min);
_mav_put_uint8_t(buf, 5, sec);
_mav_put_uint8_t(buf, 6, clockStat);
_mav_put_uint8_t(buf, 7, visSat);
_mav_put_uint8_t(buf, 8, useSat);
_mav_put_uint8_t(buf, 9, GppGl);
_mav_put_uint8_t(buf, 10, sigUsedMask);
_mav_put_uint8_t(buf, 11, percentUsed);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_DATE_TIME, buf, MAVLINK_MSG_ID_GPS_DATE_TIME_MIN_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_CRC);
#else
mavlink_gps_date_time_t *packet = (mavlink_gps_date_time_t *)msgbuf;
packet->year = year;
packet->month = month;
packet->day = day;
packet->hour = hour;
packet->min = min;
packet->sec = sec;
packet->clockStat = clockStat;
packet->visSat = visSat;
packet->useSat = useSat;
packet->GppGl = GppGl;
packet->sigUsedMask = sigUsedMask;
packet->percentUsed = percentUsed;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_DATE_TIME, (const char *)packet, MAVLINK_MSG_ID_GPS_DATE_TIME_MIN_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_LEN, MAVLINK_MSG_ID_GPS_DATE_TIME_CRC);
#endif
}
#endif
#endif
// MESSAGE GPS_DATE_TIME UNPACKING
/**
* @brief Get field year from gps_date_time message
*
* @return Year reported by Gps
*/
static inline uint8_t mavlink_msg_gps_date_time_get_year(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field month from gps_date_time message
*
* @return Month reported by Gps
*/
static inline uint8_t mavlink_msg_gps_date_time_get_month(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field day from gps_date_time message
*
* @return Day reported by Gps
*/
static inline uint8_t mavlink_msg_gps_date_time_get_day(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field hour from gps_date_time message
*
* @return Hour reported by Gps
*/
static inline uint8_t mavlink_msg_gps_date_time_get_hour(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
/**
* @brief Get field min from gps_date_time message
*
* @return Min reported by Gps
*/
static inline uint8_t mavlink_msg_gps_date_time_get_min(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
/**
* @brief Get field sec from gps_date_time message
*
* @return Sec reported by Gps
*/
static inline uint8_t mavlink_msg_gps_date_time_get_sec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
/**
* @brief Get field clockStat from gps_date_time message
*
* @return Clock Status. See table 47 page 211 OEMStar Manual
*/
static inline uint8_t mavlink_msg_gps_date_time_get_clockStat(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 6);
}
/**
* @brief Get field visSat from gps_date_time message
*
* @return Visible satellites reported by Gps
*/
static inline uint8_t mavlink_msg_gps_date_time_get_visSat(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 7);
}
/**
* @brief Get field useSat from gps_date_time message
*
* @return Used satellites in Solution
*/
static inline uint8_t mavlink_msg_gps_date_time_get_useSat(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
}
/**
* @brief Get field GppGl from gps_date_time message
*
* @return GPS+GLONASS satellites in Solution
*/
static inline uint8_t mavlink_msg_gps_date_time_get_GppGl(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 9);
}
/**
* @brief Get field sigUsedMask from gps_date_time message
*
* @return GPS and GLONASS usage mask (bit 0 GPS_used? bit_4 GLONASS_used?)
*/
static inline uint8_t mavlink_msg_gps_date_time_get_sigUsedMask(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 10);
}
/**
* @brief Get field percentUsed from gps_date_time message
*
* @return [%] Percent used GPS
*/
static inline uint8_t mavlink_msg_gps_date_time_get_percentUsed(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 11);
}
/**
* @brief Decode a gps_date_time message into a struct
*
* @param msg The message to decode
* @param gps_date_time C-struct to decode the message contents into
*/
static inline void mavlink_msg_gps_date_time_decode(const mavlink_message_t* msg, mavlink_gps_date_time_t* gps_date_time)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
gps_date_time->year = mavlink_msg_gps_date_time_get_year(msg);
gps_date_time->month = mavlink_msg_gps_date_time_get_month(msg);
gps_date_time->day = mavlink_msg_gps_date_time_get_day(msg);
gps_date_time->hour = mavlink_msg_gps_date_time_get_hour(msg);
gps_date_time->min = mavlink_msg_gps_date_time_get_min(msg);
gps_date_time->sec = mavlink_msg_gps_date_time_get_sec(msg);
gps_date_time->clockStat = mavlink_msg_gps_date_time_get_clockStat(msg);
gps_date_time->visSat = mavlink_msg_gps_date_time_get_visSat(msg);
gps_date_time->useSat = mavlink_msg_gps_date_time_get_useSat(msg);
gps_date_time->GppGl = mavlink_msg_gps_date_time_get_GppGl(msg);
gps_date_time->sigUsedMask = mavlink_msg_gps_date_time_get_sigUsedMask(msg);
gps_date_time->percentUsed = mavlink_msg_gps_date_time_get_percentUsed(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_GPS_DATE_TIME_LEN? msg->len : MAVLINK_MSG_ID_GPS_DATE_TIME_LEN;
memset(gps_date_time, 0, MAVLINK_MSG_ID_GPS_DATE_TIME_LEN);
memcpy(gps_date_time, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE ISR_LOCATION PACKING
#define MAVLINK_MSG_ID_ISR_LOCATION 189
typedef struct __mavlink_isr_location_t {
float latitude; /*< [deg] ISR Latitude*/
float longitude; /*< [deg] ISR Longitude*/
float height; /*< ISR Height*/
uint8_t target; /*< The system reporting the action*/
uint8_t option1; /*< Option 1*/
uint8_t option2; /*< Option 2*/
uint8_t option3; /*< Option 3*/
} mavlink_isr_location_t;
#define MAVLINK_MSG_ID_ISR_LOCATION_LEN 16
#define MAVLINK_MSG_ID_ISR_LOCATION_MIN_LEN 16
#define MAVLINK_MSG_ID_189_LEN 16
#define MAVLINK_MSG_ID_189_MIN_LEN 16
#define MAVLINK_MSG_ID_ISR_LOCATION_CRC 246
#define MAVLINK_MSG_ID_189_CRC 246
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_ISR_LOCATION { \
189, \
"ISR_LOCATION", \
7, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_isr_location_t, target) }, \
{ "latitude", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_isr_location_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_isr_location_t, longitude) }, \
{ "height", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_isr_location_t, height) }, \
{ "option1", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_isr_location_t, option1) }, \
{ "option2", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_isr_location_t, option2) }, \
{ "option3", NULL, MAVLINK_TYPE_UINT8_T, 0, 15, offsetof(mavlink_isr_location_t, option3) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_ISR_LOCATION { \
"ISR_LOCATION", \
7, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_isr_location_t, target) }, \
{ "latitude", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_isr_location_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_isr_location_t, longitude) }, \
{ "height", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_isr_location_t, height) }, \
{ "option1", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_isr_location_t, option1) }, \
{ "option2", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_isr_location_t, option2) }, \
{ "option3", NULL, MAVLINK_TYPE_UINT8_T, 0, 15, offsetof(mavlink_isr_location_t, option3) }, \
} \
}
#endif
/**
* @brief Pack a isr_location 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 reporting the action
* @param latitude [deg] ISR Latitude
* @param longitude [deg] ISR Longitude
* @param height ISR Height
* @param option1 Option 1
* @param option2 Option 2
* @param option3 Option 3
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_isr_location_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target, float latitude, float longitude, float height, uint8_t option1, uint8_t option2, uint8_t option3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ISR_LOCATION_LEN];
_mav_put_float(buf, 0, latitude);
_mav_put_float(buf, 4, longitude);
_mav_put_float(buf, 8, height);
_mav_put_uint8_t(buf, 12, target);
_mav_put_uint8_t(buf, 13, option1);
_mav_put_uint8_t(buf, 14, option2);
_mav_put_uint8_t(buf, 15, option3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ISR_LOCATION_LEN);
#else
mavlink_isr_location_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.height = height;
packet.target = target;
packet.option1 = option1;
packet.option2 = option2;
packet.option3 = option3;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ISR_LOCATION_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ISR_LOCATION;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ISR_LOCATION_MIN_LEN, MAVLINK_MSG_ID_ISR_LOCATION_LEN, MAVLINK_MSG_ID_ISR_LOCATION_CRC);
}
/**
* @brief Pack a isr_location 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param target The system reporting the action
* @param latitude [deg] ISR Latitude
* @param longitude [deg] ISR Longitude
* @param height ISR Height
* @param option1 Option 1
* @param option2 Option 2
* @param option3 Option 3
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_isr_location_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target,float latitude,float longitude,float height,uint8_t option1,uint8_t option2,uint8_t option3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ISR_LOCATION_LEN];
_mav_put_float(buf, 0, latitude);
_mav_put_float(buf, 4, longitude);
_mav_put_float(buf, 8, height);
_mav_put_uint8_t(buf, 12, target);
_mav_put_uint8_t(buf, 13, option1);
_mav_put_uint8_t(buf, 14, option2);
_mav_put_uint8_t(buf, 15, option3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ISR_LOCATION_LEN);
#else
mavlink_isr_location_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.height = height;
packet.target = target;
packet.option1 = option1;
packet.option2 = option2;
packet.option3 = option3;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ISR_LOCATION_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ISR_LOCATION;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ISR_LOCATION_MIN_LEN, MAVLINK_MSG_ID_ISR_LOCATION_LEN, MAVLINK_MSG_ID_ISR_LOCATION_CRC);
}
/**
* @brief Encode a isr_location struct
*
* @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 isr_location C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_isr_location_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_isr_location_t* isr_location)
{
return mavlink_msg_isr_location_pack(system_id, component_id, msg, isr_location->target, isr_location->latitude, isr_location->longitude, isr_location->height, isr_location->option1, isr_location->option2, isr_location->option3);
}
/**
* @brief Encode a isr_location struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param isr_location C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_isr_location_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_isr_location_t* isr_location)
{
return mavlink_msg_isr_location_pack_chan(system_id, component_id, chan, msg, isr_location->target, isr_location->latitude, isr_location->longitude, isr_location->height, isr_location->option1, isr_location->option2, isr_location->option3);
}
/**
* @brief Send a isr_location message
* @param chan MAVLink channel to send the message
*
* @param target The system reporting the action
* @param latitude [deg] ISR Latitude
* @param longitude [deg] ISR Longitude
* @param height ISR Height
* @param option1 Option 1
* @param option2 Option 2
* @param option3 Option 3
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_isr_location_send(mavlink_channel_t chan, uint8_t target, float latitude, float longitude, float height, uint8_t option1, uint8_t option2, uint8_t option3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ISR_LOCATION_LEN];
_mav_put_float(buf, 0, latitude);
_mav_put_float(buf, 4, longitude);
_mav_put_float(buf, 8, height);
_mav_put_uint8_t(buf, 12, target);
_mav_put_uint8_t(buf, 13, option1);
_mav_put_uint8_t(buf, 14, option2);
_mav_put_uint8_t(buf, 15, option3);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ISR_LOCATION, buf, MAVLINK_MSG_ID_ISR_LOCATION_MIN_LEN, MAVLINK_MSG_ID_ISR_LOCATION_LEN, MAVLINK_MSG_ID_ISR_LOCATION_CRC);
#else
mavlink_isr_location_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.height = height;
packet.target = target;
packet.option1 = option1;
packet.option2 = option2;
packet.option3 = option3;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ISR_LOCATION, (const char *)&packet, MAVLINK_MSG_ID_ISR_LOCATION_MIN_LEN, MAVLINK_MSG_ID_ISR_LOCATION_LEN, MAVLINK_MSG_ID_ISR_LOCATION_CRC);
#endif
}
/**
* @brief Send a isr_location message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_isr_location_send_struct(mavlink_channel_t chan, const mavlink_isr_location_t* isr_location)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_isr_location_send(chan, isr_location->target, isr_location->latitude, isr_location->longitude, isr_location->height, isr_location->option1, isr_location->option2, isr_location->option3);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ISR_LOCATION, (const char *)isr_location, MAVLINK_MSG_ID_ISR_LOCATION_MIN_LEN, MAVLINK_MSG_ID_ISR_LOCATION_LEN, MAVLINK_MSG_ID_ISR_LOCATION_CRC);
#endif
}
#if MAVLINK_MSG_ID_ISR_LOCATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_isr_location_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target, float latitude, float longitude, float height, uint8_t option1, uint8_t option2, uint8_t option3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_float(buf, 0, latitude);
_mav_put_float(buf, 4, longitude);
_mav_put_float(buf, 8, height);
_mav_put_uint8_t(buf, 12, target);
_mav_put_uint8_t(buf, 13, option1);
_mav_put_uint8_t(buf, 14, option2);
_mav_put_uint8_t(buf, 15, option3);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ISR_LOCATION, buf, MAVLINK_MSG_ID_ISR_LOCATION_MIN_LEN, MAVLINK_MSG_ID_ISR_LOCATION_LEN, MAVLINK_MSG_ID_ISR_LOCATION_CRC);
#else
mavlink_isr_location_t *packet = (mavlink_isr_location_t *)msgbuf;
packet->latitude = latitude;
packet->longitude = longitude;
packet->height = height;
packet->target = target;
packet->option1 = option1;
packet->option2 = option2;
packet->option3 = option3;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ISR_LOCATION, (const char *)packet, MAVLINK_MSG_ID_ISR_LOCATION_MIN_LEN, MAVLINK_MSG_ID_ISR_LOCATION_LEN, MAVLINK_MSG_ID_ISR_LOCATION_CRC);
#endif
}
#endif
#endif
// MESSAGE ISR_LOCATION UNPACKING
/**
* @brief Get field target from isr_location message
*
* @return The system reporting the action
*/
static inline uint8_t mavlink_msg_isr_location_get_target(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 12);
}
/**
* @brief Get field latitude from isr_location message
*
* @return [deg] ISR Latitude
*/
static inline float mavlink_msg_isr_location_get_latitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field longitude from isr_location message
*
* @return [deg] ISR Longitude
*/
static inline float mavlink_msg_isr_location_get_longitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field height from isr_location message
*
* @return ISR Height
*/
static inline float mavlink_msg_isr_location_get_height(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field option1 from isr_location message
*
* @return Option 1
*/
static inline uint8_t mavlink_msg_isr_location_get_option1(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 13);
}
/**
* @brief Get field option2 from isr_location message
*
* @return Option 2
*/
static inline uint8_t mavlink_msg_isr_location_get_option2(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 14);
}
/**
* @brief Get field option3 from isr_location message
*
* @return Option 3
*/
static inline uint8_t mavlink_msg_isr_location_get_option3(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 15);
}
/**
* @brief Decode a isr_location message into a struct
*
* @param msg The message to decode
* @param isr_location C-struct to decode the message contents into
*/
static inline void mavlink_msg_isr_location_decode(const mavlink_message_t* msg, mavlink_isr_location_t* isr_location)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
isr_location->latitude = mavlink_msg_isr_location_get_latitude(msg);
isr_location->longitude = mavlink_msg_isr_location_get_longitude(msg);
isr_location->height = mavlink_msg_isr_location_get_height(msg);
isr_location->target = mavlink_msg_isr_location_get_target(msg);
isr_location->option1 = mavlink_msg_isr_location_get_option1(msg);
isr_location->option2 = mavlink_msg_isr_location_get_option2(msg);
isr_location->option3 = mavlink_msg_isr_location_get_option3(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_ISR_LOCATION_LEN? msg->len : MAVLINK_MSG_ID_ISR_LOCATION_LEN;
memset(isr_location, 0, MAVLINK_MSG_ID_ISR_LOCATION_LEN);
memcpy(isr_location, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE MID_LVL_CMDS PACKING
#define MAVLINK_MSG_ID_MID_LVL_CMDS 180
typedef struct __mavlink_mid_lvl_cmds_t {
float hCommand; /*< [m] Commanded altitude (MSL)*/
float uCommand; /*< [m/s] Commanded Airspeed*/
float rCommand; /*< [rad/s] Commanded Turnrate*/
uint8_t target; /*< The system setting the commands*/
} mavlink_mid_lvl_cmds_t;
#define MAVLINK_MSG_ID_MID_LVL_CMDS_LEN 13
#define MAVLINK_MSG_ID_MID_LVL_CMDS_MIN_LEN 13
#define MAVLINK_MSG_ID_180_LEN 13
#define MAVLINK_MSG_ID_180_MIN_LEN 13
#define MAVLINK_MSG_ID_MID_LVL_CMDS_CRC 146
#define MAVLINK_MSG_ID_180_CRC 146
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_MID_LVL_CMDS { \
180, \
"MID_LVL_CMDS", \
4, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_mid_lvl_cmds_t, target) }, \
{ "hCommand", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mid_lvl_cmds_t, hCommand) }, \
{ "uCommand", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mid_lvl_cmds_t, uCommand) }, \
{ "rCommand", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mid_lvl_cmds_t, rCommand) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_MID_LVL_CMDS { \
"MID_LVL_CMDS", \
4, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_mid_lvl_cmds_t, target) }, \
{ "hCommand", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mid_lvl_cmds_t, hCommand) }, \
{ "uCommand", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mid_lvl_cmds_t, uCommand) }, \
{ "rCommand", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mid_lvl_cmds_t, rCommand) }, \
} \
}
#endif
/**
* @brief Pack a mid_lvl_cmds 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 setting the commands
* @param hCommand [m] Commanded altitude (MSL)
* @param uCommand [m/s] Commanded Airspeed
* @param rCommand [rad/s] Commanded Turnrate
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mid_lvl_cmds_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target, float hCommand, float uCommand, float rCommand)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_MID_LVL_CMDS_LEN];
_mav_put_float(buf, 0, hCommand);
_mav_put_float(buf, 4, uCommand);
_mav_put_float(buf, 8, rCommand);
_mav_put_uint8_t(buf, 12, target);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MID_LVL_CMDS_LEN);
#else
mavlink_mid_lvl_cmds_t packet;
packet.hCommand = hCommand;
packet.uCommand = uCommand;
packet.rCommand = rCommand;
packet.target = target;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MID_LVL_CMDS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MID_LVL_CMDS;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MID_LVL_CMDS_MIN_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_CRC);
}
/**
* @brief Pack a mid_lvl_cmds 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param target The system setting the commands
* @param hCommand [m] Commanded altitude (MSL)
* @param uCommand [m/s] Commanded Airspeed
* @param rCommand [rad/s] Commanded Turnrate
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mid_lvl_cmds_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target,float hCommand,float uCommand,float rCommand)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_MID_LVL_CMDS_LEN];
_mav_put_float(buf, 0, hCommand);
_mav_put_float(buf, 4, uCommand);
_mav_put_float(buf, 8, rCommand);
_mav_put_uint8_t(buf, 12, target);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MID_LVL_CMDS_LEN);
#else
mavlink_mid_lvl_cmds_t packet;
packet.hCommand = hCommand;
packet.uCommand = uCommand;
packet.rCommand = rCommand;
packet.target = target;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MID_LVL_CMDS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MID_LVL_CMDS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MID_LVL_CMDS_MIN_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_CRC);
}
/**
* @brief Encode a mid_lvl_cmds struct
*
* @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 mid_lvl_cmds C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mid_lvl_cmds_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mid_lvl_cmds_t* mid_lvl_cmds)
{
return mavlink_msg_mid_lvl_cmds_pack(system_id, component_id, msg, mid_lvl_cmds->target, mid_lvl_cmds->hCommand, mid_lvl_cmds->uCommand, mid_lvl_cmds->rCommand);
}
/**
* @brief Encode a mid_lvl_cmds struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param mid_lvl_cmds C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_mid_lvl_cmds_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mid_lvl_cmds_t* mid_lvl_cmds)
{
return mavlink_msg_mid_lvl_cmds_pack_chan(system_id, component_id, chan, msg, mid_lvl_cmds->target, mid_lvl_cmds->hCommand, mid_lvl_cmds->uCommand, mid_lvl_cmds->rCommand);
}
/**
* @brief Send a mid_lvl_cmds message
* @param chan MAVLink channel to send the message
*
* @param target The system setting the commands
* @param hCommand [m] Commanded altitude (MSL)
* @param uCommand [m/s] Commanded Airspeed
* @param rCommand [rad/s] Commanded Turnrate
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_mid_lvl_cmds_send(mavlink_channel_t chan, uint8_t target, float hCommand, float uCommand, float rCommand)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_MID_LVL_CMDS_LEN];
_mav_put_float(buf, 0, hCommand);
_mav_put_float(buf, 4, uCommand);
_mav_put_float(buf, 8, rCommand);
_mav_put_uint8_t(buf, 12, target);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MID_LVL_CMDS, buf, MAVLINK_MSG_ID_MID_LVL_CMDS_MIN_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_CRC);
#else
mavlink_mid_lvl_cmds_t packet;
packet.hCommand = hCommand;
packet.uCommand = uCommand;
packet.rCommand = rCommand;
packet.target = target;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MID_LVL_CMDS, (const char *)&packet, MAVLINK_MSG_ID_MID_LVL_CMDS_MIN_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_CRC);
#endif
}
/**
* @brief Send a mid_lvl_cmds message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_mid_lvl_cmds_send_struct(mavlink_channel_t chan, const mavlink_mid_lvl_cmds_t* mid_lvl_cmds)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_mid_lvl_cmds_send(chan, mid_lvl_cmds->target, mid_lvl_cmds->hCommand, mid_lvl_cmds->uCommand, mid_lvl_cmds->rCommand);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MID_LVL_CMDS, (const char *)mid_lvl_cmds, MAVLINK_MSG_ID_MID_LVL_CMDS_MIN_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_CRC);
#endif
}
#if MAVLINK_MSG_ID_MID_LVL_CMDS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_mid_lvl_cmds_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target, float hCommand, float uCommand, float rCommand)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_float(buf, 0, hCommand);
_mav_put_float(buf, 4, uCommand);
_mav_put_float(buf, 8, rCommand);
_mav_put_uint8_t(buf, 12, target);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MID_LVL_CMDS, buf, MAVLINK_MSG_ID_MID_LVL_CMDS_MIN_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_CRC);
#else
mavlink_mid_lvl_cmds_t *packet = (mavlink_mid_lvl_cmds_t *)msgbuf;
packet->hCommand = hCommand;
packet->uCommand = uCommand;
packet->rCommand = rCommand;
packet->target = target;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MID_LVL_CMDS, (const char *)packet, MAVLINK_MSG_ID_MID_LVL_CMDS_MIN_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_LEN, MAVLINK_MSG_ID_MID_LVL_CMDS_CRC);
#endif
}
#endif
#endif
// MESSAGE MID_LVL_CMDS UNPACKING
/**
* @brief Get field target from mid_lvl_cmds message
*
* @return The system setting the commands
*/
static inline uint8_t mavlink_msg_mid_lvl_cmds_get_target(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 12);
}
/**
* @brief Get field hCommand from mid_lvl_cmds message
*
* @return [m] Commanded altitude (MSL)
*/
static inline float mavlink_msg_mid_lvl_cmds_get_hCommand(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field uCommand from mid_lvl_cmds message
*
* @return [m/s] Commanded Airspeed
*/
static inline float mavlink_msg_mid_lvl_cmds_get_uCommand(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field rCommand from mid_lvl_cmds message
*
* @return [rad/s] Commanded Turnrate
*/
static inline float mavlink_msg_mid_lvl_cmds_get_rCommand(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Decode a mid_lvl_cmds message into a struct
*
* @param msg The message to decode
* @param mid_lvl_cmds C-struct to decode the message contents into
*/
static inline void mavlink_msg_mid_lvl_cmds_decode(const mavlink_message_t* msg, mavlink_mid_lvl_cmds_t* mid_lvl_cmds)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mid_lvl_cmds->hCommand = mavlink_msg_mid_lvl_cmds_get_hCommand(msg);
mid_lvl_cmds->uCommand = mavlink_msg_mid_lvl_cmds_get_uCommand(msg);
mid_lvl_cmds->rCommand = mavlink_msg_mid_lvl_cmds_get_rCommand(msg);
mid_lvl_cmds->target = mavlink_msg_mid_lvl_cmds_get_target(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_MID_LVL_CMDS_LEN? msg->len : MAVLINK_MSG_ID_MID_LVL_CMDS_LEN;
memset(mid_lvl_cmds, 0, MAVLINK_MSG_ID_MID_LVL_CMDS_LEN);
memcpy(mid_lvl_cmds, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE NOVATEL_DIAG PACKING
#define MAVLINK_MSG_ID_NOVATEL_DIAG 195
typedef struct __mavlink_novatel_diag_t {
uint32_t receiverStatus; /*< Status Bitfield. See table 69 page 350 Novatel OEMstar Manual*/
float posSolAge; /*< [s] Age of the position solution*/
uint16_t csFails; /*< Times the CRC has failed since boot*/
uint8_t timeStatus; /*< The Time Status. See Table 8 page 27 Novatel OEMStar Manual*/
uint8_t solStatus; /*< solution Status. See table 44 page 197*/
uint8_t posType; /*< position type. See table 43 page 196*/
uint8_t velType; /*< velocity type. See table 43 page 196*/
} mavlink_novatel_diag_t;
#define MAVLINK_MSG_ID_NOVATEL_DIAG_LEN 14
#define MAVLINK_MSG_ID_NOVATEL_DIAG_MIN_LEN 14
#define MAVLINK_MSG_ID_195_LEN 14
#define MAVLINK_MSG_ID_195_MIN_LEN 14
#define MAVLINK_MSG_ID_NOVATEL_DIAG_CRC 59
#define MAVLINK_MSG_ID_195_CRC 59
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_NOVATEL_DIAG { \
195, \
"NOVATEL_DIAG", \
7, \
{ { "timeStatus", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_novatel_diag_t, timeStatus) }, \
{ "receiverStatus", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_novatel_diag_t, receiverStatus) }, \
{ "solStatus", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_novatel_diag_t, solStatus) }, \
{ "posType", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_novatel_diag_t, posType) }, \
{ "velType", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_novatel_diag_t, velType) }, \
{ "posSolAge", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_novatel_diag_t, posSolAge) }, \
{ "csFails", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_novatel_diag_t, csFails) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_NOVATEL_DIAG { \
"NOVATEL_DIAG", \
7, \
{ { "timeStatus", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_novatel_diag_t, timeStatus) }, \
{ "receiverStatus", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_novatel_diag_t, receiverStatus) }, \
{ "solStatus", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_novatel_diag_t, solStatus) }, \
{ "posType", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_novatel_diag_t, posType) }, \
{ "velType", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_novatel_diag_t, velType) }, \
{ "posSolAge", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_novatel_diag_t, posSolAge) }, \
{ "csFails", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_novatel_diag_t, csFails) }, \
} \
}
#endif
/**
* @brief Pack a novatel_diag 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 timeStatus The Time Status. See Table 8 page 27 Novatel OEMStar Manual
* @param receiverStatus Status Bitfield. See table 69 page 350 Novatel OEMstar Manual
* @param solStatus solution Status. See table 44 page 197
* @param posType position type. See table 43 page 196
* @param velType velocity type. See table 43 page 196
* @param posSolAge [s] Age of the position solution
* @param csFails Times the CRC has failed since boot
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_novatel_diag_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t timeStatus, uint32_t receiverStatus, uint8_t solStatus, uint8_t posType, uint8_t velType, float posSolAge, uint16_t csFails)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_NOVATEL_DIAG_LEN];
_mav_put_uint32_t(buf, 0, receiverStatus);
_mav_put_float(buf, 4, posSolAge);
_mav_put_uint16_t(buf, 8, csFails);
_mav_put_uint8_t(buf, 10, timeStatus);
_mav_put_uint8_t(buf, 11, solStatus);
_mav_put_uint8_t(buf, 12, posType);
_mav_put_uint8_t(buf, 13, velType);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_NOVATEL_DIAG_LEN);
#else
mavlink_novatel_diag_t packet;
packet.receiverStatus = receiverStatus;
packet.posSolAge = posSolAge;
packet.csFails = csFails;
packet.timeStatus = timeStatus;
packet.solStatus = solStatus;
packet.posType = posType;
packet.velType = velType;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_NOVATEL_DIAG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_NOVATEL_DIAG;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_NOVATEL_DIAG_MIN_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_CRC);
}
/**
* @brief Pack a novatel_diag 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param timeStatus The Time Status. See Table 8 page 27 Novatel OEMStar Manual
* @param receiverStatus Status Bitfield. See table 69 page 350 Novatel OEMstar Manual
* @param solStatus solution Status. See table 44 page 197
* @param posType position type. See table 43 page 196
* @param velType velocity type. See table 43 page 196
* @param posSolAge [s] Age of the position solution
* @param csFails Times the CRC has failed since boot
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_novatel_diag_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t timeStatus,uint32_t receiverStatus,uint8_t solStatus,uint8_t posType,uint8_t velType,float posSolAge,uint16_t csFails)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_NOVATEL_DIAG_LEN];
_mav_put_uint32_t(buf, 0, receiverStatus);
_mav_put_float(buf, 4, posSolAge);
_mav_put_uint16_t(buf, 8, csFails);
_mav_put_uint8_t(buf, 10, timeStatus);
_mav_put_uint8_t(buf, 11, solStatus);
_mav_put_uint8_t(buf, 12, posType);
_mav_put_uint8_t(buf, 13, velType);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_NOVATEL_DIAG_LEN);
#else
mavlink_novatel_diag_t packet;
packet.receiverStatus = receiverStatus;
packet.posSolAge = posSolAge;
packet.csFails = csFails;
packet.timeStatus = timeStatus;
packet.solStatus = solStatus;
packet.posType = posType;
packet.velType = velType;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_NOVATEL_DIAG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_NOVATEL_DIAG;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_NOVATEL_DIAG_MIN_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_CRC);
}
/**
* @brief Encode a novatel_diag struct
*
* @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 novatel_diag C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_novatel_diag_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_novatel_diag_t* novatel_diag)
{
return mavlink_msg_novatel_diag_pack(system_id, component_id, msg, novatel_diag->timeStatus, novatel_diag->receiverStatus, novatel_diag->solStatus, novatel_diag->posType, novatel_diag->velType, novatel_diag->posSolAge, novatel_diag->csFails);
}
/**
* @brief Encode a novatel_diag struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param novatel_diag C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_novatel_diag_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_novatel_diag_t* novatel_diag)
{
return mavlink_msg_novatel_diag_pack_chan(system_id, component_id, chan, msg, novatel_diag->timeStatus, novatel_diag->receiverStatus, novatel_diag->solStatus, novatel_diag->posType, novatel_diag->velType, novatel_diag->posSolAge, novatel_diag->csFails);
}
/**
* @brief Send a novatel_diag message
* @param chan MAVLink channel to send the message
*
* @param timeStatus The Time Status. See Table 8 page 27 Novatel OEMStar Manual
* @param receiverStatus Status Bitfield. See table 69 page 350 Novatel OEMstar Manual
* @param solStatus solution Status. See table 44 page 197
* @param posType position type. See table 43 page 196
* @param velType velocity type. See table 43 page 196
* @param posSolAge [s] Age of the position solution
* @param csFails Times the CRC has failed since boot
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_novatel_diag_send(mavlink_channel_t chan, uint8_t timeStatus, uint32_t receiverStatus, uint8_t solStatus, uint8_t posType, uint8_t velType, float posSolAge, uint16_t csFails)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_NOVATEL_DIAG_LEN];
_mav_put_uint32_t(buf, 0, receiverStatus);
_mav_put_float(buf, 4, posSolAge);
_mav_put_uint16_t(buf, 8, csFails);
_mav_put_uint8_t(buf, 10, timeStatus);
_mav_put_uint8_t(buf, 11, solStatus);
_mav_put_uint8_t(buf, 12, posType);
_mav_put_uint8_t(buf, 13, velType);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NOVATEL_DIAG, buf, MAVLINK_MSG_ID_NOVATEL_DIAG_MIN_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_CRC);
#else
mavlink_novatel_diag_t packet;
packet.receiverStatus = receiverStatus;
packet.posSolAge = posSolAge;
packet.csFails = csFails;
packet.timeStatus = timeStatus;
packet.solStatus = solStatus;
packet.posType = posType;
packet.velType = velType;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NOVATEL_DIAG, (const char *)&packet, MAVLINK_MSG_ID_NOVATEL_DIAG_MIN_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_CRC);
#endif
}
/**
* @brief Send a novatel_diag message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_novatel_diag_send_struct(mavlink_channel_t chan, const mavlink_novatel_diag_t* novatel_diag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_novatel_diag_send(chan, novatel_diag->timeStatus, novatel_diag->receiverStatus, novatel_diag->solStatus, novatel_diag->posType, novatel_diag->velType, novatel_diag->posSolAge, novatel_diag->csFails);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NOVATEL_DIAG, (const char *)novatel_diag, MAVLINK_MSG_ID_NOVATEL_DIAG_MIN_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_CRC);
#endif
}
#if MAVLINK_MSG_ID_NOVATEL_DIAG_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_novatel_diag_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t timeStatus, uint32_t receiverStatus, uint8_t solStatus, uint8_t posType, uint8_t velType, float posSolAge, uint16_t csFails)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint32_t(buf, 0, receiverStatus);
_mav_put_float(buf, 4, posSolAge);
_mav_put_uint16_t(buf, 8, csFails);
_mav_put_uint8_t(buf, 10, timeStatus);
_mav_put_uint8_t(buf, 11, solStatus);
_mav_put_uint8_t(buf, 12, posType);
_mav_put_uint8_t(buf, 13, velType);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NOVATEL_DIAG, buf, MAVLINK_MSG_ID_NOVATEL_DIAG_MIN_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_CRC);
#else
mavlink_novatel_diag_t *packet = (mavlink_novatel_diag_t *)msgbuf;
packet->receiverStatus = receiverStatus;
packet->posSolAge = posSolAge;
packet->csFails = csFails;
packet->timeStatus = timeStatus;
packet->solStatus = solStatus;
packet->posType = posType;
packet->velType = velType;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NOVATEL_DIAG, (const char *)packet, MAVLINK_MSG_ID_NOVATEL_DIAG_MIN_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_LEN, MAVLINK_MSG_ID_NOVATEL_DIAG_CRC);
#endif
}
#endif
#endif
// MESSAGE NOVATEL_DIAG UNPACKING
/**
* @brief Get field timeStatus from novatel_diag message
*
* @return The Time Status. See Table 8 page 27 Novatel OEMStar Manual
*/
static inline uint8_t mavlink_msg_novatel_diag_get_timeStatus(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 10);
}
/**
* @brief Get field receiverStatus from novatel_diag message
*
* @return Status Bitfield. See table 69 page 350 Novatel OEMstar Manual
*/
static inline uint32_t mavlink_msg_novatel_diag_get_receiverStatus(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field solStatus from novatel_diag message
*
* @return solution Status. See table 44 page 197
*/
static inline uint8_t mavlink_msg_novatel_diag_get_solStatus(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 11);
}
/**
* @brief Get field posType from novatel_diag message
*
* @return position type. See table 43 page 196
*/
static inline uint8_t mavlink_msg_novatel_diag_get_posType(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 12);
}
/**
* @brief Get field velType from novatel_diag message
*
* @return velocity type. See table 43 page 196
*/
static inline uint8_t mavlink_msg_novatel_diag_get_velType(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 13);
}
/**
* @brief Get field posSolAge from novatel_diag message
*
* @return [s] Age of the position solution
*/
static inline float mavlink_msg_novatel_diag_get_posSolAge(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field csFails from novatel_diag message
*
* @return Times the CRC has failed since boot
*/
static inline uint16_t mavlink_msg_novatel_diag_get_csFails(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 8);
}
/**
* @brief Decode a novatel_diag message into a struct
*
* @param msg The message to decode
* @param novatel_diag C-struct to decode the message contents into
*/
static inline void mavlink_msg_novatel_diag_decode(const mavlink_message_t* msg, mavlink_novatel_diag_t* novatel_diag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
novatel_diag->receiverStatus = mavlink_msg_novatel_diag_get_receiverStatus(msg);
novatel_diag->posSolAge = mavlink_msg_novatel_diag_get_posSolAge(msg);
novatel_diag->csFails = mavlink_msg_novatel_diag_get_csFails(msg);
novatel_diag->timeStatus = mavlink_msg_novatel_diag_get_timeStatus(msg);
novatel_diag->solStatus = mavlink_msg_novatel_diag_get_solStatus(msg);
novatel_diag->posType = mavlink_msg_novatel_diag_get_posType(msg);
novatel_diag->velType = mavlink_msg_novatel_diag_get_velType(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_NOVATEL_DIAG_LEN? msg->len : MAVLINK_MSG_ID_NOVATEL_DIAG_LEN;
memset(novatel_diag, 0, MAVLINK_MSG_ID_NOVATEL_DIAG_LEN);
memcpy(novatel_diag, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE PTZ_STATUS PACKING
#define MAVLINK_MSG_ID_PTZ_STATUS 192
typedef struct __mavlink_ptz_status_t {
int16_t pan; /*< The Pan value in 10ths of degree*/
int16_t tilt; /*< The Tilt value in 10ths of degree*/
uint8_t zoom; /*< The actual Zoom Value*/
} mavlink_ptz_status_t;
#define MAVLINK_MSG_ID_PTZ_STATUS_LEN 5
#define MAVLINK_MSG_ID_PTZ_STATUS_MIN_LEN 5
#define MAVLINK_MSG_ID_192_LEN 5
#define MAVLINK_MSG_ID_192_MIN_LEN 5
#define MAVLINK_MSG_ID_PTZ_STATUS_CRC 187
#define MAVLINK_MSG_ID_192_CRC 187
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_PTZ_STATUS { \
192, \
"PTZ_STATUS", \
3, \
{ { "zoom", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_ptz_status_t, zoom) }, \
{ "pan", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_ptz_status_t, pan) }, \
{ "tilt", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_ptz_status_t, tilt) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_PTZ_STATUS { \
"PTZ_STATUS", \
3, \
{ { "zoom", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_ptz_status_t, zoom) }, \
{ "pan", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_ptz_status_t, pan) }, \
{ "tilt", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_ptz_status_t, tilt) }, \
} \
}
#endif
/**
* @brief Pack a ptz_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 zoom The actual Zoom Value
* @param pan The Pan value in 10ths of degree
* @param tilt The Tilt value in 10ths of degree
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_ptz_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t zoom, int16_t pan, int16_t tilt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_PTZ_STATUS_LEN];
_mav_put_int16_t(buf, 0, pan);
_mav_put_int16_t(buf, 2, tilt);
_mav_put_uint8_t(buf, 4, zoom);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PTZ_STATUS_LEN);
#else
mavlink_ptz_status_t packet;
packet.pan = pan;
packet.tilt = tilt;
packet.zoom = zoom;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PTZ_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_PTZ_STATUS;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PTZ_STATUS_MIN_LEN, MAVLINK_MSG_ID_PTZ_STATUS_LEN, MAVLINK_MSG_ID_PTZ_STATUS_CRC);
}
/**
* @brief Pack a ptz_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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param zoom The actual Zoom Value
* @param pan The Pan value in 10ths of degree
* @param tilt The Tilt value in 10ths of degree
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_ptz_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t zoom,int16_t pan,int16_t tilt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_PTZ_STATUS_LEN];
_mav_put_int16_t(buf, 0, pan);
_mav_put_int16_t(buf, 2, tilt);
_mav_put_uint8_t(buf, 4, zoom);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PTZ_STATUS_LEN);
#else
mavlink_ptz_status_t packet;
packet.pan = pan;
packet.tilt = tilt;
packet.zoom = zoom;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PTZ_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_PTZ_STATUS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PTZ_STATUS_MIN_LEN, MAVLINK_MSG_ID_PTZ_STATUS_LEN, MAVLINK_MSG_ID_PTZ_STATUS_CRC);
}
/**
* @brief Encode a ptz_status struct
*
* @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 ptz_status C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_ptz_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_ptz_status_t* ptz_status)
{
return mavlink_msg_ptz_status_pack(system_id, component_id, msg, ptz_status->zoom, ptz_status->pan, ptz_status->tilt);
}
/**
* @brief Encode a ptz_status struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param ptz_status C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_ptz_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_ptz_status_t* ptz_status)
{
return mavlink_msg_ptz_status_pack_chan(system_id, component_id, chan, msg, ptz_status->zoom, ptz_status->pan, ptz_status->tilt);
}
/**
* @brief Send a ptz_status message
* @param chan MAVLink channel to send the message
*
* @param zoom The actual Zoom Value
* @param pan The Pan value in 10ths of degree
* @param tilt The Tilt value in 10ths of degree
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_ptz_status_send(mavlink_channel_t chan, uint8_t zoom, int16_t pan, int16_t tilt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_PTZ_STATUS_LEN];
_mav_put_int16_t(buf, 0, pan);
_mav_put_int16_t(buf, 2, tilt);
_mav_put_uint8_t(buf, 4, zoom);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PTZ_STATUS, buf, MAVLINK_MSG_ID_PTZ_STATUS_MIN_LEN, MAVLINK_MSG_ID_PTZ_STATUS_LEN, MAVLINK_MSG_ID_PTZ_STATUS_CRC);
#else
mavlink_ptz_status_t packet;
packet.pan = pan;
packet.tilt = tilt;
packet.zoom = zoom;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PTZ_STATUS, (const char *)&packet, MAVLINK_MSG_ID_PTZ_STATUS_MIN_LEN, MAVLINK_MSG_ID_PTZ_STATUS_LEN, MAVLINK_MSG_ID_PTZ_STATUS_CRC);
#endif
}
/**
* @brief Send a ptz_status message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_ptz_status_send_struct(mavlink_channel_t chan, const mavlink_ptz_status_t* ptz_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_ptz_status_send(chan, ptz_status->zoom, ptz_status->pan, ptz_status->tilt);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PTZ_STATUS, (const char *)ptz_status, MAVLINK_MSG_ID_PTZ_STATUS_MIN_LEN, MAVLINK_MSG_ID_PTZ_STATUS_LEN, MAVLINK_MSG_ID_PTZ_STATUS_CRC);
#endif
}
#if MAVLINK_MSG_ID_PTZ_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_ptz_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t zoom, int16_t pan, int16_t tilt)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_int16_t(buf, 0, pan);
_mav_put_int16_t(buf, 2, tilt);
_mav_put_uint8_t(buf, 4, zoom);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PTZ_STATUS, buf, MAVLINK_MSG_ID_PTZ_STATUS_MIN_LEN, MAVLINK_MSG_ID_PTZ_STATUS_LEN, MAVLINK_MSG_ID_PTZ_STATUS_CRC);
#else
mavlink_ptz_status_t *packet = (mavlink_ptz_status_t *)msgbuf;
packet->pan = pan;
packet->tilt = tilt;
packet->zoom = zoom;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PTZ_STATUS, (const char *)packet, MAVLINK_MSG_ID_PTZ_STATUS_MIN_LEN, MAVLINK_MSG_ID_PTZ_STATUS_LEN, MAVLINK_MSG_ID_PTZ_STATUS_CRC);
#endif
}
#endif
#endif
// MESSAGE PTZ_STATUS UNPACKING
/**
* @brief Get field zoom from ptz_status message
*
* @return The actual Zoom Value
*/
static inline uint8_t mavlink_msg_ptz_status_get_zoom(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
/**
* @brief Get field pan from ptz_status message
*
* @return The Pan value in 10ths of degree
*/
static inline int16_t mavlink_msg_ptz_status_get_pan(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 0);
}
/**
* @brief Get field tilt from ptz_status message
*
* @return The Tilt value in 10ths of degree
*/
static inline int16_t mavlink_msg_ptz_status_get_tilt(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 2);
}
/**
* @brief Decode a ptz_status message into a struct
*
* @param msg The message to decode
* @param ptz_status C-struct to decode the message contents into
*/
static inline void mavlink_msg_ptz_status_decode(const mavlink_message_t* msg, mavlink_ptz_status_t* ptz_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
ptz_status->pan = mavlink_msg_ptz_status_get_pan(msg);
ptz_status->tilt = mavlink_msg_ptz_status_get_tilt(msg);
ptz_status->zoom = mavlink_msg_ptz_status_get_zoom(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_PTZ_STATUS_LEN? msg->len : MAVLINK_MSG_ID_PTZ_STATUS_LEN;
memset(ptz_status, 0, MAVLINK_MSG_ID_PTZ_STATUS_LEN);
memcpy(ptz_status, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE SENSOR_BIAS PACKING
#define MAVLINK_MSG_ID_SENSOR_BIAS 172
typedef struct __mavlink_sensor_bias_t {
float axBias; /*< [m/s] Accelerometer X bias*/
float ayBias; /*< [m/s] Accelerometer Y bias*/
float azBias; /*< [m/s] Accelerometer Z bias*/
float gxBias; /*< [rad/s] Gyro X bias*/
float gyBias; /*< [rad/s] Gyro Y bias*/
float gzBias; /*< [rad/s] Gyro Z bias*/
} mavlink_sensor_bias_t;
#define MAVLINK_MSG_ID_SENSOR_BIAS_LEN 24
#define MAVLINK_MSG_ID_SENSOR_BIAS_MIN_LEN 24
#define MAVLINK_MSG_ID_172_LEN 24
#define MAVLINK_MSG_ID_172_MIN_LEN 24
#define MAVLINK_MSG_ID_SENSOR_BIAS_CRC 168
#define MAVLINK_MSG_ID_172_CRC 168
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_SENSOR_BIAS { \
172, \
"SENSOR_BIAS", \
6, \
{ { "axBias", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_sensor_bias_t, axBias) }, \
{ "ayBias", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_sensor_bias_t, ayBias) }, \
{ "azBias", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_sensor_bias_t, azBias) }, \
{ "gxBias", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_sensor_bias_t, gxBias) }, \
{ "gyBias", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_sensor_bias_t, gyBias) }, \
{ "gzBias", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_sensor_bias_t, gzBias) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_SENSOR_BIAS { \
"SENSOR_BIAS", \
6, \
{ { "axBias", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_sensor_bias_t, axBias) }, \
{ "ayBias", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_sensor_bias_t, ayBias) }, \
{ "azBias", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_sensor_bias_t, azBias) }, \
{ "gxBias", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_sensor_bias_t, gxBias) }, \
{ "gyBias", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_sensor_bias_t, gyBias) }, \
{ "gzBias", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_sensor_bias_t, gzBias) }, \
} \
}
#endif
/**
* @brief Pack a sensor_bias 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 axBias [m/s] Accelerometer X bias
* @param ayBias [m/s] Accelerometer Y bias
* @param azBias [m/s] Accelerometer Z bias
* @param gxBias [rad/s] Gyro X bias
* @param gyBias [rad/s] Gyro Y bias
* @param gzBias [rad/s] Gyro Z bias
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_sensor_bias_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
float axBias, float ayBias, float azBias, float gxBias, float gyBias, float gzBias)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SENSOR_BIAS_LEN];
_mav_put_float(buf, 0, axBias);
_mav_put_float(buf, 4, ayBias);
_mav_put_float(buf, 8, azBias);
_mav_put_float(buf, 12, gxBias);
_mav_put_float(buf, 16, gyBias);
_mav_put_float(buf, 20, gzBias);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENSOR_BIAS_LEN);
#else
mavlink_sensor_bias_t packet;
packet.axBias = axBias;
packet.ayBias = ayBias;
packet.azBias = azBias;
packet.gxBias = gxBias;
packet.gyBias = gyBias;
packet.gzBias = gzBias;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENSOR_BIAS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SENSOR_BIAS;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENSOR_BIAS_MIN_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_CRC);
}
/**
* @brief Pack a sensor_bias 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param axBias [m/s] Accelerometer X bias
* @param ayBias [m/s] Accelerometer Y bias
* @param azBias [m/s] Accelerometer Z bias
* @param gxBias [rad/s] Gyro X bias
* @param gyBias [rad/s] Gyro Y bias
* @param gzBias [rad/s] Gyro Z bias
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_sensor_bias_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
float axBias,float ayBias,float azBias,float gxBias,float gyBias,float gzBias)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SENSOR_BIAS_LEN];
_mav_put_float(buf, 0, axBias);
_mav_put_float(buf, 4, ayBias);
_mav_put_float(buf, 8, azBias);
_mav_put_float(buf, 12, gxBias);
_mav_put_float(buf, 16, gyBias);
_mav_put_float(buf, 20, gzBias);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENSOR_BIAS_LEN);
#else
mavlink_sensor_bias_t packet;
packet.axBias = axBias;
packet.ayBias = ayBias;
packet.azBias = azBias;
packet.gxBias = gxBias;
packet.gyBias = gyBias;
packet.gzBias = gzBias;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENSOR_BIAS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SENSOR_BIAS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SENSOR_BIAS_MIN_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_CRC);
}
/**
* @brief Encode a sensor_bias struct
*
* @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 sensor_bias C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_sensor_bias_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_sensor_bias_t* sensor_bias)
{
return mavlink_msg_sensor_bias_pack(system_id, component_id, msg, sensor_bias->axBias, sensor_bias->ayBias, sensor_bias->azBias, sensor_bias->gxBias, sensor_bias->gyBias, sensor_bias->gzBias);
}
/**
* @brief Encode a sensor_bias struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param sensor_bias C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_sensor_bias_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_sensor_bias_t* sensor_bias)
{
return mavlink_msg_sensor_bias_pack_chan(system_id, component_id, chan, msg, sensor_bias->axBias, sensor_bias->ayBias, sensor_bias->azBias, sensor_bias->gxBias, sensor_bias->gyBias, sensor_bias->gzBias);
}
/**
* @brief Send a sensor_bias message
* @param chan MAVLink channel to send the message
*
* @param axBias [m/s] Accelerometer X bias
* @param ayBias [m/s] Accelerometer Y bias
* @param azBias [m/s] Accelerometer Z bias
* @param gxBias [rad/s] Gyro X bias
* @param gyBias [rad/s] Gyro Y bias
* @param gzBias [rad/s] Gyro Z bias
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_sensor_bias_send(mavlink_channel_t chan, float axBias, float ayBias, float azBias, float gxBias, float gyBias, float gzBias)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SENSOR_BIAS_LEN];
_mav_put_float(buf, 0, axBias);
_mav_put_float(buf, 4, ayBias);
_mav_put_float(buf, 8, azBias);
_mav_put_float(buf, 12, gxBias);
_mav_put_float(buf, 16, gyBias);
_mav_put_float(buf, 20, gzBias);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_BIAS, buf, MAVLINK_MSG_ID_SENSOR_BIAS_MIN_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_CRC);
#else
mavlink_sensor_bias_t packet;
packet.axBias = axBias;
packet.ayBias = ayBias;
packet.azBias = azBias;
packet.gxBias = gxBias;
packet.gyBias = gyBias;
packet.gzBias = gzBias;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_BIAS, (const char *)&packet, MAVLINK_MSG_ID_SENSOR_BIAS_MIN_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_CRC);
#endif
}
/**
* @brief Send a sensor_bias message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_sensor_bias_send_struct(mavlink_channel_t chan, const mavlink_sensor_bias_t* sensor_bias)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_sensor_bias_send(chan, sensor_bias->axBias, sensor_bias->ayBias, sensor_bias->azBias, sensor_bias->gxBias, sensor_bias->gyBias, sensor_bias->gzBias);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_BIAS, (const char *)sensor_bias, MAVLINK_MSG_ID_SENSOR_BIAS_MIN_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_CRC);
#endif
}
#if MAVLINK_MSG_ID_SENSOR_BIAS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_sensor_bias_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float axBias, float ayBias, float azBias, float gxBias, float gyBias, float gzBias)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_float(buf, 0, axBias);
_mav_put_float(buf, 4, ayBias);
_mav_put_float(buf, 8, azBias);
_mav_put_float(buf, 12, gxBias);
_mav_put_float(buf, 16, gyBias);
_mav_put_float(buf, 20, gzBias);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_BIAS, buf, MAVLINK_MSG_ID_SENSOR_BIAS_MIN_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_CRC);
#else
mavlink_sensor_bias_t *packet = (mavlink_sensor_bias_t *)msgbuf;
packet->axBias = axBias;
packet->ayBias = ayBias;
packet->azBias = azBias;
packet->gxBias = gxBias;
packet->gyBias = gyBias;
packet->gzBias = gzBias;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_BIAS, (const char *)packet, MAVLINK_MSG_ID_SENSOR_BIAS_MIN_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_LEN, MAVLINK_MSG_ID_SENSOR_BIAS_CRC);
#endif
}
#endif
#endif
// MESSAGE SENSOR_BIAS UNPACKING
/**
* @brief Get field axBias from sensor_bias message
*
* @return [m/s] Accelerometer X bias
*/
static inline float mavlink_msg_sensor_bias_get_axBias(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field ayBias from sensor_bias message
*
* @return [m/s] Accelerometer Y bias
*/
static inline float mavlink_msg_sensor_bias_get_ayBias(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field azBias from sensor_bias message
*
* @return [m/s] Accelerometer Z bias
*/
static inline float mavlink_msg_sensor_bias_get_azBias(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field gxBias from sensor_bias message
*
* @return [rad/s] Gyro X bias
*/
static inline float mavlink_msg_sensor_bias_get_gxBias(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field gyBias from sensor_bias message
*
* @return [rad/s] Gyro Y bias
*/
static inline float mavlink_msg_sensor_bias_get_gyBias(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field gzBias from sensor_bias message
*
* @return [rad/s] Gyro Z bias
*/
static inline float mavlink_msg_sensor_bias_get_gzBias(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Decode a sensor_bias message into a struct
*
* @param msg The message to decode
* @param sensor_bias C-struct to decode the message contents into
*/
static inline void mavlink_msg_sensor_bias_decode(const mavlink_message_t* msg, mavlink_sensor_bias_t* sensor_bias)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
sensor_bias->axBias = mavlink_msg_sensor_bias_get_axBias(msg);
sensor_bias->ayBias = mavlink_msg_sensor_bias_get_ayBias(msg);
sensor_bias->azBias = mavlink_msg_sensor_bias_get_azBias(msg);
sensor_bias->gxBias = mavlink_msg_sensor_bias_get_gxBias(msg);
sensor_bias->gyBias = mavlink_msg_sensor_bias_get_gyBias(msg);
sensor_bias->gzBias = mavlink_msg_sensor_bias_get_gzBias(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_SENSOR_BIAS_LEN? msg->len : MAVLINK_MSG_ID_SENSOR_BIAS_LEN;
memset(sensor_bias, 0, MAVLINK_MSG_ID_SENSOR_BIAS_LEN);
memcpy(sensor_bias, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE SENSOR_DIAG PACKING
#define MAVLINK_MSG_ID_SENSOR_DIAG 196
typedef struct __mavlink_sensor_diag_t {
float float1; /*< Float field 1*/
float float2; /*< Float field 2*/
int16_t int1; /*< Int 16 field 1*/
int8_t char1; /*< Int 8 field 1*/
} mavlink_sensor_diag_t;
#define MAVLINK_MSG_ID_SENSOR_DIAG_LEN 11
#define MAVLINK_MSG_ID_SENSOR_DIAG_MIN_LEN 11
#define MAVLINK_MSG_ID_196_LEN 11
#define MAVLINK_MSG_ID_196_MIN_LEN 11
#define MAVLINK_MSG_ID_SENSOR_DIAG_CRC 129
#define MAVLINK_MSG_ID_196_CRC 129
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_SENSOR_DIAG { \
196, \
"SENSOR_DIAG", \
4, \
{ { "float1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_sensor_diag_t, float1) }, \
{ "float2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_sensor_diag_t, float2) }, \
{ "int1", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_sensor_diag_t, int1) }, \
{ "char1", NULL, MAVLINK_TYPE_INT8_T, 0, 10, offsetof(mavlink_sensor_diag_t, char1) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_SENSOR_DIAG { \
"SENSOR_DIAG", \
4, \
{ { "float1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_sensor_diag_t, float1) }, \
{ "float2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_sensor_diag_t, float2) }, \
{ "int1", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_sensor_diag_t, int1) }, \
{ "char1", NULL, MAVLINK_TYPE_INT8_T, 0, 10, offsetof(mavlink_sensor_diag_t, char1) }, \
} \
}
#endif
/**
* @brief Pack a sensor_diag 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 float1 Float field 1
* @param float2 Float field 2
* @param int1 Int 16 field 1
* @param char1 Int 8 field 1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_sensor_diag_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
float float1, float float2, int16_t int1, int8_t char1)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SENSOR_DIAG_LEN];
_mav_put_float(buf, 0, float1);
_mav_put_float(buf, 4, float2);
_mav_put_int16_t(buf, 8, int1);
_mav_put_int8_t(buf, 10, char1);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENSOR_DIAG_LEN);
#else
mavlink_sensor_diag_t packet;
packet.float1 = float1;
packet.float2 = float2;
packet.int1 = int1;
packet.char1 = char1;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENSOR_DIAG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SENSOR_DIAG;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENSOR_DIAG_MIN_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_CRC);
}
/**
* @brief Pack a sensor_diag 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param float1 Float field 1
* @param float2 Float field 2
* @param int1 Int 16 field 1
* @param char1 Int 8 field 1
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_sensor_diag_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
float float1,float float2,int16_t int1,int8_t char1)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SENSOR_DIAG_LEN];
_mav_put_float(buf, 0, float1);
_mav_put_float(buf, 4, float2);
_mav_put_int16_t(buf, 8, int1);
_mav_put_int8_t(buf, 10, char1);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENSOR_DIAG_LEN);
#else
mavlink_sensor_diag_t packet;
packet.float1 = float1;
packet.float2 = float2;
packet.int1 = int1;
packet.char1 = char1;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENSOR_DIAG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SENSOR_DIAG;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SENSOR_DIAG_MIN_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_CRC);
}
/**
* @brief Encode a sensor_diag struct
*
* @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 sensor_diag C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_sensor_diag_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_sensor_diag_t* sensor_diag)
{
return mavlink_msg_sensor_diag_pack(system_id, component_id, msg, sensor_diag->float1, sensor_diag->float2, sensor_diag->int1, sensor_diag->char1);
}
/**
* @brief Encode a sensor_diag struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param sensor_diag C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_sensor_diag_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_sensor_diag_t* sensor_diag)
{
return mavlink_msg_sensor_diag_pack_chan(system_id, component_id, chan, msg, sensor_diag->float1, sensor_diag->float2, sensor_diag->int1, sensor_diag->char1);
}
/**
* @brief Send a sensor_diag message
* @param chan MAVLink channel to send the message
*
* @param float1 Float field 1
* @param float2 Float field 2
* @param int1 Int 16 field 1
* @param char1 Int 8 field 1
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_sensor_diag_send(mavlink_channel_t chan, float float1, float float2, int16_t int1, int8_t char1)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SENSOR_DIAG_LEN];
_mav_put_float(buf, 0, float1);
_mav_put_float(buf, 4, float2);
_mav_put_int16_t(buf, 8, int1);
_mav_put_int8_t(buf, 10, char1);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_DIAG, buf, MAVLINK_MSG_ID_SENSOR_DIAG_MIN_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_CRC);
#else
mavlink_sensor_diag_t packet;
packet.float1 = float1;
packet.float2 = float2;
packet.int1 = int1;
packet.char1 = char1;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_DIAG, (const char *)&packet, MAVLINK_MSG_ID_SENSOR_DIAG_MIN_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_CRC);
#endif
}
/**
* @brief Send a sensor_diag message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_sensor_diag_send_struct(mavlink_channel_t chan, const mavlink_sensor_diag_t* sensor_diag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_sensor_diag_send(chan, sensor_diag->float1, sensor_diag->float2, sensor_diag->int1, sensor_diag->char1);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_DIAG, (const char *)sensor_diag, MAVLINK_MSG_ID_SENSOR_DIAG_MIN_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_CRC);
#endif
}
#if MAVLINK_MSG_ID_SENSOR_DIAG_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_sensor_diag_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float float1, float float2, int16_t int1, int8_t char1)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_float(buf, 0, float1);
_mav_put_float(buf, 4, float2);
_mav_put_int16_t(buf, 8, int1);
_mav_put_int8_t(buf, 10, char1);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_DIAG, buf, MAVLINK_MSG_ID_SENSOR_DIAG_MIN_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_CRC);
#else
mavlink_sensor_diag_t *packet = (mavlink_sensor_diag_t *)msgbuf;
packet->float1 = float1;
packet->float2 = float2;
packet->int1 = int1;
packet->char1 = char1;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_DIAG, (const char *)packet, MAVLINK_MSG_ID_SENSOR_DIAG_MIN_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_LEN, MAVLINK_MSG_ID_SENSOR_DIAG_CRC);
#endif
}
#endif
#endif
// MESSAGE SENSOR_DIAG UNPACKING
/**
* @brief Get field float1 from sensor_diag message
*
* @return Float field 1
*/
static inline float mavlink_msg_sensor_diag_get_float1(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field float2 from sensor_diag message
*
* @return Float field 2
*/
static inline float mavlink_msg_sensor_diag_get_float2(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field int1 from sensor_diag message
*
* @return Int 16 field 1
*/
static inline int16_t mavlink_msg_sensor_diag_get_int1(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 8);
}
/**
* @brief Get field char1 from sensor_diag message
*
* @return Int 8 field 1
*/
static inline int8_t mavlink_msg_sensor_diag_get_char1(const mavlink_message_t* msg)
{
return _MAV_RETURN_int8_t(msg, 10);
}
/**
* @brief Decode a sensor_diag message into a struct
*
* @param msg The message to decode
* @param sensor_diag C-struct to decode the message contents into
*/
static inline void mavlink_msg_sensor_diag_decode(const mavlink_message_t* msg, mavlink_sensor_diag_t* sensor_diag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
sensor_diag->float1 = mavlink_msg_sensor_diag_get_float1(msg);
sensor_diag->float2 = mavlink_msg_sensor_diag_get_float2(msg);
sensor_diag->int1 = mavlink_msg_sensor_diag_get_int1(msg);
sensor_diag->char1 = mavlink_msg_sensor_diag_get_char1(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_SENSOR_DIAG_LEN? msg->len : MAVLINK_MSG_ID_SENSOR_DIAG_LEN;
memset(sensor_diag, 0, MAVLINK_MSG_ID_SENSOR_DIAG_LEN);
memcpy(sensor_diag, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE SLUGS_CAMERA_ORDER PACKING
#define MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER 184
typedef struct __mavlink_slugs_camera_order_t {
uint8_t target; /*< The system reporting the action*/
int8_t pan; /*< Order the mount to pan: -1 left, 0 No pan motion, +1 right*/
int8_t tilt; /*< Order the mount to tilt: -1 down, 0 No tilt motion, +1 up*/
int8_t zoom; /*< Order the zoom values 0 to 10*/
int8_t moveHome; /*< Orders the camera mount to move home. The other fields are ignored when this field is set. 1: move home, 0 ignored*/
} mavlink_slugs_camera_order_t;
#define MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN 5
#define MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_MIN_LEN 5
#define MAVLINK_MSG_ID_184_LEN 5
#define MAVLINK_MSG_ID_184_MIN_LEN 5
#define MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_CRC 45
#define MAVLINK_MSG_ID_184_CRC 45
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_SLUGS_CAMERA_ORDER { \
184, \
"SLUGS_CAMERA_ORDER", \
5, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_slugs_camera_order_t, target) }, \
{ "pan", NULL, MAVLINK_TYPE_INT8_T, 0, 1, offsetof(mavlink_slugs_camera_order_t, pan) }, \
{ "tilt", NULL, MAVLINK_TYPE_INT8_T, 0, 2, offsetof(mavlink_slugs_camera_order_t, tilt) }, \
{ "zoom", NULL, MAVLINK_TYPE_INT8_T, 0, 3, offsetof(mavlink_slugs_camera_order_t, zoom) }, \
{ "moveHome", NULL, MAVLINK_TYPE_INT8_T, 0, 4, offsetof(mavlink_slugs_camera_order_t, moveHome) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_SLUGS_CAMERA_ORDER { \
"SLUGS_CAMERA_ORDER", \
5, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_slugs_camera_order_t, target) }, \
{ "pan", NULL, MAVLINK_TYPE_INT8_T, 0, 1, offsetof(mavlink_slugs_camera_order_t, pan) }, \
{ "tilt", NULL, MAVLINK_TYPE_INT8_T, 0, 2, offsetof(mavlink_slugs_camera_order_t, tilt) }, \
{ "zoom", NULL, MAVLINK_TYPE_INT8_T, 0, 3, offsetof(mavlink_slugs_camera_order_t, zoom) }, \
{ "moveHome", NULL, MAVLINK_TYPE_INT8_T, 0, 4, offsetof(mavlink_slugs_camera_order_t, moveHome) }, \
} \
}
#endif
/**
* @brief Pack a slugs_camera_order 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 reporting the action
* @param pan Order the mount to pan: -1 left, 0 No pan motion, +1 right
* @param tilt Order the mount to tilt: -1 down, 0 No tilt motion, +1 up
* @param zoom Order the zoom values 0 to 10
* @param moveHome Orders the camera mount to move home. The other fields are ignored when this field is set. 1: move home, 0 ignored
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_slugs_camera_order_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target, int8_t pan, int8_t tilt, int8_t zoom, int8_t moveHome)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN];
_mav_put_uint8_t(buf, 0, target);
_mav_put_int8_t(buf, 1, pan);
_mav_put_int8_t(buf, 2, tilt);
_mav_put_int8_t(buf, 3, zoom);
_mav_put_int8_t(buf, 4, moveHome);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN);
#else
mavlink_slugs_camera_order_t packet;
packet.target = target;
packet.pan = pan;
packet.tilt = tilt;
packet.zoom = zoom;
packet.moveHome = moveHome;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_CRC);
}
/**
* @brief Pack a slugs_camera_order 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param target The system reporting the action
* @param pan Order the mount to pan: -1 left, 0 No pan motion, +1 right
* @param tilt Order the mount to tilt: -1 down, 0 No tilt motion, +1 up
* @param zoom Order the zoom values 0 to 10
* @param moveHome Orders the camera mount to move home. The other fields are ignored when this field is set. 1: move home, 0 ignored
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_slugs_camera_order_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target,int8_t pan,int8_t tilt,int8_t zoom,int8_t moveHome)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN];
_mav_put_uint8_t(buf, 0, target);
_mav_put_int8_t(buf, 1, pan);
_mav_put_int8_t(buf, 2, tilt);
_mav_put_int8_t(buf, 3, zoom);
_mav_put_int8_t(buf, 4, moveHome);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN);
#else
mavlink_slugs_camera_order_t packet;
packet.target = target;
packet.pan = pan;
packet.tilt = tilt;
packet.zoom = zoom;
packet.moveHome = moveHome;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_CRC);
}
/**
* @brief Encode a slugs_camera_order struct
*
* @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 slugs_camera_order C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_slugs_camera_order_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_slugs_camera_order_t* slugs_camera_order)
{
return mavlink_msg_slugs_camera_order_pack(system_id, component_id, msg, slugs_camera_order->target, slugs_camera_order->pan, slugs_camera_order->tilt, slugs_camera_order->zoom, slugs_camera_order->moveHome);
}
/**
* @brief Encode a slugs_camera_order struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param slugs_camera_order C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_slugs_camera_order_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_slugs_camera_order_t* slugs_camera_order)
{
return mavlink_msg_slugs_camera_order_pack_chan(system_id, component_id, chan, msg, slugs_camera_order->target, slugs_camera_order->pan, slugs_camera_order->tilt, slugs_camera_order->zoom, slugs_camera_order->moveHome);
}
/**
* @brief Send a slugs_camera_order message
* @param chan MAVLink channel to send the message
*
* @param target The system reporting the action
* @param pan Order the mount to pan: -1 left, 0 No pan motion, +1 right
* @param tilt Order the mount to tilt: -1 down, 0 No tilt motion, +1 up
* @param zoom Order the zoom values 0 to 10
* @param moveHome Orders the camera mount to move home. The other fields are ignored when this field is set. 1: move home, 0 ignored
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_slugs_camera_order_send(mavlink_channel_t chan, uint8_t target, int8_t pan, int8_t tilt, int8_t zoom, int8_t moveHome)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN];
_mav_put_uint8_t(buf, 0, target);
_mav_put_int8_t(buf, 1, pan);
_mav_put_int8_t(buf, 2, tilt);
_mav_put_int8_t(buf, 3, zoom);
_mav_put_int8_t(buf, 4, moveHome);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER, buf, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_CRC);
#else
mavlink_slugs_camera_order_t packet;
packet.target = target;
packet.pan = pan;
packet.tilt = tilt;
packet.zoom = zoom;
packet.moveHome = moveHome;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER, (const char *)&packet, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_CRC);
#endif
}
/**
* @brief Send a slugs_camera_order message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_slugs_camera_order_send_struct(mavlink_channel_t chan, const mavlink_slugs_camera_order_t* slugs_camera_order)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_slugs_camera_order_send(chan, slugs_camera_order->target, slugs_camera_order->pan, slugs_camera_order->tilt, slugs_camera_order->zoom, slugs_camera_order->moveHome);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER, (const char *)slugs_camera_order, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_CRC);
#endif
}
#if MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_slugs_camera_order_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target, int8_t pan, int8_t tilt, int8_t zoom, int8_t moveHome)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, target);
_mav_put_int8_t(buf, 1, pan);
_mav_put_int8_t(buf, 2, tilt);
_mav_put_int8_t(buf, 3, zoom);
_mav_put_int8_t(buf, 4, moveHome);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER, buf, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_CRC);
#else
mavlink_slugs_camera_order_t *packet = (mavlink_slugs_camera_order_t *)msgbuf;
packet->target = target;
packet->pan = pan;
packet->tilt = tilt;
packet->zoom = zoom;
packet->moveHome = moveHome;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER, (const char *)packet, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_CRC);
#endif
}
#endif
#endif
// MESSAGE SLUGS_CAMERA_ORDER UNPACKING
/**
* @brief Get field target from slugs_camera_order message
*
* @return The system reporting the action
*/
static inline uint8_t mavlink_msg_slugs_camera_order_get_target(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field pan from slugs_camera_order message
*
* @return Order the mount to pan: -1 left, 0 No pan motion, +1 right
*/
static inline int8_t mavlink_msg_slugs_camera_order_get_pan(const mavlink_message_t* msg)
{
return _MAV_RETURN_int8_t(msg, 1);
}
/**
* @brief Get field tilt from slugs_camera_order message
*
* @return Order the mount to tilt: -1 down, 0 No tilt motion, +1 up
*/
static inline int8_t mavlink_msg_slugs_camera_order_get_tilt(const mavlink_message_t* msg)
{
return _MAV_RETURN_int8_t(msg, 2);
}
/**
* @brief Get field zoom from slugs_camera_order message
*
* @return Order the zoom values 0 to 10
*/
static inline int8_t mavlink_msg_slugs_camera_order_get_zoom(const mavlink_message_t* msg)
{
return _MAV_RETURN_int8_t(msg, 3);
}
/**
* @brief Get field moveHome from slugs_camera_order message
*
* @return Orders the camera mount to move home. The other fields are ignored when this field is set. 1: move home, 0 ignored
*/
static inline int8_t mavlink_msg_slugs_camera_order_get_moveHome(const mavlink_message_t* msg)
{
return _MAV_RETURN_int8_t(msg, 4);
}
/**
* @brief Decode a slugs_camera_order message into a struct
*
* @param msg The message to decode
* @param slugs_camera_order C-struct to decode the message contents into
*/
static inline void mavlink_msg_slugs_camera_order_decode(const mavlink_message_t* msg, mavlink_slugs_camera_order_t* slugs_camera_order)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
slugs_camera_order->target = mavlink_msg_slugs_camera_order_get_target(msg);
slugs_camera_order->pan = mavlink_msg_slugs_camera_order_get_pan(msg);
slugs_camera_order->tilt = mavlink_msg_slugs_camera_order_get_tilt(msg);
slugs_camera_order->zoom = mavlink_msg_slugs_camera_order_get_zoom(msg);
slugs_camera_order->moveHome = mavlink_msg_slugs_camera_order_get_moveHome(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN? msg->len : MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN;
memset(slugs_camera_order, 0, MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_LEN);
memcpy(slugs_camera_order, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE SLUGS_CONFIGURATION_CAMERA PACKING
#define MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA 188
typedef struct __mavlink_slugs_configuration_camera_t {
uint8_t target; /*< The system setting the commands*/
uint8_t idOrder; /*< ID 0: brightness 1: aperture 2: iris 3: ICR 4: backlight*/
uint8_t order; /*< 1: up/on 2: down/off 3: auto/reset/no action*/
} mavlink_slugs_configuration_camera_t;
#define MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN 3
#define MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_MIN_LEN 3
#define MAVLINK_MSG_ID_188_LEN 3
#define MAVLINK_MSG_ID_188_MIN_LEN 3
#define MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_CRC 5
#define MAVLINK_MSG_ID_188_CRC 5
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_SLUGS_CONFIGURATION_CAMERA { \
188, \
"SLUGS_CONFIGURATION_CAMERA", \
3, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_slugs_configuration_camera_t, target) }, \
{ "idOrder", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_slugs_configuration_camera_t, idOrder) }, \
{ "order", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_slugs_configuration_camera_t, order) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_SLUGS_CONFIGURATION_CAMERA { \
"SLUGS_CONFIGURATION_CAMERA", \
3, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_slugs_configuration_camera_t, target) }, \
{ "idOrder", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_slugs_configuration_camera_t, idOrder) }, \
{ "order", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_slugs_configuration_camera_t, order) }, \
} \
}
#endif
/**
* @brief Pack a slugs_configuration_camera 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 setting the commands
* @param idOrder ID 0: brightness 1: aperture 2: iris 3: ICR 4: backlight
* @param order 1: up/on 2: down/off 3: auto/reset/no action
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_slugs_configuration_camera_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target, uint8_t idOrder, uint8_t order)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN];
_mav_put_uint8_t(buf, 0, target);
_mav_put_uint8_t(buf, 1, idOrder);
_mav_put_uint8_t(buf, 2, order);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN);
#else
mavlink_slugs_configuration_camera_t packet;
packet.target = target;
packet.idOrder = idOrder;
packet.order = order;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_CRC);
}
/**
* @brief Pack a slugs_configuration_camera 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param target The system setting the commands
* @param idOrder ID 0: brightness 1: aperture 2: iris 3: ICR 4: backlight
* @param order 1: up/on 2: down/off 3: auto/reset/no action
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_slugs_configuration_camera_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target,uint8_t idOrder,uint8_t order)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN];
_mav_put_uint8_t(buf, 0, target);
_mav_put_uint8_t(buf, 1, idOrder);
_mav_put_uint8_t(buf, 2, order);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN);
#else
mavlink_slugs_configuration_camera_t packet;
packet.target = target;
packet.idOrder = idOrder;
packet.order = order;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_CRC);
}
/**
* @brief Encode a slugs_configuration_camera struct
*
* @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 slugs_configuration_camera C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_slugs_configuration_camera_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_slugs_configuration_camera_t* slugs_configuration_camera)
{
return mavlink_msg_slugs_configuration_camera_pack(system_id, component_id, msg, slugs_configuration_camera->target, slugs_configuration_camera->idOrder, slugs_configuration_camera->order);
}
/**
* @brief Encode a slugs_configuration_camera struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param slugs_configuration_camera C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_slugs_configuration_camera_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_slugs_configuration_camera_t* slugs_configuration_camera)
{
return mavlink_msg_slugs_configuration_camera_pack_chan(system_id, component_id, chan, msg, slugs_configuration_camera->target, slugs_configuration_camera->idOrder, slugs_configuration_camera->order);
}
/**
* @brief Send a slugs_configuration_camera message
* @param chan MAVLink channel to send the message
*
* @param target The system setting the commands
* @param idOrder ID 0: brightness 1: aperture 2: iris 3: ICR 4: backlight
* @param order 1: up/on 2: down/off 3: auto/reset/no action
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_slugs_configuration_camera_send(mavlink_channel_t chan, uint8_t target, uint8_t idOrder, uint8_t order)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN];
_mav_put_uint8_t(buf, 0, target);
_mav_put_uint8_t(buf, 1, idOrder);
_mav_put_uint8_t(buf, 2, order);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA, buf, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_CRC);
#else
mavlink_slugs_configuration_camera_t packet;
packet.target = target;
packet.idOrder = idOrder;
packet.order = order;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA, (const char *)&packet, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_CRC);
#endif
}
/**
* @brief Send a slugs_configuration_camera message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_slugs_configuration_camera_send_struct(mavlink_channel_t chan, const mavlink_slugs_configuration_camera_t* slugs_configuration_camera)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_slugs_configuration_camera_send(chan, slugs_configuration_camera->target, slugs_configuration_camera->idOrder, slugs_configuration_camera->order);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA, (const char *)slugs_configuration_camera, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_CRC);
#endif
}
#if MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_slugs_configuration_camera_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target, uint8_t idOrder, uint8_t order)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, target);
_mav_put_uint8_t(buf, 1, idOrder);
_mav_put_uint8_t(buf, 2, order);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA, buf, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_CRC);
#else
mavlink_slugs_configuration_camera_t *packet = (mavlink_slugs_configuration_camera_t *)msgbuf;
packet->target = target;
packet->idOrder = idOrder;
packet->order = order;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA, (const char *)packet, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_MIN_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_CRC);
#endif
}
#endif
#endif
// MESSAGE SLUGS_CONFIGURATION_CAMERA UNPACKING
/**
* @brief Get field target from slugs_configuration_camera message
*
* @return The system setting the commands
*/
static inline uint8_t mavlink_msg_slugs_configuration_camera_get_target(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field idOrder from slugs_configuration_camera message
*
* @return ID 0: brightness 1: aperture 2: iris 3: ICR 4: backlight
*/
static inline uint8_t mavlink_msg_slugs_configuration_camera_get_idOrder(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field order from slugs_configuration_camera message
*
* @return 1: up/on 2: down/off 3: auto/reset/no action
*/
static inline uint8_t mavlink_msg_slugs_configuration_camera_get_order(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Decode a slugs_configuration_camera message into a struct
*
* @param msg The message to decode
* @param slugs_configuration_camera C-struct to decode the message contents into
*/
static inline void mavlink_msg_slugs_configuration_camera_decode(const mavlink_message_t* msg, mavlink_slugs_configuration_camera_t* slugs_configuration_camera)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
slugs_configuration_camera->target = mavlink_msg_slugs_configuration_camera_get_target(msg);
slugs_configuration_camera->idOrder = mavlink_msg_slugs_configuration_camera_get_idOrder(msg);
slugs_configuration_camera->order = mavlink_msg_slugs_configuration_camera_get_order(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN? msg->len : MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN;
memset(slugs_configuration_camera, 0, MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_LEN);
memcpy(slugs_configuration_camera, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE SLUGS_MOBILE_LOCATION PACKING
#define MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION 186
typedef struct __mavlink_slugs_mobile_location_t {
float latitude; /*< [deg] Mobile Latitude*/
float longitude; /*< [deg] Mobile Longitude*/
uint8_t target; /*< The system reporting the action*/
} mavlink_slugs_mobile_location_t;
#define MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN 9
#define MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_MIN_LEN 9
#define MAVLINK_MSG_ID_186_LEN 9
#define MAVLINK_MSG_ID_186_MIN_LEN 9
#define MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_CRC 101
#define MAVLINK_MSG_ID_186_CRC 101
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_SLUGS_MOBILE_LOCATION { \
186, \
"SLUGS_MOBILE_LOCATION", \
3, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_slugs_mobile_location_t, target) }, \
{ "latitude", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_slugs_mobile_location_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_slugs_mobile_location_t, longitude) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_SLUGS_MOBILE_LOCATION { \
"SLUGS_MOBILE_LOCATION", \
3, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_slugs_mobile_location_t, target) }, \
{ "latitude", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_slugs_mobile_location_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_slugs_mobile_location_t, longitude) }, \
} \
}
#endif
/**
* @brief Pack a slugs_mobile_location 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 reporting the action
* @param latitude [deg] Mobile Latitude
* @param longitude [deg] Mobile Longitude
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_slugs_mobile_location_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target, float latitude, float longitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN];
_mav_put_float(buf, 0, latitude);
_mav_put_float(buf, 4, longitude);
_mav_put_uint8_t(buf, 8, target);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN);
#else
mavlink_slugs_mobile_location_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.target = target;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_CRC);
}
/**
* @brief Pack a slugs_mobile_location 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param target The system reporting the action
* @param latitude [deg] Mobile Latitude
* @param longitude [deg] Mobile Longitude
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_slugs_mobile_location_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target,float latitude,float longitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN];
_mav_put_float(buf, 0, latitude);
_mav_put_float(buf, 4, longitude);
_mav_put_uint8_t(buf, 8, target);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN);
#else
mavlink_slugs_mobile_location_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.target = target;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_CRC);
}
/**
* @brief Encode a slugs_mobile_location struct
*
* @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 slugs_mobile_location C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_slugs_mobile_location_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_slugs_mobile_location_t* slugs_mobile_location)
{
return mavlink_msg_slugs_mobile_location_pack(system_id, component_id, msg, slugs_mobile_location->target, slugs_mobile_location->latitude, slugs_mobile_location->longitude);
}
/**
* @brief Encode a slugs_mobile_location struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param slugs_mobile_location C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_slugs_mobile_location_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_slugs_mobile_location_t* slugs_mobile_location)
{
return mavlink_msg_slugs_mobile_location_pack_chan(system_id, component_id, chan, msg, slugs_mobile_location->target, slugs_mobile_location->latitude, slugs_mobile_location->longitude);
}
/**
* @brief Send a slugs_mobile_location message
* @param chan MAVLink channel to send the message
*
* @param target The system reporting the action
* @param latitude [deg] Mobile Latitude
* @param longitude [deg] Mobile Longitude
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_slugs_mobile_location_send(mavlink_channel_t chan, uint8_t target, float latitude, float longitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN];
_mav_put_float(buf, 0, latitude);
_mav_put_float(buf, 4, longitude);
_mav_put_uint8_t(buf, 8, target);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION, buf, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_CRC);
#else
mavlink_slugs_mobile_location_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.target = target;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION, (const char *)&packet, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_CRC);
#endif
}
/**
* @brief Send a slugs_mobile_location message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_slugs_mobile_location_send_struct(mavlink_channel_t chan, const mavlink_slugs_mobile_location_t* slugs_mobile_location)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_slugs_mobile_location_send(chan, slugs_mobile_location->target, slugs_mobile_location->latitude, slugs_mobile_location->longitude);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION, (const char *)slugs_mobile_location, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_CRC);
#endif
}
#if MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_slugs_mobile_location_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target, float latitude, float longitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_float(buf, 0, latitude);
_mav_put_float(buf, 4, longitude);
_mav_put_uint8_t(buf, 8, target);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION, buf, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_CRC);
#else
mavlink_slugs_mobile_location_t *packet = (mavlink_slugs_mobile_location_t *)msgbuf;
packet->latitude = latitude;
packet->longitude = longitude;
packet->target = target;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION, (const char *)packet, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_CRC);
#endif
}
#endif
#endif
// MESSAGE SLUGS_MOBILE_LOCATION UNPACKING
/**
* @brief Get field target from slugs_mobile_location message
*
* @return The system reporting the action
*/
static inline uint8_t mavlink_msg_slugs_mobile_location_get_target(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
}
/**
* @brief Get field latitude from slugs_mobile_location message
*
* @return [deg] Mobile Latitude
*/
static inline float mavlink_msg_slugs_mobile_location_get_latitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field longitude from slugs_mobile_location message
*
* @return [deg] Mobile Longitude
*/
static inline float mavlink_msg_slugs_mobile_location_get_longitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Decode a slugs_mobile_location message into a struct
*
* @param msg The message to decode
* @param slugs_mobile_location C-struct to decode the message contents into
*/
static inline void mavlink_msg_slugs_mobile_location_decode(const mavlink_message_t* msg, mavlink_slugs_mobile_location_t* slugs_mobile_location)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
slugs_mobile_location->latitude = mavlink_msg_slugs_mobile_location_get_latitude(msg);
slugs_mobile_location->longitude = mavlink_msg_slugs_mobile_location_get_longitude(msg);
slugs_mobile_location->target = mavlink_msg_slugs_mobile_location_get_target(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN? msg->len : MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN;
memset(slugs_mobile_location, 0, MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_LEN);
memcpy(slugs_mobile_location, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE SLUGS_NAVIGATION PACKING
#define MAVLINK_MSG_ID_SLUGS_NAVIGATION 176
typedef struct __mavlink_slugs_navigation_t {
float u_m; /*< [m/s] Measured Airspeed prior to the nav filter*/
float phi_c; /*< Commanded Roll*/
float theta_c; /*< Commanded Pitch*/
float psiDot_c; /*< Commanded Turn rate*/
float ay_body; /*< Y component of the body acceleration*/
float totalDist; /*< Total Distance to Run on this leg of Navigation*/
float dist2Go; /*< Remaining distance to Run on this leg of Navigation*/
uint16_t h_c; /*< [dm] Commanded altitude (MSL)*/
uint8_t fromWP; /*< Origin WP*/
uint8_t toWP; /*< Destination WP*/
} mavlink_slugs_navigation_t;
#define MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN 32
#define MAVLINK_MSG_ID_SLUGS_NAVIGATION_MIN_LEN 32
#define MAVLINK_MSG_ID_176_LEN 32
#define MAVLINK_MSG_ID_176_MIN_LEN 32
#define MAVLINK_MSG_ID_SLUGS_NAVIGATION_CRC 228
#define MAVLINK_MSG_ID_176_CRC 228
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_SLUGS_NAVIGATION { \
176, \
"SLUGS_NAVIGATION", \
10, \
{ { "u_m", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_slugs_navigation_t, u_m) }, \
{ "phi_c", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_slugs_navigation_t, phi_c) }, \
{ "theta_c", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_slugs_navigation_t, theta_c) }, \
{ "psiDot_c", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_slugs_navigation_t, psiDot_c) }, \
{ "ay_body", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_slugs_navigation_t, ay_body) }, \
{ "totalDist", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_slugs_navigation_t, totalDist) }, \
{ "dist2Go", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_slugs_navigation_t, dist2Go) }, \
{ "fromWP", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_slugs_navigation_t, fromWP) }, \
{ "toWP", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_slugs_navigation_t, toWP) }, \
{ "h_c", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_slugs_navigation_t, h_c) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_SLUGS_NAVIGATION { \
"SLUGS_NAVIGATION", \
10, \
{ { "u_m", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_slugs_navigation_t, u_m) }, \
{ "phi_c", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_slugs_navigation_t, phi_c) }, \
{ "theta_c", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_slugs_navigation_t, theta_c) }, \
{ "psiDot_c", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_slugs_navigation_t, psiDot_c) }, \
{ "ay_body", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_slugs_navigation_t, ay_body) }, \
{ "totalDist", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_slugs_navigation_t, totalDist) }, \
{ "dist2Go", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_slugs_navigation_t, dist2Go) }, \
{ "fromWP", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_slugs_navigation_t, fromWP) }, \
{ "toWP", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_slugs_navigation_t, toWP) }, \
{ "h_c", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_slugs_navigation_t, h_c) }, \
} \
}
#endif
/**
* @brief Pack a slugs_navigation 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 u_m [m/s] Measured Airspeed prior to the nav filter
* @param phi_c Commanded Roll
* @param theta_c Commanded Pitch
* @param psiDot_c Commanded Turn rate
* @param ay_body Y component of the body acceleration
* @param totalDist Total Distance to Run on this leg of Navigation
* @param dist2Go Remaining distance to Run on this leg of Navigation
* @param fromWP Origin WP
* @param toWP Destination WP
* @param h_c [dm] Commanded altitude (MSL)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_slugs_navigation_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
float u_m, float phi_c, float theta_c, float psiDot_c, float ay_body, float totalDist, float dist2Go, uint8_t fromWP, uint8_t toWP, uint16_t h_c)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN];
_mav_put_float(buf, 0, u_m);
_mav_put_float(buf, 4, phi_c);
_mav_put_float(buf, 8, theta_c);
_mav_put_float(buf, 12, psiDot_c);
_mav_put_float(buf, 16, ay_body);
_mav_put_float(buf, 20, totalDist);
_mav_put_float(buf, 24, dist2Go);
_mav_put_uint16_t(buf, 28, h_c);
_mav_put_uint8_t(buf, 30, fromWP);
_mav_put_uint8_t(buf, 31, toWP);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN);
#else
mavlink_slugs_navigation_t packet;
packet.u_m = u_m;
packet.phi_c = phi_c;
packet.theta_c = theta_c;
packet.psiDot_c = psiDot_c;
packet.ay_body = ay_body;
packet.totalDist = totalDist;
packet.dist2Go = dist2Go;
packet.h_c = h_c;
packet.fromWP = fromWP;
packet.toWP = toWP;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SLUGS_NAVIGATION;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SLUGS_NAVIGATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_CRC);
}
/**
* @brief Pack a slugs_navigation 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param u_m [m/s] Measured Airspeed prior to the nav filter
* @param phi_c Commanded Roll
* @param theta_c Commanded Pitch
* @param psiDot_c Commanded Turn rate
* @param ay_body Y component of the body acceleration
* @param totalDist Total Distance to Run on this leg of Navigation
* @param dist2Go Remaining distance to Run on this leg of Navigation
* @param fromWP Origin WP
* @param toWP Destination WP
* @param h_c [dm] Commanded altitude (MSL)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_slugs_navigation_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
float u_m,float phi_c,float theta_c,float psiDot_c,float ay_body,float totalDist,float dist2Go,uint8_t fromWP,uint8_t toWP,uint16_t h_c)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN];
_mav_put_float(buf, 0, u_m);
_mav_put_float(buf, 4, phi_c);
_mav_put_float(buf, 8, theta_c);
_mav_put_float(buf, 12, psiDot_c);
_mav_put_float(buf, 16, ay_body);
_mav_put_float(buf, 20, totalDist);
_mav_put_float(buf, 24, dist2Go);
_mav_put_uint16_t(buf, 28, h_c);
_mav_put_uint8_t(buf, 30, fromWP);
_mav_put_uint8_t(buf, 31, toWP);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN);
#else
mavlink_slugs_navigation_t packet;
packet.u_m = u_m;
packet.phi_c = phi_c;
packet.theta_c = theta_c;
packet.psiDot_c = psiDot_c;
packet.ay_body = ay_body;
packet.totalDist = totalDist;
packet.dist2Go = dist2Go;
packet.h_c = h_c;
packet.fromWP = fromWP;
packet.toWP = toWP;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SLUGS_NAVIGATION;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SLUGS_NAVIGATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_CRC);
}
/**
* @brief Encode a slugs_navigation struct
*
* @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 slugs_navigation C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_slugs_navigation_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_slugs_navigation_t* slugs_navigation)
{
return mavlink_msg_slugs_navigation_pack(system_id, component_id, msg, slugs_navigation->u_m, slugs_navigation->phi_c, slugs_navigation->theta_c, slugs_navigation->psiDot_c, slugs_navigation->ay_body, slugs_navigation->totalDist, slugs_navigation->dist2Go, slugs_navigation->fromWP, slugs_navigation->toWP, slugs_navigation->h_c);
}
/**
* @brief Encode a slugs_navigation struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param slugs_navigation C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_slugs_navigation_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_slugs_navigation_t* slugs_navigation)
{
return mavlink_msg_slugs_navigation_pack_chan(system_id, component_id, chan, msg, slugs_navigation->u_m, slugs_navigation->phi_c, slugs_navigation->theta_c, slugs_navigation->psiDot_c, slugs_navigation->ay_body, slugs_navigation->totalDist, slugs_navigation->dist2Go, slugs_navigation->fromWP, slugs_navigation->toWP, slugs_navigation->h_c);
}
/**
* @brief Send a slugs_navigation message
* @param chan MAVLink channel to send the message
*
* @param u_m [m/s] Measured Airspeed prior to the nav filter
* @param phi_c Commanded Roll
* @param theta_c Commanded Pitch
* @param psiDot_c Commanded Turn rate
* @param ay_body Y component of the body acceleration
* @param totalDist Total Distance to Run on this leg of Navigation
* @param dist2Go Remaining distance to Run on this leg of Navigation
* @param fromWP Origin WP
* @param toWP Destination WP
* @param h_c [dm] Commanded altitude (MSL)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_slugs_navigation_send(mavlink_channel_t chan, float u_m, float phi_c, float theta_c, float psiDot_c, float ay_body, float totalDist, float dist2Go, uint8_t fromWP, uint8_t toWP, uint16_t h_c)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN];
_mav_put_float(buf, 0, u_m);
_mav_put_float(buf, 4, phi_c);
_mav_put_float(buf, 8, theta_c);
_mav_put_float(buf, 12, psiDot_c);
_mav_put_float(buf, 16, ay_body);
_mav_put_float(buf, 20, totalDist);
_mav_put_float(buf, 24, dist2Go);
_mav_put_uint16_t(buf, 28, h_c);
_mav_put_uint8_t(buf, 30, fromWP);
_mav_put_uint8_t(buf, 31, toWP);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_NAVIGATION, buf, MAVLINK_MSG_ID_SLUGS_NAVIGATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_CRC);
#else
mavlink_slugs_navigation_t packet;
packet.u_m = u_m;
packet.phi_c = phi_c;
packet.theta_c = theta_c;
packet.psiDot_c = psiDot_c;
packet.ay_body = ay_body;
packet.totalDist = totalDist;
packet.dist2Go = dist2Go;
packet.h_c = h_c;
packet.fromWP = fromWP;
packet.toWP = toWP;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_NAVIGATION, (const char *)&packet, MAVLINK_MSG_ID_SLUGS_NAVIGATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_CRC);
#endif
}
/**
* @brief Send a slugs_navigation message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_slugs_navigation_send_struct(mavlink_channel_t chan, const mavlink_slugs_navigation_t* slugs_navigation)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_slugs_navigation_send(chan, slugs_navigation->u_m, slugs_navigation->phi_c, slugs_navigation->theta_c, slugs_navigation->psiDot_c, slugs_navigation->ay_body, slugs_navigation->totalDist, slugs_navigation->dist2Go, slugs_navigation->fromWP, slugs_navigation->toWP, slugs_navigation->h_c);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_NAVIGATION, (const char *)slugs_navigation, MAVLINK_MSG_ID_SLUGS_NAVIGATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_CRC);
#endif
}
#if MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_slugs_navigation_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float u_m, float phi_c, float theta_c, float psiDot_c, float ay_body, float totalDist, float dist2Go, uint8_t fromWP, uint8_t toWP, uint16_t h_c)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_float(buf, 0, u_m);
_mav_put_float(buf, 4, phi_c);
_mav_put_float(buf, 8, theta_c);
_mav_put_float(buf, 12, psiDot_c);
_mav_put_float(buf, 16, ay_body);
_mav_put_float(buf, 20, totalDist);
_mav_put_float(buf, 24, dist2Go);
_mav_put_uint16_t(buf, 28, h_c);
_mav_put_uint8_t(buf, 30, fromWP);
_mav_put_uint8_t(buf, 31, toWP);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_NAVIGATION, buf, MAVLINK_MSG_ID_SLUGS_NAVIGATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_CRC);
#else
mavlink_slugs_navigation_t *packet = (mavlink_slugs_navigation_t *)msgbuf;
packet->u_m = u_m;
packet->phi_c = phi_c;
packet->theta_c = theta_c;
packet->psiDot_c = psiDot_c;
packet->ay_body = ay_body;
packet->totalDist = totalDist;
packet->dist2Go = dist2Go;
packet->h_c = h_c;
packet->fromWP = fromWP;
packet->toWP = toWP;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SLUGS_NAVIGATION, (const char *)packet, MAVLINK_MSG_ID_SLUGS_NAVIGATION_MIN_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN, MAVLINK_MSG_ID_SLUGS_NAVIGATION_CRC);
#endif
}
#endif
#endif
// MESSAGE SLUGS_NAVIGATION UNPACKING
/**
* @brief Get field u_m from slugs_navigation message
*
* @return [m/s] Measured Airspeed prior to the nav filter
*/
static inline float mavlink_msg_slugs_navigation_get_u_m(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field phi_c from slugs_navigation message
*
* @return Commanded Roll
*/
static inline float mavlink_msg_slugs_navigation_get_phi_c(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field theta_c from slugs_navigation message
*
* @return Commanded Pitch
*/
static inline float mavlink_msg_slugs_navigation_get_theta_c(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field psiDot_c from slugs_navigation message
*
* @return Commanded Turn rate
*/
static inline float mavlink_msg_slugs_navigation_get_psiDot_c(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field ay_body from slugs_navigation message
*
* @return Y component of the body acceleration
*/
static inline float mavlink_msg_slugs_navigation_get_ay_body(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field totalDist from slugs_navigation message
*
* @return Total Distance to Run on this leg of Navigation
*/
static inline float mavlink_msg_slugs_navigation_get_totalDist(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Get field dist2Go from slugs_navigation message
*
* @return Remaining distance to Run on this leg of Navigation
*/
static inline float mavlink_msg_slugs_navigation_get_dist2Go(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
/**
* @brief Get field fromWP from slugs_navigation message
*
* @return Origin WP
*/
static inline uint8_t mavlink_msg_slugs_navigation_get_fromWP(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 30);
}
/**
* @brief Get field toWP from slugs_navigation message
*
* @return Destination WP
*/
static inline uint8_t mavlink_msg_slugs_navigation_get_toWP(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 31);
}
/**
* @brief Get field h_c from slugs_navigation message
*
* @return [dm] Commanded altitude (MSL)
*/
static inline uint16_t mavlink_msg_slugs_navigation_get_h_c(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 28);
}
/**
* @brief Decode a slugs_navigation message into a struct
*
* @param msg The message to decode
* @param slugs_navigation C-struct to decode the message contents into
*/
static inline void mavlink_msg_slugs_navigation_decode(const mavlink_message_t* msg, mavlink_slugs_navigation_t* slugs_navigation)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
slugs_navigation->u_m = mavlink_msg_slugs_navigation_get_u_m(msg);
slugs_navigation->phi_c = mavlink_msg_slugs_navigation_get_phi_c(msg);
slugs_navigation->theta_c = mavlink_msg_slugs_navigation_get_theta_c(msg);
slugs_navigation->psiDot_c = mavlink_msg_slugs_navigation_get_psiDot_c(msg);
slugs_navigation->ay_body = mavlink_msg_slugs_navigation_get_ay_body(msg);
slugs_navigation->totalDist = mavlink_msg_slugs_navigation_get_totalDist(msg);
slugs_navigation->dist2Go = mavlink_msg_slugs_navigation_get_dist2Go(msg);
slugs_navigation->h_c = mavlink_msg_slugs_navigation_get_h_c(msg);
slugs_navigation->fromWP = mavlink_msg_slugs_navigation_get_fromWP(msg);
slugs_navigation->toWP = mavlink_msg_slugs_navigation_get_toWP(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN? msg->len : MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN;
memset(slugs_navigation, 0, MAVLINK_MSG_ID_SLUGS_NAVIGATION_LEN);
memcpy(slugs_navigation, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE STATUS_GPS PACKING
#define MAVLINK_MSG_ID_STATUS_GPS 194
typedef struct __mavlink_status_gps_t {
float magVar; /*< [deg] Magnetic variation*/
uint16_t csFails; /*< Number of times checksum has failed*/
uint8_t gpsQuality; /*< The quality indicator, 0=fix not available or invalid, 1=GPS fix, 2=C/A differential GPS, 6=Dead reckoning mode, 7=Manual input mode (fixed position), 8=Simulator mode, 9= WAAS a*/
uint8_t msgsType; /*< Indicates if GN, GL or GP messages are being received*/
uint8_t posStatus; /*< A = data valid, V = data invalid*/
int8_t magDir; /*< Magnetic variation direction E/W. Easterly variation (E) subtracts from True course and Westerly variation (W) adds to True course*/
uint8_t modeInd; /*< Positioning system mode indicator. A - Autonomous;D-Differential; E-Estimated (dead reckoning) mode;M-Manual input; N-Data not valid*/
} mavlink_status_gps_t;
#define MAVLINK_MSG_ID_STATUS_GPS_LEN 11
#define MAVLINK_MSG_ID_STATUS_GPS_MIN_LEN 11
#define MAVLINK_MSG_ID_194_LEN 11
#define MAVLINK_MSG_ID_194_MIN_LEN 11
#define MAVLINK_MSG_ID_STATUS_GPS_CRC 51
#define MAVLINK_MSG_ID_194_CRC 51
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_STATUS_GPS { \
194, \
"STATUS_GPS", \
7, \
{ { "csFails", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_status_gps_t, csFails) }, \
{ "gpsQuality", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_status_gps_t, gpsQuality) }, \
{ "msgsType", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_status_gps_t, msgsType) }, \
{ "posStatus", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_status_gps_t, posStatus) }, \
{ "magVar", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_status_gps_t, magVar) }, \
{ "magDir", NULL, MAVLINK_TYPE_INT8_T, 0, 9, offsetof(mavlink_status_gps_t, magDir) }, \
{ "modeInd", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_status_gps_t, modeInd) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_STATUS_GPS { \
"STATUS_GPS", \
7, \
{ { "csFails", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_status_gps_t, csFails) }, \
{ "gpsQuality", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_status_gps_t, gpsQuality) }, \
{ "msgsType", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_status_gps_t, msgsType) }, \
{ "posStatus", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_status_gps_t, posStatus) }, \
{ "magVar", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_status_gps_t, magVar) }, \
{ "magDir", NULL, MAVLINK_TYPE_INT8_T, 0, 9, offsetof(mavlink_status_gps_t, magDir) }, \
{ "modeInd", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_status_gps_t, modeInd) }, \
} \
}
#endif
/**
* @brief Pack a status_gps 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 csFails Number of times checksum has failed
* @param gpsQuality The quality indicator, 0=fix not available or invalid, 1=GPS fix, 2=C/A differential GPS, 6=Dead reckoning mode, 7=Manual input mode (fixed position), 8=Simulator mode, 9= WAAS a
* @param msgsType Indicates if GN, GL or GP messages are being received
* @param posStatus A = data valid, V = data invalid
* @param magVar [deg] Magnetic variation
* @param magDir Magnetic variation direction E/W. Easterly variation (E) subtracts from True course and Westerly variation (W) adds to True course
* @param modeInd Positioning system mode indicator. A - Autonomous;D-Differential; E-Estimated (dead reckoning) mode;M-Manual input; N-Data not valid
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_status_gps_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint16_t csFails, uint8_t gpsQuality, uint8_t msgsType, uint8_t posStatus, float magVar, int8_t magDir, uint8_t modeInd)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_STATUS_GPS_LEN];
_mav_put_float(buf, 0, magVar);
_mav_put_uint16_t(buf, 4, csFails);
_mav_put_uint8_t(buf, 6, gpsQuality);
_mav_put_uint8_t(buf, 7, msgsType);
_mav_put_uint8_t(buf, 8, posStatus);
_mav_put_int8_t(buf, 9, magDir);
_mav_put_uint8_t(buf, 10, modeInd);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STATUS_GPS_LEN);
#else
mavlink_status_gps_t packet;
packet.magVar = magVar;
packet.csFails = csFails;
packet.gpsQuality = gpsQuality;
packet.msgsType = msgsType;
packet.posStatus = posStatus;
packet.magDir = magDir;
packet.modeInd = modeInd;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STATUS_GPS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_STATUS_GPS;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_STATUS_GPS_MIN_LEN, MAVLINK_MSG_ID_STATUS_GPS_LEN, MAVLINK_MSG_ID_STATUS_GPS_CRC);
}
/**
* @brief Pack a status_gps 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param csFails Number of times checksum has failed
* @param gpsQuality The quality indicator, 0=fix not available or invalid, 1=GPS fix, 2=C/A differential GPS, 6=Dead reckoning mode, 7=Manual input mode (fixed position), 8=Simulator mode, 9= WAAS a
* @param msgsType Indicates if GN, GL or GP messages are being received
* @param posStatus A = data valid, V = data invalid
* @param magVar [deg] Magnetic variation
* @param magDir Magnetic variation direction E/W. Easterly variation (E) subtracts from True course and Westerly variation (W) adds to True course
* @param modeInd Positioning system mode indicator. A - Autonomous;D-Differential; E-Estimated (dead reckoning) mode;M-Manual input; N-Data not valid
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_status_gps_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint16_t csFails,uint8_t gpsQuality,uint8_t msgsType,uint8_t posStatus,float magVar,int8_t magDir,uint8_t modeInd)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_STATUS_GPS_LEN];
_mav_put_float(buf, 0, magVar);
_mav_put_uint16_t(buf, 4, csFails);
_mav_put_uint8_t(buf, 6, gpsQuality);
_mav_put_uint8_t(buf, 7, msgsType);
_mav_put_uint8_t(buf, 8, posStatus);
_mav_put_int8_t(buf, 9, magDir);
_mav_put_uint8_t(buf, 10, modeInd);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STATUS_GPS_LEN);
#else
mavlink_status_gps_t packet;
packet.magVar = magVar;
packet.csFails = csFails;
packet.gpsQuality = gpsQuality;
packet.msgsType = msgsType;
packet.posStatus = posStatus;
packet.magDir = magDir;
packet.modeInd = modeInd;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STATUS_GPS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_STATUS_GPS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_STATUS_GPS_MIN_LEN, MAVLINK_MSG_ID_STATUS_GPS_LEN, MAVLINK_MSG_ID_STATUS_GPS_CRC);
}
/**
* @brief Encode a status_gps struct
*
* @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 status_gps C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_status_gps_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_status_gps_t* status_gps)
{
return mavlink_msg_status_gps_pack(system_id, component_id, msg, status_gps->csFails, status_gps->gpsQuality, status_gps->msgsType, status_gps->posStatus, status_gps->magVar, status_gps->magDir, status_gps->modeInd);
}
/**
* @brief Encode a status_gps struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param status_gps C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_status_gps_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_status_gps_t* status_gps)
{
return mavlink_msg_status_gps_pack_chan(system_id, component_id, chan, msg, status_gps->csFails, status_gps->gpsQuality, status_gps->msgsType, status_gps->posStatus, status_gps->magVar, status_gps->magDir, status_gps->modeInd);
}
/**
* @brief Send a status_gps message
* @param chan MAVLink channel to send the message
*
* @param csFails Number of times checksum has failed
* @param gpsQuality The quality indicator, 0=fix not available or invalid, 1=GPS fix, 2=C/A differential GPS, 6=Dead reckoning mode, 7=Manual input mode (fixed position), 8=Simulator mode, 9= WAAS a
* @param msgsType Indicates if GN, GL or GP messages are being received
* @param posStatus A = data valid, V = data invalid
* @param magVar [deg] Magnetic variation
* @param magDir Magnetic variation direction E/W. Easterly variation (E) subtracts from True course and Westerly variation (W) adds to True course
* @param modeInd Positioning system mode indicator. A - Autonomous;D-Differential; E-Estimated (dead reckoning) mode;M-Manual input; N-Data not valid
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_status_gps_send(mavlink_channel_t chan, uint16_t csFails, uint8_t gpsQuality, uint8_t msgsType, uint8_t posStatus, float magVar, int8_t magDir, uint8_t modeInd)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_STATUS_GPS_LEN];
_mav_put_float(buf, 0, magVar);
_mav_put_uint16_t(buf, 4, csFails);
_mav_put_uint8_t(buf, 6, gpsQuality);
_mav_put_uint8_t(buf, 7, msgsType);
_mav_put_uint8_t(buf, 8, posStatus);
_mav_put_int8_t(buf, 9, magDir);
_mav_put_uint8_t(buf, 10, modeInd);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATUS_GPS, buf, MAVLINK_MSG_ID_STATUS_GPS_MIN_LEN, MAVLINK_MSG_ID_STATUS_GPS_LEN, MAVLINK_MSG_ID_STATUS_GPS_CRC);
#else
mavlink_status_gps_t packet;
packet.magVar = magVar;
packet.csFails = csFails;
packet.gpsQuality = gpsQuality;
packet.msgsType = msgsType;
packet.posStatus = posStatus;
packet.magDir = magDir;
packet.modeInd = modeInd;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATUS_GPS, (const char *)&packet, MAVLINK_MSG_ID_STATUS_GPS_MIN_LEN, MAVLINK_MSG_ID_STATUS_GPS_LEN, MAVLINK_MSG_ID_STATUS_GPS_CRC);
#endif
}
/**
* @brief Send a status_gps message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_status_gps_send_struct(mavlink_channel_t chan, const mavlink_status_gps_t* status_gps)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_status_gps_send(chan, status_gps->csFails, status_gps->gpsQuality, status_gps->msgsType, status_gps->posStatus, status_gps->magVar, status_gps->magDir, status_gps->modeInd);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATUS_GPS, (const char *)status_gps, MAVLINK_MSG_ID_STATUS_GPS_MIN_LEN, MAVLINK_MSG_ID_STATUS_GPS_LEN, MAVLINK_MSG_ID_STATUS_GPS_CRC);
#endif
}
#if MAVLINK_MSG_ID_STATUS_GPS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_status_gps_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t csFails, uint8_t gpsQuality, uint8_t msgsType, uint8_t posStatus, float magVar, int8_t magDir, uint8_t modeInd)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_float(buf, 0, magVar);
_mav_put_uint16_t(buf, 4, csFails);
_mav_put_uint8_t(buf, 6, gpsQuality);
_mav_put_uint8_t(buf, 7, msgsType);
_mav_put_uint8_t(buf, 8, posStatus);
_mav_put_int8_t(buf, 9, magDir);
_mav_put_uint8_t(buf, 10, modeInd);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATUS_GPS, buf, MAVLINK_MSG_ID_STATUS_GPS_MIN_LEN, MAVLINK_MSG_ID_STATUS_GPS_LEN, MAVLINK_MSG_ID_STATUS_GPS_CRC);
#else
mavlink_status_gps_t *packet = (mavlink_status_gps_t *)msgbuf;
packet->magVar = magVar;
packet->csFails = csFails;
packet->gpsQuality = gpsQuality;
packet->msgsType = msgsType;
packet->posStatus = posStatus;
packet->magDir = magDir;
packet->modeInd = modeInd;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATUS_GPS, (const char *)packet, MAVLINK_MSG_ID_STATUS_GPS_MIN_LEN, MAVLINK_MSG_ID_STATUS_GPS_LEN, MAVLINK_MSG_ID_STATUS_GPS_CRC);
#endif
}
#endif
#endif
// MESSAGE STATUS_GPS UNPACKING
/**
* @brief Get field csFails from status_gps message
*
* @return Number of times checksum has failed
*/
static inline uint16_t mavlink_msg_status_gps_get_csFails(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 4);
}
/**
* @brief Get field gpsQuality from status_gps message
*
* @return The quality indicator, 0=fix not available or invalid, 1=GPS fix, 2=C/A differential GPS, 6=Dead reckoning mode, 7=Manual input mode (fixed position), 8=Simulator mode, 9= WAAS a
*/
static inline uint8_t mavlink_msg_status_gps_get_gpsQuality(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 6);
}
/**
* @brief Get field msgsType from status_gps message
*
* @return Indicates if GN, GL or GP messages are being received
*/
static inline uint8_t mavlink_msg_status_gps_get_msgsType(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 7);
}
/**
* @brief Get field posStatus from status_gps message
*
* @return A = data valid, V = data invalid
*/
static inline uint8_t mavlink_msg_status_gps_get_posStatus(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
}
/**
* @brief Get field magVar from status_gps message
*
* @return [deg] Magnetic variation
*/
static inline float mavlink_msg_status_gps_get_magVar(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field magDir from status_gps message
*
* @return Magnetic variation direction E/W. Easterly variation (E) subtracts from True course and Westerly variation (W) adds to True course
*/
static inline int8_t mavlink_msg_status_gps_get_magDir(const mavlink_message_t* msg)
{
return _MAV_RETURN_int8_t(msg, 9);
}
/**
* @brief Get field modeInd from status_gps message
*
* @return Positioning system mode indicator. A - Autonomous;D-Differential; E-Estimated (dead reckoning) mode;M-Manual input; N-Data not valid
*/
static inline uint8_t mavlink_msg_status_gps_get_modeInd(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 10);
}
/**
* @brief Decode a status_gps message into a struct
*
* @param msg The message to decode
* @param status_gps C-struct to decode the message contents into
*/
static inline void mavlink_msg_status_gps_decode(const mavlink_message_t* msg, mavlink_status_gps_t* status_gps)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
status_gps->magVar = mavlink_msg_status_gps_get_magVar(msg);
status_gps->csFails = mavlink_msg_status_gps_get_csFails(msg);
status_gps->gpsQuality = mavlink_msg_status_gps_get_gpsQuality(msg);
status_gps->msgsType = mavlink_msg_status_gps_get_msgsType(msg);
status_gps->posStatus = mavlink_msg_status_gps_get_posStatus(msg);
status_gps->magDir = mavlink_msg_status_gps_get_magDir(msg);
status_gps->modeInd = mavlink_msg_status_gps_get_modeInd(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_STATUS_GPS_LEN? msg->len : MAVLINK_MSG_ID_STATUS_GPS_LEN;
memset(status_gps, 0, MAVLINK_MSG_ID_STATUS_GPS_LEN);
memcpy(status_gps, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE UAV_STATUS PACKING
#define MAVLINK_MSG_ID_UAV_STATUS 193
typedef struct __mavlink_uav_status_t {
float latitude; /*< [deg] Latitude UAV*/
float longitude; /*< [deg] Longitude UAV*/
float altitude; /*< [m] Altitude UAV*/
float speed; /*< [m/s] Speed UAV*/
float course; /*< Course UAV*/
uint8_t target; /*< The ID system reporting the action*/
} mavlink_uav_status_t;
#define MAVLINK_MSG_ID_UAV_STATUS_LEN 21
#define MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN 21
#define MAVLINK_MSG_ID_193_LEN 21
#define MAVLINK_MSG_ID_193_MIN_LEN 21
#define MAVLINK_MSG_ID_UAV_STATUS_CRC 160
#define MAVLINK_MSG_ID_193_CRC 160
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_UAV_STATUS { \
193, \
"UAV_STATUS", \
6, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_uav_status_t, target) }, \
{ "latitude", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_uav_status_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_uav_status_t, longitude) }, \
{ "altitude", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_uav_status_t, altitude) }, \
{ "speed", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_uav_status_t, speed) }, \
{ "course", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_uav_status_t, course) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_UAV_STATUS { \
"UAV_STATUS", \
6, \
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_uav_status_t, target) }, \
{ "latitude", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_uav_status_t, latitude) }, \
{ "longitude", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_uav_status_t, longitude) }, \
{ "altitude", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_uav_status_t, altitude) }, \
{ "speed", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_uav_status_t, speed) }, \
{ "course", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_uav_status_t, course) }, \
} \
}
#endif
/**
* @brief Pack a uav_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 target The ID system reporting the action
* @param latitude [deg] Latitude UAV
* @param longitude [deg] Longitude UAV
* @param altitude [m] Altitude UAV
* @param speed [m/s] Speed UAV
* @param course Course UAV
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_uav_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target, float latitude, float longitude, float altitude, float speed, float course)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_UAV_STATUS_LEN];
_mav_put_float(buf, 0, latitude);
_mav_put_float(buf, 4, longitude);
_mav_put_float(buf, 8, altitude);
_mav_put_float(buf, 12, speed);
_mav_put_float(buf, 16, course);
_mav_put_uint8_t(buf, 20, target);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAV_STATUS_LEN);
#else
mavlink_uav_status_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.speed = speed;
packet.course = course;
packet.target = target;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAV_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_UAV_STATUS;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAV_STATUS_LEN, MAVLINK_MSG_ID_UAV_STATUS_CRC);
}
/**
* @brief Pack a uav_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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param target The ID system reporting the action
* @param latitude [deg] Latitude UAV
* @param longitude [deg] Longitude UAV
* @param altitude [m] Altitude UAV
* @param speed [m/s] Speed UAV
* @param course Course UAV
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_uav_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target,float latitude,float longitude,float altitude,float speed,float course)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_UAV_STATUS_LEN];
_mav_put_float(buf, 0, latitude);
_mav_put_float(buf, 4, longitude);
_mav_put_float(buf, 8, altitude);
_mav_put_float(buf, 12, speed);
_mav_put_float(buf, 16, course);
_mav_put_uint8_t(buf, 20, target);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAV_STATUS_LEN);
#else
mavlink_uav_status_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.speed = speed;
packet.course = course;
packet.target = target;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAV_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_UAV_STATUS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAV_STATUS_LEN, MAVLINK_MSG_ID_UAV_STATUS_CRC);
}
/**
* @brief Encode a uav_status struct
*
* @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 uav_status C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_uav_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_uav_status_t* uav_status)
{
return mavlink_msg_uav_status_pack(system_id, component_id, msg, uav_status->target, uav_status->latitude, uav_status->longitude, uav_status->altitude, uav_status->speed, uav_status->course);
}
/**
* @brief Encode a uav_status struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param uav_status C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_uav_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_uav_status_t* uav_status)
{
return mavlink_msg_uav_status_pack_chan(system_id, component_id, chan, msg, uav_status->target, uav_status->latitude, uav_status->longitude, uav_status->altitude, uav_status->speed, uav_status->course);
}
/**
* @brief Send a uav_status message
* @param chan MAVLink channel to send the message
*
* @param target The ID system reporting the action
* @param latitude [deg] Latitude UAV
* @param longitude [deg] Longitude UAV
* @param altitude [m] Altitude UAV
* @param speed [m/s] Speed UAV
* @param course Course UAV
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_uav_status_send(mavlink_channel_t chan, uint8_t target, float latitude, float longitude, float altitude, float speed, float course)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_UAV_STATUS_LEN];
_mav_put_float(buf, 0, latitude);
_mav_put_float(buf, 4, longitude);
_mav_put_float(buf, 8, altitude);
_mav_put_float(buf, 12, speed);
_mav_put_float(buf, 16, course);
_mav_put_uint8_t(buf, 20, target);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAV_STATUS, buf, MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAV_STATUS_LEN, MAVLINK_MSG_ID_UAV_STATUS_CRC);
#else
mavlink_uav_status_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
packet.speed = speed;
packet.course = course;
packet.target = target;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAV_STATUS, (const char *)&packet, MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAV_STATUS_LEN, MAVLINK_MSG_ID_UAV_STATUS_CRC);
#endif
}
/**
* @brief Send a uav_status message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_uav_status_send_struct(mavlink_channel_t chan, const mavlink_uav_status_t* uav_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_uav_status_send(chan, uav_status->target, uav_status->latitude, uav_status->longitude, uav_status->altitude, uav_status->speed, uav_status->course);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAV_STATUS, (const char *)uav_status, MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAV_STATUS_LEN, MAVLINK_MSG_ID_UAV_STATUS_CRC);
#endif
}
#if MAVLINK_MSG_ID_UAV_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_uav_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target, float latitude, float longitude, float altitude, float speed, float course)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_float(buf, 0, latitude);
_mav_put_float(buf, 4, longitude);
_mav_put_float(buf, 8, altitude);
_mav_put_float(buf, 12, speed);
_mav_put_float(buf, 16, course);
_mav_put_uint8_t(buf, 20, target);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAV_STATUS, buf, MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAV_STATUS_LEN, MAVLINK_MSG_ID_UAV_STATUS_CRC);
#else
mavlink_uav_status_t *packet = (mavlink_uav_status_t *)msgbuf;
packet->latitude = latitude;
packet->longitude = longitude;
packet->altitude = altitude;
packet->speed = speed;
packet->course = course;
packet->target = target;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAV_STATUS, (const char *)packet, MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAV_STATUS_LEN, MAVLINK_MSG_ID_UAV_STATUS_CRC);
#endif
}
#endif
#endif
// MESSAGE UAV_STATUS UNPACKING
/**
* @brief Get field target from uav_status message
*
* @return The ID system reporting the action
*/
static inline uint8_t mavlink_msg_uav_status_get_target(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 20);
}
/**
* @brief Get field latitude from uav_status message
*
* @return [deg] Latitude UAV
*/
static inline float mavlink_msg_uav_status_get_latitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field longitude from uav_status message
*
* @return [deg] Longitude UAV
*/
static inline float mavlink_msg_uav_status_get_longitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field altitude from uav_status message
*
* @return [m] Altitude UAV
*/
static inline float mavlink_msg_uav_status_get_altitude(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field speed from uav_status message
*
* @return [m/s] Speed UAV
*/
static inline float mavlink_msg_uav_status_get_speed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field course from uav_status message
*
* @return Course UAV
*/
static inline float mavlink_msg_uav_status_get_course(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Decode a uav_status message into a struct
*
* @param msg The message to decode
* @param uav_status C-struct to decode the message contents into
*/
static inline void mavlink_msg_uav_status_decode(const mavlink_message_t* msg, mavlink_uav_status_t* uav_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
uav_status->latitude = mavlink_msg_uav_status_get_latitude(msg);
uav_status->longitude = mavlink_msg_uav_status_get_longitude(msg);
uav_status->altitude = mavlink_msg_uav_status_get_altitude(msg);
uav_status->speed = mavlink_msg_uav_status_get_speed(msg);
uav_status->course = mavlink_msg_uav_status_get_course(msg);
uav_status->target = mavlink_msg_uav_status_get_target(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_UAV_STATUS_LEN? msg->len : MAVLINK_MSG_ID_UAV_STATUS_LEN;
memset(uav_status, 0, MAVLINK_MSG_ID_UAV_STATUS_LEN);
memcpy(uav_status, _MAV_PAYLOAD(msg), len);
#endif
}
#pragma once
// MESSAGE VOLT_SENSOR PACKING
#define MAVLINK_MSG_ID_VOLT_SENSOR 191
typedef struct __mavlink_volt_sensor_t {
uint16_t voltage; /*< Voltage in uS of PWM. 0 uS = 0V, 20 uS = 21.5V */
uint16_t reading2; /*< Depends on the value of r2Type (0) Current consumption in uS of PWM, 20 uS = 90Amp (1) Distance in cm (2) Distance in cm (3) Absolute value*/
uint8_t r2Type; /*< It is the value of reading 2: 0 - Current, 1 - Foreward Sonar, 2 - Back Sonar, 3 - RPM*/
} mavlink_volt_sensor_t;
#define MAVLINK_MSG_ID_VOLT_SENSOR_LEN 5
#define MAVLINK_MSG_ID_VOLT_SENSOR_MIN_LEN 5
#define MAVLINK_MSG_ID_191_LEN 5
#define MAVLINK_MSG_ID_191_MIN_LEN 5
#define MAVLINK_MSG_ID_VOLT_SENSOR_CRC 17
#define MAVLINK_MSG_ID_191_CRC 17
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_VOLT_SENSOR { \
191, \
"VOLT_SENSOR", \
3, \
{ { "r2Type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_volt_sensor_t, r2Type) }, \
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_volt_sensor_t, voltage) }, \
{ "reading2", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_volt_sensor_t, reading2) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_VOLT_SENSOR { \
"VOLT_SENSOR", \
3, \
{ { "r2Type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_volt_sensor_t, r2Type) }, \
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_volt_sensor_t, voltage) }, \
{ "reading2", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_volt_sensor_t, reading2) }, \
} \
}
#endif
/**
* @brief Pack a volt_sensor 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 r2Type It is the value of reading 2: 0 - Current, 1 - Foreward Sonar, 2 - Back Sonar, 3 - RPM
* @param voltage Voltage in uS of PWM. 0 uS = 0V, 20 uS = 21.5V
* @param reading2 Depends on the value of r2Type (0) Current consumption in uS of PWM, 20 uS = 90Amp (1) Distance in cm (2) Distance in cm (3) Absolute value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_volt_sensor_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t r2Type, uint16_t voltage, uint16_t reading2)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_VOLT_SENSOR_LEN];
_mav_put_uint16_t(buf, 0, voltage);
_mav_put_uint16_t(buf, 2, reading2);
_mav_put_uint8_t(buf, 4, r2Type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VOLT_SENSOR_LEN);
#else
mavlink_volt_sensor_t packet;
packet.voltage = voltage;
packet.reading2 = reading2;
packet.r2Type = r2Type;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VOLT_SENSOR_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_VOLT_SENSOR;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VOLT_SENSOR_MIN_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_CRC);
}
/**
* @brief Pack a volt_sensor 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param r2Type It is the value of reading 2: 0 - Current, 1 - Foreward Sonar, 2 - Back Sonar, 3 - RPM
* @param voltage Voltage in uS of PWM. 0 uS = 0V, 20 uS = 21.5V
* @param reading2 Depends on the value of r2Type (0) Current consumption in uS of PWM, 20 uS = 90Amp (1) Distance in cm (2) Distance in cm (3) Absolute value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_volt_sensor_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t r2Type,uint16_t voltage,uint16_t reading2)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_VOLT_SENSOR_LEN];
_mav_put_uint16_t(buf, 0, voltage);
_mav_put_uint16_t(buf, 2, reading2);
_mav_put_uint8_t(buf, 4, r2Type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VOLT_SENSOR_LEN);
#else
mavlink_volt_sensor_t packet;
packet.voltage = voltage;
packet.reading2 = reading2;
packet.r2Type = r2Type;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VOLT_SENSOR_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_VOLT_SENSOR;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_VOLT_SENSOR_MIN_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_CRC);
}
/**
* @brief Encode a volt_sensor struct
*
* @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 volt_sensor C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_volt_sensor_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_volt_sensor_t* volt_sensor)
{
return mavlink_msg_volt_sensor_pack(system_id, component_id, msg, volt_sensor->r2Type, volt_sensor->voltage, volt_sensor->reading2);
}
/**
* @brief Encode a volt_sensor struct 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 will be sent over
* @param msg The MAVLink message to compress the data into
* @param volt_sensor C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_volt_sensor_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_volt_sensor_t* volt_sensor)
{
return mavlink_msg_volt_sensor_pack_chan(system_id, component_id, chan, msg, volt_sensor->r2Type, volt_sensor->voltage, volt_sensor->reading2);
}
/**
* @brief Send a volt_sensor message
* @param chan MAVLink channel to send the message
*
* @param r2Type It is the value of reading 2: 0 - Current, 1 - Foreward Sonar, 2 - Back Sonar, 3 - RPM
* @param voltage Voltage in uS of PWM. 0 uS = 0V, 20 uS = 21.5V
* @param reading2 Depends on the value of r2Type (0) Current consumption in uS of PWM, 20 uS = 90Amp (1) Distance in cm (2) Distance in cm (3) Absolute value
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_volt_sensor_send(mavlink_channel_t chan, uint8_t r2Type, uint16_t voltage, uint16_t reading2)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_VOLT_SENSOR_LEN];
_mav_put_uint16_t(buf, 0, voltage);
_mav_put_uint16_t(buf, 2, reading2);
_mav_put_uint8_t(buf, 4, r2Type);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VOLT_SENSOR, buf, MAVLINK_MSG_ID_VOLT_SENSOR_MIN_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_CRC);
#else
mavlink_volt_sensor_t packet;
packet.voltage = voltage;
packet.reading2 = reading2;
packet.r2Type = r2Type;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VOLT_SENSOR, (const char *)&packet, MAVLINK_MSG_ID_VOLT_SENSOR_MIN_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_CRC);
#endif
}
/**
* @brief Send a volt_sensor message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_volt_sensor_send_struct(mavlink_channel_t chan, const mavlink_volt_sensor_t* volt_sensor)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_volt_sensor_send(chan, volt_sensor->r2Type, volt_sensor->voltage, volt_sensor->reading2);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VOLT_SENSOR, (const char *)volt_sensor, MAVLINK_MSG_ID_VOLT_SENSOR_MIN_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_CRC);
#endif
}
#if MAVLINK_MSG_ID_VOLT_SENSOR_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_volt_sensor_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t r2Type, uint16_t voltage, uint16_t reading2)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint16_t(buf, 0, voltage);
_mav_put_uint16_t(buf, 2, reading2);
_mav_put_uint8_t(buf, 4, r2Type);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VOLT_SENSOR, buf, MAVLINK_MSG_ID_VOLT_SENSOR_MIN_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_CRC);
#else
mavlink_volt_sensor_t *packet = (mavlink_volt_sensor_t *)msgbuf;
packet->voltage = voltage;
packet->reading2 = reading2;
packet->r2Type = r2Type;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VOLT_SENSOR, (const char *)packet, MAVLINK_MSG_ID_VOLT_SENSOR_MIN_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_LEN, MAVLINK_MSG_ID_VOLT_SENSOR_CRC);
#endif
}
#endif
#endif
// MESSAGE VOLT_SENSOR UNPACKING
/**
* @brief Get field r2Type from volt_sensor message
*
* @return It is the value of reading 2: 0 - Current, 1 - Foreward Sonar, 2 - Back Sonar, 3 - RPM
*/
static inline uint8_t mavlink_msg_volt_sensor_get_r2Type(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
/**
* @brief Get field voltage from volt_sensor message
*
* @return Voltage in uS of PWM. 0 uS = 0V, 20 uS = 21.5V
*/
static inline uint16_t mavlink_msg_volt_sensor_get_voltage(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
/**
* @brief Get field reading2 from volt_sensor message
*
* @return Depends on the value of r2Type (0) Current consumption in uS of PWM, 20 uS = 90Amp (1) Distance in cm (2) Distance in cm (3) Absolute value
*/
static inline uint16_t mavlink_msg_volt_sensor_get_reading2(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 2);
}
/**
* @brief Decode a volt_sensor message into a struct
*
* @param msg The message to decode
* @param volt_sensor C-struct to decode the message contents into
*/
static inline void mavlink_msg_volt_sensor_decode(const mavlink_message_t* msg, mavlink_volt_sensor_t* volt_sensor)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
volt_sensor->voltage = mavlink_msg_volt_sensor_get_voltage(msg);
volt_sensor->reading2 = mavlink_msg_volt_sensor_get_reading2(msg);
volt_sensor->r2Type = mavlink_msg_volt_sensor_get_r2Type(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_VOLT_SENSOR_LEN? msg->len : MAVLINK_MSG_ID_VOLT_SENSOR_LEN;
memset(volt_sensor, 0, MAVLINK_MSG_ID_VOLT_SENSOR_LEN);
memcpy(volt_sensor, _MAV_PAYLOAD(msg), len);
#endif
}
/** @file
* @brief MAVLink comm protocol generated from slugs.xml
* @see http://mavlink.org
*/
#pragma once
#ifndef MAVLINK_SLUGS_H
#define MAVLINK_SLUGS_H
#ifndef MAVLINK_H
#error Wrong include order: MAVLINK_SLUGS.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#undef MAVLINK_THIS_XML_IDX
#define MAVLINK_THIS_XML_IDX 0
#ifdef __cplusplus
extern "C" {
#endif
// MESSAGE LENGTHS AND CRCS
#ifndef MAVLINK_MESSAGE_LENGTHS
#define MAVLINK_MESSAGE_LENGTHS {}
#endif
#ifndef MAVLINK_MESSAGE_CRCS
#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {1, 124, 31, 31, 0, 0, 0}, {2, 137, 12, 12, 0, 0, 0}, {4, 237, 14, 14, 3, 12, 13}, {5, 217, 28, 28, 1, 0, 0}, {6, 104, 3, 3, 0, 0, 0}, {7, 119, 32, 32, 0, 0, 0}, {8, 117, 36, 36, 0, 0, 0}, {11, 89, 6, 6, 1, 4, 0}, {19, 137, 24, 24, 3, 4, 5}, {20, 214, 20, 20, 3, 2, 3}, {21, 159, 2, 2, 3, 0, 1}, {22, 220, 25, 25, 0, 0, 0}, {23, 168, 23, 23, 3, 4, 5}, {24, 24, 30, 52, 0, 0, 0}, {25, 23, 101, 101, 0, 0, 0}, {26, 170, 22, 24, 0, 0, 0}, {27, 144, 26, 29, 0, 0, 0}, {28, 67, 16, 16, 0, 0, 0}, {29, 115, 14, 16, 0, 0, 0}, {30, 39, 28, 28, 0, 0, 0}, {31, 246, 32, 48, 0, 0, 0}, {32, 185, 28, 28, 0, 0, 0}, {33, 104, 28, 28, 0, 0, 0}, {34, 237, 22, 22, 0, 0, 0}, {35, 244, 22, 22, 0, 0, 0}, {36, 222, 21, 37, 0, 0, 0}, {37, 212, 6, 7, 3, 4, 5}, {38, 9, 6, 7, 3, 4, 5}, {39, 254, 37, 38, 3, 32, 33}, {40, 230, 4, 5, 3, 2, 3}, {41, 28, 4, 4, 3, 2, 3}, {42, 28, 2, 2, 0, 0, 0}, {43, 132, 2, 3, 3, 0, 1}, {44, 221, 4, 5, 3, 2, 3}, {45, 232, 2, 3, 3, 0, 1}, {46, 11, 2, 2, 0, 0, 0}, {47, 153, 3, 4, 3, 0, 1}, {48, 41, 13, 21, 1, 12, 0}, {49, 39, 12, 20, 0, 0, 0}, {50, 78, 37, 37, 3, 18, 19}, {51, 196, 4, 5, 3, 2, 3}, {52, 132, 7, 7, 0, 0, 0}, {54, 15, 27, 27, 3, 24, 25}, {55, 3, 25, 25, 0, 0, 0}, {61, 167, 72, 72, 0, 0, 0}, {62, 183, 26, 26, 0, 0, 0}, {63, 119, 181, 181, 0, 0, 0}, {64, 191, 225, 225, 0, 0, 0}, {65, 118, 42, 42, 0, 0, 0}, {66, 148, 6, 6, 3, 2, 3}, {67, 21, 4, 4, 0, 0, 0}, {69, 243, 11, 11, 1, 10, 0}, {70, 124, 18, 38, 3, 16, 17}, {73, 38, 37, 38, 3, 32, 33}, {74, 20, 20, 20, 0, 0, 0}, {75, 158, 35, 35, 3, 30, 31}, {76, 152, 33, 33, 3, 30, 31}, {77, 143, 3, 10, 3, 8, 9}, {80, 14, 4, 4, 3, 2, 3}, {81, 106, 22, 22, 0, 0, 0}, {82, 49, 39, 39, 3, 36, 37}, {83, 22, 37, 37, 0, 0, 0}, {84, 143, 53, 53, 3, 50, 51}, {85, 140, 51, 51, 0, 0, 0}, {86, 5, 53, 53, 3, 50, 51}, {87, 150, 51, 51, 0, 0, 0}, {89, 231, 28, 28, 0, 0, 0}, {90, 183, 56, 56, 0, 0, 0}, {91, 63, 42, 42, 0, 0, 0}, {92, 54, 33, 33, 0, 0, 0}, {93, 47, 81, 81, 0, 0, 0}, {100, 175, 26, 34, 0, 0, 0}, {101, 102, 32, 117, 0, 0, 0}, {102, 158, 32, 117, 0, 0, 0}, {103, 208, 20, 57, 0, 0, 0}, {104, 56, 32, 116, 0, 0, 0}, {105, 93, 62, 63, 0, 0, 0}, {106, 138, 44, 44, 0, 0, 0}, {107, 108, 64, 65, 0, 0, 0}, {108, 32, 84, 84, 0, 0, 0}, {109, 185, 9, 9, 0, 0, 0}, {110, 84, 254, 254, 3, 1, 2}, {111, 34, 16, 16, 0, 0, 0}, {112, 174, 12, 12, 0, 0, 0}, {113, 124, 36, 39, 0, 0, 0}, {114, 237, 44, 44, 0, 0, 0}, {115, 4, 64, 64, 0, 0, 0}, {116, 76, 22, 24, 0, 0, 0}, {117, 128, 6, 6, 3, 4, 5}, {118, 56, 14, 14, 0, 0, 0}, {119, 116, 12, 12, 3, 10, 11}, {120, 134, 97, 97, 0, 0, 0}, {121, 237, 2, 2, 3, 0, 1}, {122, 203, 2, 2, 3, 0, 1}, {123, 250, 113, 113, 3, 0, 1}, {124, 87, 35, 37, 0, 0, 0}, {125, 203, 6, 6, 0, 0, 0}, {126, 220, 79, 79, 0, 0, 0}, {127, 25, 35, 35, 0, 0, 0}, {128, 226, 35, 35, 0, 0, 0}, {129, 46, 22, 24, 0, 0, 0}, {130, 29, 13, 13, 0, 0, 0}, {131, 223, 255, 255, 0, 0, 0}, {132, 85, 14, 39, 0, 0, 0}, {133, 6, 18, 18, 0, 0, 0}, {134, 229, 43, 43, 0, 0, 0}, {135, 203, 8, 8, 0, 0, 0}, {136, 1, 22, 22, 0, 0, 0}, {137, 195, 14, 16, 0, 0, 0}, {138, 109, 36, 120, 0, 0, 0}, {139, 168, 43, 43, 3, 41, 42}, {140, 181, 41, 41, 0, 0, 0}, {141, 47, 32, 32, 0, 0, 0}, {142, 72, 243, 243, 0, 0, 0}, {143, 131, 14, 16, 0, 0, 0}, {144, 127, 93, 93, 0, 0, 0}, {146, 103, 100, 100, 0, 0, 0}, {147, 154, 36, 49, 0, 0, 0}, {148, 178, 60, 78, 0, 0, 0}, {149, 200, 30, 60, 0, 0, 0}, {162, 189, 8, 9, 0, 0, 0}, {170, 75, 4, 4, 0, 0, 0}, {172, 168, 24, 24, 0, 0, 0}, {173, 2, 18, 18, 0, 0, 0}, {176, 228, 32, 32, 0, 0, 0}, {177, 167, 24, 24, 0, 0, 0}, {179, 132, 12, 12, 0, 0, 0}, {180, 146, 13, 13, 0, 0, 0}, {181, 104, 3, 3, 0, 0, 0}, {184, 45, 5, 5, 0, 0, 0}, {185, 113, 10, 10, 0, 0, 0}, {186, 101, 9, 9, 0, 0, 0}, {188, 5, 3, 3, 0, 0, 0}, {189, 246, 16, 16, 0, 0, 0}, {191, 17, 5, 5, 0, 0, 0}, {192, 187, 5, 5, 0, 0, 0}, {193, 160, 21, 21, 0, 0, 0}, {194, 51, 11, 11, 0, 0, 0}, {195, 59, 14, 14, 0, 0, 0}, {196, 129, 11, 11, 0, 0, 0}, {197, 39, 4, 4, 0, 0, 0}, {230, 163, 42, 42, 0, 0, 0}, {231, 105, 40, 40, 0, 0, 0}, {232, 151, 63, 65, 0, 0, 0}, {233, 35, 182, 182, 0, 0, 0}, {234, 150, 40, 40, 0, 0, 0}, {235, 179, 42, 42, 0, 0, 0}, {241, 90, 32, 32, 0, 0, 0}, {242, 104, 52, 60, 0, 0, 0}, {243, 85, 53, 61, 1, 52, 0}, {244, 95, 6, 6, 0, 0, 0}, {245, 130, 2, 2, 0, 0, 0}, {246, 184, 38, 38, 0, 0, 0}, {247, 81, 19, 19, 0, 0, 0}, {248, 8, 254, 254, 3, 3, 4}, {249, 204, 36, 36, 0, 0, 0}, {250, 49, 30, 30, 0, 0, 0}, {251, 170, 18, 18, 0, 0, 0}, {252, 44, 18, 18, 0, 0, 0}, {253, 83, 51, 54, 0, 0, 0}, {254, 46, 9, 9, 0, 0, 0}, {256, 71, 42, 42, 3, 8, 9}, {257, 131, 9, 9, 0, 0, 0}, {258, 187, 32, 232, 3, 0, 1}, {259, 92, 235, 235, 0, 0, 0}, {260, 146, 5, 13, 0, 0, 0}, {261, 179, 27, 27, 0, 0, 0}, {262, 12, 18, 22, 0, 0, 0}, {263, 133, 255, 255, 0, 0, 0}, {264, 49, 28, 28, 0, 0, 0}, {265, 26, 16, 20, 0, 0, 0}, {266, 193, 255, 255, 3, 2, 3}, {267, 35, 255, 255, 3, 2, 3}, {268, 14, 4, 4, 3, 2, 3}, {269, 109, 213, 213, 0, 0, 0}, {270, 59, 19, 19, 0, 0, 0}, {271, 22, 52, 52, 0, 0, 0}, {275, 126, 31, 31, 0, 0, 0}, {276, 18, 49, 49, 0, 0, 0}, {280, 166, 33, 33, 0, 0, 0}, {281, 0, 9, 9, 0, 0, 0}, {282, 123, 35, 35, 3, 32, 33}, {283, 247, 98, 98, 0, 0, 0}, {284, 99, 32, 32, 3, 30, 31}, {285, 137, 40, 40, 3, 38, 39}, {286, 210, 53, 53, 3, 50, 51}, {287, 74, 23, 23, 3, 20, 21}, {290, 221, 42, 42, 0, 0, 0}, {291, 10, 57, 57, 0, 0, 0}, {299, 19, 96, 98, 0, 0, 0}, {300, 217, 22, 22, 0, 0, 0}, {301, 243, 58, 58, 0, 0, 0}, {310, 28, 17, 17, 0, 0, 0}, {311, 95, 116, 116, 0, 0, 0}, {320, 243, 20, 21, 3, 2, 3}, {321, 88, 2, 3, 3, 0, 1}, {322, 243, 149, 149, 0, 0, 0}, {323, 78, 147, 147, 3, 0, 1}, {324, 132, 146, 146, 0, 0, 0}, {325, 132, 149, 149, 0, 0, 0}, {326, 120, 147, 147, 3, 0, 1}, {327, 129, 146, 146, 0, 0, 0}, {330, 23, 158, 167, 0, 0, 0}, {331, 91, 230, 232, 0, 0, 0}, {332, 236, 239, 239, 0, 0, 0}, {333, 231, 109, 109, 0, 0, 0}, {334, 72, 10, 10, 0, 0, 0}, {335, 225, 24, 24, 0, 0, 0}, {336, 245, 84, 84, 0, 0, 0}, {339, 199, 5, 5, 0, 0, 0}, {340, 99, 70, 70, 0, 0, 0}, {350, 232, 20, 252, 0, 0, 0}, {360, 11, 25, 25, 0, 0, 0}, {370, 98, 73, 73, 0, 0, 0}, {371, 161, 50, 50, 0, 0, 0}, {373, 117, 42, 42, 0, 0, 0}, {375, 251, 140, 140, 0, 0, 0}, {380, 232, 20, 20, 0, 0, 0}, {385, 147, 133, 133, 3, 2, 3}, {390, 156, 238, 238, 0, 0, 0}, {395, 163, 156, 156, 0, 0, 0}, {400, 110, 254, 254, 3, 4, 5}, {401, 183, 6, 6, 3, 4, 5}, {9000, 113, 137, 137, 0, 0, 0}, {9005, 117, 34, 34, 0, 0, 0}, {12900, 114, 44, 44, 3, 0, 1}, {12901, 254, 59, 59, 3, 30, 31}, {12902, 49, 53, 53, 3, 4, 5}, {12903, 249, 46, 46, 3, 0, 1}, {12904, 203, 46, 46, 3, 20, 21}, {12905, 49, 43, 43, 3, 0, 1}, {12915, 62, 254, 254, 3, 0, 1}}
#endif
#include "../protocol.h"
#define MAVLINK_ENABLED_SLUGS
// ENUM DEFINITIONS
/** @brief Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See https://mavlink.io/en/guide/xml_schema.html#MAV_CMD for information about the structure of the MAV_CMD entries */
#ifndef HAVE_ENUM_MAV_CMD
#define HAVE_ENUM_MAV_CMD
typedef enum MAV_CMD
{
MAV_CMD_NAV_WAYPOINT=16, /* Navigate to waypoint. |Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| Acceptance radius (if the sphere with this radius is hit, the waypoint counts as reached)| 0 to pass through the WP, if > 0 radius to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.| Desired yaw angle at waypoint (rotary wing). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_LOITER_UNLIM=17, /* Loiter around this waypoint an unlimited amount of time |Empty| Empty| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_LOITER_TURNS=18, /* Loiter around this waypoint for X turns |Number of turns.| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_LOITER_TIME=19, /* Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint. |Loiter time (only starts once Lat, Lon and Alt is reached).| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise.| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_RETURN_TO_LAUNCH=20, /* Return to launch location |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_NAV_LAND=21, /* Land at location. |Minimum target altitude if landing is aborted (0 = undefined/use system default).| Precision land mode.| Empty| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude.| Longitude.| Landing altitude (ground level in current frame).| */
MAV_CMD_NAV_TAKEOFF=22, /* Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode. |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_LAND_LOCAL=23, /* Land at local position (local frame only) |Landing target number (if available)| Maximum accepted offset from desired landing position - computed magnitude from spherical coordinates: d = sqrt(x^2 + y^2 + z^2), which gives the maximum accepted distance between the desired landing position and the position where the vehicle is about to land| Landing descend rate| Desired yaw angle| Y-axis position| X-axis position| Z-axis / ground level position| */
MAV_CMD_NAV_TAKEOFF_LOCAL=24, /* Takeoff from local position (local frame only) |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Takeoff ascend rate| Yaw angle (if magnetometer or another yaw estimation source present), ignored without one of these| Y-axis position| X-axis position| Z-axis position| */
MAV_CMD_NAV_FOLLOW=25, /* Vehicle following, i.e. this waypoint represents the position of a moving vehicle |Following logic to use (e.g. loitering or sinusoidal following) - depends on specific autopilot implementation| Ground speed of vehicle to be followed| Radius around waypoint. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT=30, /* Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached. |Climb or Descend (0 = Neutral, command completes when within 5m of this command's altitude, 1 = Climbing, command completes when at or above this command's altitude, 2 = Descending, command completes when at or below this command's altitude.| Empty| Empty| Empty| Empty| Empty| Desired altitude| */
MAV_CMD_NAV_LOITER_TO_ALT=31, /* Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint. |Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.| Empty| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */
MAV_CMD_DO_FOLLOW=32, /* Begin following a target |System ID (of the FOLLOW_TARGET beacon). Send 0 to disable follow-me and return to the default position hold mode.| Reserved| Reserved| Altitude mode: 0: Keep current altitude, 1: keep altitude difference to target, 2: go to a fixed altitude above home.| Altitude above home. (used if mode=2)| Reserved| Time to land in which the MAV should go to the default position hold mode after a message RX timeout.| */
MAV_CMD_DO_FOLLOW_REPOSITION=33, /* Reposition the MAV after a follow target command has been sent |Camera q1 (where 0 is on the ray from the camera to the tracking device)| Camera q2| Camera q3| Camera q4| altitude offset from target| X offset from target| Y offset from target| */
MAV_CMD_DO_ORBIT=34, /* Start orbiting on the circumference of a circle defined by the parameters. Setting any value NaN results in using defaults. |Radius of the circle. positive: Orbit clockwise. negative: Orbit counter-clockwise.| Tangential Velocity. NaN: Vehicle configuration default.| Yaw behavior of the vehicle.| Reserved (e.g. for dynamic center beacon options)| Center point latitude (if no MAV_FRAME specified) / X coordinate according to MAV_FRAME. NaN: Use current vehicle position or current center if already orbiting.| Center point longitude (if no MAV_FRAME specified) / Y coordinate according to MAV_FRAME. NaN: Use current vehicle position or current center if already orbiting.| Center point altitude (MSL) (if no MAV_FRAME specified) / Z coordinate according to MAV_FRAME. NaN: Use current vehicle position or current center if already orbiting.| */
MAV_CMD_NAV_ROI=80, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID. (see MAV_ROI enum)| ROI index (allows a vehicle to manage multiple ROI's)| Empty| x the location of the fixed ROI (see MAV_FRAME)| y| z| */
MAV_CMD_NAV_PATHPLANNING=81, /* Control autonomous path planning on the MAV. |0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| Empty| Yaw angle at goal| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */
MAV_CMD_NAV_SPLINE_WAYPOINT=82, /* Navigate to waypoint using a spline path. |Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| Empty| Empty| Empty| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */
MAV_CMD_NAV_VTOL_TAKEOFF=84, /* Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.). |Empty| Front transition heading.| Empty| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_VTOL_LAND=85, /* Land using VTOL mode |Empty| Empty| Approach altitude (with the same reference as the Altitude field). NaN if unspecified.| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude (ground level)| */
MAV_CMD_NAV_GUIDED_ENABLE=92, /* hand control over to an external controller |On / Off (> 0.5f on)| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_NAV_DELAY=93, /* Delay the next navigation command a number of seconds or until a specified time |Delay (-1 to enable time-of-day fields)| hour (24h format, UTC, -1 to ignore)| minute (24h format, UTC, -1 to ignore)| second (24h format, UTC)| Empty| Empty| Empty| */
MAV_CMD_NAV_PAYLOAD_PLACE=94, /* Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload. |Maximum distance to descend.| Empty| Empty| Empty| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_LAST=95, /* NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_CONDITION_DELAY=112, /* Delay mission state machine. |Delay| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_CONDITION_CHANGE_ALT=113, /* Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached. |Descent / Ascend rate.| Empty| Empty| Empty| Empty| Empty| Target Altitude| */
MAV_CMD_CONDITION_DISTANCE=114, /* Delay mission state machine until within desired distance of next NAV point. |Distance.| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_CONDITION_YAW=115, /* Reach a certain target angle. |target angle, 0 is north| angular speed| direction: -1: counter clockwise, 1: clockwise| 0: absolute angle, 1: relative offset| Empty| Empty| Empty| */
MAV_CMD_CONDITION_LAST=159, /* NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_SET_MODE=176, /* Set system mode. |Mode| Custom mode - this is system specific, please refer to the individual autopilot specifications for details.| Custom sub mode - this is system specific, please refer to the individual autopilot specifications for details.| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_JUMP=177, /* Jump to the desired command in the mission list. Repeat this action only the specified number of times |Sequence number| Repeat count| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_CHANGE_SPEED=178, /* Change speed and/or throttle set points. |Speed type (0=Airspeed, 1=Ground Speed, 2=Climb Speed, 3=Descent Speed)| Speed (-1 indicates no change)| Throttle (-1 indicates no change)| 0: absolute, 1: relative| Empty| Empty| Empty| */
MAV_CMD_DO_SET_HOME=179, /* Changes the home location either to the current location or a specified location. |Use current (1=use current location, 0=use specified location)| Empty| Empty| Yaw angle. NaN to use default heading| Latitude| Longitude| Altitude| */
MAV_CMD_DO_SET_PARAMETER=180, /* Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter. |Parameter number| Parameter value| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_SET_RELAY=181, /* Set a relay to a condition. |Relay instance number.| Setting. (1=on, 0=off, others possible depending on system hardware)| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_REPEAT_RELAY=182, /* Cycle a relay on and off for a desired number of cycles with a desired period. |Relay instance number.| Cycle count.| Cycle time.| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_SET_SERVO=183, /* Set a servo to a desired PWM value. |Servo instance number.| Pulse Width Modulation.| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_REPEAT_SERVO=184, /* Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. |Servo instance number.| Pulse Width Modulation.| Cycle count.| Cycle time.| Empty| Empty| Empty| */
MAV_CMD_DO_FLIGHTTERMINATION=185, /* Terminate flight immediately |Flight termination activated if > 0.5| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_CHANGE_ALTITUDE=186, /* Change altitude set point. |Altitude| Frame of new altitude.| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_SET_ACTUATOR=187, /* Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter). |Actuator 1 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 2 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 3 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 4 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 5 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 6 value, scaled from [-1 to 1]. NaN to ignore.| Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7)| */
MAV_CMD_DO_LAND_START=189, /* Mission command to perform a landing. This is used as a marker in a mission to tell the autopilot where a sequence of mission items that represents a landing starts. It may also be sent via a COMMAND_LONG to trigger a landing, in which case the nearest (geographically) landing sequence in the mission will be used. The Latitude/Longitude is optional, and may be set to 0 if not needed. If specified then it will be used to help find the closest landing sequence. |Empty| Empty| Empty| Empty| Latitude| Longitude| Empty| */
MAV_CMD_DO_RALLY_LAND=190, /* Mission command to perform a landing from a rally point. |Break altitude| Landing speed| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_GO_AROUND=191, /* Mission command to safely abort an autonomous landing. |Altitude| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_REPOSITION=192, /* Reposition the vehicle to a specific WGS84 global position. |Ground speed, less than 0 (-1) for default| Bitmask of option flags.| Reserved| Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)| Latitude| Longitude| Altitude| */
MAV_CMD_DO_PAUSE_CONTINUE=193, /* If in a GPS controlled position mode, hold the current position or continue. |0: Pause current mission or reposition command, hold current position. 1: Continue mission. A VTOL capable vehicle should enter hover mode (multicopter and VTOL planes). A plane should loiter with the default loiter radius.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */
MAV_CMD_DO_SET_REVERSE=194, /* Set moving direction to forward or reverse. |Direction (0=Forward, 1=Reverse)| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_SET_ROI_LOCATION=195, /* Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. (Send command multiple times for more than one but not all gimbals.)| Empty| Empty| Empty| Latitude of ROI location| Longitude of ROI location| Altitude of ROI location| */
MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET=196, /* Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. (Send command multiple times for more than one but not all gimbals.)| Empty| Empty| Empty| Pitch offset from next waypoint, positive tilting up| roll offset from next waypoint, positive banking to the right| yaw offset from next waypoint, positive panning to the right| */
MAV_CMD_DO_SET_ROI_NONE=197, /* Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. (Send command multiple times for more than one but not all gimbals.)| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_SET_ROI_SYSID=198, /* Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |System ID| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. (Send command multiple times for more than one but not all gimbals.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_DO_CONTROL_VIDEO=200, /* Control onboard camera system. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty| */
MAV_CMD_DO_SET_ROI=201, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID (depends on param 1).| Region of interest index. (allows a vehicle to manage multiple ROI's)| Empty| MAV_ROI_WPNEXT: pitch offset from next waypoint, MAV_ROI_LOCATION: latitude| MAV_ROI_WPNEXT: roll offset from next waypoint, MAV_ROI_LOCATION: longitude| MAV_ROI_WPNEXT: yaw offset from next waypoint, MAV_ROI_LOCATION: altitude| */
MAV_CMD_DO_DIGICAM_CONFIGURE=202, /* Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Modes: P, TV, AV, M, Etc.| Shutter speed: Divisor number for one second.| Aperture: F stop number.| ISO number e.g. 80, 100, 200, Etc.| Exposure type enumerator.| Command Identity.| Main engine cut-off time before camera trigger. (0 means no cut-off)| */
MAV_CMD_DO_DIGICAM_CONTROL=203, /* Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Session control e.g. show/hide lens| Zoom's absolute position| Zooming step value to offset zoom from the current position| Focus Locking, Unlocking or Re-locking| Shooting Command| Command Identity| Test shot identifier. If set to 1, image will only be captured, but not counted towards internal frame count.| */
MAV_CMD_DO_MOUNT_CONFIGURE=204, /* Mission command to configure a camera or antenna mount |Mount operation mode| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| roll input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| pitch input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| yaw input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| */
MAV_CMD_DO_MOUNT_CONTROL=205, /* Mission command to control a camera or antenna mount |pitch depending on mount mode (degrees or degrees/second depending on pitch input).| roll depending on mount mode (degrees or degrees/second depending on roll input).| yaw depending on mount mode (degrees or degrees/second depending on yaw input).| altitude depending on mount mode.| latitude, set if appropriate mount mode.| longitude, set if appropriate mount mode.| Mount mode.| */
MAV_CMD_DO_SET_CAM_TRIGG_DIST=206, /* Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. -1 or 0 to ignore| Trigger camera once immediately. (0 = no trigger, 1 = trigger)| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_FENCE_ENABLE=207, /* Mission command to enable the geofence |enable? (0=disable, 1=enable, 2=disable_floor_only)| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_PARACHUTE=208, /* Mission item/command to release a parachute or enable/disable auto release. |Action| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_MOTOR_TEST=209, /* Mission command to perform motor test. |Motor instance number. (from 1 to max number of motors on the vehicle)| Throttle type.| Throttle.| Timeout.| Motor count. (number of motors to test to test in sequence, waiting for the timeout above between them; 0=1 motor, 1=1 motor, 2=2 motors...)| Motor test order.| Empty| */
MAV_CMD_DO_INVERTED_FLIGHT=210, /* Change to/from inverted flight. |Inverted flight. (0=normal, 1=inverted)| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_GRIPPER=211, /* Mission command to operate a gripper. |Gripper instance number.| Gripper action to perform.| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_NAV_SET_YAW_SPEED=213, /* Sets a desired vehicle turn angle and speed change. |Yaw angle to adjust steering by.| Speed.| Final angle. (0=absolute, 1=relative)| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL=214, /* Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera. |Camera trigger cycle time. -1 or 0 to ignore.| Camera shutter integration time. Should be less than trigger cycle time. -1 or 0 to ignore.| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_MOUNT_CONTROL_QUAT=220, /* Mission command to control a camera or antenna mount, using a quaternion as reference. |quaternion param q1, w (1 in null-rotation)| quaternion param q2, x (0 in null-rotation)| quaternion param q3, y (0 in null-rotation)| quaternion param q4, z (0 in null-rotation)| Empty| Empty| Empty| */
MAV_CMD_DO_GUIDED_MASTER=221, /* set id of master controller |System ID| Component ID| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_GUIDED_LIMITS=222, /* Set limits for external control |Timeout - maximum time that external controller will be allowed to control vehicle. 0 means no timeout.| Altitude (MSL) min - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit.| Altitude (MSL) max - if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit.| Horizontal move limit - if vehicle moves more than this distance from its location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal move limit.| Empty| Empty| Empty| */
MAV_CMD_DO_ENGINE_CONTROL=223, /* Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines |0: Stop engine, 1:Start Engine| 0: Warm start, 1:Cold start. Controls use of choke where applicable| Height delay. This is for commanding engine start only after the vehicle has gained the specified height. Used in VTOL vehicles during takeoff to start engine after the aircraft is off the ground. Zero for no delay.| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_SET_MISSION_CURRENT=224, /* Set the mission item with sequence number seq as current item. This means that the MAV will continue to this mission item on the shortest path (not following the mission items in-between). |Mission sequence value to set| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_LAST=240, /* NOP - This command is only used to mark the upper limit of the DO commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_PREFLIGHT_CALIBRATION=241, /* Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero. |1: gyro calibration, 3: gyro temperature calibration| 1: magnetometer calibration| 1: ground pressure calibration| 1: radio RC calibration, 2: RC trim calibration| 1: accelerometer calibration, 2: board level calibration, 3: accelerometer temperature calibration, 4: simple accelerometer calibration| 1: APM: compass/motor interference calibration (PX4: airspeed calibration, deprecated), 2: airspeed calibration| 1: ESC calibration, 3: barometer temperature calibration| */
MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS=242, /* Set sensor offsets. This command will be only accepted if in pre-flight mode. |Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow, 5: second magnetometer, 6: third magnetometer| X axis offset (or generic dimension 1), in the sensor's raw units| Y axis offset (or generic dimension 2), in the sensor's raw units| Z axis offset (or generic dimension 3), in the sensor's raw units| Generic dimension 4, in the sensor's raw units| Generic dimension 5, in the sensor's raw units| Generic dimension 6, in the sensor's raw units| */
MAV_CMD_PREFLIGHT_UAVCAN=243, /* Trigger UAVCAN config. This command will be only accepted if in pre-flight mode. |1: Trigger actuator ID assignment and direction mapping.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */
MAV_CMD_PREFLIGHT_STORAGE=245, /* Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. |Parameter storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM, 2: Reset to defaults| Mission storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM, 2: Reset to defaults| Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging, > 1: logging rate (e.g. set to 1000 for 1000 Hz logging)| Reserved| Empty| Empty| Empty| */
MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN=246, /* Request the reboot or shutdown of system components. |0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot, 3: Reboot autopilot and keep it in the bootloader until upgraded.| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer, 3: Reboot onboard computer and keep it in the bootloader until upgraded.| WIP: 0: Do nothing for camera, 1: Reboot onboard camera, 2: Shutdown onboard camera, 3: Reboot onboard camera and keep it in the bootloader until upgraded| WIP: 0: Do nothing for mount (e.g. gimbal), 1: Reboot mount, 2: Shutdown mount, 3: Reboot mount and keep it in the bootloader until upgraded| Reserved (set to 0)| Reserved (set to 0)| WIP: ID (e.g. camera ID -1 for all IDs)| */
MAV_CMD_DO_UPGRADE=247, /* Request a target system to start an upgrade of one (or all) of its components. For example, the command might be sent to a companion computer to cause it to upgrade a connected flight controller. The system doing the upgrade will report progress using the normal command protocol sequence for a long running operation. Command protocol information: https://mavlink.io/en/services/command.html. |Component id of the component to be upgraded. If set to 0, all components should be upgraded.| 0: Do not reboot component after the action is executed, 1: Reboot component after the action is executed.| Reserved| Reserved| Reserved| Reserved| WIP: upgrade progress report rate (can be used for more granular control).| */
MAV_CMD_OVERRIDE_GOTO=252, /* Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position. |MAV_GOTO_DO_HOLD: pause mission and either hold or move to specified position (depending on param2), MAV_GOTO_DO_CONTINUE: resume mission.| MAV_GOTO_HOLD_AT_CURRENT_POSITION: hold at current position, MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position.| Coordinate frame of hold point.| Desired yaw angle.| Latitude/X position.| Longitude/Y position.| Altitude/Z position.| */
MAV_CMD_MISSION_START=300, /* start running a mission |first_item: the first mission item to run| last_item: the last mission item to run (after this item is run, the mission ends)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_COMPONENT_ARM_DISARM=400, /* Arms / Disarms a component |0: disarm, 1: arm| 0: arm-disarm unless prevented by safety checks (i.e. when landed), 21196: force arming/disarming (e.g. allow arming to override preflight checks and disarming in flight)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_ILLUMINATOR_ON_OFF=405, /* Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |0: Illuminators OFF, 1: Illuminators ON| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_GET_HOME_POSITION=410, /* Request the home position from the vehicle. |Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */
MAV_CMD_INJECT_FAILURE=420, /* Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting. |The unit which is affected by the failure.| The type how the failure manifests itself.| Instance affected by failure (0 to signal all).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_START_RX_PAIR=500, /* Starts receiver pairing. |0:Spektrum.| RC type.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_GET_MESSAGE_INTERVAL=510, /* Request the interval between messages for a particular MAVLink message ID. The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message. |The MAVLink message ID| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_SET_MESSAGE_INTERVAL=511, /* Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM. |The MAVLink message ID| The interval between two messages. Set to -1 to disable and 0 to request default rate.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Target address of message stream (if message has target address fields). 0: Flight-stack default (recommended), 1: address of requestor, 2: broadcast.| */
MAV_CMD_REQUEST_MESSAGE=512, /* Request the target system(s) emit a single instance of a specified message (i.e. a "one-shot" version of MAV_CMD_SET_MESSAGE_INTERVAL). |The MAVLink message ID of the requested message.| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| Target address for requested message (if message has target address fields). 0: Flight-stack default, 1: address of requestor, 2: broadcast.| */
MAV_CMD_REQUEST_PROTOCOL_VERSION=519, /* Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message |1: Request supported protocol versions by all nodes on the network| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES=520, /* Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message |1: Request autopilot version| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_REQUEST_CAMERA_INFORMATION=521, /* Request camera information (CAMERA_INFORMATION). |0: No action 1: Request camera capabilities| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_REQUEST_CAMERA_SETTINGS=522, /* Request camera settings (CAMERA_SETTINGS). |0: No Action 1: Request camera settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_REQUEST_STORAGE_INFORMATION=525, /* Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage. |Storage ID (0 for all, 1 for first, 2 for second, etc.)| 0: No Action 1: Request storage information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_STORAGE_FORMAT=526, /* Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage. |Storage ID (1 for first, 2 for second, etc.)| Format storage (and reset image log). 0: No action 1: Format storage| Reset Image Log (without formatting storage medium). This will reset CAMERA_CAPTURE_STATUS.image_count and CAMERA_IMAGE_CAPTURED.image_index. 0: No action 1: Reset Image Log| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS=527, /* Request camera capture status (CAMERA_CAPTURE_STATUS) |0: No Action 1: Request camera capture status| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_REQUEST_FLIGHT_INFORMATION=528, /* Request flight information (FLIGHT_INFORMATION) |1: Request flight information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_RESET_CAMERA_SETTINGS=529, /* Reset all camera settings to Factory Default |0: No Action 1: Reset all settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_SET_CAMERA_MODE=530, /* Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming. |Reserved (Set to 0)| Camera mode| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */
MAV_CMD_SET_CAMERA_ZOOM=531, /* Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success). |Zoom type| Zoom value. The range of valid values depend on the zoom type.| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */
MAV_CMD_SET_CAMERA_FOCUS=532, /* Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success). |Focus type| Focus value| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */
MAV_CMD_JUMP_TAG=600, /* Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG. |Tag.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_DO_JUMP_TAG=601, /* Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number. |Target tag to jump to.| Repeat count.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_PARAM_TRANSACTION=900, /* Request to start or end a parameter transaction. Multiple kinds of transport layers can be used to exchange parameters in the transaction (param, param_ext and mavftp). The command response can either be a success/failure or an in progress in case the receiving side takes some time to apply the parameters. |Action to be performed (start, commit, cancel, etc.)| Possible transport layers to set and get parameters via mavlink during a parameter transaction.| Identifier for a specific transaction.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_DO_GIMBAL_MANAGER_TILTPAN=1000, /* High level setpoint to be sent to a gimbal manager to set a gimbal attitude. It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: a gimbal is never to react to this command but only the gimbal manager. |Tilt/pitch rate (positive to tilt up).| Pan/yaw rate (positive to pan to the right).| Tilt/pitch angle (positive to tilt up, relative to vehicle for PAN mode, relative to world horizon for HOLD mode).| Pan/yaw angle (positive to pan to the right, relative to vehicle for PAN mode, absolute to North for HOLD mode).| Gimbal manager flags to use.| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. (Send command multiple times for more than one but not all gimbals.)| */
MAV_CMD_IMAGE_START_CAPTURE=2000, /* Start image capture sequence. Sends CAMERA_IMAGE_CAPTURED after each capture. Use NaN for reserved values. |Reserved (Set to 0)| Desired elapsed time between two consecutive pictures (in seconds). Minimum values depend on hardware (typically greater than 2 seconds).| Total number of images to capture. 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE.| Capture sequence number starting from 1. This is only valid for single-capture (param3 == 1). Increment the capture ID for each capture command to prevent double captures when a command is re-transmitted. Use 0 to ignore it.| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_IMAGE_STOP_CAPTURE=2001, /* Stop image capture sequence Use NaN for reserved values. |Reserved (Set to 0)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */
MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE=2002, /* Re-request a CAMERA_IMAGE_CAPTURED message. |Sequence number for missing CAMERA_IMAGE_CAPTURED message| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */
MAV_CMD_DO_TRIGGER_CONTROL=2003, /* Enable or disable on-board camera triggering system. |Trigger enable/disable (0 for disable, 1 for start), -1 to ignore| 1 to reset the trigger sequence, -1 or 0 to ignore| 1 to pause triggering, but without switching the camera off or retracting it. -1 to ignore| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_CAMERA_TRACK_POINT=2004, /* If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking. |Point to track x value (normalized 0..1, 0 is left, 1 is right).| Point to track y value (normalized 0..1, 0 is top, 1 is bottom).| Point radius (normalized 0..1, 0 is image left, 1 is image right).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_CAMERA_TRACK_RECTANGLE=2005, /* If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking. |Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_CAMERA_STOP_TRACKING=2010, /* Stops ongoing tracking. |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_VIDEO_START_CAPTURE=2500, /* Starts video capture (recording). |Video Stream ID (0 for all streams)| Frequency CAMERA_CAPTURE_STATUS messages should be sent while recording (0 for no messages, otherwise frequency)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| */
MAV_CMD_VIDEO_STOP_CAPTURE=2501, /* Stop the current video capture (recording). |Video Stream ID (0 for all streams)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| */
MAV_CMD_VIDEO_START_STREAMING=2502, /* Start video streaming |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_VIDEO_STOP_STREAMING=2503, /* Stop the given video stream |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION=2504, /* Request video stream information (VIDEO_STREAM_INFORMATION) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_REQUEST_VIDEO_STREAM_STATUS=2505, /* Request video stream status (VIDEO_STREAM_STATUS) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_LOGGING_START=2510, /* Request to start streaming logging data over MAVLink (see also LOGGING_DATA message) |Format: 0: ULog| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */
MAV_CMD_LOGGING_STOP=2511, /* Request to stop streaming log data over MAVLink |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */
MAV_CMD_AIRFRAME_CONFIGURATION=2520, /* |Landing gear ID (default: 0, -1 for all)| Landing gear position (Down: 0, Up: 1, NaN for no change)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| */
MAV_CMD_CONTROL_HIGH_LATENCY=2600, /* Request to start/stop transmitting over the high latency telemetry |Control transmission over high latency telemetry (0: stop, 1: start)| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_PANORAMA_CREATE=2800, /* Create a panorama at the current position |Viewing angle horizontal of the panorama (+- 0.5 the total angle)| Viewing angle vertical of panorama.| Speed of the horizontal rotation.| Speed of the vertical rotation.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_DO_VTOL_TRANSITION=3000, /* Request VTOL transition |The target VTOL state. Only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_ARM_AUTHORIZATION_REQUEST=3001, /* Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. If approved the progress of command_ack message should be set with period of time that this authorization is valid in seconds or in case it was denied it should be set with one of the reasons in ARM_AUTH_DENIED_REASON.
|Vehicle system id, this way ground station can request arm authorization on behalf of any vehicle| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_SET_GUIDED_SUBMODE_STANDARD=4000, /* This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes.
|Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE=4001, /* This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position.
|Radius of desired circle in CIRCLE_MODE| User defined| User defined| User defined| Target latitude of center of circle in CIRCLE_MODE| Target longitude of center of circle in CIRCLE_MODE| Reserved (default:0)| */
MAV_CMD_CONDITION_GATE=4501, /* Delay mission state machine until gate has been reached. |Geometry: 0: orthogonal to path between previous and next waypoint.| Altitude: 0: ignore altitude| Empty| Empty| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_FENCE_RETURN_POINT=5000, /* Fence return point. There can only be one fence return point.
|Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */
MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION=5001, /* Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.
|Polygon vertex count| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */
MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION=5002, /* Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.
|Polygon vertex count| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */
MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION=5003, /* Circular fence area. The vehicle must stay inside this area.
|Radius.| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */
MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION=5004, /* Circular fence area. The vehicle must stay outside this area.
|Radius.| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */
MAV_CMD_NAV_RALLY_POINT=5100, /* Rally point. You can have multiple rally points defined.
|Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */
MAV_CMD_UAVCAN_GET_NODE_INFO=5200, /* Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */
MAV_CMD_DO_NOTHING=10001, /* Does nothing. |1 to arm, 0 to disarm| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_RETURN_TO_BASE=10011, /* Return vehicle to base. |0: return to base, 1: track mobile base| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_STOP_RETURN_TO_BASE=10012, /* Stops the vehicle from returning to base and resumes flight. |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_TURN_LIGHT=10013, /* Turns the vehicle's visible or infrared lights on or off. |0: visible lights, 1: infrared lights| 0: turn on, 1: turn off| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_GET_MID_LEVEL_COMMANDS=10014, /* Requests vehicle to send current mid-level commands to ground station. |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_MIDLEVEL_STORAGE=10015, /* Requests storage of mid-level commands. |Mid-level command storage: 0: read from flash/EEPROM, 1: write to flash/EEPROM| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
MAV_CMD_PAYLOAD_PREPARE_DEPLOY=30001, /* Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity. |Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| Desired approach vector in compass heading. A negative value indicates the system can define the approach vector at will.| Desired ground speed at release time. This can be overridden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| Minimum altitude clearance to the release position. A negative value indicates the system can define the clearance at will.| Latitude. Note, if used in MISSION_ITEM (deprecated) the units are degrees (unscaled)| Longitude. Note, if used in MISSION_ITEM (deprecated) the units are degrees (unscaled)| Altitude (MSL)| */
MAV_CMD_PAYLOAD_CONTROL_DEPLOY=30002, /* Control the payload deployment. |Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deployment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */
MAV_CMD_WAYPOINT_USER_1=31000, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
MAV_CMD_WAYPOINT_USER_2=31001, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
MAV_CMD_WAYPOINT_USER_3=31002, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
MAV_CMD_WAYPOINT_USER_4=31003, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
MAV_CMD_WAYPOINT_USER_5=31004, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
MAV_CMD_SPATIAL_USER_1=31005, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
MAV_CMD_SPATIAL_USER_2=31006, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
MAV_CMD_SPATIAL_USER_3=31007, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
MAV_CMD_SPATIAL_USER_4=31008, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
MAV_CMD_SPATIAL_USER_5=31009, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
MAV_CMD_USER_1=31010, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */
MAV_CMD_USER_2=31011, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */
MAV_CMD_USER_3=31012, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */
MAV_CMD_USER_4=31013, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */
MAV_CMD_USER_5=31014, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */
MAV_CMD_FIXED_MAG_CAL_YAW=42006, /* Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location. |Yaw of vehicle in earth frame.| CompassMask, 0 for all.| Latitude.| Longitude.| Empty.| Empty.| Empty.| */
MAV_CMD_DO_WINCH=42600, /* Command to operate winch. |Winch instance number.| Action to perform.| Length of cable to release (negative to wind).| Release rate (negative to wind).| Empty.| Empty.| Empty.| */
MAV_CMD_ENUM_END=42601, /* | */
} MAV_CMD;
#endif
/** @brief Slugs-specific navigation modes. */
#ifndef HAVE_ENUM_SLUGS_MODE
#define HAVE_ENUM_SLUGS_MODE
typedef enum SLUGS_MODE
{
SLUGS_MODE_NONE=0, /* No change to SLUGS mode. | */
SLUGS_MODE_LIFTOFF=1, /* Vehicle is in liftoff mode. | */
SLUGS_MODE_PASSTHROUGH=2, /* Vehicle is in passthrough mode, being controlled by a pilot. | */
SLUGS_MODE_WAYPOINT=3, /* Vehicle is in waypoint mode, navigating to waypoints. | */
SLUGS_MODE_MID_LEVEL=4, /* Vehicle is executing mid-level commands. | */
SLUGS_MODE_RETURNING=5, /* Vehicle is returning to the home location. | */
SLUGS_MODE_LANDING=6, /* Vehicle is landing. | */
SLUGS_MODE_LOST=7, /* Lost connection with vehicle. | */
SLUGS_MODE_SELECTIVE_PASSTHROUGH=8, /* Vehicle is in selective passthrough mode, where selected surfaces are being manually controlled. | */
SLUGS_MODE_ISR=9, /* Vehicle is in ISR mode, performing reconaissance at a point specified by ISR_LOCATION message. | */
SLUGS_MODE_LINE_PATROL=10, /* Vehicle is patrolling along lines between waypoints. | */
SLUGS_MODE_GROUNDED=11, /* Vehicle is grounded or an error has occurred. | */
SLUGS_MODE_ENUM_END=12, /* | */
} SLUGS_MODE;
#endif
/** @brief These flags encode the control surfaces for selective passthrough mode. If a bit is set then the pilot console
has control of the surface, and if not then the autopilot has control of the surface. */
#ifndef HAVE_ENUM_CONTROL_SURFACE_FLAG
#define HAVE_ENUM_CONTROL_SURFACE_FLAG
typedef enum CONTROL_SURFACE_FLAG
{
CONTROL_SURFACE_FLAG_RIGHT_FLAP=1, /* 0b00000001 Right flap control passes through to pilot console. | */
CONTROL_SURFACE_FLAG_LEFT_FLAP=2, /* 0b00000010 Left flap control passes through to pilot console. | */
CONTROL_SURFACE_FLAG_RIGHT_ELEVATOR=4, /* 0b00000100 Right elevator control passes through to pilot console. | */
CONTROL_SURFACE_FLAG_LEFT_ELEVATOR=8, /* 0b00001000 Left elevator control passes through to pilot console. | */
CONTROL_SURFACE_FLAG_RUDDER=16, /* 0b00010000 Rudder control passes through to pilot console. | */
CONTROL_SURFACE_FLAG_RIGHT_AILERON=32, /* 0b00100000 Right aileron control passes through to pilot console. | */
CONTROL_SURFACE_FLAG_LEFT_AILERON=64, /* 0b01000000 Left aileron control passes through to pilot console. | */
CONTROL_SURFACE_FLAG_THROTTLE=128, /* 0b10000000 Throttle control passes through to pilot console. | */
CONTROL_SURFACE_FLAG_ENUM_END=129, /* | */
} CONTROL_SURFACE_FLAG;
#endif
// MAVLINK VERSION
#ifndef MAVLINK_VERSION
#define MAVLINK_VERSION 2
#endif
#if (MAVLINK_VERSION == 0)
#undef MAVLINK_VERSION
#define MAVLINK_VERSION 2
#endif
// MESSAGE DEFINITIONS
#include "./mavlink_msg_cpu_load.h"
#include "./mavlink_msg_sensor_bias.h"
#include "./mavlink_msg_diagnostic.h"
#include "./mavlink_msg_slugs_navigation.h"
#include "./mavlink_msg_data_log.h"
#include "./mavlink_msg_gps_date_time.h"
#include "./mavlink_msg_mid_lvl_cmds.h"
#include "./mavlink_msg_ctrl_srfc_pt.h"
#include "./mavlink_msg_slugs_camera_order.h"
#include "./mavlink_msg_control_surface.h"
#include "./mavlink_msg_slugs_mobile_location.h"
#include "./mavlink_msg_slugs_configuration_camera.h"
#include "./mavlink_msg_isr_location.h"
#include "./mavlink_msg_volt_sensor.h"
#include "./mavlink_msg_ptz_status.h"
#include "./mavlink_msg_uav_status.h"
#include "./mavlink_msg_status_gps.h"
#include "./mavlink_msg_novatel_diag.h"
#include "./mavlink_msg_sensor_diag.h"
#include "./mavlink_msg_boot.h"
// base include
#include "../common/common.h"
#undef MAVLINK_THIS_XML_IDX
#define MAVLINK_THIS_XML_IDX 0
#if MAVLINK_THIS_XML_IDX == MAVLINK_PRIMARY_XML_IDX
# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_LINK_NODE_STATUS, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_ACK_TRANSACTION, 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_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_MISSION_CHANGED, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_COMMAND_CANCEL, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, 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, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, 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, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_CPU_LOAD, MAVLINK_MESSAGE_INFO_SENSOR_BIAS, MAVLINK_MESSAGE_INFO_DIAGNOSTIC, MAVLINK_MESSAGE_INFO_SLUGS_NAVIGATION, MAVLINK_MESSAGE_INFO_DATA_LOG, MAVLINK_MESSAGE_INFO_GPS_DATE_TIME, MAVLINK_MESSAGE_INFO_MID_LVL_CMDS, MAVLINK_MESSAGE_INFO_CTRL_SRFC_PT, MAVLINK_MESSAGE_INFO_SLUGS_CAMERA_ORDER, MAVLINK_MESSAGE_INFO_CONTROL_SURFACE, MAVLINK_MESSAGE_INFO_SLUGS_MOBILE_LOCATION, MAVLINK_MESSAGE_INFO_SLUGS_CONFIGURATION_CAMERA, MAVLINK_MESSAGE_INFO_ISR_LOCATION, MAVLINK_MESSAGE_INFO_VOLT_SENSOR, MAVLINK_MESSAGE_INFO_PTZ_STATUS, MAVLINK_MESSAGE_INFO_UAV_STATUS, MAVLINK_MESSAGE_INFO_STATUS_GPS, MAVLINK_MESSAGE_INFO_NOVATEL_DIAG, MAVLINK_MESSAGE_INFO_SENSOR_DIAG, MAVLINK_MESSAGE_INFO_BOOT, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, 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, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_TILTPAN, MAVLINK_MESSAGE_INFO_ESC_INFO, MAVLINK_MESSAGE_INFO_ESC_STATUS, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE_TRIMMED, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET_TRIMMED, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK_TRIMMED, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER, MAVLINK_MESSAGE_INFO_CELLULAR_STATUS, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS, MAVLINK_MESSAGE_INFO_SMART_BATTERY_INFO, MAVLINK_MESSAGE_INFO_SMART_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_TIME_ESTIMATE_TO_TARGET, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_ONBOARD_COMPUTER_STATUS, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION, MAVLINK_MESSAGE_INFO_PLAY_TUNE_V2, MAVLINK_MESSAGE_INFO_SUPPORTED_TUNES, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK}
# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADSB_VEHICLE", 246 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "BATTERY_STATUS", 147 }, { "BOOT", 197 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CELLULAR_CONFIG", 336 }, { "CELLULAR_STATUS", 334 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_CANCEL", 80 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "COMPONENT_INFORMATION", 395 }, { "CONTROL_SURFACE", 185 }, { "CONTROL_SYSTEM_STATE", 146 }, { "CPU_LOAD", 170 }, { "CTRL_SRFC_PT", 181 }, { "DATA_LOG", 177 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DIAGNOSTIC", 173 }, { "DISTANCE_SENSOR", 132 }, { "ENCAPSULATED_DATA", 131 }, { "ESC_INFO", 290 }, { "ESC_STATUS", 291 }, { "ESTIMATOR_STATUS", 230 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_TILTPAN", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_DATE_TIME", 179 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "HEARTBEAT", 0 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "ISBD_LINK_STATUS", 335 }, { "ISR_LOCATION", 189 }, { "LANDING_TARGET", 149 }, { "LINK_NODE_STATUS", 8 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MID_LVL_CMDS", 180 }, { "MISSION_ACK", 47 }, { "MISSION_CHANGED", 52 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_ORIENTATION", 265 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "NOVATEL_DIAG", 195 }, { "OBSTACLE_DISTANCE", 330 }, { "ODOMETRY", 331 }, { "ONBOARD_COMPUTER_STATUS", 390 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "ORBIT_EXECUTION_STATUS", 360 }, { "PARAM_ACK_TRANSACTION", 19 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_ACK_TRIMMED", 327 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_SET_TRIMMED", 326 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_EXT_VALUE_TRIMMED", 325 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "PLAY_TUNE_V2", 400 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "PROTOCOL_VERSION", 300 }, { "PTZ_STATUS", 192 }, { "RADIO_STATUS", 109 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "REQUEST_DATA_STREAM", 66 }, { "RESOURCE_REQUEST", 142 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SENSOR_BIAS", 172 }, { "SENSOR_DIAG", 196 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIM_STATE", 108 }, { "SLUGS_CAMERA_ORDER", 184 }, { "SLUGS_CONFIGURATION_CAMERA", 188 }, { "SLUGS_MOBILE_LOCATION", 186 }, { "SLUGS_NAVIGATION", 176 }, { "SMART_BATTERY_INFO", 370 }, { "SMART_BATTERY_STATUS", 371 }, { "STATUSTEXT", 253 }, { "STATUS_GPS", 194 }, { "STORAGE_INFORMATION", 261 }, { "SUPPORTED_TUNES", 401 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TIME_ESTIMATE_TO_TARGET", 380 }, { "TRAJECTORY_REPRESENTATION_BEZIER", 333 }, { "TRAJECTORY_REPRESENTATION_WAYPOINTS", 332 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UAV_STATUS", 193 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "VOLT_SENSOR", 191 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND_COV", 231 }}
# if MAVLINK_COMMAND_24BIT
# include "../mavlink_get_info.h"
# endif
#endif
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // MAVLINK_SLUGS_H
/** @file
* @brief MAVLink comm protocol testsuite generated from slugs.xml
* @see http://qgroundcontrol.org/mavlink/
*/
#pragma once
#ifndef SLUGS_TESTSUITE_H
#define SLUGS_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_slugs(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);
mavlink_test_slugs(system_id, component_id, last_msg);
}
#endif
#include "../common/testsuite.h"
static void mavlink_test_cpu_load(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_CPU_LOAD >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_cpu_load_t packet_in = {
17235,139,206
};
mavlink_cpu_load_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.batVolt = packet_in.batVolt;
packet1.sensLoad = packet_in.sensLoad;
packet1.ctrlLoad = packet_in.ctrlLoad;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_cpu_load_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_cpu_load_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_cpu_load_pack(system_id, component_id, &msg , packet1.sensLoad , packet1.ctrlLoad , packet1.batVolt );
mavlink_msg_cpu_load_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_cpu_load_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sensLoad , packet1.ctrlLoad , packet1.batVolt );
mavlink_msg_cpu_load_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_cpu_load_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_cpu_load_send(MAVLINK_COMM_1 , packet1.sensLoad , packet1.ctrlLoad , packet1.batVolt );
mavlink_msg_cpu_load_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_sensor_bias(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SENSOR_BIAS >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_sensor_bias_t packet_in = {
17.0,45.0,73.0,101.0,129.0,157.0
};
mavlink_sensor_bias_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.axBias = packet_in.axBias;
packet1.ayBias = packet_in.ayBias;
packet1.azBias = packet_in.azBias;
packet1.gxBias = packet_in.gxBias;
packet1.gyBias = packet_in.gyBias;
packet1.gzBias = packet_in.gzBias;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_SENSOR_BIAS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SENSOR_BIAS_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_sensor_bias_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_sensor_bias_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_sensor_bias_pack(system_id, component_id, &msg , packet1.axBias , packet1.ayBias , packet1.azBias , packet1.gxBias , packet1.gyBias , packet1.gzBias );
mavlink_msg_sensor_bias_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_sensor_bias_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.axBias , packet1.ayBias , packet1.azBias , packet1.gxBias , packet1.gyBias , packet1.gzBias );
mavlink_msg_sensor_bias_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_sensor_bias_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_sensor_bias_send(MAVLINK_COMM_1 , packet1.axBias , packet1.ayBias , packet1.azBias , packet1.gxBias , packet1.gyBias , packet1.gzBias );
mavlink_msg_sensor_bias_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_diagnostic(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_DIAGNOSTIC >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_diagnostic_t packet_in = {
17.0,45.0,73.0,17859,17963,18067
};
mavlink_diagnostic_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.diagFl1 = packet_in.diagFl1;
packet1.diagFl2 = packet_in.diagFl2;
packet1.diagFl3 = packet_in.diagFl3;
packet1.diagSh1 = packet_in.diagSh1;
packet1.diagSh2 = packet_in.diagSh2;
packet1.diagSh3 = packet_in.diagSh3;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_diagnostic_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_diagnostic_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_diagnostic_pack(system_id, component_id, &msg , packet1.diagFl1 , packet1.diagFl2 , packet1.diagFl3 , packet1.diagSh1 , packet1.diagSh2 , packet1.diagSh3 );
mavlink_msg_diagnostic_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_diagnostic_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.diagFl1 , packet1.diagFl2 , packet1.diagFl3 , packet1.diagSh1 , packet1.diagSh2 , packet1.diagSh3 );
mavlink_msg_diagnostic_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_diagnostic_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_diagnostic_send(MAVLINK_COMM_1 , packet1.diagFl1 , packet1.diagFl2 , packet1.diagFl3 , packet1.diagSh1 , packet1.diagSh2 , packet1.diagSh3 );
mavlink_msg_diagnostic_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_slugs_navigation(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SLUGS_NAVIGATION >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_slugs_navigation_t packet_in = {
17.0,45.0,73.0,101.0,129.0,157.0,185.0,18691,223,34
};
mavlink_slugs_navigation_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.u_m = packet_in.u_m;
packet1.phi_c = packet_in.phi_c;
packet1.theta_c = packet_in.theta_c;
packet1.psiDot_c = packet_in.psiDot_c;
packet1.ay_body = packet_in.ay_body;
packet1.totalDist = packet_in.totalDist;
packet1.dist2Go = packet_in.dist2Go;
packet1.h_c = packet_in.h_c;
packet1.fromWP = packet_in.fromWP;
packet1.toWP = packet_in.toWP;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_SLUGS_NAVIGATION_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SLUGS_NAVIGATION_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_navigation_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_slugs_navigation_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_navigation_pack(system_id, component_id, &msg , packet1.u_m , packet1.phi_c , packet1.theta_c , packet1.psiDot_c , packet1.ay_body , packet1.totalDist , packet1.dist2Go , packet1.fromWP , packet1.toWP , packet1.h_c );
mavlink_msg_slugs_navigation_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_navigation_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.u_m , packet1.phi_c , packet1.theta_c , packet1.psiDot_c , packet1.ay_body , packet1.totalDist , packet1.dist2Go , packet1.fromWP , packet1.toWP , packet1.h_c );
mavlink_msg_slugs_navigation_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_slugs_navigation_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_navigation_send(MAVLINK_COMM_1 , packet1.u_m , packet1.phi_c , packet1.theta_c , packet1.psiDot_c , packet1.ay_body , packet1.totalDist , packet1.dist2Go , packet1.fromWP , packet1.toWP , packet1.h_c );
mavlink_msg_slugs_navigation_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_data_log(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_DATA_LOG >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_data_log_t packet_in = {
17.0,45.0,73.0,101.0,129.0,157.0
};
mavlink_data_log_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.fl_1 = packet_in.fl_1;
packet1.fl_2 = packet_in.fl_2;
packet1.fl_3 = packet_in.fl_3;
packet1.fl_4 = packet_in.fl_4;
packet1.fl_5 = packet_in.fl_5;
packet1.fl_6 = packet_in.fl_6;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_DATA_LOG_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_DATA_LOG_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_data_log_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_data_log_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_data_log_pack(system_id, component_id, &msg , packet1.fl_1 , packet1.fl_2 , packet1.fl_3 , packet1.fl_4 , packet1.fl_5 , packet1.fl_6 );
mavlink_msg_data_log_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_data_log_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.fl_1 , packet1.fl_2 , packet1.fl_3 , packet1.fl_4 , packet1.fl_5 , packet1.fl_6 );
mavlink_msg_data_log_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_log_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_data_log_send(MAVLINK_COMM_1 , packet1.fl_1 , packet1.fl_2 , packet1.fl_3 , packet1.fl_4 , packet1.fl_5 , packet1.fl_6 );
mavlink_msg_data_log_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gps_date_time(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_GPS_DATE_TIME >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gps_date_time_t packet_in = {
5,72,139,206,17,84,151,218,29,96,163,230
};
mavlink_gps_date_time_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.year = packet_in.year;
packet1.month = packet_in.month;
packet1.day = packet_in.day;
packet1.hour = packet_in.hour;
packet1.min = packet_in.min;
packet1.sec = packet_in.sec;
packet1.clockStat = packet_in.clockStat;
packet1.visSat = packet_in.visSat;
packet1.useSat = packet_in.useSat;
packet1.GppGl = packet_in.GppGl;
packet1.sigUsedMask = packet_in.sigUsedMask;
packet1.percentUsed = packet_in.percentUsed;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_GPS_DATE_TIME_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_GPS_DATE_TIME_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_date_time_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gps_date_time_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_date_time_pack(system_id, component_id, &msg , packet1.year , packet1.month , packet1.day , packet1.hour , packet1.min , packet1.sec , packet1.clockStat , packet1.visSat , packet1.useSat , packet1.GppGl , packet1.sigUsedMask , packet1.percentUsed );
mavlink_msg_gps_date_time_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_date_time_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.year , packet1.month , packet1.day , packet1.hour , packet1.min , packet1.sec , packet1.clockStat , packet1.visSat , packet1.useSat , packet1.GppGl , packet1.sigUsedMask , packet1.percentUsed );
mavlink_msg_gps_date_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_gps_date_time_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gps_date_time_send(MAVLINK_COMM_1 , packet1.year , packet1.month , packet1.day , packet1.hour , packet1.min , packet1.sec , packet1.clockStat , packet1.visSat , packet1.useSat , packet1.GppGl , packet1.sigUsedMask , packet1.percentUsed );
mavlink_msg_gps_date_time_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_mid_lvl_cmds(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_MID_LVL_CMDS >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mid_lvl_cmds_t packet_in = {
17.0,45.0,73.0,41
};
mavlink_mid_lvl_cmds_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.hCommand = packet_in.hCommand;
packet1.uCommand = packet_in.uCommand;
packet1.rCommand = packet_in.rCommand;
packet1.target = packet_in.target;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_MID_LVL_CMDS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_MID_LVL_CMDS_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mid_lvl_cmds_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mid_lvl_cmds_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mid_lvl_cmds_pack(system_id, component_id, &msg , packet1.target , packet1.hCommand , packet1.uCommand , packet1.rCommand );
mavlink_msg_mid_lvl_cmds_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mid_lvl_cmds_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target , packet1.hCommand , packet1.uCommand , packet1.rCommand );
mavlink_msg_mid_lvl_cmds_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_mid_lvl_cmds_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mid_lvl_cmds_send(MAVLINK_COMM_1 , packet1.target , packet1.hCommand , packet1.uCommand , packet1.rCommand );
mavlink_msg_mid_lvl_cmds_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_ctrl_srfc_pt(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_CTRL_SRFC_PT >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_ctrl_srfc_pt_t packet_in = {
17235,139
};
mavlink_ctrl_srfc_pt_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.bitfieldPt = packet_in.bitfieldPt;
packet1.target = packet_in.target;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_CTRL_SRFC_PT_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_CTRL_SRFC_PT_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_ctrl_srfc_pt_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_ctrl_srfc_pt_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_ctrl_srfc_pt_pack(system_id, component_id, &msg , packet1.target , packet1.bitfieldPt );
mavlink_msg_ctrl_srfc_pt_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_ctrl_srfc_pt_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target , packet1.bitfieldPt );
mavlink_msg_ctrl_srfc_pt_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_ctrl_srfc_pt_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_ctrl_srfc_pt_send(MAVLINK_COMM_1 , packet1.target , packet1.bitfieldPt );
mavlink_msg_ctrl_srfc_pt_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_slugs_camera_order(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_slugs_camera_order_t packet_in = {
5,72,139,206,17
};
mavlink_slugs_camera_order_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target = packet_in.target;
packet1.pan = packet_in.pan;
packet1.tilt = packet_in.tilt;
packet1.zoom = packet_in.zoom;
packet1.moveHome = packet_in.moveHome;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SLUGS_CAMERA_ORDER_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_camera_order_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_slugs_camera_order_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_camera_order_pack(system_id, component_id, &msg , packet1.target , packet1.pan , packet1.tilt , packet1.zoom , packet1.moveHome );
mavlink_msg_slugs_camera_order_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_camera_order_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target , packet1.pan , packet1.tilt , packet1.zoom , packet1.moveHome );
mavlink_msg_slugs_camera_order_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_slugs_camera_order_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_camera_order_send(MAVLINK_COMM_1 , packet1.target , packet1.pan , packet1.tilt , packet1.zoom , packet1.moveHome );
mavlink_msg_slugs_camera_order_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_control_surface(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_CONTROL_SURFACE >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_control_surface_t packet_in = {
17.0,45.0,29,96
};
mavlink_control_surface_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.mControl = packet_in.mControl;
packet1.bControl = packet_in.bControl;
packet1.target = packet_in.target;
packet1.idSurface = packet_in.idSurface;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_CONTROL_SURFACE_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_CONTROL_SURFACE_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_control_surface_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_control_surface_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_control_surface_pack(system_id, component_id, &msg , packet1.target , packet1.idSurface , packet1.mControl , packet1.bControl );
mavlink_msg_control_surface_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_control_surface_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target , packet1.idSurface , packet1.mControl , packet1.bControl );
mavlink_msg_control_surface_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_control_surface_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_control_surface_send(MAVLINK_COMM_1 , packet1.target , packet1.idSurface , packet1.mControl , packet1.bControl );
mavlink_msg_control_surface_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_slugs_mobile_location(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_slugs_mobile_location_t packet_in = {
17.0,45.0,29
};
mavlink_slugs_mobile_location_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.latitude = packet_in.latitude;
packet1.longitude = packet_in.longitude;
packet1.target = packet_in.target;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SLUGS_MOBILE_LOCATION_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_mobile_location_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_slugs_mobile_location_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_mobile_location_pack(system_id, component_id, &msg , packet1.target , packet1.latitude , packet1.longitude );
mavlink_msg_slugs_mobile_location_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_mobile_location_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target , packet1.latitude , packet1.longitude );
mavlink_msg_slugs_mobile_location_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_slugs_mobile_location_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_mobile_location_send(MAVLINK_COMM_1 , packet1.target , packet1.latitude , packet1.longitude );
mavlink_msg_slugs_mobile_location_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_slugs_configuration_camera(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_slugs_configuration_camera_t packet_in = {
5,72,139
};
mavlink_slugs_configuration_camera_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target = packet_in.target;
packet1.idOrder = packet_in.idOrder;
packet1.order = packet_in.order;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SLUGS_CONFIGURATION_CAMERA_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_configuration_camera_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_slugs_configuration_camera_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_configuration_camera_pack(system_id, component_id, &msg , packet1.target , packet1.idOrder , packet1.order );
mavlink_msg_slugs_configuration_camera_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_configuration_camera_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target , packet1.idOrder , packet1.order );
mavlink_msg_slugs_configuration_camera_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_slugs_configuration_camera_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_slugs_configuration_camera_send(MAVLINK_COMM_1 , packet1.target , packet1.idOrder , packet1.order );
mavlink_msg_slugs_configuration_camera_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_isr_location(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ISR_LOCATION >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_isr_location_t packet_in = {
17.0,45.0,73.0,41,108,175,242
};
mavlink_isr_location_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.latitude = packet_in.latitude;
packet1.longitude = packet_in.longitude;
packet1.height = packet_in.height;
packet1.target = packet_in.target;
packet1.option1 = packet_in.option1;
packet1.option2 = packet_in.option2;
packet1.option3 = packet_in.option3;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_ISR_LOCATION_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ISR_LOCATION_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_isr_location_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_isr_location_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_isr_location_pack(system_id, component_id, &msg , packet1.target , packet1.latitude , packet1.longitude , packet1.height , packet1.option1 , packet1.option2 , packet1.option3 );
mavlink_msg_isr_location_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_isr_location_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target , packet1.latitude , packet1.longitude , packet1.height , packet1.option1 , packet1.option2 , packet1.option3 );
mavlink_msg_isr_location_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_isr_location_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_isr_location_send(MAVLINK_COMM_1 , packet1.target , packet1.latitude , packet1.longitude , packet1.height , packet1.option1 , packet1.option2 , packet1.option3 );
mavlink_msg_isr_location_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_volt_sensor(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_VOLT_SENSOR >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_volt_sensor_t packet_in = {
17235,17339,17
};
mavlink_volt_sensor_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.voltage = packet_in.voltage;
packet1.reading2 = packet_in.reading2;
packet1.r2Type = packet_in.r2Type;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_VOLT_SENSOR_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_VOLT_SENSOR_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_volt_sensor_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_volt_sensor_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_volt_sensor_pack(system_id, component_id, &msg , packet1.r2Type , packet1.voltage , packet1.reading2 );
mavlink_msg_volt_sensor_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_volt_sensor_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.r2Type , packet1.voltage , packet1.reading2 );
mavlink_msg_volt_sensor_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_volt_sensor_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_volt_sensor_send(MAVLINK_COMM_1 , packet1.r2Type , packet1.voltage , packet1.reading2 );
mavlink_msg_volt_sensor_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_ptz_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_PTZ_STATUS >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_ptz_status_t packet_in = {
17235,17339,17
};
mavlink_ptz_status_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.pan = packet_in.pan;
packet1.tilt = packet_in.tilt;
packet1.zoom = packet_in.zoom;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_PTZ_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_PTZ_STATUS_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_ptz_status_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_ptz_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_ptz_status_pack(system_id, component_id, &msg , packet1.zoom , packet1.pan , packet1.tilt );
mavlink_msg_ptz_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_ptz_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.zoom , packet1.pan , packet1.tilt );
mavlink_msg_ptz_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_ptz_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_ptz_status_send(MAVLINK_COMM_1 , packet1.zoom , packet1.pan , packet1.tilt );
mavlink_msg_ptz_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_uav_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_UAV_STATUS >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_uav_status_t packet_in = {
17.0,45.0,73.0,101.0,129.0,65
};
mavlink_uav_status_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.latitude = packet_in.latitude;
packet1.longitude = packet_in.longitude;
packet1.altitude = packet_in.altitude;
packet1.speed = packet_in.speed;
packet1.course = packet_in.course;
packet1.target = packet_in.target;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_uav_status_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_uav_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_uav_status_pack(system_id, component_id, &msg , packet1.target , packet1.latitude , packet1.longitude , packet1.altitude , packet1.speed , packet1.course );
mavlink_msg_uav_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_uav_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target , packet1.latitude , packet1.longitude , packet1.altitude , packet1.speed , packet1.course );
mavlink_msg_uav_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_uav_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_uav_status_send(MAVLINK_COMM_1 , packet1.target , packet1.latitude , packet1.longitude , packet1.altitude , packet1.speed , packet1.course );
mavlink_msg_uav_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_status_gps(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_STATUS_GPS >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_status_gps_t packet_in = {
17.0,17443,151,218,29,96,163
};
mavlink_status_gps_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.magVar = packet_in.magVar;
packet1.csFails = packet_in.csFails;
packet1.gpsQuality = packet_in.gpsQuality;
packet1.msgsType = packet_in.msgsType;
packet1.posStatus = packet_in.posStatus;
packet1.magDir = packet_in.magDir;
packet1.modeInd = packet_in.modeInd;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_STATUS_GPS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_STATUS_GPS_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_status_gps_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_status_gps_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_status_gps_pack(system_id, component_id, &msg , packet1.csFails , packet1.gpsQuality , packet1.msgsType , packet1.posStatus , packet1.magVar , packet1.magDir , packet1.modeInd );
mavlink_msg_status_gps_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_status_gps_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.csFails , packet1.gpsQuality , packet1.msgsType , packet1.posStatus , packet1.magVar , packet1.magDir , packet1.modeInd );
mavlink_msg_status_gps_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_status_gps_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_status_gps_send(MAVLINK_COMM_1 , packet1.csFails , packet1.gpsQuality , packet1.msgsType , packet1.posStatus , packet1.magVar , packet1.magDir , packet1.modeInd );
mavlink_msg_status_gps_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_novatel_diag(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_NOVATEL_DIAG >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_novatel_diag_t packet_in = {
963497464,45.0,17651,163,230,41,108
};
mavlink_novatel_diag_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.receiverStatus = packet_in.receiverStatus;
packet1.posSolAge = packet_in.posSolAge;
packet1.csFails = packet_in.csFails;
packet1.timeStatus = packet_in.timeStatus;
packet1.solStatus = packet_in.solStatus;
packet1.posType = packet_in.posType;
packet1.velType = packet_in.velType;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_NOVATEL_DIAG_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_NOVATEL_DIAG_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_novatel_diag_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_novatel_diag_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_novatel_diag_pack(system_id, component_id, &msg , packet1.timeStatus , packet1.receiverStatus , packet1.solStatus , packet1.posType , packet1.velType , packet1.posSolAge , packet1.csFails );
mavlink_msg_novatel_diag_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_novatel_diag_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.timeStatus , packet1.receiverStatus , packet1.solStatus , packet1.posType , packet1.velType , packet1.posSolAge , packet1.csFails );
mavlink_msg_novatel_diag_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_novatel_diag_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_novatel_diag_send(MAVLINK_COMM_1 , packet1.timeStatus , packet1.receiverStatus , packet1.solStatus , packet1.posType , packet1.velType , packet1.posSolAge , packet1.csFails );
mavlink_msg_novatel_diag_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_sensor_diag(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SENSOR_DIAG >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_sensor_diag_t packet_in = {
17.0,45.0,17651,163
};
mavlink_sensor_diag_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.float1 = packet_in.float1;
packet1.float2 = packet_in.float2;
packet1.int1 = packet_in.int1;
packet1.char1 = packet_in.char1;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_SENSOR_DIAG_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SENSOR_DIAG_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_sensor_diag_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_sensor_diag_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_sensor_diag_pack(system_id, component_id, &msg , packet1.float1 , packet1.float2 , packet1.int1 , packet1.char1 );
mavlink_msg_sensor_diag_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_sensor_diag_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.float1 , packet1.float2 , packet1.int1 , packet1.char1 );
mavlink_msg_sensor_diag_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_sensor_diag_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_sensor_diag_send(MAVLINK_COMM_1 , packet1.float1 , packet1.float2 , packet1.int1 , packet1.char1 );
mavlink_msg_sensor_diag_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_boot(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_BOOT >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_boot_t packet_in = {
963497464
};
mavlink_boot_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.version = packet_in.version;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_BOOT_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_BOOT_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_boot_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_boot_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_boot_pack(system_id, component_id, &msg , packet1.version );
mavlink_msg_boot_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_boot_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.version );
mavlink_msg_boot_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_boot_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_boot_send(MAVLINK_COMM_1 , packet1.version );
mavlink_msg_boot_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_slugs(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_test_cpu_load(system_id, component_id, last_msg);
mavlink_test_sensor_bias(system_id, component_id, last_msg);
mavlink_test_diagnostic(system_id, component_id, last_msg);
mavlink_test_slugs_navigation(system_id, component_id, last_msg);
mavlink_test_data_log(system_id, component_id, last_msg);
mavlink_test_gps_date_time(system_id, component_id, last_msg);
mavlink_test_mid_lvl_cmds(system_id, component_id, last_msg);
mavlink_test_ctrl_srfc_pt(system_id, component_id, last_msg);
mavlink_test_slugs_camera_order(system_id, component_id, last_msg);
mavlink_test_control_surface(system_id, component_id, last_msg);
mavlink_test_slugs_mobile_location(system_id, component_id, last_msg);
mavlink_test_slugs_configuration_camera(system_id, component_id, last_msg);
mavlink_test_isr_location(system_id, component_id, last_msg);
mavlink_test_volt_sensor(system_id, component_id, last_msg);
mavlink_test_ptz_status(system_id, component_id, last_msg);
mavlink_test_uav_status(system_id, component_id, last_msg);
mavlink_test_status_gps(system_id, component_id, last_msg);
mavlink_test_novatel_diag(system_id, component_id, last_msg);
mavlink_test_sensor_diag(system_id, component_id, last_msg);
mavlink_test_boot(system_id, component_id, last_msg);
}
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // SLUGS_TESTSUITE_H
/** @file
* @brief MAVLink comm protocol built from slugs.xml
* @see http://mavlink.org
*/
#pragma once
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Sat Sep 05 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
#endif // MAVLINK_VERSION_H
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Sat Sep 05 2020"
#define MAVLINK_BUILD_DATE "Sun Sep 06 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Sat Sep 05 2020"
#define MAVLINK_BUILD_DATE "Sun Sep 06 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 179
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Sat Sep 05 2020"
#define MAVLINK_BUILD_DATE "Sun Sep 06 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment