update
This commit is contained in:
@@ -7,19 +7,19 @@
|
||||
typedef struct __mavlink_fence_point_t {
|
||||
float lat; /*< [deg] Latitude of point.*/
|
||||
float lng; /*< [deg] Longitude of point.*/
|
||||
uint8_t target_system; /*< System ID.*/
|
||||
uint16_t target_system; /*< System ID.*/
|
||||
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;
|
||||
|
||||
#define MAVLINK_MSG_ID_FENCE_POINT_LEN 12
|
||||
#define MAVLINK_MSG_ID_FENCE_POINT_MIN_LEN 12
|
||||
#define MAVLINK_MSG_ID_160_LEN 12
|
||||
#define MAVLINK_MSG_ID_160_MIN_LEN 12
|
||||
#define MAVLINK_MSG_ID_FENCE_POINT_LEN 13
|
||||
#define MAVLINK_MSG_ID_FENCE_POINT_MIN_LEN 13
|
||||
#define MAVLINK_MSG_ID_160_LEN 13
|
||||
#define MAVLINK_MSG_ID_160_MIN_LEN 13
|
||||
|
||||
#define MAVLINK_MSG_ID_FENCE_POINT_CRC 78
|
||||
#define MAVLINK_MSG_ID_160_CRC 78
|
||||
#define MAVLINK_MSG_ID_FENCE_POINT_CRC 192
|
||||
#define MAVLINK_MSG_ID_160_CRC 192
|
||||
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ typedef struct __mavlink_fence_point_t {
|
||||
160, \
|
||||
"FENCE_POINT", \
|
||||
6, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_fence_point_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_fence_point_t, target_component) }, \
|
||||
{ "idx", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_fence_point_t, idx) }, \
|
||||
{ "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_fence_point_t, count) }, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_fence_point_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_fence_point_t, target_component) }, \
|
||||
{ "idx", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_fence_point_t, idx) }, \
|
||||
{ "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_fence_point_t, count) }, \
|
||||
{ "lat", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_fence_point_t, lat) }, \
|
||||
{ "lng", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_fence_point_t, lng) }, \
|
||||
} \
|
||||
@@ -40,10 +40,10 @@ typedef struct __mavlink_fence_point_t {
|
||||
#define MAVLINK_MESSAGE_INFO_FENCE_POINT { \
|
||||
"FENCE_POINT", \
|
||||
6, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_fence_point_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_fence_point_t, target_component) }, \
|
||||
{ "idx", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_fence_point_t, idx) }, \
|
||||
{ "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_fence_point_t, count) }, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_fence_point_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_fence_point_t, target_component) }, \
|
||||
{ "idx", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_fence_point_t, idx) }, \
|
||||
{ "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_fence_point_t, count) }, \
|
||||
{ "lat", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_fence_point_t, lat) }, \
|
||||
{ "lng", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_fence_point_t, lng) }, \
|
||||
} \
|
||||
@@ -65,16 +65,16 @@ typedef struct __mavlink_fence_point_t {
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
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)
|
||||
uint16_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
|
||||
char buf[MAVLINK_MSG_ID_FENCE_POINT_LEN];
|
||||
_mav_put_float(buf, 0, lat);
|
||||
_mav_put_float(buf, 4, lng);
|
||||
_mav_put_uint8_t(buf, 8, target_system);
|
||||
_mav_put_uint8_t(buf, 9, target_component);
|
||||
_mav_put_uint8_t(buf, 10, idx);
|
||||
_mav_put_uint8_t(buf, 11, count);
|
||||
_mav_put_uint16_t(buf, 8, target_system);
|
||||
_mav_put_uint8_t(buf, 10, target_component);
|
||||
_mav_put_uint8_t(buf, 11, idx);
|
||||
_mav_put_uint8_t(buf, 12, count);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FENCE_POINT_LEN);
|
||||
#else
|
||||
@@ -109,16 +109,16 @@ static inline uint16_t mavlink_msg_fence_point_pack(uint16_t system_id, uint8_t
|
||||
*/
|
||||
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)
|
||||
uint16_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
|
||||
char buf[MAVLINK_MSG_ID_FENCE_POINT_LEN];
|
||||
_mav_put_float(buf, 0, lat);
|
||||
_mav_put_float(buf, 4, lng);
|
||||
_mav_put_uint8_t(buf, 8, target_system);
|
||||
_mav_put_uint8_t(buf, 9, target_component);
|
||||
_mav_put_uint8_t(buf, 10, idx);
|
||||
_mav_put_uint8_t(buf, 11, count);
|
||||
_mav_put_uint16_t(buf, 8, target_system);
|
||||
_mav_put_uint8_t(buf, 10, target_component);
|
||||
_mav_put_uint8_t(buf, 11, idx);
|
||||
_mav_put_uint8_t(buf, 12, count);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FENCE_POINT_LEN);
|
||||
#else
|
||||
@@ -177,16 +177,16 @@ static inline uint16_t mavlink_msg_fence_point_encode_chan(uint16_t system_id, u
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_fence_point_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t idx, uint8_t count, float lat, float lng)
|
||||
static inline void mavlink_msg_fence_point_send(mavlink_channel_t chan, uint16_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
|
||||
char buf[MAVLINK_MSG_ID_FENCE_POINT_LEN];
|
||||
_mav_put_float(buf, 0, lat);
|
||||
_mav_put_float(buf, 4, lng);
|
||||
_mav_put_uint8_t(buf, 8, target_system);
|
||||
_mav_put_uint8_t(buf, 9, target_component);
|
||||
_mav_put_uint8_t(buf, 10, idx);
|
||||
_mav_put_uint8_t(buf, 11, count);
|
||||
_mav_put_uint16_t(buf, 8, target_system);
|
||||
_mav_put_uint8_t(buf, 10, target_component);
|
||||
_mav_put_uint8_t(buf, 11, idx);
|
||||
_mav_put_uint8_t(buf, 12, count);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_POINT, buf, MAVLINK_MSG_ID_FENCE_POINT_MIN_LEN, MAVLINK_MSG_ID_FENCE_POINT_LEN, MAVLINK_MSG_ID_FENCE_POINT_CRC);
|
||||
#else
|
||||
@@ -224,16 +224,16 @@ static inline void mavlink_msg_fence_point_send_struct(mavlink_channel_t chan, c
|
||||
is usually the receive buffer for the channel, and allows a reply to an
|
||||
incoming message with minimum stack space usage.
|
||||
*/
|
||||
static inline void mavlink_msg_fence_point_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t idx, uint8_t count, float lat, float lng)
|
||||
static inline void mavlink_msg_fence_point_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_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
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_float(buf, 0, lat);
|
||||
_mav_put_float(buf, 4, lng);
|
||||
_mav_put_uint8_t(buf, 8, target_system);
|
||||
_mav_put_uint8_t(buf, 9, target_component);
|
||||
_mav_put_uint8_t(buf, 10, idx);
|
||||
_mav_put_uint8_t(buf, 11, count);
|
||||
_mav_put_uint16_t(buf, 8, target_system);
|
||||
_mav_put_uint8_t(buf, 10, target_component);
|
||||
_mav_put_uint8_t(buf, 11, idx);
|
||||
_mav_put_uint8_t(buf, 12, count);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_POINT, buf, MAVLINK_MSG_ID_FENCE_POINT_MIN_LEN, MAVLINK_MSG_ID_FENCE_POINT_LEN, MAVLINK_MSG_ID_FENCE_POINT_CRC);
|
||||
#else
|
||||
@@ -260,9 +260,9 @@ static inline void mavlink_msg_fence_point_send_buf(mavlink_message_t *msgbuf, m
|
||||
*
|
||||
* @return System ID.
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_fence_point_get_target_system(const mavlink_message_t* msg)
|
||||
static inline uint16_t mavlink_msg_fence_point_get_target_system(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 8);
|
||||
return _MAV_RETURN_uint16_t(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -272,7 +272,7 @@ static inline uint8_t mavlink_msg_fence_point_get_target_system(const mavlink_me
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_fence_point_get_target_component(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 9);
|
||||
return _MAV_RETURN_uint8_t(msg, 10);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -282,7 +282,7 @@ static inline uint8_t mavlink_msg_fence_point_get_target_component(const mavlink
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_fence_point_get_idx(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 10);
|
||||
return _MAV_RETURN_uint8_t(msg, 11);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -292,7 +292,7 @@ static inline uint8_t mavlink_msg_fence_point_get_idx(const mavlink_message_t* m
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_fence_point_get_count(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 11);
|
||||
return _MAV_RETURN_uint8_t(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user