update
This commit is contained in:
@@ -9,18 +9,18 @@ typedef struct __mavlink_gimbal_device_set_attitude_t {
|
||||
float angular_velocity_x; /*< [rad/s] X component of angular velocity, positive is banking to the right, NaN to be ignored.*/
|
||||
float angular_velocity_y; /*< [rad/s] Y component of angular velocity, positive is tilting up, NaN to be ignored.*/
|
||||
float angular_velocity_z; /*< [rad/s] Z component of angular velocity, positive is panning to the right, NaN to be ignored.*/
|
||||
uint16_t target_system; /*< System ID*/
|
||||
uint16_t flags; /*< Low level gimbal flags.*/
|
||||
uint8_t target_system; /*< System ID*/
|
||||
uint8_t target_component; /*< Component ID*/
|
||||
} mavlink_gimbal_device_set_attitude_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN 32
|
||||
#define MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_MIN_LEN 32
|
||||
#define MAVLINK_MSG_ID_284_LEN 32
|
||||
#define MAVLINK_MSG_ID_284_MIN_LEN 32
|
||||
#define MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN 33
|
||||
#define MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_MIN_LEN 33
|
||||
#define MAVLINK_MSG_ID_284_LEN 33
|
||||
#define MAVLINK_MSG_ID_284_MIN_LEN 33
|
||||
|
||||
#define MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_CRC 99
|
||||
#define MAVLINK_MSG_ID_284_CRC 99
|
||||
#define MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_CRC 101
|
||||
#define MAVLINK_MSG_ID_284_CRC 101
|
||||
|
||||
#define MAVLINK_MSG_GIMBAL_DEVICE_SET_ATTITUDE_FIELD_Q_LEN 4
|
||||
|
||||
@@ -29,9 +29,9 @@ typedef struct __mavlink_gimbal_device_set_attitude_t {
|
||||
284, \
|
||||
"GIMBAL_DEVICE_SET_ATTITUDE", \
|
||||
7, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_gimbal_device_set_attitude_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_gimbal_device_set_attitude_t, target_component) }, \
|
||||
{ "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_gimbal_device_set_attitude_t, flags) }, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_gimbal_device_set_attitude_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_gimbal_device_set_attitude_t, target_component) }, \
|
||||
{ "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_gimbal_device_set_attitude_t, flags) }, \
|
||||
{ "q", NULL, MAVLINK_TYPE_FLOAT, 4, 0, offsetof(mavlink_gimbal_device_set_attitude_t, q) }, \
|
||||
{ "angular_velocity_x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_gimbal_device_set_attitude_t, angular_velocity_x) }, \
|
||||
{ "angular_velocity_y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_gimbal_device_set_attitude_t, angular_velocity_y) }, \
|
||||
@@ -42,9 +42,9 @@ typedef struct __mavlink_gimbal_device_set_attitude_t {
|
||||
#define MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE { \
|
||||
"GIMBAL_DEVICE_SET_ATTITUDE", \
|
||||
7, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_gimbal_device_set_attitude_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_gimbal_device_set_attitude_t, target_component) }, \
|
||||
{ "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_gimbal_device_set_attitude_t, flags) }, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_gimbal_device_set_attitude_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_gimbal_device_set_attitude_t, target_component) }, \
|
||||
{ "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_gimbal_device_set_attitude_t, flags) }, \
|
||||
{ "q", NULL, MAVLINK_TYPE_FLOAT, 4, 0, offsetof(mavlink_gimbal_device_set_attitude_t, q) }, \
|
||||
{ "angular_velocity_x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_gimbal_device_set_attitude_t, angular_velocity_x) }, \
|
||||
{ "angular_velocity_y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_gimbal_device_set_attitude_t, angular_velocity_y) }, \
|
||||
@@ -69,16 +69,16 @@ typedef struct __mavlink_gimbal_device_set_attitude_t {
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gimbal_device_set_attitude_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z)
|
||||
uint16_t target_system, uint8_t target_component, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN];
|
||||
_mav_put_float(buf, 16, angular_velocity_x);
|
||||
_mav_put_float(buf, 20, angular_velocity_y);
|
||||
_mav_put_float(buf, 24, angular_velocity_z);
|
||||
_mav_put_uint16_t(buf, 28, flags);
|
||||
_mav_put_uint8_t(buf, 30, target_system);
|
||||
_mav_put_uint8_t(buf, 31, target_component);
|
||||
_mav_put_uint16_t(buf, 28, target_system);
|
||||
_mav_put_uint16_t(buf, 30, flags);
|
||||
_mav_put_uint8_t(buf, 32, target_component);
|
||||
_mav_put_float_array(buf, 0, q, 4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN);
|
||||
#else
|
||||
@@ -86,8 +86,8 @@ static inline uint16_t mavlink_msg_gimbal_device_set_attitude_pack(uint16_t syst
|
||||
packet.angular_velocity_x = angular_velocity_x;
|
||||
packet.angular_velocity_y = angular_velocity_y;
|
||||
packet.angular_velocity_z = angular_velocity_z;
|
||||
packet.flags = flags;
|
||||
packet.target_system = target_system;
|
||||
packet.flags = flags;
|
||||
packet.target_component = target_component;
|
||||
mav_array_memcpy(packet.q, q, sizeof(float)*4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN);
|
||||
@@ -114,16 +114,16 @@ static inline uint16_t mavlink_msg_gimbal_device_set_attitude_pack(uint16_t syst
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gimbal_device_set_attitude_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t target_system,uint8_t target_component,uint16_t flags,const float *q,float angular_velocity_x,float angular_velocity_y,float angular_velocity_z)
|
||||
uint16_t target_system,uint8_t target_component,uint16_t flags,const float *q,float angular_velocity_x,float angular_velocity_y,float angular_velocity_z)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN];
|
||||
_mav_put_float(buf, 16, angular_velocity_x);
|
||||
_mav_put_float(buf, 20, angular_velocity_y);
|
||||
_mav_put_float(buf, 24, angular_velocity_z);
|
||||
_mav_put_uint16_t(buf, 28, flags);
|
||||
_mav_put_uint8_t(buf, 30, target_system);
|
||||
_mav_put_uint8_t(buf, 31, target_component);
|
||||
_mav_put_uint16_t(buf, 28, target_system);
|
||||
_mav_put_uint16_t(buf, 30, flags);
|
||||
_mav_put_uint8_t(buf, 32, target_component);
|
||||
_mav_put_float_array(buf, 0, q, 4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN);
|
||||
#else
|
||||
@@ -131,8 +131,8 @@ static inline uint16_t mavlink_msg_gimbal_device_set_attitude_pack_chan(uint16_t
|
||||
packet.angular_velocity_x = angular_velocity_x;
|
||||
packet.angular_velocity_y = angular_velocity_y;
|
||||
packet.angular_velocity_z = angular_velocity_z;
|
||||
packet.flags = flags;
|
||||
packet.target_system = target_system;
|
||||
packet.flags = flags;
|
||||
packet.target_component = target_component;
|
||||
mav_array_memcpy(packet.q, q, sizeof(float)*4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN);
|
||||
@@ -183,16 +183,16 @@ static inline uint16_t mavlink_msg_gimbal_device_set_attitude_encode_chan(uint16
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_gimbal_device_set_attitude_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z)
|
||||
static inline void mavlink_msg_gimbal_device_set_attitude_send(mavlink_channel_t chan, uint16_t target_system, uint8_t target_component, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN];
|
||||
_mav_put_float(buf, 16, angular_velocity_x);
|
||||
_mav_put_float(buf, 20, angular_velocity_y);
|
||||
_mav_put_float(buf, 24, angular_velocity_z);
|
||||
_mav_put_uint16_t(buf, 28, flags);
|
||||
_mav_put_uint8_t(buf, 30, target_system);
|
||||
_mav_put_uint8_t(buf, 31, target_component);
|
||||
_mav_put_uint16_t(buf, 28, target_system);
|
||||
_mav_put_uint16_t(buf, 30, flags);
|
||||
_mav_put_uint8_t(buf, 32, target_component);
|
||||
_mav_put_float_array(buf, 0, q, 4);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE, buf, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_CRC);
|
||||
#else
|
||||
@@ -200,8 +200,8 @@ static inline void mavlink_msg_gimbal_device_set_attitude_send(mavlink_channel_t
|
||||
packet.angular_velocity_x = angular_velocity_x;
|
||||
packet.angular_velocity_y = angular_velocity_y;
|
||||
packet.angular_velocity_z = angular_velocity_z;
|
||||
packet.flags = flags;
|
||||
packet.target_system = target_system;
|
||||
packet.flags = flags;
|
||||
packet.target_component = target_component;
|
||||
mav_array_memcpy(packet.q, q, sizeof(float)*4);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_CRC);
|
||||
@@ -230,16 +230,16 @@ static inline void mavlink_msg_gimbal_device_set_attitude_send_struct(mavlink_ch
|
||||
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_device_set_attitude_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z)
|
||||
static inline void mavlink_msg_gimbal_device_set_attitude_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t target_system, uint8_t target_component, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_float(buf, 16, angular_velocity_x);
|
||||
_mav_put_float(buf, 20, angular_velocity_y);
|
||||
_mav_put_float(buf, 24, angular_velocity_z);
|
||||
_mav_put_uint16_t(buf, 28, flags);
|
||||
_mav_put_uint8_t(buf, 30, target_system);
|
||||
_mav_put_uint8_t(buf, 31, target_component);
|
||||
_mav_put_uint16_t(buf, 28, target_system);
|
||||
_mav_put_uint16_t(buf, 30, flags);
|
||||
_mav_put_uint8_t(buf, 32, target_component);
|
||||
_mav_put_float_array(buf, 0, q, 4);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE, buf, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_CRC);
|
||||
#else
|
||||
@@ -247,8 +247,8 @@ static inline void mavlink_msg_gimbal_device_set_attitude_send_buf(mavlink_messa
|
||||
packet->angular_velocity_x = angular_velocity_x;
|
||||
packet->angular_velocity_y = angular_velocity_y;
|
||||
packet->angular_velocity_z = angular_velocity_z;
|
||||
packet->flags = flags;
|
||||
packet->target_system = target_system;
|
||||
packet->flags = flags;
|
||||
packet->target_component = target_component;
|
||||
mav_array_memcpy(packet->q, q, sizeof(float)*4);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_CRC);
|
||||
@@ -266,9 +266,9 @@ static inline void mavlink_msg_gimbal_device_set_attitude_send_buf(mavlink_messa
|
||||
*
|
||||
* @return System ID
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_gimbal_device_set_attitude_get_target_system(const mavlink_message_t* msg)
|
||||
static inline uint16_t mavlink_msg_gimbal_device_set_attitude_get_target_system(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 30);
|
||||
return _MAV_RETURN_uint16_t(msg, 28);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -278,7 +278,7 @@ static inline uint8_t mavlink_msg_gimbal_device_set_attitude_get_target_system(c
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_gimbal_device_set_attitude_get_target_component(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 31);
|
||||
return _MAV_RETURN_uint8_t(msg, 32);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -288,7 +288,7 @@ static inline uint8_t mavlink_msg_gimbal_device_set_attitude_get_target_componen
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gimbal_device_set_attitude_get_flags(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 28);
|
||||
return _MAV_RETURN_uint16_t(msg, 30);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -344,8 +344,8 @@ static inline void mavlink_msg_gimbal_device_set_attitude_decode(const mavlink_m
|
||||
gimbal_device_set_attitude->angular_velocity_x = mavlink_msg_gimbal_device_set_attitude_get_angular_velocity_x(msg);
|
||||
gimbal_device_set_attitude->angular_velocity_y = mavlink_msg_gimbal_device_set_attitude_get_angular_velocity_y(msg);
|
||||
gimbal_device_set_attitude->angular_velocity_z = mavlink_msg_gimbal_device_set_attitude_get_angular_velocity_z(msg);
|
||||
gimbal_device_set_attitude->flags = mavlink_msg_gimbal_device_set_attitude_get_flags(msg);
|
||||
gimbal_device_set_attitude->target_system = mavlink_msg_gimbal_device_set_attitude_get_target_system(msg);
|
||||
gimbal_device_set_attitude->flags = mavlink_msg_gimbal_device_set_attitude_get_flags(msg);
|
||||
gimbal_device_set_attitude->target_component = mavlink_msg_gimbal_device_set_attitude_get_target_component(msg);
|
||||
#else
|
||||
uint8_t len = msg->len < MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN? msg->len : MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE_LEN;
|
||||
|
||||
Reference in New Issue
Block a user