✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
@@ -3,14 +3,14 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_SET_MAG_OFFSETS 151
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_set_mag_offsets_t {
|
||||
int16_t mag_ofs_x; /*< Magnetometer X offset.*/
|
||||
int16_t mag_ofs_y; /*< Magnetometer Y offset.*/
|
||||
int16_t mag_ofs_z; /*< Magnetometer Z offset.*/
|
||||
uint8_t target_system; /*< System ID.*/
|
||||
uint8_t target_component; /*< Component ID.*/
|
||||
}) mavlink_set_mag_offsets_t;
|
||||
} mavlink_set_mag_offsets_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN 8
|
||||
#define MAVLINK_MSG_ID_SET_MAG_OFFSETS_MIN_LEN 8
|
||||
@@ -60,7 +60,7 @@ typedef struct __mavlink_set_mag_offsets_t {
|
||||
* @param mag_ofs_z Magnetometer Z offset.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_set_mag_offsets_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
static inline uint16_t mavlink_msg_set_mag_offsets_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
@@ -100,7 +100,7 @@ static inline uint16_t mavlink_msg_set_mag_offsets_pack(uint8_t system_id, uint8
|
||||
* @param mag_ofs_z Magnetometer Z offset.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_set_mag_offsets_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
static inline uint16_t mavlink_msg_set_mag_offsets_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,int16_t mag_ofs_x,int16_t mag_ofs_y,int16_t mag_ofs_z)
|
||||
{
|
||||
@@ -136,7 +136,7 @@ static inline uint16_t mavlink_msg_set_mag_offsets_pack_chan(uint8_t system_id,
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param set_mag_offsets C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_set_mag_offsets_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_mag_offsets_t* set_mag_offsets)
|
||||
static inline uint16_t mavlink_msg_set_mag_offsets_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_mag_offsets_t* set_mag_offsets)
|
||||
{
|
||||
return mavlink_msg_set_mag_offsets_pack(system_id, component_id, msg, set_mag_offsets->target_system, set_mag_offsets->target_component, set_mag_offsets->mag_ofs_x, set_mag_offsets->mag_ofs_y, set_mag_offsets->mag_ofs_z);
|
||||
}
|
||||
@@ -150,7 +150,7 @@ static inline uint16_t mavlink_msg_set_mag_offsets_encode(uint8_t system_id, uin
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param set_mag_offsets C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_set_mag_offsets_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_set_mag_offsets_t* set_mag_offsets)
|
||||
static inline uint16_t mavlink_msg_set_mag_offsets_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_set_mag_offsets_t* set_mag_offsets)
|
||||
{
|
||||
return mavlink_msg_set_mag_offsets_pack_chan(system_id, component_id, chan, msg, set_mag_offsets->target_system, set_mag_offsets->target_component, set_mag_offsets->mag_ofs_x, set_mag_offsets->mag_ofs_y, set_mag_offsets->mag_ofs_z);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user