|
@@ -3,7 +3,7 @@
|
|
|
|
|
|
#define MAVLINK_MSG_ID_VK_FORMATION_LEADER 53004
|
|
|
|
|
|
-
|
|
|
+MAVPACKED(
|
|
|
typedef struct __mavlink_vk_formation_leader_t {
|
|
|
uint32_t timestamp; /*< [ms] Timestamp in ms from system boot.*/
|
|
|
uint32_t state; /*< formation leader drone state bitmap*/
|
|
@@ -19,13 +19,13 @@ typedef struct __mavlink_vk_formation_leader_t {
|
|
|
int16_t z_dist; /*< [cm] distance between drones in z axis*/
|
|
|
uint16_t rect_col_num; /*< columns number of rectangle formation*/
|
|
|
uint8_t formation_type; /*< formation type*/
|
|
|
- uint8_t formation_heading; /*< [deg] if nan, use yaw as formation
|
|
|
+ float formation_heading; /*< [deg] if nan, use yaw as formation
|
|
|
heading*/
|
|
|
-} mavlink_vk_formation_leader_t;
|
|
|
+}) mavlink_vk_formation_leader_t;
|
|
|
|
|
|
-#define MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN 46
|
|
|
+#define MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN 49
|
|
|
#define MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN 45
|
|
|
-#define MAVLINK_MSG_ID_53004_LEN 46
|
|
|
+#define MAVLINK_MSG_ID_53004_LEN 49
|
|
|
#define MAVLINK_MSG_ID_53004_MIN_LEN 45
|
|
|
|
|
|
#define MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC 219
|
|
@@ -52,7 +52,7 @@ typedef struct __mavlink_vk_formation_leader_t {
|
|
|
{ "y_dist", NULL, MAVLINK_TYPE_INT16_T, 0, 38, offsetof(mavlink_vk_formation_leader_t, y_dist) }, \
|
|
|
{ "z_dist", NULL, MAVLINK_TYPE_INT16_T, 0, 40, offsetof(mavlink_vk_formation_leader_t, z_dist) }, \
|
|
|
{ "rect_col_num", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_vk_formation_leader_t, rect_col_num) }, \
|
|
|
- { "formation_heading", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_vk_formation_leader_t, formation_heading) }, \
|
|
|
+ { "formation_heading", NULL, MAVLINK_TYPE_FLOAT, 0, 45, offsetof(mavlink_vk_formation_leader_t, formation_heading) }, \
|
|
|
} \
|
|
|
}
|
|
|
#else
|
|
@@ -73,7 +73,7 @@ typedef struct __mavlink_vk_formation_leader_t {
|
|
|
{ "y_dist", NULL, MAVLINK_TYPE_INT16_T, 0, 38, offsetof(mavlink_vk_formation_leader_t, y_dist) }, \
|
|
|
{ "z_dist", NULL, MAVLINK_TYPE_INT16_T, 0, 40, offsetof(mavlink_vk_formation_leader_t, z_dist) }, \
|
|
|
{ "rect_col_num", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_vk_formation_leader_t, rect_col_num) }, \
|
|
|
- { "formation_heading", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_vk_formation_leader_t, formation_heading) }, \
|
|
|
+ { "formation_heading", NULL, MAVLINK_TYPE_FLOAT, 0, 45, offsetof(mavlink_vk_formation_leader_t, formation_heading) }, \
|
|
|
} \
|
|
|
}
|
|
|
#endif
|
|
@@ -103,7 +103,7 @@ typedef struct __mavlink_vk_formation_leader_t {
|
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
|
|
- uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num, uint8_t formation_heading)
|
|
|
+ uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num, float formation_heading)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char buf[MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN];
|
|
@@ -121,7 +121,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack(uint8_t system_id, u
|
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
|
- _mav_put_uint8_t(buf, 45, formation_heading);
|
|
|
+ _mav_put_float(buf, 45, formation_heading);
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
|
#else
|
|
@@ -175,7 +175,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack(uint8_t system_id, u
|
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
|
|
- uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num, uint8_t formation_heading)
|
|
|
+ uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num, float formation_heading)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char buf[MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN];
|
|
@@ -193,7 +193,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack_status(uint8_t syste
|
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
|
- _mav_put_uint8_t(buf, 45, formation_heading);
|
|
|
+ _mav_put_float(buf, 45, formation_heading);
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
|
#else
|
|
@@ -251,7 +251,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack_status(uint8_t syste
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
|
|
mavlink_message_t* msg,
|
|
|
- uint32_t timestamp,uint32_t state,int32_t lat,int32_t lon,float msl,float ve,float vn,float vu,float yaw,uint8_t formation_type,int16_t x_dist,int16_t y_dist,int16_t z_dist,uint16_t rect_col_num,uint8_t formation_heading)
|
|
|
+ uint32_t timestamp,uint32_t state,int32_t lat,int32_t lon,float msl,float ve,float vn,float vu,float yaw,uint8_t formation_type,int16_t x_dist,int16_t y_dist,int16_t z_dist,uint16_t rect_col_num,float formation_heading)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char buf[MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN];
|
|
@@ -269,7 +269,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack_chan(uint8_t system_
|
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
|
- _mav_put_uint8_t(buf, 45, formation_heading);
|
|
|
+ _mav_put_float(buf, 45, formation_heading);
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
|
#else
|
|
@@ -361,7 +361,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_encode_status(uint8_t sys
|
|
|
*/
|
|
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
|
|
|
|
|
-static inline void mavlink_msg_vk_formation_leader_send(mavlink_channel_t chan, uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num, uint8_t formation_heading)
|
|
|
+static inline void mavlink_msg_vk_formation_leader_send(mavlink_channel_t chan, uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num, float formation_heading)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char buf[MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN];
|
|
@@ -379,7 +379,7 @@ static inline void mavlink_msg_vk_formation_leader_send(mavlink_channel_t chan,
|
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
|
- _mav_put_uint8_t(buf, 45, formation_heading);
|
|
|
+ _mav_put_float(buf, 45, formation_heading);
|
|
|
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FORMATION_LEADER, buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC);
|
|
|
#else
|
|
@@ -426,7 +426,7 @@ static inline void mavlink_msg_vk_formation_leader_send_struct(mavlink_channel_t
|
|
|
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_vk_formation_leader_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num, uint8_t formation_heading)
|
|
|
+static inline void mavlink_msg_vk_formation_leader_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num, float formation_heading)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char *buf = (char *)msgbuf;
|
|
@@ -444,7 +444,7 @@ static inline void mavlink_msg_vk_formation_leader_send_buf(mavlink_message_t *m
|
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
|
- _mav_put_uint8_t(buf, 45, formation_heading);
|
|
|
+ _mav_put_float(buf, 45, formation_heading);
|
|
|
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FORMATION_LEADER, buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC);
|
|
|
#else
|
|
@@ -621,9 +621,9 @@ static inline uint16_t mavlink_msg_vk_formation_leader_get_rect_col_num(const ma
|
|
|
* @return [deg] if nan, use yaw as formation
|
|
|
heading
|
|
|
*/
|
|
|
-static inline uint8_t mavlink_msg_vk_formation_leader_get_formation_heading(const mavlink_message_t* msg)
|
|
|
+static inline float mavlink_msg_vk_formation_leader_get_formation_heading(const mavlink_message_t* msg)
|
|
|
{
|
|
|
- return _MAV_RETURN_uint8_t(msg, 45);
|
|
|
+ return _MAV_RETURN_float(msg, 45);
|
|
|
}
|
|
|
|
|
|
/**
|