✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_FENCE_STATUS 162
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_fence_status_t {
|
||||
uint32_t breach_time; /*< [ms] Time (since boot) of last breach.*/
|
||||
uint16_t breach_count; /*< Number of fence breaches.*/
|
||||
uint8_t breach_status; /*< Breach status (0 if currently inside fence, 1 if outside).*/
|
||||
uint8_t breach_type; /*< Last breach type.*/
|
||||
}) mavlink_fence_status_t;
|
||||
} mavlink_fence_status_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_FENCE_STATUS_LEN 8
|
||||
#define MAVLINK_MSG_ID_FENCE_STATUS_MIN_LEN 8
|
||||
@@ -56,7 +56,7 @@ typedef struct __mavlink_fence_status_t {
|
||||
* @param breach_time [ms] Time (since boot) of last breach.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
static inline uint16_t mavlink_msg_fence_status_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t breach_status, uint16_t breach_count, uint8_t breach_type, uint32_t breach_time)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
@@ -93,7 +93,7 @@ static inline uint16_t mavlink_msg_fence_status_pack(uint8_t system_id, uint8_t
|
||||
* @param breach_time [ms] Time (since boot) of last breach.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
static inline uint16_t mavlink_msg_fence_status_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t breach_status,uint16_t breach_count,uint8_t breach_type,uint32_t breach_time)
|
||||
{
|
||||
@@ -127,7 +127,7 @@ static inline uint16_t mavlink_msg_fence_status_pack_chan(uint8_t system_id, uin
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param fence_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_fence_status_t* fence_status)
|
||||
static inline uint16_t mavlink_msg_fence_status_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_fence_status_t* fence_status)
|
||||
{
|
||||
return mavlink_msg_fence_status_pack(system_id, component_id, msg, fence_status->breach_status, fence_status->breach_count, fence_status->breach_type, fence_status->breach_time);
|
||||
}
|
||||
@@ -141,7 +141,7 @@ static inline uint16_t mavlink_msg_fence_status_encode(uint8_t system_id, uint8_
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param fence_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_fence_status_t* fence_status)
|
||||
static inline uint16_t mavlink_msg_fence_status_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_fence_status_t* fence_status)
|
||||
{
|
||||
return mavlink_msg_fence_status_pack_chan(system_id, component_id, chan, msg, fence_status->breach_status, fence_status->breach_count, fence_status->breach_type, fence_status->breach_time);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user