feat: update definitions

This commit is contained in:
matt
2020-09-20 13:56:18 +08:00
parent 36a71efa12
commit b2baf4bffc
146 changed files with 28320 additions and 3729 deletions
@@ -5,7 +5,7 @@
typedef struct __mavlink_trajectory_representation_waypoints_t {
uint32_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number.*/
uint32_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/
float pos_x[5]; /*< [m] X-coordinate of waypoint, set to NaN if not being used*/
float pos_y[5]; /*< [m] Y-coordinate of waypoint, set to NaN if not being used*/
float pos_z[5]; /*< [m] Z-coordinate of waypoint, set to NaN if not being used*/
@@ -17,16 +17,17 @@ typedef struct __mavlink_trajectory_representation_waypoints_t {
float acc_z[5]; /*< [m/s/s] Z-acceleration of waypoint, set to NaN if not being used*/
float pos_yaw[5]; /*< [rad] Yaw angle, set to NaN if not being used*/
float vel_yaw[5]; /*< [rad/s] Yaw rate, set to NaN if not being used*/
uint16_t command[5]; /*< Scheduled action for each waypoint, UINT16_MAX if not being used.*/
uint8_t valid_points; /*< Number of valid points (up-to 5 waypoints are possible)*/
} mavlink_trajectory_representation_waypoints_t;
#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN 225
#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN 225
#define MAVLINK_MSG_ID_332_LEN 225
#define MAVLINK_MSG_ID_332_MIN_LEN 225
#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN 235
#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN 235
#define MAVLINK_MSG_ID_332_LEN 235
#define MAVLINK_MSG_ID_332_MIN_LEN 235
#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC 87
#define MAVLINK_MSG_ID_332_CRC 87
#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC 199
#define MAVLINK_MSG_ID_332_CRC 199
#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_POS_X_LEN 5
#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_POS_Y_LEN 5
@@ -39,14 +40,15 @@ typedef struct __mavlink_trajectory_representation_waypoints_t {
#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_ACC_Z_LEN 5
#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_POS_YAW_LEN 5
#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_VEL_YAW_LEN 5
#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_COMMAND_LEN 5
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS { \
332, \
"TRAJECTORY_REPRESENTATION_WAYPOINTS", \
13, \
14, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_trajectory_representation_waypoints_t, time_usec) }, \
{ "valid_points", NULL, MAVLINK_TYPE_UINT8_T, 0, 224, offsetof(mavlink_trajectory_representation_waypoints_t, valid_points) }, \
{ "valid_points", NULL, MAVLINK_TYPE_UINT8_T, 0, 234, offsetof(mavlink_trajectory_representation_waypoints_t, valid_points) }, \
{ "pos_x", NULL, MAVLINK_TYPE_FLOAT, 5, 4, offsetof(mavlink_trajectory_representation_waypoints_t, pos_x) }, \
{ "pos_y", NULL, MAVLINK_TYPE_FLOAT, 5, 24, offsetof(mavlink_trajectory_representation_waypoints_t, pos_y) }, \
{ "pos_z", NULL, MAVLINK_TYPE_FLOAT, 5, 44, offsetof(mavlink_trajectory_representation_waypoints_t, pos_z) }, \
@@ -58,14 +60,15 @@ typedef struct __mavlink_trajectory_representation_waypoints_t {
{ "acc_z", NULL, MAVLINK_TYPE_FLOAT, 5, 164, offsetof(mavlink_trajectory_representation_waypoints_t, acc_z) }, \
{ "pos_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 184, offsetof(mavlink_trajectory_representation_waypoints_t, pos_yaw) }, \
{ "vel_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 204, offsetof(mavlink_trajectory_representation_waypoints_t, vel_yaw) }, \
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 5, 224, offsetof(mavlink_trajectory_representation_waypoints_t, command) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS { \
"TRAJECTORY_REPRESENTATION_WAYPOINTS", \
13, \
14, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_trajectory_representation_waypoints_t, time_usec) }, \
{ "valid_points", NULL, MAVLINK_TYPE_UINT8_T, 0, 224, offsetof(mavlink_trajectory_representation_waypoints_t, valid_points) }, \
{ "valid_points", NULL, MAVLINK_TYPE_UINT8_T, 0, 234, offsetof(mavlink_trajectory_representation_waypoints_t, valid_points) }, \
{ "pos_x", NULL, MAVLINK_TYPE_FLOAT, 5, 4, offsetof(mavlink_trajectory_representation_waypoints_t, pos_x) }, \
{ "pos_y", NULL, MAVLINK_TYPE_FLOAT, 5, 24, offsetof(mavlink_trajectory_representation_waypoints_t, pos_y) }, \
{ "pos_z", NULL, MAVLINK_TYPE_FLOAT, 5, 44, offsetof(mavlink_trajectory_representation_waypoints_t, pos_z) }, \
@@ -77,6 +80,7 @@ typedef struct __mavlink_trajectory_representation_waypoints_t {
{ "acc_z", NULL, MAVLINK_TYPE_FLOAT, 5, 164, offsetof(mavlink_trajectory_representation_waypoints_t, acc_z) }, \
{ "pos_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 184, offsetof(mavlink_trajectory_representation_waypoints_t, pos_yaw) }, \
{ "vel_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 204, offsetof(mavlink_trajectory_representation_waypoints_t, vel_yaw) }, \
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 5, 224, offsetof(mavlink_trajectory_representation_waypoints_t, command) }, \
} \
}
#endif
@@ -87,7 +91,7 @@ typedef struct __mavlink_trajectory_representation_waypoints_t {
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number.
* @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
* @param valid_points Number of valid points (up-to 5 waypoints are possible)
* @param pos_x [m] X-coordinate of waypoint, set to NaN if not being used
* @param pos_y [m] Y-coordinate of waypoint, set to NaN if not being used
@@ -100,15 +104,16 @@ typedef struct __mavlink_trajectory_representation_waypoints_t {
* @param acc_z [m/s/s] Z-acceleration of waypoint, set to NaN if not being used
* @param pos_yaw [rad] Yaw angle, set to NaN if not being used
* @param vel_yaw [rad/s] Yaw rate, set to NaN if not being used
* @param command Scheduled action for each waypoint, UINT16_MAX if not being used.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *vel_x, const float *vel_y, const float *vel_z, const float *acc_x, const float *acc_y, const float *acc_z, const float *pos_yaw, const float *vel_yaw)
uint32_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *vel_x, const float *vel_y, const float *vel_z, const float *acc_x, const float *acc_y, const float *acc_z, const float *pos_yaw, const float *vel_yaw, const uint16_t *command)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN];
_mav_put_uint32_t(buf, 0, time_usec);
_mav_put_uint8_t(buf, 224, valid_points);
_mav_put_uint8_t(buf, 234, valid_points);
_mav_put_float_array(buf, 4, pos_x, 5);
_mav_put_float_array(buf, 24, pos_y, 5);
_mav_put_float_array(buf, 44, pos_z, 5);
@@ -120,6 +125,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack(uint
_mav_put_float_array(buf, 164, acc_z, 5);
_mav_put_float_array(buf, 184, pos_yaw, 5);
_mav_put_float_array(buf, 204, vel_yaw, 5);
_mav_put_uint16_t_array(buf, 224, command, 5);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN);
#else
mavlink_trajectory_representation_waypoints_t packet;
@@ -136,6 +142,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack(uint
mav_array_memcpy(packet.acc_z, acc_z, sizeof(float)*5);
mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5);
mav_array_memcpy(packet.vel_yaw, vel_yaw, sizeof(float)*5);
mav_array_memcpy(packet.command, command, sizeof(uint16_t)*5);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN);
#endif
@@ -149,7 +156,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack(uint
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number.
* @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
* @param valid_points Number of valid points (up-to 5 waypoints are possible)
* @param pos_x [m] X-coordinate of waypoint, set to NaN if not being used
* @param pos_y [m] Y-coordinate of waypoint, set to NaN if not being used
@@ -162,16 +169,17 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack(uint
* @param acc_z [m/s/s] Z-acceleration of waypoint, set to NaN if not being used
* @param pos_yaw [rad] Yaw angle, set to NaN if not being used
* @param vel_yaw [rad/s] Yaw rate, set to NaN if not being used
* @param command Scheduled action for each waypoint, UINT16_MAX if not being used.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_usec,uint8_t valid_points,const float *pos_x,const float *pos_y,const float *pos_z,const float *vel_x,const float *vel_y,const float *vel_z,const float *acc_x,const float *acc_y,const float *acc_z,const float *pos_yaw,const float *vel_yaw)
uint32_t time_usec,uint8_t valid_points,const float *pos_x,const float *pos_y,const float *pos_z,const float *vel_x,const float *vel_y,const float *vel_z,const float *acc_x,const float *acc_y,const float *acc_z,const float *pos_yaw,const float *vel_yaw,const uint16_t *command)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN];
_mav_put_uint32_t(buf, 0, time_usec);
_mav_put_uint8_t(buf, 224, valid_points);
_mav_put_uint8_t(buf, 234, valid_points);
_mav_put_float_array(buf, 4, pos_x, 5);
_mav_put_float_array(buf, 24, pos_y, 5);
_mav_put_float_array(buf, 44, pos_z, 5);
@@ -183,6 +191,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack_chan
_mav_put_float_array(buf, 164, acc_z, 5);
_mav_put_float_array(buf, 184, pos_yaw, 5);
_mav_put_float_array(buf, 204, vel_yaw, 5);
_mav_put_uint16_t_array(buf, 224, command, 5);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN);
#else
mavlink_trajectory_representation_waypoints_t packet;
@@ -199,6 +208,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack_chan
mav_array_memcpy(packet.acc_z, acc_z, sizeof(float)*5);
mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5);
mav_array_memcpy(packet.vel_yaw, vel_yaw, sizeof(float)*5);
mav_array_memcpy(packet.command, command, sizeof(uint16_t)*5);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN);
#endif
@@ -216,7 +226,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack_chan
*/
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_trajectory_representation_waypoints_t* trajectory_representation_waypoints)
{
return mavlink_msg_trajectory_representation_waypoints_pack(system_id, component_id, msg, trajectory_representation_waypoints->time_usec, trajectory_representation_waypoints->valid_points, trajectory_representation_waypoints->pos_x, trajectory_representation_waypoints->pos_y, trajectory_representation_waypoints->pos_z, trajectory_representation_waypoints->vel_x, trajectory_representation_waypoints->vel_y, trajectory_representation_waypoints->vel_z, trajectory_representation_waypoints->acc_x, trajectory_representation_waypoints->acc_y, trajectory_representation_waypoints->acc_z, trajectory_representation_waypoints->pos_yaw, trajectory_representation_waypoints->vel_yaw);
return mavlink_msg_trajectory_representation_waypoints_pack(system_id, component_id, msg, trajectory_representation_waypoints->time_usec, trajectory_representation_waypoints->valid_points, trajectory_representation_waypoints->pos_x, trajectory_representation_waypoints->pos_y, trajectory_representation_waypoints->pos_z, trajectory_representation_waypoints->vel_x, trajectory_representation_waypoints->vel_y, trajectory_representation_waypoints->vel_z, trajectory_representation_waypoints->acc_x, trajectory_representation_waypoints->acc_y, trajectory_representation_waypoints->acc_z, trajectory_representation_waypoints->pos_yaw, trajectory_representation_waypoints->vel_yaw, trajectory_representation_waypoints->command);
}
/**
@@ -230,14 +240,14 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_encode(ui
*/
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_trajectory_representation_waypoints_t* trajectory_representation_waypoints)
{
return mavlink_msg_trajectory_representation_waypoints_pack_chan(system_id, component_id, chan, msg, trajectory_representation_waypoints->time_usec, trajectory_representation_waypoints->valid_points, trajectory_representation_waypoints->pos_x, trajectory_representation_waypoints->pos_y, trajectory_representation_waypoints->pos_z, trajectory_representation_waypoints->vel_x, trajectory_representation_waypoints->vel_y, trajectory_representation_waypoints->vel_z, trajectory_representation_waypoints->acc_x, trajectory_representation_waypoints->acc_y, trajectory_representation_waypoints->acc_z, trajectory_representation_waypoints->pos_yaw, trajectory_representation_waypoints->vel_yaw);
return mavlink_msg_trajectory_representation_waypoints_pack_chan(system_id, component_id, chan, msg, trajectory_representation_waypoints->time_usec, trajectory_representation_waypoints->valid_points, trajectory_representation_waypoints->pos_x, trajectory_representation_waypoints->pos_y, trajectory_representation_waypoints->pos_z, trajectory_representation_waypoints->vel_x, trajectory_representation_waypoints->vel_y, trajectory_representation_waypoints->vel_z, trajectory_representation_waypoints->acc_x, trajectory_representation_waypoints->acc_y, trajectory_representation_waypoints->acc_z, trajectory_representation_waypoints->pos_yaw, trajectory_representation_waypoints->vel_yaw, trajectory_representation_waypoints->command);
}
/**
* @brief Send a trajectory_representation_waypoints message
* @param chan MAVLink channel to send the message
*
* @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number.
* @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
* @param valid_points Number of valid points (up-to 5 waypoints are possible)
* @param pos_x [m] X-coordinate of waypoint, set to NaN if not being used
* @param pos_y [m] Y-coordinate of waypoint, set to NaN if not being used
@@ -250,15 +260,16 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_encode_ch
* @param acc_z [m/s/s] Z-acceleration of waypoint, set to NaN if not being used
* @param pos_yaw [rad] Yaw angle, set to NaN if not being used
* @param vel_yaw [rad/s] Yaw rate, set to NaN if not being used
* @param command Scheduled action for each waypoint, UINT16_MAX if not being used.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_trajectory_representation_waypoints_send(mavlink_channel_t chan, uint32_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *vel_x, const float *vel_y, const float *vel_z, const float *acc_x, const float *acc_y, const float *acc_z, const float *pos_yaw, const float *vel_yaw)
static inline void mavlink_msg_trajectory_representation_waypoints_send(mavlink_channel_t chan, uint32_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *vel_x, const float *vel_y, const float *vel_z, const float *acc_x, const float *acc_y, const float *acc_z, const float *pos_yaw, const float *vel_yaw, const uint16_t *command)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN];
_mav_put_uint32_t(buf, 0, time_usec);
_mav_put_uint8_t(buf, 224, valid_points);
_mav_put_uint8_t(buf, 234, valid_points);
_mav_put_float_array(buf, 4, pos_x, 5);
_mav_put_float_array(buf, 24, pos_y, 5);
_mav_put_float_array(buf, 44, pos_z, 5);
@@ -270,6 +281,7 @@ static inline void mavlink_msg_trajectory_representation_waypoints_send(mavlink_
_mav_put_float_array(buf, 164, acc_z, 5);
_mav_put_float_array(buf, 184, pos_yaw, 5);
_mav_put_float_array(buf, 204, vel_yaw, 5);
_mav_put_uint16_t_array(buf, 224, command, 5);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS, buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC);
#else
mavlink_trajectory_representation_waypoints_t packet;
@@ -286,6 +298,7 @@ static inline void mavlink_msg_trajectory_representation_waypoints_send(mavlink_
mav_array_memcpy(packet.acc_z, acc_z, sizeof(float)*5);
mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5);
mav_array_memcpy(packet.vel_yaw, vel_yaw, sizeof(float)*5);
mav_array_memcpy(packet.command, command, sizeof(uint16_t)*5);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS, (const char *)&packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC);
#endif
}
@@ -298,7 +311,7 @@ static inline void mavlink_msg_trajectory_representation_waypoints_send(mavlink_
static inline void mavlink_msg_trajectory_representation_waypoints_send_struct(mavlink_channel_t chan, const mavlink_trajectory_representation_waypoints_t* trajectory_representation_waypoints)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_trajectory_representation_waypoints_send(chan, trajectory_representation_waypoints->time_usec, trajectory_representation_waypoints->valid_points, trajectory_representation_waypoints->pos_x, trajectory_representation_waypoints->pos_y, trajectory_representation_waypoints->pos_z, trajectory_representation_waypoints->vel_x, trajectory_representation_waypoints->vel_y, trajectory_representation_waypoints->vel_z, trajectory_representation_waypoints->acc_x, trajectory_representation_waypoints->acc_y, trajectory_representation_waypoints->acc_z, trajectory_representation_waypoints->pos_yaw, trajectory_representation_waypoints->vel_yaw);
mavlink_msg_trajectory_representation_waypoints_send(chan, trajectory_representation_waypoints->time_usec, trajectory_representation_waypoints->valid_points, trajectory_representation_waypoints->pos_x, trajectory_representation_waypoints->pos_y, trajectory_representation_waypoints->pos_z, trajectory_representation_waypoints->vel_x, trajectory_representation_waypoints->vel_y, trajectory_representation_waypoints->vel_z, trajectory_representation_waypoints->acc_x, trajectory_representation_waypoints->acc_y, trajectory_representation_waypoints->acc_z, trajectory_representation_waypoints->pos_yaw, trajectory_representation_waypoints->vel_yaw, trajectory_representation_waypoints->command);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS, (const char *)trajectory_representation_waypoints, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC);
#endif
@@ -312,12 +325,12 @@ static inline void mavlink_msg_trajectory_representation_waypoints_send_struct(m
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_trajectory_representation_waypoints_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *vel_x, const float *vel_y, const float *vel_z, const float *acc_x, const float *acc_y, const float *acc_z, const float *pos_yaw, const float *vel_yaw)
static inline void mavlink_msg_trajectory_representation_waypoints_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *vel_x, const float *vel_y, const float *vel_z, const float *acc_x, const float *acc_y, const float *acc_z, const float *pos_yaw, const float *vel_yaw, const uint16_t *command)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint32_t(buf, 0, time_usec);
_mav_put_uint8_t(buf, 224, valid_points);
_mav_put_uint8_t(buf, 234, valid_points);
_mav_put_float_array(buf, 4, pos_x, 5);
_mav_put_float_array(buf, 24, pos_y, 5);
_mav_put_float_array(buf, 44, pos_z, 5);
@@ -329,6 +342,7 @@ static inline void mavlink_msg_trajectory_representation_waypoints_send_buf(mavl
_mav_put_float_array(buf, 164, acc_z, 5);
_mav_put_float_array(buf, 184, pos_yaw, 5);
_mav_put_float_array(buf, 204, vel_yaw, 5);
_mav_put_uint16_t_array(buf, 224, command, 5);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS, buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC);
#else
mavlink_trajectory_representation_waypoints_t *packet = (mavlink_trajectory_representation_waypoints_t *)msgbuf;
@@ -345,6 +359,7 @@ static inline void mavlink_msg_trajectory_representation_waypoints_send_buf(mavl
mav_array_memcpy(packet->acc_z, acc_z, sizeof(float)*5);
mav_array_memcpy(packet->pos_yaw, pos_yaw, sizeof(float)*5);
mav_array_memcpy(packet->vel_yaw, vel_yaw, sizeof(float)*5);
mav_array_memcpy(packet->command, command, sizeof(uint16_t)*5);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS, (const char *)packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC);
#endif
}
@@ -358,7 +373,7 @@ static inline void mavlink_msg_trajectory_representation_waypoints_send_buf(mavl
/**
* @brief Get field time_usec from trajectory_representation_waypoints message
*
* @return [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number.
* @return [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
*/
static inline uint32_t mavlink_msg_trajectory_representation_waypoints_get_time_usec(const mavlink_message_t* msg)
{
@@ -372,7 +387,7 @@ static inline uint32_t mavlink_msg_trajectory_representation_waypoints_get_time_
*/
static inline uint8_t mavlink_msg_trajectory_representation_waypoints_get_valid_points(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 224);
return _MAV_RETURN_uint8_t(msg, 234);
}
/**
@@ -485,6 +500,16 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_vel_y
return _MAV_RETURN_float_array(msg, vel_yaw, 5, 204);
}
/**
* @brief Get field command from trajectory_representation_waypoints message
*
* @return Scheduled action for each waypoint, UINT16_MAX if not being used.
*/
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_command(const mavlink_message_t* msg, uint16_t *command)
{
return _MAV_RETURN_uint16_t_array(msg, command, 5, 224);
}
/**
* @brief Decode a trajectory_representation_waypoints message into a struct
*
@@ -506,6 +531,7 @@ static inline void mavlink_msg_trajectory_representation_waypoints_decode(const
mavlink_msg_trajectory_representation_waypoints_get_acc_z(msg, trajectory_representation_waypoints->acc_z);
mavlink_msg_trajectory_representation_waypoints_get_pos_yaw(msg, trajectory_representation_waypoints->pos_yaw);
mavlink_msg_trajectory_representation_waypoints_get_vel_yaw(msg, trajectory_representation_waypoints->vel_yaw);
mavlink_msg_trajectory_representation_waypoints_get_command(msg, trajectory_representation_waypoints->command);
trajectory_representation_waypoints->valid_points = mavlink_msg_trajectory_representation_waypoints_get_valid_points(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN? msg->len : MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN;