✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_ATTITUDE 30
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_attitude_t {
|
||||
uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/
|
||||
float roll; /*< [rad] Roll angle (-pi..+pi)*/
|
||||
@@ -12,7 +12,7 @@ typedef struct __mavlink_attitude_t {
|
||||
float rollspeed; /*< [rad/s] Roll angular speed*/
|
||||
float pitchspeed; /*< [rad/s] Pitch angular speed*/
|
||||
float yawspeed; /*< [rad/s] Yaw angular speed*/
|
||||
}) mavlink_attitude_t;
|
||||
} mavlink_attitude_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_ATTITUDE_LEN 28
|
||||
#define MAVLINK_MSG_ID_ATTITUDE_MIN_LEN 28
|
||||
@@ -68,7 +68,7 @@ typedef struct __mavlink_attitude_t {
|
||||
* @param yawspeed [rad/s] Yaw angular speed
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_attitude_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
static inline uint16_t mavlink_msg_attitude_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint32_t time_boot_ms, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
@@ -114,7 +114,7 @@ static inline uint16_t mavlink_msg_attitude_pack(uint8_t system_id, uint8_t comp
|
||||
* @param yawspeed [rad/s] Yaw angular speed
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_attitude_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
static inline uint16_t mavlink_msg_attitude_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint32_t time_boot_ms,float roll,float pitch,float yaw,float rollspeed,float pitchspeed,float yawspeed)
|
||||
{
|
||||
@@ -154,7 +154,7 @@ static inline uint16_t mavlink_msg_attitude_pack_chan(uint8_t system_id, uint8_t
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param attitude C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_attitude_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_attitude_t* attitude)
|
||||
static inline uint16_t mavlink_msg_attitude_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_attitude_t* attitude)
|
||||
{
|
||||
return mavlink_msg_attitude_pack(system_id, component_id, msg, attitude->time_boot_ms, attitude->roll, attitude->pitch, attitude->yaw, attitude->rollspeed, attitude->pitchspeed, attitude->yawspeed);
|
||||
}
|
||||
@@ -168,7 +168,7 @@ static inline uint16_t mavlink_msg_attitude_encode(uint8_t system_id, uint8_t co
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param attitude C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_attitude_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_attitude_t* attitude)
|
||||
static inline uint16_t mavlink_msg_attitude_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_attitude_t* attitude)
|
||||
{
|
||||
return mavlink_msg_attitude_pack_chan(system_id, component_id, chan, msg, attitude->time_boot_ms, attitude->roll, attitude->pitch, attitude->yaw, attitude->rollspeed, attitude->pitchspeed, attitude->yawspeed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user