✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_AHRS2 178
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_ahrs2_t {
|
||||
float roll; /*< [rad] Roll angle.*/
|
||||
float pitch; /*< [rad] Pitch angle.*/
|
||||
@@ -11,7 +11,7 @@ typedef struct __mavlink_ahrs2_t {
|
||||
float altitude; /*< [m] Altitude (MSL).*/
|
||||
int32_t lat; /*< [degE7] Latitude.*/
|
||||
int32_t lng; /*< [degE7] Longitude.*/
|
||||
}) mavlink_ahrs2_t;
|
||||
} mavlink_ahrs2_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_AHRS2_LEN 24
|
||||
#define MAVLINK_MSG_ID_AHRS2_MIN_LEN 24
|
||||
@@ -64,7 +64,7 @@ typedef struct __mavlink_ahrs2_t {
|
||||
* @param lng [degE7] Longitude.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ahrs2_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
static inline uint16_t mavlink_msg_ahrs2_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
float roll, float pitch, float yaw, float altitude, int32_t lat, int32_t lng)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
@@ -107,7 +107,7 @@ static inline uint16_t mavlink_msg_ahrs2_pack(uint8_t system_id, uint8_t compone
|
||||
* @param lng [degE7] Longitude.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ahrs2_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
static inline uint16_t mavlink_msg_ahrs2_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
float roll,float pitch,float yaw,float altitude,int32_t lat,int32_t lng)
|
||||
{
|
||||
@@ -145,7 +145,7 @@ static inline uint16_t mavlink_msg_ahrs2_pack_chan(uint8_t system_id, uint8_t co
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param ahrs2 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ahrs2_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_ahrs2_t* ahrs2)
|
||||
static inline uint16_t mavlink_msg_ahrs2_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_ahrs2_t* ahrs2)
|
||||
{
|
||||
return mavlink_msg_ahrs2_pack(system_id, component_id, msg, ahrs2->roll, ahrs2->pitch, ahrs2->yaw, ahrs2->altitude, ahrs2->lat, ahrs2->lng);
|
||||
}
|
||||
@@ -159,7 +159,7 @@ static inline uint16_t mavlink_msg_ahrs2_encode(uint8_t system_id, uint8_t compo
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param ahrs2 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ahrs2_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_ahrs2_t* ahrs2)
|
||||
static inline uint16_t mavlink_msg_ahrs2_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_ahrs2_t* ahrs2)
|
||||
{
|
||||
return mavlink_msg_ahrs2_pack_chan(system_id, component_id, chan, msg, ahrs2->roll, ahrs2->pitch, ahrs2->yaw, ahrs2->altitude, ahrs2->lat, ahrs2->lng);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user