✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_FENCE_POINT 160
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_fence_point_t {
|
||||
float lat; /*< [deg] Latitude of point.*/
|
||||
float lng; /*< [deg] Longitude of point.*/
|
||||
@@ -11,7 +11,7 @@ typedef struct __mavlink_fence_point_t {
|
||||
uint8_t target_component; /*< Component ID.*/
|
||||
uint8_t idx; /*< Point index (first point is 1, 0 is for return point).*/
|
||||
uint8_t count; /*< Total number of points (for sanity checking).*/
|
||||
}) mavlink_fence_point_t;
|
||||
} mavlink_fence_point_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_FENCE_POINT_LEN 12
|
||||
#define MAVLINK_MSG_ID_FENCE_POINT_MIN_LEN 12
|
||||
@@ -64,7 +64,7 @@ typedef struct __mavlink_fence_point_t {
|
||||
* @param lng [deg] Longitude of point.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_point_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
static inline uint16_t mavlink_msg_fence_point_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint8_t idx, uint8_t count, float lat, float lng)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
@@ -107,7 +107,7 @@ static inline uint16_t mavlink_msg_fence_point_pack(uint8_t system_id, uint8_t c
|
||||
* @param lng [deg] Longitude of point.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_point_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
static inline uint16_t mavlink_msg_fence_point_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,uint8_t idx,uint8_t count,float lat,float lng)
|
||||
{
|
||||
@@ -145,7 +145,7 @@ static inline uint16_t mavlink_msg_fence_point_pack_chan(uint8_t system_id, uint
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param fence_point C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_point_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_fence_point_t* fence_point)
|
||||
static inline uint16_t mavlink_msg_fence_point_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_fence_point_t* fence_point)
|
||||
{
|
||||
return mavlink_msg_fence_point_pack(system_id, component_id, msg, fence_point->target_system, fence_point->target_component, fence_point->idx, fence_point->count, fence_point->lat, fence_point->lng);
|
||||
}
|
||||
@@ -159,7 +159,7 @@ static inline uint16_t mavlink_msg_fence_point_encode(uint8_t system_id, uint8_t
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param fence_point C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_point_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_fence_point_t* fence_point)
|
||||
static inline uint16_t mavlink_msg_fence_point_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_fence_point_t* fence_point)
|
||||
{
|
||||
return mavlink_msg_fence_point_pack_chan(system_id, component_id, chan, msg, fence_point->target_system, fence_point->target_component, fence_point->idx, fence_point->count, fence_point->lat, fence_point->lng);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user