This commit is contained in:
matt
2020-09-20 14:09:03 +08:00
parent b2baf4bffc
commit 991dc1353a
96 changed files with 4166 additions and 4166 deletions
+73 -73
View File
@@ -12,9 +12,9 @@ typedef struct __mavlink_mission_item_t {
float x; /*< PARAM5 / local: X coordinate, global: latitude*/
float y; /*< PARAM6 / local: Y coordinate, global: longitude*/
float z; /*< PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame).*/
uint16_t target_system; /*< System ID*/
uint16_t seq; /*< Sequence*/
uint16_t command; /*< The scheduled action for the waypoint.*/
uint8_t target_system; /*< System ID*/
uint8_t target_component; /*< Component ID*/
uint8_t frame; /*< The coordinate system of the waypoint.*/
uint8_t current; /*< false:0, true:1*/
@@ -22,13 +22,13 @@ typedef struct __mavlink_mission_item_t {
uint8_t mission_type; /*< Mission type.*/
} mavlink_mission_item_t;
#define MAVLINK_MSG_ID_MISSION_ITEM_LEN 38
#define MAVLINK_MSG_ID_MISSION_ITEM_MIN_LEN 37
#define MAVLINK_MSG_ID_39_LEN 38
#define MAVLINK_MSG_ID_39_MIN_LEN 37
#define MAVLINK_MSG_ID_MISSION_ITEM_LEN 39
#define MAVLINK_MSG_ID_MISSION_ITEM_MIN_LEN 38
#define MAVLINK_MSG_ID_39_LEN 39
#define MAVLINK_MSG_ID_39_MIN_LEN 38
#define MAVLINK_MSG_ID_MISSION_ITEM_CRC 254
#define MAVLINK_MSG_ID_39_CRC 254
#define MAVLINK_MSG_ID_MISSION_ITEM_CRC 100
#define MAVLINK_MSG_ID_39_CRC 100
@@ -37,13 +37,13 @@ typedef struct __mavlink_mission_item_t {
39, \
"MISSION_ITEM", \
15, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_mission_item_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_mission_item_t, target_component) }, \
{ "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_mission_item_t, seq) }, \
{ "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_mission_item_t, frame) }, \
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_mission_item_t, command) }, \
{ "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_mission_item_t, current) }, \
{ "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_mission_item_t, autocontinue) }, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_mission_item_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_mission_item_t, target_component) }, \
{ "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_mission_item_t, seq) }, \
{ "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_mission_item_t, frame) }, \
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_mission_item_t, command) }, \
{ "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_mission_item_t, current) }, \
{ "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_mission_item_t, autocontinue) }, \
{ "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mission_item_t, param1) }, \
{ "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mission_item_t, param2) }, \
{ "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mission_item_t, param3) }, \
@@ -51,20 +51,20 @@ typedef struct __mavlink_mission_item_t {
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_mission_item_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_mission_item_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_mission_item_t, z) }, \
{ "mission_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_mission_item_t, mission_type) }, \
{ "mission_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 38, offsetof(mavlink_mission_item_t, mission_type) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_MISSION_ITEM { \
"MISSION_ITEM", \
15, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_mission_item_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_mission_item_t, target_component) }, \
{ "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_mission_item_t, seq) }, \
{ "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_mission_item_t, frame) }, \
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_mission_item_t, command) }, \
{ "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_mission_item_t, current) }, \
{ "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_mission_item_t, autocontinue) }, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_mission_item_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_mission_item_t, target_component) }, \
{ "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_mission_item_t, seq) }, \
{ "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_mission_item_t, frame) }, \
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_mission_item_t, command) }, \
{ "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_mission_item_t, current) }, \
{ "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_mission_item_t, autocontinue) }, \
{ "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mission_item_t, param1) }, \
{ "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mission_item_t, param2) }, \
{ "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mission_item_t, param3) }, \
@@ -72,7 +72,7 @@ typedef struct __mavlink_mission_item_t {
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_mission_item_t, x) }, \
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_mission_item_t, y) }, \
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_mission_item_t, z) }, \
{ "mission_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_mission_item_t, mission_type) }, \
{ "mission_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 38, offsetof(mavlink_mission_item_t, mission_type) }, \
} \
}
#endif
@@ -101,7 +101,7 @@ typedef struct __mavlink_mission_item_t {
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_item_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint16_t seq, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, float x, float y, float z, uint8_t mission_type)
uint16_t target_system, uint8_t target_component, uint16_t seq, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, float x, float y, float z, uint8_t mission_type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_MISSION_ITEM_LEN];
@@ -112,14 +112,14 @@ static inline uint16_t mavlink_msg_mission_item_pack(uint16_t system_id, uint8_t
_mav_put_float(buf, 16, x);
_mav_put_float(buf, 20, y);
_mav_put_float(buf, 24, z);
_mav_put_uint16_t(buf, 28, seq);
_mav_put_uint16_t(buf, 30, command);
_mav_put_uint8_t(buf, 32, target_system);
_mav_put_uint8_t(buf, 33, target_component);
_mav_put_uint8_t(buf, 34, frame);
_mav_put_uint8_t(buf, 35, current);
_mav_put_uint8_t(buf, 36, autocontinue);
_mav_put_uint8_t(buf, 37, mission_type);
_mav_put_uint16_t(buf, 28, target_system);
_mav_put_uint16_t(buf, 30, seq);
_mav_put_uint16_t(buf, 32, command);
_mav_put_uint8_t(buf, 34, target_component);
_mav_put_uint8_t(buf, 35, frame);
_mav_put_uint8_t(buf, 36, current);
_mav_put_uint8_t(buf, 37, autocontinue);
_mav_put_uint8_t(buf, 38, mission_type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ITEM_LEN);
#else
@@ -131,9 +131,9 @@ static inline uint16_t mavlink_msg_mission_item_pack(uint16_t system_id, uint8_t
packet.x = x;
packet.y = y;
packet.z = z;
packet.target_system = target_system;
packet.seq = seq;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.frame = frame;
packet.current = current;
@@ -172,7 +172,7 @@ static inline uint16_t mavlink_msg_mission_item_pack(uint16_t system_id, uint8_t
*/
static inline uint16_t mavlink_msg_mission_item_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,uint16_t seq,uint8_t frame,uint16_t command,uint8_t current,uint8_t autocontinue,float param1,float param2,float param3,float param4,float x,float y,float z,uint8_t mission_type)
uint16_t target_system,uint8_t target_component,uint16_t seq,uint8_t frame,uint16_t command,uint8_t current,uint8_t autocontinue,float param1,float param2,float param3,float param4,float x,float y,float z,uint8_t mission_type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_MISSION_ITEM_LEN];
@@ -183,14 +183,14 @@ static inline uint16_t mavlink_msg_mission_item_pack_chan(uint16_t system_id, ui
_mav_put_float(buf, 16, x);
_mav_put_float(buf, 20, y);
_mav_put_float(buf, 24, z);
_mav_put_uint16_t(buf, 28, seq);
_mav_put_uint16_t(buf, 30, command);
_mav_put_uint8_t(buf, 32, target_system);
_mav_put_uint8_t(buf, 33, target_component);
_mav_put_uint8_t(buf, 34, frame);
_mav_put_uint8_t(buf, 35, current);
_mav_put_uint8_t(buf, 36, autocontinue);
_mav_put_uint8_t(buf, 37, mission_type);
_mav_put_uint16_t(buf, 28, target_system);
_mav_put_uint16_t(buf, 30, seq);
_mav_put_uint16_t(buf, 32, command);
_mav_put_uint8_t(buf, 34, target_component);
_mav_put_uint8_t(buf, 35, frame);
_mav_put_uint8_t(buf, 36, current);
_mav_put_uint8_t(buf, 37, autocontinue);
_mav_put_uint8_t(buf, 38, mission_type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ITEM_LEN);
#else
@@ -202,9 +202,9 @@ static inline uint16_t mavlink_msg_mission_item_pack_chan(uint16_t system_id, ui
packet.x = x;
packet.y = y;
packet.z = z;
packet.target_system = target_system;
packet.seq = seq;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.frame = frame;
packet.current = current;
@@ -267,7 +267,7 @@ static inline uint16_t mavlink_msg_mission_item_encode_chan(uint16_t system_id,
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_mission_item_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, float x, float y, float z, uint8_t mission_type)
static inline void mavlink_msg_mission_item_send(mavlink_channel_t chan, uint16_t target_system, uint8_t target_component, uint16_t seq, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, float x, float y, float z, uint8_t mission_type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_MISSION_ITEM_LEN];
@@ -278,14 +278,14 @@ static inline void mavlink_msg_mission_item_send(mavlink_channel_t chan, uint8_t
_mav_put_float(buf, 16, x);
_mav_put_float(buf, 20, y);
_mav_put_float(buf, 24, z);
_mav_put_uint16_t(buf, 28, seq);
_mav_put_uint16_t(buf, 30, command);
_mav_put_uint8_t(buf, 32, target_system);
_mav_put_uint8_t(buf, 33, target_component);
_mav_put_uint8_t(buf, 34, frame);
_mav_put_uint8_t(buf, 35, current);
_mav_put_uint8_t(buf, 36, autocontinue);
_mav_put_uint8_t(buf, 37, mission_type);
_mav_put_uint16_t(buf, 28, target_system);
_mav_put_uint16_t(buf, 30, seq);
_mav_put_uint16_t(buf, 32, command);
_mav_put_uint8_t(buf, 34, target_component);
_mav_put_uint8_t(buf, 35, frame);
_mav_put_uint8_t(buf, 36, current);
_mav_put_uint8_t(buf, 37, autocontinue);
_mav_put_uint8_t(buf, 38, mission_type);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM, buf, MAVLINK_MSG_ID_MISSION_ITEM_MIN_LEN, MAVLINK_MSG_ID_MISSION_ITEM_LEN, MAVLINK_MSG_ID_MISSION_ITEM_CRC);
#else
@@ -297,9 +297,9 @@ static inline void mavlink_msg_mission_item_send(mavlink_channel_t chan, uint8_t
packet.x = x;
packet.y = y;
packet.z = z;
packet.target_system = target_system;
packet.seq = seq;
packet.command = command;
packet.target_system = target_system;
packet.target_component = target_component;
packet.frame = frame;
packet.current = current;
@@ -332,7 +332,7 @@ static inline void mavlink_msg_mission_item_send_struct(mavlink_channel_t chan,
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_mission_item_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, float x, float y, float z, uint8_t mission_type)
static inline void mavlink_msg_mission_item_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t target_system, uint8_t target_component, uint16_t seq, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, float x, float y, float z, uint8_t mission_type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
@@ -343,14 +343,14 @@ static inline void mavlink_msg_mission_item_send_buf(mavlink_message_t *msgbuf,
_mav_put_float(buf, 16, x);
_mav_put_float(buf, 20, y);
_mav_put_float(buf, 24, z);
_mav_put_uint16_t(buf, 28, seq);
_mav_put_uint16_t(buf, 30, command);
_mav_put_uint8_t(buf, 32, target_system);
_mav_put_uint8_t(buf, 33, target_component);
_mav_put_uint8_t(buf, 34, frame);
_mav_put_uint8_t(buf, 35, current);
_mav_put_uint8_t(buf, 36, autocontinue);
_mav_put_uint8_t(buf, 37, mission_type);
_mav_put_uint16_t(buf, 28, target_system);
_mav_put_uint16_t(buf, 30, seq);
_mav_put_uint16_t(buf, 32, command);
_mav_put_uint8_t(buf, 34, target_component);
_mav_put_uint8_t(buf, 35, frame);
_mav_put_uint8_t(buf, 36, current);
_mav_put_uint8_t(buf, 37, autocontinue);
_mav_put_uint8_t(buf, 38, mission_type);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM, buf, MAVLINK_MSG_ID_MISSION_ITEM_MIN_LEN, MAVLINK_MSG_ID_MISSION_ITEM_LEN, MAVLINK_MSG_ID_MISSION_ITEM_CRC);
#else
@@ -362,9 +362,9 @@ static inline void mavlink_msg_mission_item_send_buf(mavlink_message_t *msgbuf,
packet->x = x;
packet->y = y;
packet->z = z;
packet->target_system = target_system;
packet->seq = seq;
packet->command = command;
packet->target_system = target_system;
packet->target_component = target_component;
packet->frame = frame;
packet->current = current;
@@ -386,9 +386,9 @@ static inline void mavlink_msg_mission_item_send_buf(mavlink_message_t *msgbuf,
*
* @return System ID
*/
static inline uint8_t mavlink_msg_mission_item_get_target_system(const mavlink_message_t* msg)
static inline uint16_t mavlink_msg_mission_item_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 32);
return _MAV_RETURN_uint16_t(msg, 28);
}
/**
@@ -398,7 +398,7 @@ static inline uint8_t mavlink_msg_mission_item_get_target_system(const mavlink_m
*/
static inline uint8_t mavlink_msg_mission_item_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 33);
return _MAV_RETURN_uint8_t(msg, 34);
}
/**
@@ -408,7 +408,7 @@ static inline uint8_t mavlink_msg_mission_item_get_target_component(const mavlin
*/
static inline uint16_t mavlink_msg_mission_item_get_seq(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 28);
return _MAV_RETURN_uint16_t(msg, 30);
}
/**
@@ -418,7 +418,7 @@ static inline uint16_t mavlink_msg_mission_item_get_seq(const mavlink_message_t*
*/
static inline uint8_t mavlink_msg_mission_item_get_frame(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 34);
return _MAV_RETURN_uint8_t(msg, 35);
}
/**
@@ -428,7 +428,7 @@ static inline uint8_t mavlink_msg_mission_item_get_frame(const mavlink_message_t
*/
static inline uint16_t mavlink_msg_mission_item_get_command(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 30);
return _MAV_RETURN_uint16_t(msg, 32);
}
/**
@@ -438,7 +438,7 @@ static inline uint16_t mavlink_msg_mission_item_get_command(const mavlink_messag
*/
static inline uint8_t mavlink_msg_mission_item_get_current(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 35);
return _MAV_RETURN_uint8_t(msg, 36);
}
/**
@@ -448,7 +448,7 @@ static inline uint8_t mavlink_msg_mission_item_get_current(const mavlink_message
*/
static inline uint8_t mavlink_msg_mission_item_get_autocontinue(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 36);
return _MAV_RETURN_uint8_t(msg, 37);
}
/**
@@ -528,7 +528,7 @@ static inline float mavlink_msg_mission_item_get_z(const mavlink_message_t* msg)
*/
static inline uint8_t mavlink_msg_mission_item_get_mission_type(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 37);
return _MAV_RETURN_uint8_t(msg, 38);
}
/**
@@ -547,9 +547,9 @@ static inline void mavlink_msg_mission_item_decode(const mavlink_message_t* msg,
mission_item->x = mavlink_msg_mission_item_get_x(msg);
mission_item->y = mavlink_msg_mission_item_get_y(msg);
mission_item->z = mavlink_msg_mission_item_get_z(msg);
mission_item->target_system = mavlink_msg_mission_item_get_target_system(msg);
mission_item->seq = mavlink_msg_mission_item_get_seq(msg);
mission_item->command = mavlink_msg_mission_item_get_command(msg);
mission_item->target_system = mavlink_msg_mission_item_get_target_system(msg);
mission_item->target_component = mavlink_msg_mission_item_get_target_component(msg);
mission_item->frame = mavlink_msg_mission_item_get_frame(msg);
mission_item->current = mavlink_msg_mission_item_get_current(msg);