GCS_MAVLink: generate after GIMBAL/GOPRO msgs added

This commit is contained in:
Randy Mackay 2015-04-21 21:01:06 +09:00
parent 86b81120fd
commit 9f10c43708
19 changed files with 5275 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,257 @@
// MESSAGE GIMBAL_AXIS_CALIBRATION_PROGRESS PACKING
#define MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS 203
typedef struct __mavlink_gimbal_axis_calibration_progress_t
{
uint8_t calibration_axis; ///< Which gimbal axis we're reporting calibration progress for
uint8_t calibration_progress; ///< The current calibration progress for this axis, 0x64=100%
uint8_t calibration_status; ///< The status of the running calibration
} mavlink_gimbal_axis_calibration_progress_t;
#define MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN 3
#define MAVLINK_MSG_ID_203_LEN 3
#define MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC 128
#define MAVLINK_MSG_ID_203_CRC 128
#define MAVLINK_MESSAGE_INFO_GIMBAL_AXIS_CALIBRATION_PROGRESS { \
"GIMBAL_AXIS_CALIBRATION_PROGRESS", \
3, \
{ { "calibration_axis", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_axis_calibration_progress_t, calibration_axis) }, \
{ "calibration_progress", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_axis_calibration_progress_t, calibration_progress) }, \
{ "calibration_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gimbal_axis_calibration_progress_t, calibration_status) }, \
} \
}
/**
* @brief Pack a gimbal_axis_calibration_progress 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_axis Which gimbal axis we're reporting calibration progress for
* @param calibration_progress The current calibration progress for this axis, 0x64=100%
* @param calibration_status The status of the running calibration
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_axis_calibration_progress_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t calibration_axis, uint8_t calibration_progress, uint8_t calibration_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN];
_mav_put_uint8_t(buf, 0, calibration_axis);
_mav_put_uint8_t(buf, 1, calibration_progress);
_mav_put_uint8_t(buf, 2, calibration_status);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#else
mavlink_gimbal_axis_calibration_progress_t packet;
packet.calibration_axis = calibration_axis;
packet.calibration_progress = calibration_progress;
packet.calibration_status = calibration_status;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
}
/**
* @brief Pack a gimbal_axis_calibration_progress 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_axis Which gimbal axis we're reporting calibration progress for
* @param calibration_progress The current calibration progress for this axis, 0x64=100%
* @param calibration_status The status of the running calibration
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_axis_calibration_progress_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t calibration_axis,uint8_t calibration_progress,uint8_t calibration_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN];
_mav_put_uint8_t(buf, 0, calibration_axis);
_mav_put_uint8_t(buf, 1, calibration_progress);
_mav_put_uint8_t(buf, 2, calibration_status);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#else
mavlink_gimbal_axis_calibration_progress_t packet;
packet.calibration_axis = calibration_axis;
packet.calibration_progress = calibration_progress;
packet.calibration_status = calibration_status;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
}
/**
* @brief Encode a gimbal_axis_calibration_progress 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_axis_calibration_progress C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_axis_calibration_progress_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_axis_calibration_progress_t* gimbal_axis_calibration_progress)
{
return mavlink_msg_gimbal_axis_calibration_progress_pack(system_id, component_id, msg, gimbal_axis_calibration_progress->calibration_axis, gimbal_axis_calibration_progress->calibration_progress, gimbal_axis_calibration_progress->calibration_status);
}
/**
* @brief Encode a gimbal_axis_calibration_progress 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_axis_calibration_progress C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_axis_calibration_progress_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_axis_calibration_progress_t* gimbal_axis_calibration_progress)
{
return mavlink_msg_gimbal_axis_calibration_progress_pack_chan(system_id, component_id, chan, msg, gimbal_axis_calibration_progress->calibration_axis, gimbal_axis_calibration_progress->calibration_progress, gimbal_axis_calibration_progress->calibration_status);
}
/**
* @brief Send a gimbal_axis_calibration_progress message
* @param chan MAVLink channel to send the message
*
* @param calibration_axis Which gimbal axis we're reporting calibration progress for
* @param calibration_progress The current calibration progress for this axis, 0x64=100%
* @param calibration_status The status of the running calibration
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_axis_calibration_progress_send(mavlink_channel_t chan, uint8_t calibration_axis, uint8_t calibration_progress, uint8_t calibration_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN];
_mav_put_uint8_t(buf, 0, calibration_axis);
_mav_put_uint8_t(buf, 1, calibration_progress);
_mav_put_uint8_t(buf, 2, calibration_status);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
#else
mavlink_gimbal_axis_calibration_progress_t packet;
packet.calibration_axis = calibration_axis;
packet.calibration_progress = calibration_progress;
packet.calibration_status = calibration_status;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_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_axis_calibration_progress_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t calibration_axis, uint8_t calibration_progress, uint8_t calibration_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, calibration_axis);
_mav_put_uint8_t(buf, 1, calibration_progress);
_mav_put_uint8_t(buf, 2, calibration_status);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
#else
mavlink_gimbal_axis_calibration_progress_t *packet = (mavlink_gimbal_axis_calibration_progress_t *)msgbuf;
packet->calibration_axis = calibration_axis;
packet->calibration_progress = calibration_progress;
packet->calibration_status = calibration_status;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_AXIS_CALIBRATION_PROGRESS UNPACKING
/**
* @brief Get field calibration_axis from gimbal_axis_calibration_progress message
*
* @return Which gimbal axis we're reporting calibration progress for
*/
static inline uint8_t mavlink_msg_gimbal_axis_calibration_progress_get_calibration_axis(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field calibration_progress from gimbal_axis_calibration_progress message
*
* @return The current calibration progress for this axis, 0x64=100%
*/
static inline uint8_t mavlink_msg_gimbal_axis_calibration_progress_get_calibration_progress(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field calibration_status from gimbal_axis_calibration_progress message
*
* @return The status of the running calibration
*/
static inline uint8_t mavlink_msg_gimbal_axis_calibration_progress_get_calibration_status(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Decode a gimbal_axis_calibration_progress message into a struct
*
* @param msg The message to decode
* @param gimbal_axis_calibration_progress C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_axis_calibration_progress_decode(const mavlink_message_t* msg, mavlink_gimbal_axis_calibration_progress_t* gimbal_axis_calibration_progress)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_axis_calibration_progress->calibration_axis = mavlink_msg_gimbal_axis_calibration_progress_get_calibration_axis(msg);
gimbal_axis_calibration_progress->calibration_progress = mavlink_msg_gimbal_axis_calibration_progress_get_calibration_progress(msg);
gimbal_axis_calibration_progress->calibration_status = mavlink_msg_gimbal_axis_calibration_progress_get_calibration_status(msg);
#else
memcpy(gimbal_axis_calibration_progress, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
}

View File

@ -0,0 +1,257 @@
// MESSAGE GIMBAL_ERASE_FIRMWARE_AND_CONFIG PACKING
#define MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG 208
typedef struct __mavlink_gimbal_erase_firmware_and_config_t
{
uint32_t knock; ///< Knock value to confirm this is a valid request
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_gimbal_erase_firmware_and_config_t;
#define MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN 6
#define MAVLINK_MSG_ID_208_LEN 6
#define MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC 221
#define MAVLINK_MSG_ID_208_CRC 221
#define MAVLINK_MESSAGE_INFO_GIMBAL_ERASE_FIRMWARE_AND_CONFIG { \
"GIMBAL_ERASE_FIRMWARE_AND_CONFIG", \
3, \
{ { "knock", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gimbal_erase_firmware_and_config_t, knock) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_gimbal_erase_firmware_and_config_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_gimbal_erase_firmware_and_config_t, target_component) }, \
} \
}
/**
* @brief Pack a gimbal_erase_firmware_and_config message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param knock Knock value to confirm this is a valid request
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_erase_firmware_and_config_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint32_t knock)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN];
_mav_put_uint32_t(buf, 0, knock);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#else
mavlink_gimbal_erase_firmware_and_config_t packet;
packet.knock = knock;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
}
/**
* @brief Pack a gimbal_erase_firmware_and_config 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
* @param knock Knock value to confirm this is a valid request
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_erase_firmware_and_config_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,uint32_t knock)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN];
_mav_put_uint32_t(buf, 0, knock);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#else
mavlink_gimbal_erase_firmware_and_config_t packet;
packet.knock = knock;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
}
/**
* @brief Encode a gimbal_erase_firmware_and_config 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_erase_firmware_and_config C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_erase_firmware_and_config_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_erase_firmware_and_config_t* gimbal_erase_firmware_and_config)
{
return mavlink_msg_gimbal_erase_firmware_and_config_pack(system_id, component_id, msg, gimbal_erase_firmware_and_config->target_system, gimbal_erase_firmware_and_config->target_component, gimbal_erase_firmware_and_config->knock);
}
/**
* @brief Encode a gimbal_erase_firmware_and_config 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_erase_firmware_and_config C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_erase_firmware_and_config_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_erase_firmware_and_config_t* gimbal_erase_firmware_and_config)
{
return mavlink_msg_gimbal_erase_firmware_and_config_pack_chan(system_id, component_id, chan, msg, gimbal_erase_firmware_and_config->target_system, gimbal_erase_firmware_and_config->target_component, gimbal_erase_firmware_and_config->knock);
}
/**
* @brief Send a gimbal_erase_firmware_and_config message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param knock Knock value to confirm this is a valid request
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_erase_firmware_and_config_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t knock)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN];
_mav_put_uint32_t(buf, 0, knock);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, buf, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, buf, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
#else
mavlink_gimbal_erase_firmware_and_config_t packet;
packet.knock = knock;
packet.target_system = target_system;
packet.target_component = target_component;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_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_erase_firmware_and_config_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t knock)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint32_t(buf, 0, knock);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, buf, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, buf, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
#else
mavlink_gimbal_erase_firmware_and_config_t *packet = (mavlink_gimbal_erase_firmware_and_config_t *)msgbuf;
packet->knock = knock;
packet->target_system = target_system;
packet->target_component = target_component;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_ERASE_FIRMWARE_AND_CONFIG UNPACKING
/**
* @brief Get field target_system from gimbal_erase_firmware_and_config message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gimbal_erase_firmware_and_config_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
/**
* @brief Get field target_component from gimbal_erase_firmware_and_config message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gimbal_erase_firmware_and_config_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
/**
* @brief Get field knock from gimbal_erase_firmware_and_config message
*
* @return Knock value to confirm this is a valid request
*/
static inline uint32_t mavlink_msg_gimbal_erase_firmware_and_config_get_knock(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Decode a gimbal_erase_firmware_and_config message into a struct
*
* @param msg The message to decode
* @param gimbal_erase_firmware_and_config C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_erase_firmware_and_config_decode(const mavlink_message_t* msg, mavlink_gimbal_erase_firmware_and_config_t* gimbal_erase_firmware_and_config)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_erase_firmware_and_config->knock = mavlink_msg_gimbal_erase_firmware_and_config_get_knock(msg);
gimbal_erase_firmware_and_config->target_system = mavlink_msg_gimbal_erase_firmware_and_config_get_target_system(msg);
gimbal_erase_firmware_and_config->target_component = mavlink_msg_gimbal_erase_firmware_and_config_get_target_component(msg);
#else
memcpy(gimbal_erase_firmware_and_config, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
}

View File

@ -0,0 +1,209 @@
// 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
}

View File

@ -0,0 +1,209 @@
// 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
}

View File

@ -0,0 +1,233 @@
// MESSAGE GIMBAL_PERFORM_FACTORY_TESTS PACKING
#define MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS 209
typedef struct __mavlink_gimbal_perform_factory_tests_t
{
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_gimbal_perform_factory_tests_t;
#define MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN 2
#define MAVLINK_MSG_ID_209_LEN 2
#define MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC 226
#define MAVLINK_MSG_ID_209_CRC 226
#define MAVLINK_MESSAGE_INFO_GIMBAL_PERFORM_FACTORY_TESTS { \
"GIMBAL_PERFORM_FACTORY_TESTS", \
2, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_perform_factory_tests_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_perform_factory_tests_t, target_component) }, \
} \
}
/**
* @brief Pack a gimbal_perform_factory_tests 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_perform_factory_tests_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_PERFORM_FACTORY_TESTS_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_PERFORM_FACTORY_TESTS_LEN);
#else
mavlink_gimbal_perform_factory_tests_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
#endif
}
/**
* @brief Pack a gimbal_perform_factory_tests 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_perform_factory_tests_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_PERFORM_FACTORY_TESTS_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_PERFORM_FACTORY_TESTS_LEN);
#else
mavlink_gimbal_perform_factory_tests_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
#endif
}
/**
* @brief Encode a gimbal_perform_factory_tests 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_perform_factory_tests C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_perform_factory_tests_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_perform_factory_tests_t* gimbal_perform_factory_tests)
{
return mavlink_msg_gimbal_perform_factory_tests_pack(system_id, component_id, msg, gimbal_perform_factory_tests->target_system, gimbal_perform_factory_tests->target_component);
}
/**
* @brief Encode a gimbal_perform_factory_tests 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_perform_factory_tests C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_perform_factory_tests_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_perform_factory_tests_t* gimbal_perform_factory_tests)
{
return mavlink_msg_gimbal_perform_factory_tests_pack_chan(system_id, component_id, chan, msg, gimbal_perform_factory_tests->target_system, gimbal_perform_factory_tests->target_component);
}
/**
* @brief Send a gimbal_perform_factory_tests 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_perform_factory_tests_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_PERFORM_FACTORY_TESTS_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_PERFORM_FACTORY_TESTS, buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
#endif
#else
mavlink_gimbal_perform_factory_tests_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_PERFORM_FACTORY_TESTS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_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_perform_factory_tests_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_PERFORM_FACTORY_TESTS, buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
#endif
#else
mavlink_gimbal_perform_factory_tests_t *packet = (mavlink_gimbal_perform_factory_tests_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_PERFORM_FACTORY_TESTS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_PERFORM_FACTORY_TESTS UNPACKING
/**
* @brief Get field target_system from gimbal_perform_factory_tests message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gimbal_perform_factory_tests_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from gimbal_perform_factory_tests message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gimbal_perform_factory_tests_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Decode a gimbal_perform_factory_tests message into a struct
*
* @param msg The message to decode
* @param gimbal_perform_factory_tests C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_perform_factory_tests_decode(const mavlink_message_t* msg, mavlink_gimbal_perform_factory_tests_t* gimbal_perform_factory_tests)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_perform_factory_tests->target_system = mavlink_msg_gimbal_perform_factory_tests_get_target_system(msg);
gimbal_perform_factory_tests->target_component = mavlink_msg_gimbal_perform_factory_tests_get_target_component(msg);
#else
memcpy(gimbal_perform_factory_tests, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
#endif
}

View File

@ -0,0 +1,257 @@
// MESSAGE GIMBAL_REPORT_AXIS_CALIBRATION_STATUS PACKING
#define MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS 212
typedef struct __mavlink_gimbal_report_axis_calibration_status_t
{
uint8_t yaw_requires_calibration; ///< Whether or not the yaw axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
uint8_t pitch_requires_calibration; ///< Whether or not the pitch axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
uint8_t roll_requires_calibration; ///< Whether or not the roll axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
} mavlink_gimbal_report_axis_calibration_status_t;
#define MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN 3
#define MAVLINK_MSG_ID_212_LEN 3
#define MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC 235
#define MAVLINK_MSG_ID_212_CRC 235
#define MAVLINK_MESSAGE_INFO_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS { \
"GIMBAL_REPORT_AXIS_CALIBRATION_STATUS", \
3, \
{ { "yaw_requires_calibration", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_report_axis_calibration_status_t, yaw_requires_calibration) }, \
{ "pitch_requires_calibration", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_report_axis_calibration_status_t, pitch_requires_calibration) }, \
{ "roll_requires_calibration", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gimbal_report_axis_calibration_status_t, roll_requires_calibration) }, \
} \
}
/**
* @brief Pack a gimbal_report_axis_calibration_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 yaw_requires_calibration Whether or not the yaw axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
* @param pitch_requires_calibration Whether or not the pitch axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
* @param roll_requires_calibration Whether or not the roll axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_report_axis_calibration_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t yaw_requires_calibration, uint8_t pitch_requires_calibration, uint8_t roll_requires_calibration)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN];
_mav_put_uint8_t(buf, 0, yaw_requires_calibration);
_mav_put_uint8_t(buf, 1, pitch_requires_calibration);
_mav_put_uint8_t(buf, 2, roll_requires_calibration);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN);
#else
mavlink_gimbal_report_axis_calibration_status_t packet;
packet.yaw_requires_calibration = yaw_requires_calibration;
packet.pitch_requires_calibration = pitch_requires_calibration;
packet.roll_requires_calibration = roll_requires_calibration;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN);
#endif
}
/**
* @brief Pack a gimbal_report_axis_calibration_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 yaw_requires_calibration Whether or not the yaw axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
* @param pitch_requires_calibration Whether or not the pitch axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
* @param roll_requires_calibration Whether or not the roll axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_report_axis_calibration_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t yaw_requires_calibration,uint8_t pitch_requires_calibration,uint8_t roll_requires_calibration)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN];
_mav_put_uint8_t(buf, 0, yaw_requires_calibration);
_mav_put_uint8_t(buf, 1, pitch_requires_calibration);
_mav_put_uint8_t(buf, 2, roll_requires_calibration);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN);
#else
mavlink_gimbal_report_axis_calibration_status_t packet;
packet.yaw_requires_calibration = yaw_requires_calibration;
packet.pitch_requires_calibration = pitch_requires_calibration;
packet.roll_requires_calibration = roll_requires_calibration;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN);
#endif
}
/**
* @brief Encode a gimbal_report_axis_calibration_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 gimbal_report_axis_calibration_status C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_report_axis_calibration_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_report_axis_calibration_status_t* gimbal_report_axis_calibration_status)
{
return mavlink_msg_gimbal_report_axis_calibration_status_pack(system_id, component_id, msg, gimbal_report_axis_calibration_status->yaw_requires_calibration, gimbal_report_axis_calibration_status->pitch_requires_calibration, gimbal_report_axis_calibration_status->roll_requires_calibration);
}
/**
* @brief Encode a gimbal_report_axis_calibration_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 gimbal_report_axis_calibration_status C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_report_axis_calibration_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_report_axis_calibration_status_t* gimbal_report_axis_calibration_status)
{
return mavlink_msg_gimbal_report_axis_calibration_status_pack_chan(system_id, component_id, chan, msg, gimbal_report_axis_calibration_status->yaw_requires_calibration, gimbal_report_axis_calibration_status->pitch_requires_calibration, gimbal_report_axis_calibration_status->roll_requires_calibration);
}
/**
* @brief Send a gimbal_report_axis_calibration_status message
* @param chan MAVLink channel to send the message
*
* @param yaw_requires_calibration Whether or not the yaw axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
* @param pitch_requires_calibration Whether or not the pitch axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
* @param roll_requires_calibration Whether or not the roll axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_report_axis_calibration_status_send(mavlink_channel_t chan, uint8_t yaw_requires_calibration, uint8_t pitch_requires_calibration, uint8_t roll_requires_calibration)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN];
_mav_put_uint8_t(buf, 0, yaw_requires_calibration);
_mav_put_uint8_t(buf, 1, pitch_requires_calibration);
_mav_put_uint8_t(buf, 2, roll_requires_calibration);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN);
#endif
#else
mavlink_gimbal_report_axis_calibration_status_t packet;
packet.yaw_requires_calibration = yaw_requires_calibration;
packet.pitch_requires_calibration = pitch_requires_calibration;
packet.roll_requires_calibration = roll_requires_calibration;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_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_gimbal_report_axis_calibration_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t yaw_requires_calibration, uint8_t pitch_requires_calibration, uint8_t roll_requires_calibration)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, yaw_requires_calibration);
_mav_put_uint8_t(buf, 1, pitch_requires_calibration);
_mav_put_uint8_t(buf, 2, roll_requires_calibration);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN);
#endif
#else
mavlink_gimbal_report_axis_calibration_status_t *packet = (mavlink_gimbal_report_axis_calibration_status_t *)msgbuf;
packet->yaw_requires_calibration = yaw_requires_calibration;
packet->pitch_requires_calibration = pitch_requires_calibration;
packet->roll_requires_calibration = roll_requires_calibration;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_REPORT_AXIS_CALIBRATION_STATUS UNPACKING
/**
* @brief Get field yaw_requires_calibration from gimbal_report_axis_calibration_status message
*
* @return Whether or not the yaw axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
*/
static inline uint8_t mavlink_msg_gimbal_report_axis_calibration_status_get_yaw_requires_calibration(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field pitch_requires_calibration from gimbal_report_axis_calibration_status message
*
* @return Whether or not the pitch axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
*/
static inline uint8_t mavlink_msg_gimbal_report_axis_calibration_status_get_pitch_requires_calibration(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field roll_requires_calibration from gimbal_report_axis_calibration_status message
*
* @return Whether or not the roll axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration
*/
static inline uint8_t mavlink_msg_gimbal_report_axis_calibration_status_get_roll_requires_calibration(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Decode a gimbal_report_axis_calibration_status message into a struct
*
* @param msg The message to decode
* @param gimbal_report_axis_calibration_status C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_report_axis_calibration_status_decode(const mavlink_message_t* msg, mavlink_gimbal_report_axis_calibration_status_t* gimbal_report_axis_calibration_status)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_report_axis_calibration_status->yaw_requires_calibration = mavlink_msg_gimbal_report_axis_calibration_status_get_yaw_requires_calibration(msg);
gimbal_report_axis_calibration_status->pitch_requires_calibration = mavlink_msg_gimbal_report_axis_calibration_status_get_pitch_requires_calibration(msg);
gimbal_report_axis_calibration_status->roll_requires_calibration = mavlink_msg_gimbal_report_axis_calibration_status_get_roll_requires_calibration(msg);
#else
memcpy(gimbal_report_axis_calibration_status, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN);
#endif
}

View File

@ -0,0 +1,281 @@
// MESSAGE GIMBAL_REPORT_FACTORY_TESTS_PROGRESS PACKING
#define MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS 210
typedef struct __mavlink_gimbal_report_factory_tests_progress_t
{
uint8_t test; ///< Which factory test is currently running
uint8_t test_section; ///< Which section of the test is currently running. The meaning of this is test-dependent
uint8_t test_section_progress; ///< The progress of the current test section, 0x64=100%
uint8_t test_status; ///< The status of the currently executing test section. The meaning of this is test and section-dependent
} mavlink_gimbal_report_factory_tests_progress_t;
#define MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN 4
#define MAVLINK_MSG_ID_210_LEN 4
#define MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC 238
#define MAVLINK_MSG_ID_210_CRC 238
#define MAVLINK_MESSAGE_INFO_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS { \
"GIMBAL_REPORT_FACTORY_TESTS_PROGRESS", \
4, \
{ { "test", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_report_factory_tests_progress_t, test) }, \
{ "test_section", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_report_factory_tests_progress_t, test_section) }, \
{ "test_section_progress", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gimbal_report_factory_tests_progress_t, test_section_progress) }, \
{ "test_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_gimbal_report_factory_tests_progress_t, test_status) }, \
} \
}
/**
* @brief Pack a gimbal_report_factory_tests_progress 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 test Which factory test is currently running
* @param test_section Which section of the test is currently running. The meaning of this is test-dependent
* @param test_section_progress The progress of the current test section, 0x64=100%
* @param test_status The status of the currently executing test section. The meaning of this is test and section-dependent
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_report_factory_tests_progress_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t test, uint8_t test_section, uint8_t test_section_progress, uint8_t test_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN];
_mav_put_uint8_t(buf, 0, test);
_mav_put_uint8_t(buf, 1, test_section);
_mav_put_uint8_t(buf, 2, test_section_progress);
_mav_put_uint8_t(buf, 3, test_status);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#else
mavlink_gimbal_report_factory_tests_progress_t packet;
packet.test = test;
packet.test_section = test_section;
packet.test_section_progress = test_section_progress;
packet.test_status = test_status;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
}
/**
* @brief Pack a gimbal_report_factory_tests_progress 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 test Which factory test is currently running
* @param test_section Which section of the test is currently running. The meaning of this is test-dependent
* @param test_section_progress The progress of the current test section, 0x64=100%
* @param test_status The status of the currently executing test section. The meaning of this is test and section-dependent
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_report_factory_tests_progress_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t test,uint8_t test_section,uint8_t test_section_progress,uint8_t test_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN];
_mav_put_uint8_t(buf, 0, test);
_mav_put_uint8_t(buf, 1, test_section);
_mav_put_uint8_t(buf, 2, test_section_progress);
_mav_put_uint8_t(buf, 3, test_status);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#else
mavlink_gimbal_report_factory_tests_progress_t packet;
packet.test = test;
packet.test_section = test_section;
packet.test_section_progress = test_section_progress;
packet.test_status = test_status;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
}
/**
* @brief Encode a gimbal_report_factory_tests_progress 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_report_factory_tests_progress C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_report_factory_tests_progress_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_report_factory_tests_progress_t* gimbal_report_factory_tests_progress)
{
return mavlink_msg_gimbal_report_factory_tests_progress_pack(system_id, component_id, msg, gimbal_report_factory_tests_progress->test, gimbal_report_factory_tests_progress->test_section, gimbal_report_factory_tests_progress->test_section_progress, gimbal_report_factory_tests_progress->test_status);
}
/**
* @brief Encode a gimbal_report_factory_tests_progress 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_report_factory_tests_progress C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_report_factory_tests_progress_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_report_factory_tests_progress_t* gimbal_report_factory_tests_progress)
{
return mavlink_msg_gimbal_report_factory_tests_progress_pack_chan(system_id, component_id, chan, msg, gimbal_report_factory_tests_progress->test, gimbal_report_factory_tests_progress->test_section, gimbal_report_factory_tests_progress->test_section_progress, gimbal_report_factory_tests_progress->test_status);
}
/**
* @brief Send a gimbal_report_factory_tests_progress message
* @param chan MAVLink channel to send the message
*
* @param test Which factory test is currently running
* @param test_section Which section of the test is currently running. The meaning of this is test-dependent
* @param test_section_progress The progress of the current test section, 0x64=100%
* @param test_status The status of the currently executing test section. The meaning of this is test and section-dependent
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_report_factory_tests_progress_send(mavlink_channel_t chan, uint8_t test, uint8_t test_section, uint8_t test_section_progress, uint8_t test_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN];
_mav_put_uint8_t(buf, 0, test);
_mav_put_uint8_t(buf, 1, test_section);
_mav_put_uint8_t(buf, 2, test_section_progress);
_mav_put_uint8_t(buf, 3, test_status);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
#else
mavlink_gimbal_report_factory_tests_progress_t packet;
packet.test = test;
packet.test_section = test_section;
packet.test_section_progress = test_section_progress;
packet.test_status = test_status;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_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_report_factory_tests_progress_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t test, uint8_t test_section, uint8_t test_section_progress, uint8_t test_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, test);
_mav_put_uint8_t(buf, 1, test_section);
_mav_put_uint8_t(buf, 2, test_section_progress);
_mav_put_uint8_t(buf, 3, test_status);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
#else
mavlink_gimbal_report_factory_tests_progress_t *packet = (mavlink_gimbal_report_factory_tests_progress_t *)msgbuf;
packet->test = test;
packet->test_section = test_section;
packet->test_section_progress = test_section_progress;
packet->test_status = test_status;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_REPORT_FACTORY_TESTS_PROGRESS UNPACKING
/**
* @brief Get field test from gimbal_report_factory_tests_progress message
*
* @return Which factory test is currently running
*/
static inline uint8_t mavlink_msg_gimbal_report_factory_tests_progress_get_test(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field test_section from gimbal_report_factory_tests_progress message
*
* @return Which section of the test is currently running. The meaning of this is test-dependent
*/
static inline uint8_t mavlink_msg_gimbal_report_factory_tests_progress_get_test_section(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field test_section_progress from gimbal_report_factory_tests_progress message
*
* @return The progress of the current test section, 0x64=100%
*/
static inline uint8_t mavlink_msg_gimbal_report_factory_tests_progress_get_test_section_progress(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field test_status from gimbal_report_factory_tests_progress message
*
* @return The status of the currently executing test section. The meaning of this is test and section-dependent
*/
static inline uint8_t mavlink_msg_gimbal_report_factory_tests_progress_get_test_status(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
/**
* @brief Decode a gimbal_report_factory_tests_progress message into a struct
*
* @param msg The message to decode
* @param gimbal_report_factory_tests_progress C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_report_factory_tests_progress_decode(const mavlink_message_t* msg, mavlink_gimbal_report_factory_tests_progress_t* gimbal_report_factory_tests_progress)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_report_factory_tests_progress->test = mavlink_msg_gimbal_report_factory_tests_progress_get_test(msg);
gimbal_report_factory_tests_progress->test_section = mavlink_msg_gimbal_report_factory_tests_progress_get_test_section(msg);
gimbal_report_factory_tests_progress->test_section_progress = mavlink_msg_gimbal_report_factory_tests_progress_get_test_section_progress(msg);
gimbal_report_factory_tests_progress->test_status = mavlink_msg_gimbal_report_factory_tests_progress_get_test_status(msg);
#else
memcpy(gimbal_report_factory_tests_progress, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
}

View File

@ -0,0 +1,233 @@
// MESSAGE GIMBAL_REQUEST_AXIS_CALIBRATION PACKING
#define MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION 213
typedef struct __mavlink_gimbal_request_axis_calibration_t
{
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_gimbal_request_axis_calibration_t;
#define MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN 2
#define MAVLINK_MSG_ID_213_LEN 2
#define MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC 14
#define MAVLINK_MSG_ID_213_CRC 14
#define MAVLINK_MESSAGE_INFO_GIMBAL_REQUEST_AXIS_CALIBRATION { \
"GIMBAL_REQUEST_AXIS_CALIBRATION", \
2, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_request_axis_calibration_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_request_axis_calibration_t, target_component) }, \
} \
}
/**
* @brief Pack a gimbal_request_axis_calibration 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_request_axis_calibration_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_REQUEST_AXIS_CALIBRATION_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_REQUEST_AXIS_CALIBRATION_LEN);
#else
mavlink_gimbal_request_axis_calibration_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN);
#endif
}
/**
* @brief Pack a gimbal_request_axis_calibration 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_request_axis_calibration_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_REQUEST_AXIS_CALIBRATION_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_REQUEST_AXIS_CALIBRATION_LEN);
#else
mavlink_gimbal_request_axis_calibration_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN);
#endif
}
/**
* @brief Encode a gimbal_request_axis_calibration 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_request_axis_calibration C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_request_axis_calibration_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_request_axis_calibration_t* gimbal_request_axis_calibration)
{
return mavlink_msg_gimbal_request_axis_calibration_pack(system_id, component_id, msg, gimbal_request_axis_calibration->target_system, gimbal_request_axis_calibration->target_component);
}
/**
* @brief Encode a gimbal_request_axis_calibration 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_request_axis_calibration C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_request_axis_calibration_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_request_axis_calibration_t* gimbal_request_axis_calibration)
{
return mavlink_msg_gimbal_request_axis_calibration_pack_chan(system_id, component_id, chan, msg, gimbal_request_axis_calibration->target_system, gimbal_request_axis_calibration->target_component);
}
/**
* @brief Send a gimbal_request_axis_calibration 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_request_axis_calibration_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_REQUEST_AXIS_CALIBRATION_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_REQUEST_AXIS_CALIBRATION, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN);
#endif
#else
mavlink_gimbal_request_axis_calibration_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_REQUEST_AXIS_CALIBRATION, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_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_request_axis_calibration_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_REQUEST_AXIS_CALIBRATION, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN);
#endif
#else
mavlink_gimbal_request_axis_calibration_t *packet = (mavlink_gimbal_request_axis_calibration_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_REQUEST_AXIS_CALIBRATION, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_REQUEST_AXIS_CALIBRATION UNPACKING
/**
* @brief Get field target_system from gimbal_request_axis_calibration message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gimbal_request_axis_calibration_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from gimbal_request_axis_calibration message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gimbal_request_axis_calibration_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Decode a gimbal_request_axis_calibration message into a struct
*
* @param msg The message to decode
* @param gimbal_request_axis_calibration C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_request_axis_calibration_decode(const mavlink_message_t* msg, mavlink_gimbal_request_axis_calibration_t* gimbal_request_axis_calibration)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_request_axis_calibration->target_system = mavlink_msg_gimbal_request_axis_calibration_get_target_system(msg);
gimbal_request_axis_calibration->target_component = mavlink_msg_gimbal_request_axis_calibration_get_target_component(msg);
#else
memcpy(gimbal_request_axis_calibration, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN);
#endif
}

View File

@ -0,0 +1,233 @@
// MESSAGE GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS PACKING
#define MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS 211
typedef struct __mavlink_gimbal_request_axis_calibration_status_t
{
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_gimbal_request_axis_calibration_status_t;
#define MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN 2
#define MAVLINK_MSG_ID_211_LEN 2
#define MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC 103
#define MAVLINK_MSG_ID_211_CRC 103
#define MAVLINK_MESSAGE_INFO_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS { \
"GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS", \
2, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_request_axis_calibration_status_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_request_axis_calibration_status_t, target_component) }, \
} \
}
/**
* @brief Pack a gimbal_request_axis_calibration_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_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_request_axis_calibration_status_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_REQUEST_AXIS_CALIBRATION_STATUS_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_REQUEST_AXIS_CALIBRATION_STATUS_LEN);
#else
mavlink_gimbal_request_axis_calibration_status_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN);
#endif
}
/**
* @brief Pack a gimbal_request_axis_calibration_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_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_request_axis_calibration_status_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_REQUEST_AXIS_CALIBRATION_STATUS_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_REQUEST_AXIS_CALIBRATION_STATUS_LEN);
#else
mavlink_gimbal_request_axis_calibration_status_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN);
#endif
}
/**
* @brief Encode a gimbal_request_axis_calibration_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 gimbal_request_axis_calibration_status C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_request_axis_calibration_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_request_axis_calibration_status_t* gimbal_request_axis_calibration_status)
{
return mavlink_msg_gimbal_request_axis_calibration_status_pack(system_id, component_id, msg, gimbal_request_axis_calibration_status->target_system, gimbal_request_axis_calibration_status->target_component);
}
/**
* @brief Encode a gimbal_request_axis_calibration_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 gimbal_request_axis_calibration_status C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_request_axis_calibration_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_request_axis_calibration_status_t* gimbal_request_axis_calibration_status)
{
return mavlink_msg_gimbal_request_axis_calibration_status_pack_chan(system_id, component_id, chan, msg, gimbal_request_axis_calibration_status->target_system, gimbal_request_axis_calibration_status->target_component);
}
/**
* @brief Send a gimbal_request_axis_calibration_status 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_request_axis_calibration_status_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_REQUEST_AXIS_CALIBRATION_STATUS_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_REQUEST_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN);
#endif
#else
mavlink_gimbal_request_axis_calibration_status_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_REQUEST_AXIS_CALIBRATION_STATUS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_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_gimbal_request_axis_calibration_status_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_REQUEST_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN);
#endif
#else
mavlink_gimbal_request_axis_calibration_status_t *packet = (mavlink_gimbal_request_axis_calibration_status_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_REQUEST_AXIS_CALIBRATION_STATUS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS UNPACKING
/**
* @brief Get field target_system from gimbal_request_axis_calibration_status message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gimbal_request_axis_calibration_status_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from gimbal_request_axis_calibration_status message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gimbal_request_axis_calibration_status_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Decode a gimbal_request_axis_calibration_status message into a struct
*
* @param msg The message to decode
* @param gimbal_request_axis_calibration_status C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_request_axis_calibration_status_decode(const mavlink_message_t* msg, mavlink_gimbal_request_axis_calibration_status_t* gimbal_request_axis_calibration_status)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_request_axis_calibration_status->target_system = mavlink_msg_gimbal_request_axis_calibration_status_get_target_system(msg);
gimbal_request_axis_calibration_status->target_component = mavlink_msg_gimbal_request_axis_calibration_status_get_target_component(msg);
#else
memcpy(gimbal_request_axis_calibration_status, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN);
#endif
}

View File

@ -0,0 +1,233 @@
// MESSAGE GIMBAL_RESET PACKING
#define MAVLINK_MSG_ID_GIMBAL_RESET 202
typedef struct __mavlink_gimbal_reset_t
{
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_gimbal_reset_t;
#define MAVLINK_MSG_ID_GIMBAL_RESET_LEN 2
#define MAVLINK_MSG_ID_202_LEN 2
#define MAVLINK_MSG_ID_GIMBAL_RESET_CRC 94
#define MAVLINK_MSG_ID_202_CRC 94
#define MAVLINK_MESSAGE_INFO_GIMBAL_RESET { \
"GIMBAL_RESET", \
2, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_reset_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_reset_t, target_component) }, \
} \
}
/**
* @brief Pack a gimbal_reset 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_reset_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_RESET_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_RESET_LEN);
#else
mavlink_gimbal_reset_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_RESET;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
#endif
}
/**
* @brief Pack a gimbal_reset 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_reset_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_RESET_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_RESET_LEN);
#else
mavlink_gimbal_reset_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_RESET;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
#endif
}
/**
* @brief Encode a gimbal_reset 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_reset C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_reset_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_reset_t* gimbal_reset)
{
return mavlink_msg_gimbal_reset_pack(system_id, component_id, msg, gimbal_reset->target_system, gimbal_reset->target_component);
}
/**
* @brief Encode a gimbal_reset 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_reset C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_reset_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_reset_t* gimbal_reset)
{
return mavlink_msg_gimbal_reset_pack_chan(system_id, component_id, chan, msg, gimbal_reset->target_system, gimbal_reset->target_component);
}
/**
* @brief Send a gimbal_reset 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_reset_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_RESET_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_RESET, buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
#endif
#else
mavlink_gimbal_reset_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_RESET, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_RESET_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_reset_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_RESET, buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
#endif
#else
mavlink_gimbal_reset_t *packet = (mavlink_gimbal_reset_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_RESET, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_RESET UNPACKING
/**
* @brief Get field target_system from gimbal_reset message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gimbal_reset_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from gimbal_reset message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gimbal_reset_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Decode a gimbal_reset message into a struct
*
* @param msg The message to decode
* @param gimbal_reset C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_reset_decode(const mavlink_message_t* msg, mavlink_gimbal_reset_t* gimbal_reset)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_reset->target_system = mavlink_msg_gimbal_reset_get_target_system(msg);
gimbal_reset->target_component = mavlink_msg_gimbal_reset_get_target_component(msg);
#else
memcpy(gimbal_reset, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
#endif
}

View File

@ -0,0 +1,521 @@
// MESSAGE GIMBAL_SET_FACTORY_PARAMETERS PACKING
#define MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS 206
typedef struct __mavlink_gimbal_set_factory_parameters_t
{
uint32_t magic_1; ///< Magic number 1 for validation
uint32_t magic_2; ///< Magic number 2 for validation
uint32_t magic_3; ///< Magic number 3 for validation
uint32_t serial_number_pt_1; ///< Unit Serial Number Part 1 (part code, design, language/country)
uint32_t serial_number_pt_2; ///< Unit Serial Number Part 2 (option, year, month)
uint32_t serial_number_pt_3; ///< Unit Serial Number Part 3 (incrementing serial number per month)
uint16_t assembly_year; ///< Assembly Date Year
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
uint8_t assembly_month; ///< Assembly Date Month
uint8_t assembly_day; ///< Assembly Date Day
uint8_t assembly_hour; ///< Assembly Time Hour
uint8_t assembly_minute; ///< Assembly Time Minute
uint8_t assembly_second; ///< Assembly Time Second
} mavlink_gimbal_set_factory_parameters_t;
#define MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN 33
#define MAVLINK_MSG_ID_206_LEN 33
#define MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC 112
#define MAVLINK_MSG_ID_206_CRC 112
#define MAVLINK_MESSAGE_INFO_GIMBAL_SET_FACTORY_PARAMETERS { \
"GIMBAL_SET_FACTORY_PARAMETERS", \
14, \
{ { "magic_1", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gimbal_set_factory_parameters_t, magic_1) }, \
{ "magic_2", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_gimbal_set_factory_parameters_t, magic_2) }, \
{ "magic_3", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_gimbal_set_factory_parameters_t, magic_3) }, \
{ "serial_number_pt_1", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_gimbal_set_factory_parameters_t, serial_number_pt_1) }, \
{ "serial_number_pt_2", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_gimbal_set_factory_parameters_t, serial_number_pt_2) }, \
{ "serial_number_pt_3", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_gimbal_set_factory_parameters_t, serial_number_pt_3) }, \
{ "assembly_year", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_gimbal_set_factory_parameters_t, assembly_year) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_gimbal_set_factory_parameters_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 27, offsetof(mavlink_gimbal_set_factory_parameters_t, target_component) }, \
{ "assembly_month", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_gimbal_set_factory_parameters_t, assembly_month) }, \
{ "assembly_day", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_gimbal_set_factory_parameters_t, assembly_day) }, \
{ "assembly_hour", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_gimbal_set_factory_parameters_t, assembly_hour) }, \
{ "assembly_minute", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_gimbal_set_factory_parameters_t, assembly_minute) }, \
{ "assembly_second", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_gimbal_set_factory_parameters_t, assembly_second) }, \
} \
}
/**
* @brief Pack a gimbal_set_factory_parameters message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param magic_1 Magic number 1 for validation
* @param magic_2 Magic number 2 for validation
* @param magic_3 Magic number 3 for validation
* @param assembly_year Assembly Date Year
* @param assembly_month Assembly Date Month
* @param assembly_day Assembly Date Day
* @param assembly_hour Assembly Time Hour
* @param assembly_minute Assembly Time Minute
* @param assembly_second Assembly Time Second
* @param serial_number_pt_1 Unit Serial Number Part 1 (part code, design, language/country)
* @param serial_number_pt_2 Unit Serial Number Part 2 (option, year, month)
* @param serial_number_pt_3 Unit Serial Number Part 3 (incrementing serial number per month)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_set_factory_parameters_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint32_t magic_1, uint32_t magic_2, uint32_t magic_3, uint16_t assembly_year, uint8_t assembly_month, uint8_t assembly_day, uint8_t assembly_hour, uint8_t assembly_minute, uint8_t assembly_second, uint32_t serial_number_pt_1, uint32_t serial_number_pt_2, uint32_t serial_number_pt_3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN];
_mav_put_uint32_t(buf, 0, magic_1);
_mav_put_uint32_t(buf, 4, magic_2);
_mav_put_uint32_t(buf, 8, magic_3);
_mav_put_uint32_t(buf, 12, serial_number_pt_1);
_mav_put_uint32_t(buf, 16, serial_number_pt_2);
_mav_put_uint32_t(buf, 20, serial_number_pt_3);
_mav_put_uint16_t(buf, 24, assembly_year);
_mav_put_uint8_t(buf, 26, target_system);
_mav_put_uint8_t(buf, 27, target_component);
_mav_put_uint8_t(buf, 28, assembly_month);
_mav_put_uint8_t(buf, 29, assembly_day);
_mav_put_uint8_t(buf, 30, assembly_hour);
_mav_put_uint8_t(buf, 31, assembly_minute);
_mav_put_uint8_t(buf, 32, assembly_second);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#else
mavlink_gimbal_set_factory_parameters_t packet;
packet.magic_1 = magic_1;
packet.magic_2 = magic_2;
packet.magic_3 = magic_3;
packet.serial_number_pt_1 = serial_number_pt_1;
packet.serial_number_pt_2 = serial_number_pt_2;
packet.serial_number_pt_3 = serial_number_pt_3;
packet.assembly_year = assembly_year;
packet.target_system = target_system;
packet.target_component = target_component;
packet.assembly_month = assembly_month;
packet.assembly_day = assembly_day;
packet.assembly_hour = assembly_hour;
packet.assembly_minute = assembly_minute;
packet.assembly_second = assembly_second;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
}
/**
* @brief Pack a gimbal_set_factory_parameters 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
* @param magic_1 Magic number 1 for validation
* @param magic_2 Magic number 2 for validation
* @param magic_3 Magic number 3 for validation
* @param assembly_year Assembly Date Year
* @param assembly_month Assembly Date Month
* @param assembly_day Assembly Date Day
* @param assembly_hour Assembly Time Hour
* @param assembly_minute Assembly Time Minute
* @param assembly_second Assembly Time Second
* @param serial_number_pt_1 Unit Serial Number Part 1 (part code, design, language/country)
* @param serial_number_pt_2 Unit Serial Number Part 2 (option, year, month)
* @param serial_number_pt_3 Unit Serial Number Part 3 (incrementing serial number per month)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_set_factory_parameters_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,uint32_t magic_1,uint32_t magic_2,uint32_t magic_3,uint16_t assembly_year,uint8_t assembly_month,uint8_t assembly_day,uint8_t assembly_hour,uint8_t assembly_minute,uint8_t assembly_second,uint32_t serial_number_pt_1,uint32_t serial_number_pt_2,uint32_t serial_number_pt_3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN];
_mav_put_uint32_t(buf, 0, magic_1);
_mav_put_uint32_t(buf, 4, magic_2);
_mav_put_uint32_t(buf, 8, magic_3);
_mav_put_uint32_t(buf, 12, serial_number_pt_1);
_mav_put_uint32_t(buf, 16, serial_number_pt_2);
_mav_put_uint32_t(buf, 20, serial_number_pt_3);
_mav_put_uint16_t(buf, 24, assembly_year);
_mav_put_uint8_t(buf, 26, target_system);
_mav_put_uint8_t(buf, 27, target_component);
_mav_put_uint8_t(buf, 28, assembly_month);
_mav_put_uint8_t(buf, 29, assembly_day);
_mav_put_uint8_t(buf, 30, assembly_hour);
_mav_put_uint8_t(buf, 31, assembly_minute);
_mav_put_uint8_t(buf, 32, assembly_second);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#else
mavlink_gimbal_set_factory_parameters_t packet;
packet.magic_1 = magic_1;
packet.magic_2 = magic_2;
packet.magic_3 = magic_3;
packet.serial_number_pt_1 = serial_number_pt_1;
packet.serial_number_pt_2 = serial_number_pt_2;
packet.serial_number_pt_3 = serial_number_pt_3;
packet.assembly_year = assembly_year;
packet.target_system = target_system;
packet.target_component = target_component;
packet.assembly_month = assembly_month;
packet.assembly_day = assembly_day;
packet.assembly_hour = assembly_hour;
packet.assembly_minute = assembly_minute;
packet.assembly_second = assembly_second;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
}
/**
* @brief Encode a gimbal_set_factory_parameters 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_factory_parameters C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_set_factory_parameters_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_set_factory_parameters_t* gimbal_set_factory_parameters)
{
return mavlink_msg_gimbal_set_factory_parameters_pack(system_id, component_id, msg, gimbal_set_factory_parameters->target_system, gimbal_set_factory_parameters->target_component, gimbal_set_factory_parameters->magic_1, gimbal_set_factory_parameters->magic_2, gimbal_set_factory_parameters->magic_3, gimbal_set_factory_parameters->assembly_year, gimbal_set_factory_parameters->assembly_month, gimbal_set_factory_parameters->assembly_day, gimbal_set_factory_parameters->assembly_hour, gimbal_set_factory_parameters->assembly_minute, gimbal_set_factory_parameters->assembly_second, gimbal_set_factory_parameters->serial_number_pt_1, gimbal_set_factory_parameters->serial_number_pt_2, gimbal_set_factory_parameters->serial_number_pt_3);
}
/**
* @brief Encode a gimbal_set_factory_parameters 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_factory_parameters C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_set_factory_parameters_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_set_factory_parameters_t* gimbal_set_factory_parameters)
{
return mavlink_msg_gimbal_set_factory_parameters_pack_chan(system_id, component_id, chan, msg, gimbal_set_factory_parameters->target_system, gimbal_set_factory_parameters->target_component, gimbal_set_factory_parameters->magic_1, gimbal_set_factory_parameters->magic_2, gimbal_set_factory_parameters->magic_3, gimbal_set_factory_parameters->assembly_year, gimbal_set_factory_parameters->assembly_month, gimbal_set_factory_parameters->assembly_day, gimbal_set_factory_parameters->assembly_hour, gimbal_set_factory_parameters->assembly_minute, gimbal_set_factory_parameters->assembly_second, gimbal_set_factory_parameters->serial_number_pt_1, gimbal_set_factory_parameters->serial_number_pt_2, gimbal_set_factory_parameters->serial_number_pt_3);
}
/**
* @brief Send a gimbal_set_factory_parameters message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param magic_1 Magic number 1 for validation
* @param magic_2 Magic number 2 for validation
* @param magic_3 Magic number 3 for validation
* @param assembly_year Assembly Date Year
* @param assembly_month Assembly Date Month
* @param assembly_day Assembly Date Day
* @param assembly_hour Assembly Time Hour
* @param assembly_minute Assembly Time Minute
* @param assembly_second Assembly Time Second
* @param serial_number_pt_1 Unit Serial Number Part 1 (part code, design, language/country)
* @param serial_number_pt_2 Unit Serial Number Part 2 (option, year, month)
* @param serial_number_pt_3 Unit Serial Number Part 3 (incrementing serial number per month)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_set_factory_parameters_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t magic_1, uint32_t magic_2, uint32_t magic_3, uint16_t assembly_year, uint8_t assembly_month, uint8_t assembly_day, uint8_t assembly_hour, uint8_t assembly_minute, uint8_t assembly_second, uint32_t serial_number_pt_1, uint32_t serial_number_pt_2, uint32_t serial_number_pt_3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN];
_mav_put_uint32_t(buf, 0, magic_1);
_mav_put_uint32_t(buf, 4, magic_2);
_mav_put_uint32_t(buf, 8, magic_3);
_mav_put_uint32_t(buf, 12, serial_number_pt_1);
_mav_put_uint32_t(buf, 16, serial_number_pt_2);
_mav_put_uint32_t(buf, 20, serial_number_pt_3);
_mav_put_uint16_t(buf, 24, assembly_year);
_mav_put_uint8_t(buf, 26, target_system);
_mav_put_uint8_t(buf, 27, target_component);
_mav_put_uint8_t(buf, 28, assembly_month);
_mav_put_uint8_t(buf, 29, assembly_day);
_mav_put_uint8_t(buf, 30, assembly_hour);
_mav_put_uint8_t(buf, 31, assembly_minute);
_mav_put_uint8_t(buf, 32, assembly_second);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, buf, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, buf, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
#else
mavlink_gimbal_set_factory_parameters_t packet;
packet.magic_1 = magic_1;
packet.magic_2 = magic_2;
packet.magic_3 = magic_3;
packet.serial_number_pt_1 = serial_number_pt_1;
packet.serial_number_pt_2 = serial_number_pt_2;
packet.serial_number_pt_3 = serial_number_pt_3;
packet.assembly_year = assembly_year;
packet.target_system = target_system;
packet.target_component = target_component;
packet.assembly_month = assembly_month;
packet.assembly_day = assembly_day;
packet.assembly_hour = assembly_hour;
packet.assembly_minute = assembly_minute;
packet.assembly_second = assembly_second;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_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_factory_parameters_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t magic_1, uint32_t magic_2, uint32_t magic_3, uint16_t assembly_year, uint8_t assembly_month, uint8_t assembly_day, uint8_t assembly_hour, uint8_t assembly_minute, uint8_t assembly_second, uint32_t serial_number_pt_1, uint32_t serial_number_pt_2, uint32_t serial_number_pt_3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint32_t(buf, 0, magic_1);
_mav_put_uint32_t(buf, 4, magic_2);
_mav_put_uint32_t(buf, 8, magic_3);
_mav_put_uint32_t(buf, 12, serial_number_pt_1);
_mav_put_uint32_t(buf, 16, serial_number_pt_2);
_mav_put_uint32_t(buf, 20, serial_number_pt_3);
_mav_put_uint16_t(buf, 24, assembly_year);
_mav_put_uint8_t(buf, 26, target_system);
_mav_put_uint8_t(buf, 27, target_component);
_mav_put_uint8_t(buf, 28, assembly_month);
_mav_put_uint8_t(buf, 29, assembly_day);
_mav_put_uint8_t(buf, 30, assembly_hour);
_mav_put_uint8_t(buf, 31, assembly_minute);
_mav_put_uint8_t(buf, 32, assembly_second);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, buf, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, buf, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
#else
mavlink_gimbal_set_factory_parameters_t *packet = (mavlink_gimbal_set_factory_parameters_t *)msgbuf;
packet->magic_1 = magic_1;
packet->magic_2 = magic_2;
packet->magic_3 = magic_3;
packet->serial_number_pt_1 = serial_number_pt_1;
packet->serial_number_pt_2 = serial_number_pt_2;
packet->serial_number_pt_3 = serial_number_pt_3;
packet->assembly_year = assembly_year;
packet->target_system = target_system;
packet->target_component = target_component;
packet->assembly_month = assembly_month;
packet->assembly_day = assembly_day;
packet->assembly_hour = assembly_hour;
packet->assembly_minute = assembly_minute;
packet->assembly_second = assembly_second;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_SET_FACTORY_PARAMETERS UNPACKING
/**
* @brief Get field target_system from gimbal_set_factory_parameters message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 26);
}
/**
* @brief Get field target_component from gimbal_set_factory_parameters message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 27);
}
/**
* @brief Get field magic_1 from gimbal_set_factory_parameters message
*
* @return Magic number 1 for validation
*/
static inline uint32_t mavlink_msg_gimbal_set_factory_parameters_get_magic_1(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field magic_2 from gimbal_set_factory_parameters message
*
* @return Magic number 2 for validation
*/
static inline uint32_t mavlink_msg_gimbal_set_factory_parameters_get_magic_2(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 4);
}
/**
* @brief Get field magic_3 from gimbal_set_factory_parameters message
*
* @return Magic number 3 for validation
*/
static inline uint32_t mavlink_msg_gimbal_set_factory_parameters_get_magic_3(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 8);
}
/**
* @brief Get field assembly_year from gimbal_set_factory_parameters message
*
* @return Assembly Date Year
*/
static inline uint16_t mavlink_msg_gimbal_set_factory_parameters_get_assembly_year(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 24);
}
/**
* @brief Get field assembly_month from gimbal_set_factory_parameters message
*
* @return Assembly Date Month
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_assembly_month(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 28);
}
/**
* @brief Get field assembly_day from gimbal_set_factory_parameters message
*
* @return Assembly Date Day
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_assembly_day(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 29);
}
/**
* @brief Get field assembly_hour from gimbal_set_factory_parameters message
*
* @return Assembly Time Hour
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_assembly_hour(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 30);
}
/**
* @brief Get field assembly_minute from gimbal_set_factory_parameters message
*
* @return Assembly Time Minute
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_assembly_minute(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 31);
}
/**
* @brief Get field assembly_second from gimbal_set_factory_parameters message
*
* @return Assembly Time Second
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_assembly_second(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 32);
}
/**
* @brief Get field serial_number_pt_1 from gimbal_set_factory_parameters message
*
* @return Unit Serial Number Part 1 (part code, design, language/country)
*/
static inline uint32_t mavlink_msg_gimbal_set_factory_parameters_get_serial_number_pt_1(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 12);
}
/**
* @brief Get field serial_number_pt_2 from gimbal_set_factory_parameters message
*
* @return Unit Serial Number Part 2 (option, year, month)
*/
static inline uint32_t mavlink_msg_gimbal_set_factory_parameters_get_serial_number_pt_2(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 16);
}
/**
* @brief Get field serial_number_pt_3 from gimbal_set_factory_parameters message
*
* @return Unit Serial Number Part 3 (incrementing serial number per month)
*/
static inline uint32_t mavlink_msg_gimbal_set_factory_parameters_get_serial_number_pt_3(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 20);
}
/**
* @brief Decode a gimbal_set_factory_parameters message into a struct
*
* @param msg The message to decode
* @param gimbal_set_factory_parameters C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_set_factory_parameters_decode(const mavlink_message_t* msg, mavlink_gimbal_set_factory_parameters_t* gimbal_set_factory_parameters)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_set_factory_parameters->magic_1 = mavlink_msg_gimbal_set_factory_parameters_get_magic_1(msg);
gimbal_set_factory_parameters->magic_2 = mavlink_msg_gimbal_set_factory_parameters_get_magic_2(msg);
gimbal_set_factory_parameters->magic_3 = mavlink_msg_gimbal_set_factory_parameters_get_magic_3(msg);
gimbal_set_factory_parameters->serial_number_pt_1 = mavlink_msg_gimbal_set_factory_parameters_get_serial_number_pt_1(msg);
gimbal_set_factory_parameters->serial_number_pt_2 = mavlink_msg_gimbal_set_factory_parameters_get_serial_number_pt_2(msg);
gimbal_set_factory_parameters->serial_number_pt_3 = mavlink_msg_gimbal_set_factory_parameters_get_serial_number_pt_3(msg);
gimbal_set_factory_parameters->assembly_year = mavlink_msg_gimbal_set_factory_parameters_get_assembly_year(msg);
gimbal_set_factory_parameters->target_system = mavlink_msg_gimbal_set_factory_parameters_get_target_system(msg);
gimbal_set_factory_parameters->target_component = mavlink_msg_gimbal_set_factory_parameters_get_target_component(msg);
gimbal_set_factory_parameters->assembly_month = mavlink_msg_gimbal_set_factory_parameters_get_assembly_month(msg);
gimbal_set_factory_parameters->assembly_day = mavlink_msg_gimbal_set_factory_parameters_get_assembly_day(msg);
gimbal_set_factory_parameters->assembly_hour = mavlink_msg_gimbal_set_factory_parameters_get_assembly_hour(msg);
gimbal_set_factory_parameters->assembly_minute = mavlink_msg_gimbal_set_factory_parameters_get_assembly_minute(msg);
gimbal_set_factory_parameters->assembly_second = mavlink_msg_gimbal_set_factory_parameters_get_assembly_second(msg);
#else
memcpy(gimbal_set_factory_parameters, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
}

View File

@ -0,0 +1,233 @@
// 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
}

View File

@ -0,0 +1,257 @@
// MESSAGE GOPRO_GET_REQUEST PACKING
#define MAVLINK_MSG_ID_GOPRO_GET_REQUEST 216
typedef struct __mavlink_gopro_get_request_t
{
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
uint8_t cmd_id; ///< Command ID
} mavlink_gopro_get_request_t;
#define MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN 3
#define MAVLINK_MSG_ID_216_LEN 3
#define MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC 50
#define MAVLINK_MSG_ID_216_CRC 50
#define MAVLINK_MESSAGE_INFO_GOPRO_GET_REQUEST { \
"GOPRO_GET_REQUEST", \
3, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_get_request_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_get_request_t, target_component) }, \
{ "cmd_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gopro_get_request_t, cmd_id) }, \
} \
}
/**
* @brief Pack a gopro_get_request message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_get_request_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint8_t cmd_id)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, cmd_id);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#else
mavlink_gopro_get_request_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.cmd_id = cmd_id;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_GET_REQUEST;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
}
/**
* @brief Pack a gopro_get_request message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_get_request_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint8_t cmd_id)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, cmd_id);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#else
mavlink_gopro_get_request_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.cmd_id = cmd_id;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_GET_REQUEST;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
}
/**
* @brief Encode a gopro_get_request 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_request C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_get_request_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_get_request_t* gopro_get_request)
{
return mavlink_msg_gopro_get_request_pack(system_id, component_id, msg, gopro_get_request->target_system, gopro_get_request->target_component, gopro_get_request->cmd_id);
}
/**
* @brief Encode a gopro_get_request 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_request C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_get_request_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_get_request_t* gopro_get_request)
{
return mavlink_msg_gopro_get_request_pack_chan(system_id, component_id, chan, msg, gopro_get_request->target_system, gopro_get_request->target_component, gopro_get_request->cmd_id);
}
/**
* @brief Send a gopro_get_request message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gopro_get_request_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t cmd_id)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, cmd_id);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
#else
mavlink_gopro_get_request_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.cmd_id = cmd_id;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GOPRO_GET_REQUEST_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_request_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t cmd_id)
{
#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);
_mav_put_uint8_t(buf, 2, cmd_id);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
#else
mavlink_gopro_get_request_t *packet = (mavlink_gopro_get_request_t *)msgbuf;
packet->target_system = target_system;
packet->target_component = target_component;
packet->cmd_id = cmd_id;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, (const char *)packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, (const char *)packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GOPRO_GET_REQUEST UNPACKING
/**
* @brief Get field target_system from gopro_get_request message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gopro_get_request_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from gopro_get_request message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gopro_get_request_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field cmd_id from gopro_get_request message
*
* @return Command ID
*/
static inline uint8_t mavlink_msg_gopro_get_request_get_cmd_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Decode a gopro_get_request message into a struct
*
* @param msg The message to decode
* @param gopro_get_request C-struct to decode the message contents into
*/
static inline void mavlink_msg_gopro_get_request_decode(const mavlink_message_t* msg, mavlink_gopro_get_request_t* gopro_get_request)
{
#if MAVLINK_NEED_BYTE_SWAP
gopro_get_request->target_system = mavlink_msg_gopro_get_request_get_target_system(msg);
gopro_get_request->target_component = mavlink_msg_gopro_get_request_get_target_component(msg);
gopro_get_request->cmd_id = mavlink_msg_gopro_get_request_get_cmd_id(msg);
#else
memcpy(gopro_get_request, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
}

View File

@ -0,0 +1,233 @@
// 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 value; ///< Value
} mavlink_gopro_get_response_t;
#define MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN 2
#define MAVLINK_MSG_ID_217_LEN 2
#define MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC 163
#define MAVLINK_MSG_ID_217_CRC 163
#define MAVLINK_MESSAGE_INFO_GOPRO_GET_RESPONSE { \
"GOPRO_GET_RESPONSE", \
2, \
{ { "cmd_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_get_response_t, cmd_id) }, \
{ "value", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, 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 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 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, value);
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.value = value;
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 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 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, value);
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.value = value;
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->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->value);
}
/**
* @brief Send a gopro_get_response message
* @param chan MAVLink channel to send the message
*
* @param cmd_id Command ID
* @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 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, value);
#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.value = value;
#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 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, value);
#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->value = value;
#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 value from gopro_get_response message
*
* @return Value
*/
static inline uint8_t mavlink_msg_gopro_get_response_get_value(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @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->value = mavlink_msg_gopro_get_response_get_value(msg);
#else
memcpy(gopro_get_response, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
}

View File

@ -0,0 +1,209 @@
// MESSAGE GOPRO_HEARTBEAT PACKING
#define MAVLINK_MSG_ID_GOPRO_HEARTBEAT 215
typedef struct __mavlink_gopro_heartbeat_t
{
uint8_t status; ///< Status
} mavlink_gopro_heartbeat_t;
#define MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN 1
#define MAVLINK_MSG_ID_215_LEN 1
#define MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC 77
#define MAVLINK_MSG_ID_215_CRC 77
#define MAVLINK_MESSAGE_INFO_GOPRO_HEARTBEAT { \
"GOPRO_HEARTBEAT", \
1, \
{ { "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_heartbeat_t, status) }, \
} \
}
/**
* @brief Pack a gopro_heartbeat message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param status Status
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_heartbeat_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN];
_mav_put_uint8_t(buf, 0, status);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#else
mavlink_gopro_heartbeat_t packet;
packet.status = status;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_HEARTBEAT;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
}
/**
* @brief Pack a gopro_heartbeat message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param status Status
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_heartbeat_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN];
_mav_put_uint8_t(buf, 0, status);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#else
mavlink_gopro_heartbeat_t packet;
packet.status = status;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_HEARTBEAT;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
}
/**
* @brief Encode a gopro_heartbeat 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_heartbeat C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_heartbeat_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_heartbeat_t* gopro_heartbeat)
{
return mavlink_msg_gopro_heartbeat_pack(system_id, component_id, msg, gopro_heartbeat->status);
}
/**
* @brief Encode a gopro_heartbeat 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_heartbeat C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_heartbeat_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_heartbeat_t* gopro_heartbeat)
{
return mavlink_msg_gopro_heartbeat_pack_chan(system_id, component_id, chan, msg, gopro_heartbeat->status);
}
/**
* @brief Send a gopro_heartbeat message
* @param chan MAVLink channel to send the message
*
* @param status Status
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gopro_heartbeat_send(mavlink_channel_t chan, uint8_t status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN];
_mav_put_uint8_t(buf, 0, status);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
#else
mavlink_gopro_heartbeat_t packet;
packet.status = status;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GOPRO_HEARTBEAT_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_heartbeat_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, status);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
#else
mavlink_gopro_heartbeat_t *packet = (mavlink_gopro_heartbeat_t *)msgbuf;
packet->status = status;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, (const char *)packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, (const char *)packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GOPRO_HEARTBEAT UNPACKING
/**
* @brief Get field status from gopro_heartbeat message
*
* @return Status
*/
static inline uint8_t mavlink_msg_gopro_heartbeat_get_status(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Decode a gopro_heartbeat message into a struct
*
* @param msg The message to decode
* @param gopro_heartbeat C-struct to decode the message contents into
*/
static inline void mavlink_msg_gopro_heartbeat_decode(const mavlink_message_t* msg, mavlink_gopro_heartbeat_t* gopro_heartbeat)
{
#if MAVLINK_NEED_BYTE_SWAP
gopro_heartbeat->status = mavlink_msg_gopro_heartbeat_get_status(msg);
#else
memcpy(gopro_heartbeat, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
}

View File

@ -0,0 +1,281 @@
// MESSAGE GOPRO_SET_REQUEST PACKING
#define MAVLINK_MSG_ID_GOPRO_SET_REQUEST 218
typedef struct __mavlink_gopro_set_request_t
{
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
uint8_t cmd_id; ///< Command ID
uint8_t value; ///< Value
} mavlink_gopro_set_request_t;
#define MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN 4
#define MAVLINK_MSG_ID_218_LEN 4
#define MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC 115
#define MAVLINK_MSG_ID_218_CRC 115
#define MAVLINK_MESSAGE_INFO_GOPRO_SET_REQUEST { \
"GOPRO_SET_REQUEST", \
4, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_set_request_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_set_request_t, target_component) }, \
{ "cmd_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gopro_set_request_t, cmd_id) }, \
{ "value", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_gopro_set_request_t, value) }, \
} \
}
/**
* @brief Pack a gopro_set_request message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
* @param value Value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_set_request_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint8_t cmd_id, uint8_t value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, cmd_id);
_mav_put_uint8_t(buf, 3, value);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#else
mavlink_gopro_set_request_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.cmd_id = cmd_id;
packet.value = value;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_SET_REQUEST;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
}
/**
* @brief Pack a gopro_set_request message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
* @param value Value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_set_request_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint8_t cmd_id,uint8_t value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, cmd_id);
_mav_put_uint8_t(buf, 3, value);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#else
mavlink_gopro_set_request_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.cmd_id = cmd_id;
packet.value = value;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_SET_REQUEST;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
}
/**
* @brief Encode a gopro_set_request 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_set_request C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_set_request_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_set_request_t* gopro_set_request)
{
return mavlink_msg_gopro_set_request_pack(system_id, component_id, msg, gopro_set_request->target_system, gopro_set_request->target_component, gopro_set_request->cmd_id, gopro_set_request->value);
}
/**
* @brief Encode a gopro_set_request 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_set_request C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_set_request_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_set_request_t* gopro_set_request)
{
return mavlink_msg_gopro_set_request_pack_chan(system_id, component_id, chan, msg, gopro_set_request->target_system, gopro_set_request->target_component, gopro_set_request->cmd_id, gopro_set_request->value);
}
/**
* @brief Send a gopro_set_request message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
* @param value Value
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gopro_set_request_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t cmd_id, uint8_t value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, cmd_id);
_mav_put_uint8_t(buf, 3, value);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
#else
mavlink_gopro_set_request_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.cmd_id = cmd_id;
packet.value = value;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GOPRO_SET_REQUEST_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_set_request_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t cmd_id, uint8_t value)
{
#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);
_mav_put_uint8_t(buf, 2, cmd_id);
_mav_put_uint8_t(buf, 3, value);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
#else
mavlink_gopro_set_request_t *packet = (mavlink_gopro_set_request_t *)msgbuf;
packet->target_system = target_system;
packet->target_component = target_component;
packet->cmd_id = cmd_id;
packet->value = value;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, (const char *)packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, (const char *)packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GOPRO_SET_REQUEST UNPACKING
/**
* @brief Get field target_system from gopro_set_request message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gopro_set_request_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from gopro_set_request message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gopro_set_request_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field cmd_id from gopro_set_request message
*
* @return Command ID
*/
static inline uint8_t mavlink_msg_gopro_set_request_get_cmd_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field value from gopro_set_request message
*
* @return Value
*/
static inline uint8_t mavlink_msg_gopro_set_request_get_value(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
/**
* @brief Decode a gopro_set_request message into a struct
*
* @param msg The message to decode
* @param gopro_set_request C-struct to decode the message contents into
*/
static inline void mavlink_msg_gopro_set_request_decode(const mavlink_message_t* msg, mavlink_gopro_set_request_t* gopro_set_request)
{
#if MAVLINK_NEED_BYTE_SWAP
gopro_set_request->target_system = mavlink_msg_gopro_set_request_get_target_system(msg);
gopro_set_request->target_component = mavlink_msg_gopro_set_request_get_target_component(msg);
gopro_set_request->cmd_id = mavlink_msg_gopro_set_request_get_cmd_id(msg);
gopro_set_request->value = mavlink_msg_gopro_set_request_get_value(msg);
#else
memcpy(gopro_set_request, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
}

View File

@ -0,0 +1,233 @@
// MESSAGE GOPRO_SET_RESPONSE PACKING
#define MAVLINK_MSG_ID_GOPRO_SET_RESPONSE 219
typedef struct __mavlink_gopro_set_response_t
{
uint8_t cmd_id; ///< Command ID
uint8_t result; ///< Result
} mavlink_gopro_set_response_t;
#define MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN 2
#define MAVLINK_MSG_ID_219_LEN 2
#define MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC 47
#define MAVLINK_MSG_ID_219_CRC 47
#define MAVLINK_MESSAGE_INFO_GOPRO_SET_RESPONSE { \
"GOPRO_SET_RESPONSE", \
2, \
{ { "cmd_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_set_response_t, cmd_id) }, \
{ "result", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_set_response_t, result) }, \
} \
}
/**
* @brief Pack a gopro_set_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 result Result
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_set_response_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t cmd_id, uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN];
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, result);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#else
mavlink_gopro_set_response_t packet;
packet.cmd_id = cmd_id;
packet.result = result;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_SET_RESPONSE;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
}
/**
* @brief Pack a gopro_set_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 result Result
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_set_response_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t cmd_id,uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN];
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, result);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#else
mavlink_gopro_set_response_t packet;
packet.cmd_id = cmd_id;
packet.result = result;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_SET_RESPONSE;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
}
/**
* @brief Encode a gopro_set_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_set_response C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_set_response_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_set_response_t* gopro_set_response)
{
return mavlink_msg_gopro_set_response_pack(system_id, component_id, msg, gopro_set_response->cmd_id, gopro_set_response->result);
}
/**
* @brief Encode a gopro_set_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_set_response C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_set_response_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_set_response_t* gopro_set_response)
{
return mavlink_msg_gopro_set_response_pack_chan(system_id, component_id, chan, msg, gopro_set_response->cmd_id, gopro_set_response->result);
}
/**
* @brief Send a gopro_set_response message
* @param chan MAVLink channel to send the message
*
* @param cmd_id Command ID
* @param result Result
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gopro_set_response_send(mavlink_channel_t chan, uint8_t cmd_id, uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN];
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, result);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
#else
mavlink_gopro_set_response_t packet;
packet.cmd_id = cmd_id;
packet.result = result;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GOPRO_SET_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_set_response_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t cmd_id, uint8_t result)
{
#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, result);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
#else
mavlink_gopro_set_response_t *packet = (mavlink_gopro_set_response_t *)msgbuf;
packet->cmd_id = cmd_id;
packet->result = result;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, (const char *)packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, (const char *)packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GOPRO_SET_RESPONSE UNPACKING
/**
* @brief Get field cmd_id from gopro_set_response message
*
* @return Command ID
*/
static inline uint8_t mavlink_msg_gopro_set_response_get_cmd_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field result from gopro_set_response message
*
* @return Result
*/
static inline uint8_t mavlink_msg_gopro_set_response_get_result(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Decode a gopro_set_response message into a struct
*
* @param msg The message to decode
* @param gopro_set_response C-struct to decode the message contents into
*/
static inline void mavlink_msg_gopro_set_response_decode(const mavlink_message_t* msg, mavlink_gopro_set_response_t* gopro_set_response)
{
#if MAVLINK_NEED_BYTE_SWAP
gopro_set_response->cmd_id = mavlink_msg_gopro_set_response_get_cmd_id(msg);
gopro_set_response->result = mavlink_msg_gopro_set_response_get_result(msg);
#else
memcpy(gopro_set_response, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
}

View File

@ -1809,6 +1809,771 @@ static void mavlink_test_gimbal_control(uint8_t system_id, uint8_t component_id,
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_reset(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_reset_t packet_in = {
5,72
};
mavlink_gimbal_reset_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_reset_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_reset_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_reset_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_reset_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_reset_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_reset_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_gimbal_reset_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_reset_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_reset_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_axis_calibration_progress(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_axis_calibration_progress_t packet_in = {
5,72,139
};
mavlink_gimbal_axis_calibration_progress_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.calibration_axis = packet_in.calibration_axis;
packet1.calibration_progress = packet_in.calibration_progress;
packet1.calibration_status = packet_in.calibration_status;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_axis_calibration_progress_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_axis_calibration_progress_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_axis_calibration_progress_pack(system_id, component_id, &msg , packet1.calibration_axis , packet1.calibration_progress , packet1.calibration_status );
mavlink_msg_gimbal_axis_calibration_progress_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_axis_calibration_progress_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.calibration_axis , packet1.calibration_progress , packet1.calibration_status );
mavlink_msg_gimbal_axis_calibration_progress_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_gimbal_axis_calibration_progress_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_axis_calibration_progress_send(MAVLINK_COMM_1 , packet1.calibration_axis , packet1.calibration_progress , packet1.calibration_status );
mavlink_msg_gimbal_axis_calibration_progress_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_set_home_offsets(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_set_home_offsets_t packet_in = {
5,72
};
mavlink_gimbal_set_home_offsets_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_home_offsets_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_set_home_offsets_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_home_offsets_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_set_home_offsets_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_home_offsets_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_set_home_offsets_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_gimbal_set_home_offsets_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_home_offsets_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_set_home_offsets_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_home_offset_calibration_result(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_home_offset_calibration_result_t packet_in = {
5
};
mavlink_gimbal_home_offset_calibration_result_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.calibration_result = packet_in.calibration_result;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_home_offset_calibration_result_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_home_offset_calibration_result_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_home_offset_calibration_result_pack(system_id, component_id, &msg , packet1.calibration_result );
mavlink_msg_gimbal_home_offset_calibration_result_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_home_offset_calibration_result_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.calibration_result );
mavlink_msg_gimbal_home_offset_calibration_result_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_gimbal_home_offset_calibration_result_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_home_offset_calibration_result_send(MAVLINK_COMM_1 , packet1.calibration_result );
mavlink_msg_gimbal_home_offset_calibration_result_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_set_factory_parameters(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_set_factory_parameters_t packet_in = {
963497464,963497672,963497880,963498088,963498296,963498504,18483,211,22,89,156,223,34,101
};
mavlink_gimbal_set_factory_parameters_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.magic_1 = packet_in.magic_1;
packet1.magic_2 = packet_in.magic_2;
packet1.magic_3 = packet_in.magic_3;
packet1.serial_number_pt_1 = packet_in.serial_number_pt_1;
packet1.serial_number_pt_2 = packet_in.serial_number_pt_2;
packet1.serial_number_pt_3 = packet_in.serial_number_pt_3;
packet1.assembly_year = packet_in.assembly_year;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.assembly_month = packet_in.assembly_month;
packet1.assembly_day = packet_in.assembly_day;
packet1.assembly_hour = packet_in.assembly_hour;
packet1.assembly_minute = packet_in.assembly_minute;
packet1.assembly_second = packet_in.assembly_second;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_factory_parameters_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_set_factory_parameters_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_factory_parameters_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.magic_1 , packet1.magic_2 , packet1.magic_3 , packet1.assembly_year , packet1.assembly_month , packet1.assembly_day , packet1.assembly_hour , packet1.assembly_minute , packet1.assembly_second , packet1.serial_number_pt_1 , packet1.serial_number_pt_2 , packet1.serial_number_pt_3 );
mavlink_msg_gimbal_set_factory_parameters_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_factory_parameters_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.magic_1 , packet1.magic_2 , packet1.magic_3 , packet1.assembly_year , packet1.assembly_month , packet1.assembly_day , packet1.assembly_hour , packet1.assembly_minute , packet1.assembly_second , packet1.serial_number_pt_1 , packet1.serial_number_pt_2 , packet1.serial_number_pt_3 );
mavlink_msg_gimbal_set_factory_parameters_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_gimbal_set_factory_parameters_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_factory_parameters_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.magic_1 , packet1.magic_2 , packet1.magic_3 , packet1.assembly_year , packet1.assembly_month , packet1.assembly_day , packet1.assembly_hour , packet1.assembly_minute , packet1.assembly_second , packet1.serial_number_pt_1 , packet1.serial_number_pt_2 , packet1.serial_number_pt_3 );
mavlink_msg_gimbal_set_factory_parameters_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_factory_parameters_loaded(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_factory_parameters_loaded_t packet_in = {
5
};
mavlink_gimbal_factory_parameters_loaded_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.dummy = packet_in.dummy;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_factory_parameters_loaded_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_factory_parameters_loaded_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_factory_parameters_loaded_pack(system_id, component_id, &msg , packet1.dummy );
mavlink_msg_gimbal_factory_parameters_loaded_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_factory_parameters_loaded_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.dummy );
mavlink_msg_gimbal_factory_parameters_loaded_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_gimbal_factory_parameters_loaded_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_factory_parameters_loaded_send(MAVLINK_COMM_1 , packet1.dummy );
mavlink_msg_gimbal_factory_parameters_loaded_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_erase_firmware_and_config(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_erase_firmware_and_config_t packet_in = {
963497464,17,84
};
mavlink_gimbal_erase_firmware_and_config_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.knock = packet_in.knock;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_erase_firmware_and_config_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_erase_firmware_and_config_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_erase_firmware_and_config_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.knock );
mavlink_msg_gimbal_erase_firmware_and_config_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_erase_firmware_and_config_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.knock );
mavlink_msg_gimbal_erase_firmware_and_config_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_gimbal_erase_firmware_and_config_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_erase_firmware_and_config_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.knock );
mavlink_msg_gimbal_erase_firmware_and_config_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_perform_factory_tests(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_perform_factory_tests_t packet_in = {
5,72
};
mavlink_gimbal_perform_factory_tests_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_perform_factory_tests_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_perform_factory_tests_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_perform_factory_tests_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_perform_factory_tests_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_perform_factory_tests_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_perform_factory_tests_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_gimbal_perform_factory_tests_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_perform_factory_tests_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_perform_factory_tests_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_report_factory_tests_progress(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_report_factory_tests_progress_t packet_in = {
5,72,139,206
};
mavlink_gimbal_report_factory_tests_progress_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.test = packet_in.test;
packet1.test_section = packet_in.test_section;
packet1.test_section_progress = packet_in.test_section_progress;
packet1.test_status = packet_in.test_status;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_report_factory_tests_progress_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_report_factory_tests_progress_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_report_factory_tests_progress_pack(system_id, component_id, &msg , packet1.test , packet1.test_section , packet1.test_section_progress , packet1.test_status );
mavlink_msg_gimbal_report_factory_tests_progress_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_report_factory_tests_progress_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.test , packet1.test_section , packet1.test_section_progress , packet1.test_status );
mavlink_msg_gimbal_report_factory_tests_progress_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_gimbal_report_factory_tests_progress_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_report_factory_tests_progress_send(MAVLINK_COMM_1 , packet1.test , packet1.test_section , packet1.test_section_progress , packet1.test_status );
mavlink_msg_gimbal_report_factory_tests_progress_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_request_axis_calibration_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_request_axis_calibration_status_t packet_in = {
5,72
};
mavlink_gimbal_request_axis_calibration_status_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_request_axis_calibration_status_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_request_axis_calibration_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_request_axis_calibration_status_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_request_axis_calibration_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_request_axis_calibration_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_request_axis_calibration_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_gimbal_request_axis_calibration_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_request_axis_calibration_status_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_request_axis_calibration_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_report_axis_calibration_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_report_axis_calibration_status_t packet_in = {
5,72,139
};
mavlink_gimbal_report_axis_calibration_status_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.yaw_requires_calibration = packet_in.yaw_requires_calibration;
packet1.pitch_requires_calibration = packet_in.pitch_requires_calibration;
packet1.roll_requires_calibration = packet_in.roll_requires_calibration;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_report_axis_calibration_status_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_report_axis_calibration_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_report_axis_calibration_status_pack(system_id, component_id, &msg , packet1.yaw_requires_calibration , packet1.pitch_requires_calibration , packet1.roll_requires_calibration );
mavlink_msg_gimbal_report_axis_calibration_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_report_axis_calibration_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.yaw_requires_calibration , packet1.pitch_requires_calibration , packet1.roll_requires_calibration );
mavlink_msg_gimbal_report_axis_calibration_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_gimbal_report_axis_calibration_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_report_axis_calibration_status_send(MAVLINK_COMM_1 , packet1.yaw_requires_calibration , packet1.pitch_requires_calibration , packet1.roll_requires_calibration );
mavlink_msg_gimbal_report_axis_calibration_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_request_axis_calibration(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_request_axis_calibration_t packet_in = {
5,72
};
mavlink_gimbal_request_axis_calibration_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_request_axis_calibration_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_request_axis_calibration_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_request_axis_calibration_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_request_axis_calibration_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_request_axis_calibration_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_request_axis_calibration_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_gimbal_request_axis_calibration_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_request_axis_calibration_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_request_axis_calibration_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gopro_heartbeat(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gopro_heartbeat_t packet_in = {
5
};
mavlink_gopro_heartbeat_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.status = packet_in.status;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_heartbeat_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_heartbeat_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_heartbeat_pack(system_id, component_id, &msg , packet1.status );
mavlink_msg_gopro_heartbeat_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_heartbeat_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.status );
mavlink_msg_gopro_heartbeat_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gopro_heartbeat_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_heartbeat_send(MAVLINK_COMM_1 , packet1.status );
mavlink_msg_gopro_heartbeat_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gopro_get_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gopro_get_request_t packet_in = {
5,72,139
};
mavlink_gopro_get_request_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.cmd_id = packet_in.cmd_id;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_get_request_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_get_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_get_request_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.cmd_id );
mavlink_msg_gopro_get_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_get_request_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.cmd_id );
mavlink_msg_gopro_get_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gopro_get_request_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_get_request_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.cmd_id );
mavlink_msg_gopro_get_request_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gopro_get_response(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gopro_get_response_t packet_in = {
5,72
};
mavlink_gopro_get_response_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.cmd_id = packet_in.cmd_id;
packet1.value = packet_in.value;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_get_response_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_get_response_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_get_response_pack(system_id, component_id, &msg , packet1.cmd_id , packet1.value );
mavlink_msg_gopro_get_response_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_get_response_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.cmd_id , packet1.value );
mavlink_msg_gopro_get_response_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_gopro_get_response_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_get_response_send(MAVLINK_COMM_1 , packet1.cmd_id , packet1.value );
mavlink_msg_gopro_get_response_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gopro_set_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gopro_set_request_t packet_in = {
5,72,139,206
};
mavlink_gopro_set_request_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.cmd_id = packet_in.cmd_id;
packet1.value = packet_in.value;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_set_request_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_set_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_set_request_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.cmd_id , packet1.value );
mavlink_msg_gopro_set_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_set_request_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.cmd_id , packet1.value );
mavlink_msg_gopro_set_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gopro_set_request_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_set_request_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.cmd_id , packet1.value );
mavlink_msg_gopro_set_request_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gopro_set_response(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gopro_set_response_t packet_in = {
5,72
};
mavlink_gopro_set_response_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.cmd_id = packet_in.cmd_id;
packet1.result = packet_in.result;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_set_response_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_set_response_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_set_response_pack(system_id, component_id, &msg , packet1.cmd_id , packet1.result );
mavlink_msg_gopro_set_response_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_set_response_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.cmd_id , packet1.result );
mavlink_msg_gopro_set_response_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_gopro_set_response_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_set_response_send(MAVLINK_COMM_1 , packet1.cmd_id , packet1.result );
mavlink_msg_gopro_set_response_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_ardupilotmega(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_test_sensor_offsets(system_id, component_id, last_msg);
@ -1848,6 +2613,23 @@ static void mavlink_test_ardupilotmega(uint8_t system_id, uint8_t component_id,
mavlink_test_ekf_status_report(system_id, component_id, last_msg);
mavlink_test_gimbal_report(system_id, component_id, last_msg);
mavlink_test_gimbal_control(system_id, component_id, last_msg);
mavlink_test_gimbal_reset(system_id, component_id, last_msg);
mavlink_test_gimbal_axis_calibration_progress(system_id, component_id, last_msg);
mavlink_test_gimbal_set_home_offsets(system_id, component_id, last_msg);
mavlink_test_gimbal_home_offset_calibration_result(system_id, component_id, last_msg);
mavlink_test_gimbal_set_factory_parameters(system_id, component_id, last_msg);
mavlink_test_gimbal_factory_parameters_loaded(system_id, component_id, last_msg);
mavlink_test_gimbal_erase_firmware_and_config(system_id, component_id, last_msg);
mavlink_test_gimbal_perform_factory_tests(system_id, component_id, last_msg);
mavlink_test_gimbal_report_factory_tests_progress(system_id, component_id, last_msg);
mavlink_test_gimbal_request_axis_calibration_status(system_id, component_id, last_msg);
mavlink_test_gimbal_report_axis_calibration_status(system_id, component_id, last_msg);
mavlink_test_gimbal_request_axis_calibration(system_id, component_id, last_msg);
mavlink_test_gopro_heartbeat(system_id, component_id, last_msg);
mavlink_test_gopro_get_request(system_id, component_id, last_msg);
mavlink_test_gopro_get_response(system_id, component_id, last_msg);
mavlink_test_gopro_set_request(system_id, component_id, last_msg);
mavlink_test_gopro_set_response(system_id, component_id, last_msg);
}
#ifdef __cplusplus