Commit 78f9ea18 authored by PX4BuildBot's avatar PX4BuildBot

autogenerated headers for rev...

autogenerated headers for rev https://github.com/mavlink/mavlink/tree/d397e0a518b55b2cfcd33c23b6296c4db0ba94b0
parent 6bcdf8bc
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:54 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:33 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
This diff is collapsed.
// MESSAGE GIMBAL_FACTORY_PARAMETERS_LOADED PACKING
#define MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED 207
typedef struct __mavlink_gimbal_factory_parameters_loaded_t
{
uint8_t dummy; /*< Dummy field because mavgen doesn't allow messages with no fields*/
} mavlink_gimbal_factory_parameters_loaded_t;
#define MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN 1
#define MAVLINK_MSG_ID_207_LEN 1
#define MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC 201
#define MAVLINK_MSG_ID_207_CRC 201
#define MAVLINK_MESSAGE_INFO_GIMBAL_FACTORY_PARAMETERS_LOADED { \
"GIMBAL_FACTORY_PARAMETERS_LOADED", \
1, \
{ { "dummy", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_factory_parameters_loaded_t, dummy) }, \
} \
}
/**
* @brief Pack a gimbal_factory_parameters_loaded 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 dummy Dummy field because mavgen doesn't allow messages with no fields
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_factory_parameters_loaded_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t dummy)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN];
_mav_put_uint8_t(buf, 0, dummy);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#else
mavlink_gimbal_factory_parameters_loaded_t packet;
packet.dummy = dummy;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
}
/**
* @brief Pack a gimbal_factory_parameters_loaded 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 dummy Dummy field because mavgen doesn't allow messages with no fields
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_factory_parameters_loaded_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t dummy)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN];
_mav_put_uint8_t(buf, 0, dummy);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#else
mavlink_gimbal_factory_parameters_loaded_t packet;
packet.dummy = dummy;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
}
/**
* @brief Encode a gimbal_factory_parameters_loaded 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 gimbal_factory_parameters_loaded C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_factory_parameters_loaded_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_factory_parameters_loaded_t* gimbal_factory_parameters_loaded)
{
return mavlink_msg_gimbal_factory_parameters_loaded_pack(system_id, component_id, msg, gimbal_factory_parameters_loaded->dummy);
}
/**
* @brief Encode a gimbal_factory_parameters_loaded 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 gimbal_factory_parameters_loaded C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_factory_parameters_loaded_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_factory_parameters_loaded_t* gimbal_factory_parameters_loaded)
{
return mavlink_msg_gimbal_factory_parameters_loaded_pack_chan(system_id, component_id, chan, msg, gimbal_factory_parameters_loaded->dummy);
}
/**
* @brief Send a gimbal_factory_parameters_loaded message
* @param chan MAVLink channel to send the message
*
* @param dummy Dummy field because mavgen doesn't allow messages with no fields
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_factory_parameters_loaded_send(mavlink_channel_t chan, uint8_t dummy)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN];
_mav_put_uint8_t(buf, 0, dummy);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, buf, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, buf, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
#else
mavlink_gimbal_factory_parameters_loaded_t packet;
packet.dummy = dummy;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_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_gimbal_factory_parameters_loaded_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t dummy)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, dummy);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, buf, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, buf, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
#else
mavlink_gimbal_factory_parameters_loaded_t *packet = (mavlink_gimbal_factory_parameters_loaded_t *)msgbuf;
packet->dummy = dummy;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_FACTORY_PARAMETERS_LOADED UNPACKING
/**
* @brief Get field dummy from gimbal_factory_parameters_loaded message
*
* @return Dummy field because mavgen doesn't allow messages with no fields
*/
static inline uint8_t mavlink_msg_gimbal_factory_parameters_loaded_get_dummy(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Decode a gimbal_factory_parameters_loaded message into a struct
*
* @param msg The message to decode
* @param gimbal_factory_parameters_loaded C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_factory_parameters_loaded_decode(const mavlink_message_t* msg, mavlink_gimbal_factory_parameters_loaded_t* gimbal_factory_parameters_loaded)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_factory_parameters_loaded->dummy = mavlink_msg_gimbal_factory_parameters_loaded_get_dummy(msg);
#else
memcpy(gimbal_factory_parameters_loaded, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
}
// MESSAGE GIMBAL_HOME_OFFSET_CALIBRATION_RESULT PACKING
#define MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT 205
typedef struct __mavlink_gimbal_home_offset_calibration_result_t
{
uint8_t calibration_result; /*< The result of the home offset calibration*/
} mavlink_gimbal_home_offset_calibration_result_t;
#define MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN 1
#define MAVLINK_MSG_ID_205_LEN 1
#define MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC 63
#define MAVLINK_MSG_ID_205_CRC 63
#define MAVLINK_MESSAGE_INFO_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT { \
"GIMBAL_HOME_OFFSET_CALIBRATION_RESULT", \
1, \
{ { "calibration_result", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_home_offset_calibration_result_t, calibration_result) }, \
} \
}
/**
* @brief Pack a gimbal_home_offset_calibration_result 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 calibration_result The result of the home offset calibration
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_home_offset_calibration_result_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t calibration_result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN];
_mav_put_uint8_t(buf, 0, calibration_result);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#else
mavlink_gimbal_home_offset_calibration_result_t packet;
packet.calibration_result = calibration_result;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
}
/**
* @brief Pack a gimbal_home_offset_calibration_result 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 calibration_result The result of the home offset calibration
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_home_offset_calibration_result_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t calibration_result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN];
_mav_put_uint8_t(buf, 0, calibration_result);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#else
mavlink_gimbal_home_offset_calibration_result_t packet;
packet.calibration_result = calibration_result;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
}
/**
* @brief Encode a gimbal_home_offset_calibration_result 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 gimbal_home_offset_calibration_result C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_home_offset_calibration_result_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_home_offset_calibration_result_t* gimbal_home_offset_calibration_result)
{
return mavlink_msg_gimbal_home_offset_calibration_result_pack(system_id, component_id, msg, gimbal_home_offset_calibration_result->calibration_result);
}
/**
* @brief Encode a gimbal_home_offset_calibration_result 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 gimbal_home_offset_calibration_result C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_home_offset_calibration_result_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_home_offset_calibration_result_t* gimbal_home_offset_calibration_result)
{
return mavlink_msg_gimbal_home_offset_calibration_result_pack_chan(system_id, component_id, chan, msg, gimbal_home_offset_calibration_result->calibration_result);
}
/**
* @brief Send a gimbal_home_offset_calibration_result message
* @param chan MAVLink channel to send the message
*
* @param calibration_result The result of the home offset calibration
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_home_offset_calibration_result_send(mavlink_channel_t chan, uint8_t calibration_result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN];
_mav_put_uint8_t(buf, 0, calibration_result);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, buf, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, buf, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
#else
mavlink_gimbal_home_offset_calibration_result_t packet;
packet.calibration_result = calibration_result;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_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_gimbal_home_offset_calibration_result_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t calibration_result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, calibration_result);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, buf, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, buf, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
#else
mavlink_gimbal_home_offset_calibration_result_t *packet = (mavlink_gimbal_home_offset_calibration_result_t *)msgbuf;
packet->calibration_result = calibration_result;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_HOME_OFFSET_CALIBRATION_RESULT UNPACKING
/**
* @brief Get field calibration_result from gimbal_home_offset_calibration_result message
*
* @return The result of the home offset calibration
*/
static inline uint8_t mavlink_msg_gimbal_home_offset_calibration_result_get_calibration_result(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Decode a gimbal_home_offset_calibration_result message into a struct
*
* @param msg The message to decode
* @param gimbal_home_offset_calibration_result C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_home_offset_calibration_result_decode(const mavlink_message_t* msg, mavlink_gimbal_home_offset_calibration_result_t* gimbal_home_offset_calibration_result)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_home_offset_calibration_result->calibration_result = mavlink_msg_gimbal_home_offset_calibration_result_get_calibration_result(msg);
#else
memcpy(gimbal_home_offset_calibration_result, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
}
......@@ -11,9 +11,9 @@ typedef struct __mavlink_gimbal_report_t
float delta_velocity_x; /*< Delta velocity X (m/s)*/
float delta_velocity_y; /*< Delta velocity Y (m/s)*/
float delta_velocity_z; /*< Delta velocity Z (m/s)*/
float joint_roll; /*< Joint ROLL (radians)*/
float joint_el; /*< Joint EL (radians)*/
float joint_az; /*< Joint AZ (radians)*/
float joint_roll; /*< Joint ROLL (radians)*/
float joint_el; /*< Joint EL (radians)*/
float joint_az; /*< Joint AZ (radians)*/
uint8_t target_system; /*< System ID*/
uint8_t target_component; /*< Component ID*/
} mavlink_gimbal_report_t;
......@@ -60,9 +60,9 @@ typedef struct __mavlink_gimbal_report_t
* @param delta_velocity_x Delta velocity X (m/s)
* @param delta_velocity_y Delta velocity Y (m/s)
* @param delta_velocity_z Delta velocity Z (m/s)
* @param joint_roll Joint ROLL (radians)
* @param joint_el Joint EL (radians)
* @param joint_az Joint AZ (radians)
* @param joint_roll Joint ROLL (radians)
* @param joint_el Joint EL (radians)
* @param joint_az Joint AZ (radians)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_report_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
......@@ -125,9 +125,9 @@ static inline uint16_t mavlink_msg_gimbal_report_pack(uint8_t system_id, uint8_t
* @param delta_velocity_x Delta velocity X (m/s)
* @param delta_velocity_y Delta velocity Y (m/s)
* @param delta_velocity_z Delta velocity Z (m/s)
* @param joint_roll Joint ROLL (radians)
* @param joint_el Joint EL (radians)
* @param joint_az Joint AZ (radians)
* @param joint_roll Joint ROLL (radians)
* @param joint_el Joint EL (radians)
* @param joint_az Joint AZ (radians)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_report_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
......@@ -216,9 +216,9 @@ static inline uint16_t mavlink_msg_gimbal_report_encode_chan(uint8_t system_id,
* @param delta_velocity_x Delta velocity X (m/s)
* @param delta_velocity_y Delta velocity Y (m/s)
* @param delta_velocity_z Delta velocity Z (m/s)
* @param joint_roll Joint ROLL (radians)
* @param joint_el Joint EL (radians)
* @param joint_az Joint AZ (radians)
* @param joint_roll Joint ROLL (radians)
* @param joint_el Joint EL (radians)
* @param joint_az Joint AZ (radians)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
......@@ -419,7 +419,7 @@ static inline float mavlink_msg_gimbal_report_get_delta_velocity_z(const mavlink
/**
* @brief Get field joint_roll from gimbal_report message
*
* @return Joint ROLL (radians)
* @return Joint ROLL (radians)
*/
static inline float mavlink_msg_gimbal_report_get_joint_roll(const mavlink_message_t* msg)
{
......@@ -429,7 +429,7 @@ static inline float mavlink_msg_gimbal_report_get_joint_roll(const mavlink_messa
/**
* @brief Get field joint_el from gimbal_report message
*
* @return Joint EL (radians)
* @return Joint EL (radians)
*/
static inline float mavlink_msg_gimbal_report_get_joint_el(const mavlink_message_t* msg)
{
......@@ -439,7 +439,7 @@ static inline float mavlink_msg_gimbal_report_get_joint_el(const mavlink_message
/**
* @brief Get field joint_az from gimbal_report message
*
* @return Joint AZ (radians)
* @return Joint AZ (radians)
*/
static inline float mavlink_msg_gimbal_report_get_joint_az(const mavlink_message_t* msg)
{
......
// MESSAGE GIMBAL_SET_HOME_OFFSETS PACKING
#define MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS 204
typedef struct __mavlink_gimbal_set_home_offsets_t
{
uint8_t target_system; /*< System ID*/
uint8_t target_component; /*< Component ID*/
} mavlink_gimbal_set_home_offsets_t;
#define MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN 2
#define MAVLINK_MSG_ID_204_LEN 2
#define MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC 54
#define MAVLINK_MSG_ID_204_CRC 54
#define MAVLINK_MESSAGE_INFO_GIMBAL_SET_HOME_OFFSETS { \
"GIMBAL_SET_HOME_OFFSETS", \
2, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_set_home_offsets_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_set_home_offsets_t, target_component) }, \
} \
}
/**
* @brief Pack a gimbal_set_home_offsets message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_set_home_offsets_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#else
mavlink_gimbal_set_home_offsets_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
}
/**
* @brief Pack a gimbal_set_home_offsets 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_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_set_home_offsets_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#else
mavlink_gimbal_set_home_offsets_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
}
/**
* @brief Encode a gimbal_set_home_offsets 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 gimbal_set_home_offsets C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_set_home_offsets_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_set_home_offsets_t* gimbal_set_home_offsets)
{
return mavlink_msg_gimbal_set_home_offsets_pack(system_id, component_id, msg, gimbal_set_home_offsets->target_system, gimbal_set_home_offsets->target_component);
}
/**
* @brief Encode a gimbal_set_home_offsets 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 gimbal_set_home_offsets C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_set_home_offsets_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_set_home_offsets_t* gimbal_set_home_offsets)
{
return mavlink_msg_gimbal_set_home_offsets_pack_chan(system_id, component_id, chan, msg, gimbal_set_home_offsets->target_system, gimbal_set_home_offsets->target_component);
}
/**
* @brief Send a gimbal_set_home_offsets message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_set_home_offsets_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, buf, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, buf, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
#else
mavlink_gimbal_set_home_offsets_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_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_gimbal_set_home_offsets_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, buf, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, buf, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
#else
mavlink_gimbal_set_home_offsets_t *packet = (mavlink_gimbal_set_home_offsets_t *)msgbuf;
packet->target_system = target_system;
packet->target_component = target_component;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_SET_HOME_OFFSETS UNPACKING
/**
* @brief Get field target_system from gimbal_set_home_offsets message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gimbal_set_home_offsets_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from gimbal_set_home_offsets message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gimbal_set_home_offsets_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Decode a gimbal_set_home_offsets message into a struct
*
* @param msg The message to decode
* @param gimbal_set_home_offsets C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_set_home_offsets_decode(const mavlink_message_t* msg, mavlink_gimbal_set_home_offsets_t* gimbal_set_home_offsets)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_set_home_offsets->target_system = mavlink_msg_gimbal_set_home_offsets_get_target_system(msg);
gimbal_set_home_offsets->target_component = mavlink_msg_gimbal_set_home_offsets_get_target_component(msg);
#else
memcpy(gimbal_set_home_offsets, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
}
This diff is collapsed.
This diff is collapsed.
// MESSAGE GOPRO_GET_RESPONSE PACKING
#define MAVLINK_MSG_ID_GOPRO_GET_RESPONSE 217
typedef struct __mavlink_gopro_get_response_t
{
uint8_t cmd_id; /*< Command ID*/
uint8_t status; /*< Status*/
uint8_t value[4]; /*< Value*/
} mavlink_gopro_get_response_t;
#define MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN 6
#define MAVLINK_MSG_ID_217_LEN 6
#define MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC 202
#define MAVLINK_MSG_ID_217_CRC 202
#define MAVLINK_MSG_GOPRO_GET_RESPONSE_FIELD_VALUE_LEN 4
#define MAVLINK_MESSAGE_INFO_GOPRO_GET_RESPONSE { \
"GOPRO_GET_RESPONSE", \
3, \
{ { "cmd_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_get_response_t, cmd_id) }, \
{ "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_get_response_t, status) }, \
{ "value", NULL, MAVLINK_TYPE_UINT8_T, 4, 2, offsetof(mavlink_gopro_get_response_t, value) }, \
} \
}
/**
* @brief Pack a gopro_get_response 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 cmd_id Command ID
* @param status Status
* @param value Value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_get_response_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t cmd_id, uint8_t status, const uint8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN];
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, status);
_mav_put_uint8_t_array(buf, 2, value, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#else
mavlink_gopro_get_response_t packet;
packet.cmd_id = cmd_id;
packet.status = status;
mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_GET_RESPONSE;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
}
/**
* @brief Pack a gopro_get_response 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 cmd_id Command ID
* @param status Status
* @param value Value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_get_response_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t cmd_id,uint8_t status,const uint8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN];
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, status);
_mav_put_uint8_t_array(buf, 2, value, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#else
mavlink_gopro_get_response_t packet;
packet.cmd_id = cmd_id;
packet.status = status;
mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_GET_RESPONSE;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
}
/**
* @brief Encode a gopro_get_response 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 gopro_get_response C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_get_response_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_get_response_t* gopro_get_response)
{
return mavlink_msg_gopro_get_response_pack(system_id, component_id, msg, gopro_get_response->cmd_id, gopro_get_response->status, gopro_get_response->value);
}
/**
* @brief Encode a gopro_get_response 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 gopro_get_response C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_get_response_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_get_response_t* gopro_get_response)
{
return mavlink_msg_gopro_get_response_pack_chan(system_id, component_id, chan, msg, gopro_get_response->cmd_id, gopro_get_response->status, gopro_get_response->value);
}
/**
* @brief Send a gopro_get_response message
* @param chan MAVLink channel to send the message
*
* @param cmd_id Command ID
* @param status Status
* @param value Value
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gopro_get_response_send(mavlink_channel_t chan, uint8_t cmd_id, uint8_t status, const uint8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN];
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, status);
_mav_put_uint8_t_array(buf, 2, value, 4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
#else
mavlink_gopro_get_response_t packet;
packet.cmd_id = cmd_id;
packet.status = status;
mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_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_gopro_get_response_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t cmd_id, uint8_t status, const uint8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, status);
_mav_put_uint8_t_array(buf, 2, value, 4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
#else
mavlink_gopro_get_response_t *packet = (mavlink_gopro_get_response_t *)msgbuf;
packet->cmd_id = cmd_id;
packet->status = status;
mav_array_memcpy(packet->value, value, sizeof(uint8_t)*4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, (const char *)packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, (const char *)packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GOPRO_GET_RESPONSE UNPACKING
/**
* @brief Get field cmd_id from gopro_get_response message
*
* @return Command ID
*/
static inline uint8_t mavlink_msg_gopro_get_response_get_cmd_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field status from gopro_get_response message
*
* @return Status
*/
static inline uint8_t mavlink_msg_gopro_get_response_get_status(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field value from gopro_get_response message
*
* @return Value
*/
static inline uint16_t mavlink_msg_gopro_get_response_get_value(const mavlink_message_t* msg, uint8_t *value)
{
return _MAV_RETURN_uint8_t_array(msg, value, 4, 2);
}
/**
* @brief Decode a gopro_get_response message into a struct
*
* @param msg The message to decode
* @param gopro_get_response C-struct to decode the message contents into
*/
static inline void mavlink_msg_gopro_get_response_decode(const mavlink_message_t* msg, mavlink_gopro_get_response_t* gopro_get_response)
{
#if MAVLINK_NEED_BYTE_SWAP
gopro_get_response->cmd_id = mavlink_msg_gopro_get_response_get_cmd_id(msg);
gopro_get_response->status = mavlink_msg_gopro_get_response_get_status(msg);
mavlink_msg_gopro_get_response_get_value(msg, gopro_get_response->value);
#else
memcpy(gopro_get_response, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
}
This diff is collapsed.
This diff is collapsed.
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:35 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:11 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:39 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:15 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:39:00 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:39 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:42 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:19 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
This diff is collapsed.
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:46 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:23 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 9
......
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:46 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:24 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:50 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:28 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 179
......
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:50 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:29 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.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