update
This commit is contained in:
@@ -11,18 +11,18 @@ typedef struct __mavlink_set_attitude_target_t {
|
||||
float body_pitch_rate; /*< [rad/s] Body pitch rate*/
|
||||
float body_yaw_rate; /*< [rad/s] Body yaw rate*/
|
||||
float thrust; /*< Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)*/
|
||||
uint8_t target_system; /*< System ID*/
|
||||
uint16_t target_system; /*< System ID*/
|
||||
uint8_t target_component; /*< Component ID*/
|
||||
uint8_t type_mask; /*< Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 6: reserved, bit 7: throttle, bit 8: attitude*/
|
||||
} mavlink_set_attitude_target_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN 39
|
||||
#define MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_MIN_LEN 39
|
||||
#define MAVLINK_MSG_ID_82_LEN 39
|
||||
#define MAVLINK_MSG_ID_82_MIN_LEN 39
|
||||
#define MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN 40
|
||||
#define MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_MIN_LEN 40
|
||||
#define MAVLINK_MSG_ID_82_LEN 40
|
||||
#define MAVLINK_MSG_ID_82_MIN_LEN 40
|
||||
|
||||
#define MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_CRC 49
|
||||
#define MAVLINK_MSG_ID_82_CRC 49
|
||||
#define MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_CRC 143
|
||||
#define MAVLINK_MSG_ID_82_CRC 143
|
||||
|
||||
#define MAVLINK_MSG_SET_ATTITUDE_TARGET_FIELD_Q_LEN 4
|
||||
|
||||
@@ -32,9 +32,9 @@ typedef struct __mavlink_set_attitude_target_t {
|
||||
"SET_ATTITUDE_TARGET", \
|
||||
9, \
|
||||
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_set_attitude_target_t, time_boot_ms) }, \
|
||||
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_set_attitude_target_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_set_attitude_target_t, target_component) }, \
|
||||
{ "type_mask", NULL, MAVLINK_TYPE_UINT8_T, 0, 38, offsetof(mavlink_set_attitude_target_t, type_mask) }, \
|
||||
{ "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_set_attitude_target_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 38, offsetof(mavlink_set_attitude_target_t, target_component) }, \
|
||||
{ "type_mask", NULL, MAVLINK_TYPE_UINT8_T, 0, 39, offsetof(mavlink_set_attitude_target_t, type_mask) }, \
|
||||
{ "q", NULL, MAVLINK_TYPE_FLOAT, 4, 4, offsetof(mavlink_set_attitude_target_t, q) }, \
|
||||
{ "body_roll_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_set_attitude_target_t, body_roll_rate) }, \
|
||||
{ "body_pitch_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_set_attitude_target_t, body_pitch_rate) }, \
|
||||
@@ -47,9 +47,9 @@ typedef struct __mavlink_set_attitude_target_t {
|
||||
"SET_ATTITUDE_TARGET", \
|
||||
9, \
|
||||
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_set_attitude_target_t, time_boot_ms) }, \
|
||||
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_set_attitude_target_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_set_attitude_target_t, target_component) }, \
|
||||
{ "type_mask", NULL, MAVLINK_TYPE_UINT8_T, 0, 38, offsetof(mavlink_set_attitude_target_t, type_mask) }, \
|
||||
{ "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_set_attitude_target_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 38, offsetof(mavlink_set_attitude_target_t, target_component) }, \
|
||||
{ "type_mask", NULL, MAVLINK_TYPE_UINT8_T, 0, 39, offsetof(mavlink_set_attitude_target_t, type_mask) }, \
|
||||
{ "q", NULL, MAVLINK_TYPE_FLOAT, 4, 4, offsetof(mavlink_set_attitude_target_t, q) }, \
|
||||
{ "body_roll_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_set_attitude_target_t, body_roll_rate) }, \
|
||||
{ "body_pitch_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_set_attitude_target_t, body_pitch_rate) }, \
|
||||
@@ -77,7 +77,7 @@ typedef struct __mavlink_set_attitude_target_t {
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_set_attitude_target_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust)
|
||||
uint32_t time_boot_ms, uint16_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN];
|
||||
@@ -86,9 +86,9 @@ static inline uint16_t mavlink_msg_set_attitude_target_pack(uint16_t system_id,
|
||||
_mav_put_float(buf, 24, body_pitch_rate);
|
||||
_mav_put_float(buf, 28, body_yaw_rate);
|
||||
_mav_put_float(buf, 32, thrust);
|
||||
_mav_put_uint8_t(buf, 36, target_system);
|
||||
_mav_put_uint8_t(buf, 37, target_component);
|
||||
_mav_put_uint8_t(buf, 38, type_mask);
|
||||
_mav_put_uint16_t(buf, 36, target_system);
|
||||
_mav_put_uint8_t(buf, 38, target_component);
|
||||
_mav_put_uint8_t(buf, 39, type_mask);
|
||||
_mav_put_float_array(buf, 4, q, 4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN);
|
||||
#else
|
||||
@@ -128,7 +128,7 @@ static inline uint16_t mavlink_msg_set_attitude_target_pack(uint16_t system_id,
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_set_attitude_target_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint32_t time_boot_ms,uint8_t target_system,uint8_t target_component,uint8_t type_mask,const float *q,float body_roll_rate,float body_pitch_rate,float body_yaw_rate,float thrust)
|
||||
uint32_t time_boot_ms,uint16_t target_system,uint8_t target_component,uint8_t type_mask,const float *q,float body_roll_rate,float body_pitch_rate,float body_yaw_rate,float thrust)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN];
|
||||
@@ -137,9 +137,9 @@ static inline uint16_t mavlink_msg_set_attitude_target_pack_chan(uint16_t system
|
||||
_mav_put_float(buf, 24, body_pitch_rate);
|
||||
_mav_put_float(buf, 28, body_yaw_rate);
|
||||
_mav_put_float(buf, 32, thrust);
|
||||
_mav_put_uint8_t(buf, 36, target_system);
|
||||
_mav_put_uint8_t(buf, 37, target_component);
|
||||
_mav_put_uint8_t(buf, 38, type_mask);
|
||||
_mav_put_uint16_t(buf, 36, target_system);
|
||||
_mav_put_uint8_t(buf, 38, target_component);
|
||||
_mav_put_uint8_t(buf, 39, type_mask);
|
||||
_mav_put_float_array(buf, 4, q, 4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN);
|
||||
#else
|
||||
@@ -203,7 +203,7 @@ static inline uint16_t mavlink_msg_set_attitude_target_encode_chan(uint16_t syst
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_set_attitude_target_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust)
|
||||
static inline void mavlink_msg_set_attitude_target_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint16_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN];
|
||||
@@ -212,9 +212,9 @@ static inline void mavlink_msg_set_attitude_target_send(mavlink_channel_t chan,
|
||||
_mav_put_float(buf, 24, body_pitch_rate);
|
||||
_mav_put_float(buf, 28, body_yaw_rate);
|
||||
_mav_put_float(buf, 32, thrust);
|
||||
_mav_put_uint8_t(buf, 36, target_system);
|
||||
_mav_put_uint8_t(buf, 37, target_component);
|
||||
_mav_put_uint8_t(buf, 38, type_mask);
|
||||
_mav_put_uint16_t(buf, 36, target_system);
|
||||
_mav_put_uint8_t(buf, 38, target_component);
|
||||
_mav_put_uint8_t(buf, 39, type_mask);
|
||||
_mav_put_float_array(buf, 4, q, 4);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET, buf, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_CRC);
|
||||
#else
|
||||
@@ -254,7 +254,7 @@ static inline void mavlink_msg_set_attitude_target_send_struct(mavlink_channel_t
|
||||
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_set_attitude_target_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust)
|
||||
static inline void mavlink_msg_set_attitude_target_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint16_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
@@ -263,9 +263,9 @@ static inline void mavlink_msg_set_attitude_target_send_buf(mavlink_message_t *m
|
||||
_mav_put_float(buf, 24, body_pitch_rate);
|
||||
_mav_put_float(buf, 28, body_yaw_rate);
|
||||
_mav_put_float(buf, 32, thrust);
|
||||
_mav_put_uint8_t(buf, 36, target_system);
|
||||
_mav_put_uint8_t(buf, 37, target_component);
|
||||
_mav_put_uint8_t(buf, 38, type_mask);
|
||||
_mav_put_uint16_t(buf, 36, target_system);
|
||||
_mav_put_uint8_t(buf, 38, target_component);
|
||||
_mav_put_uint8_t(buf, 39, type_mask);
|
||||
_mav_put_float_array(buf, 4, q, 4);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET, buf, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_CRC);
|
||||
#else
|
||||
@@ -304,9 +304,9 @@ static inline uint32_t mavlink_msg_set_attitude_target_get_time_boot_ms(const ma
|
||||
*
|
||||
* @return System ID
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_set_attitude_target_get_target_system(const mavlink_message_t* msg)
|
||||
static inline uint16_t mavlink_msg_set_attitude_target_get_target_system(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 36);
|
||||
return _MAV_RETURN_uint16_t(msg, 36);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -316,7 +316,7 @@ static inline uint8_t mavlink_msg_set_attitude_target_get_target_system(const ma
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_set_attitude_target_get_target_component(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 37);
|
||||
return _MAV_RETURN_uint8_t(msg, 38);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -326,7 +326,7 @@ static inline uint8_t mavlink_msg_set_attitude_target_get_target_component(const
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_set_attitude_target_get_type_mask(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 38);
|
||||
return _MAV_RETURN_uint8_t(msg, 39);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user