✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS 332
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_trajectory_representation_waypoints_t {
|
||||
uint64_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 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*/
|
||||
@@ -18,15 +18,15 @@ typedef struct __mavlink_trajectory_representation_waypoints_t {
|
||||
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*/
|
||||
uint8_t valid_points; /*< Number of valid points (up-to 5 waypoints are possible)*/
|
||||
}) mavlink_trajectory_representation_waypoints_t;
|
||||
} mavlink_trajectory_representation_waypoints_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN 229
|
||||
#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN 229
|
||||
#define MAVLINK_MSG_ID_332_LEN 229
|
||||
#define MAVLINK_MSG_ID_332_MIN_LEN 229
|
||||
#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_CRC 91
|
||||
#define MAVLINK_MSG_ID_332_CRC 91
|
||||
#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC 87
|
||||
#define MAVLINK_MSG_ID_332_CRC 87
|
||||
|
||||
#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_POS_X_LEN 5
|
||||
#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_POS_Y_LEN 5
|
||||
@@ -45,38 +45,38 @@ typedef struct __mavlink_trajectory_representation_waypoints_t {
|
||||
332, \
|
||||
"TRAJECTORY_REPRESENTATION_WAYPOINTS", \
|
||||
13, \
|
||||
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_trajectory_representation_waypoints_t, time_usec) }, \
|
||||
{ "valid_points", NULL, MAVLINK_TYPE_UINT8_T, 0, 228, offsetof(mavlink_trajectory_representation_waypoints_t, valid_points) }, \
|
||||
{ "pos_x", NULL, MAVLINK_TYPE_FLOAT, 5, 8, offsetof(mavlink_trajectory_representation_waypoints_t, pos_x) }, \
|
||||
{ "pos_y", NULL, MAVLINK_TYPE_FLOAT, 5, 28, offsetof(mavlink_trajectory_representation_waypoints_t, pos_y) }, \
|
||||
{ "pos_z", NULL, MAVLINK_TYPE_FLOAT, 5, 48, offsetof(mavlink_trajectory_representation_waypoints_t, pos_z) }, \
|
||||
{ "vel_x", NULL, MAVLINK_TYPE_FLOAT, 5, 68, offsetof(mavlink_trajectory_representation_waypoints_t, vel_x) }, \
|
||||
{ "vel_y", NULL, MAVLINK_TYPE_FLOAT, 5, 88, offsetof(mavlink_trajectory_representation_waypoints_t, vel_y) }, \
|
||||
{ "vel_z", NULL, MAVLINK_TYPE_FLOAT, 5, 108, offsetof(mavlink_trajectory_representation_waypoints_t, vel_z) }, \
|
||||
{ "acc_x", NULL, MAVLINK_TYPE_FLOAT, 5, 128, offsetof(mavlink_trajectory_representation_waypoints_t, acc_x) }, \
|
||||
{ "acc_y", NULL, MAVLINK_TYPE_FLOAT, 5, 148, offsetof(mavlink_trajectory_representation_waypoints_t, acc_y) }, \
|
||||
{ "acc_z", NULL, MAVLINK_TYPE_FLOAT, 5, 168, offsetof(mavlink_trajectory_representation_waypoints_t, acc_z) }, \
|
||||
{ "pos_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 188, offsetof(mavlink_trajectory_representation_waypoints_t, pos_yaw) }, \
|
||||
{ "vel_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 208, offsetof(mavlink_trajectory_representation_waypoints_t, vel_yaw) }, \
|
||||
{ { "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) }, \
|
||||
{ "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) }, \
|
||||
{ "vel_x", NULL, MAVLINK_TYPE_FLOAT, 5, 64, offsetof(mavlink_trajectory_representation_waypoints_t, vel_x) }, \
|
||||
{ "vel_y", NULL, MAVLINK_TYPE_FLOAT, 5, 84, offsetof(mavlink_trajectory_representation_waypoints_t, vel_y) }, \
|
||||
{ "vel_z", NULL, MAVLINK_TYPE_FLOAT, 5, 104, offsetof(mavlink_trajectory_representation_waypoints_t, vel_z) }, \
|
||||
{ "acc_x", NULL, MAVLINK_TYPE_FLOAT, 5, 124, offsetof(mavlink_trajectory_representation_waypoints_t, acc_x) }, \
|
||||
{ "acc_y", NULL, MAVLINK_TYPE_FLOAT, 5, 144, offsetof(mavlink_trajectory_representation_waypoints_t, acc_y) }, \
|
||||
{ "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) }, \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS { \
|
||||
"TRAJECTORY_REPRESENTATION_WAYPOINTS", \
|
||||
13, \
|
||||
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_trajectory_representation_waypoints_t, time_usec) }, \
|
||||
{ "valid_points", NULL, MAVLINK_TYPE_UINT8_T, 0, 228, offsetof(mavlink_trajectory_representation_waypoints_t, valid_points) }, \
|
||||
{ "pos_x", NULL, MAVLINK_TYPE_FLOAT, 5, 8, offsetof(mavlink_trajectory_representation_waypoints_t, pos_x) }, \
|
||||
{ "pos_y", NULL, MAVLINK_TYPE_FLOAT, 5, 28, offsetof(mavlink_trajectory_representation_waypoints_t, pos_y) }, \
|
||||
{ "pos_z", NULL, MAVLINK_TYPE_FLOAT, 5, 48, offsetof(mavlink_trajectory_representation_waypoints_t, pos_z) }, \
|
||||
{ "vel_x", NULL, MAVLINK_TYPE_FLOAT, 5, 68, offsetof(mavlink_trajectory_representation_waypoints_t, vel_x) }, \
|
||||
{ "vel_y", NULL, MAVLINK_TYPE_FLOAT, 5, 88, offsetof(mavlink_trajectory_representation_waypoints_t, vel_y) }, \
|
||||
{ "vel_z", NULL, MAVLINK_TYPE_FLOAT, 5, 108, offsetof(mavlink_trajectory_representation_waypoints_t, vel_z) }, \
|
||||
{ "acc_x", NULL, MAVLINK_TYPE_FLOAT, 5, 128, offsetof(mavlink_trajectory_representation_waypoints_t, acc_x) }, \
|
||||
{ "acc_y", NULL, MAVLINK_TYPE_FLOAT, 5, 148, offsetof(mavlink_trajectory_representation_waypoints_t, acc_y) }, \
|
||||
{ "acc_z", NULL, MAVLINK_TYPE_FLOAT, 5, 168, offsetof(mavlink_trajectory_representation_waypoints_t, acc_z) }, \
|
||||
{ "pos_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 188, offsetof(mavlink_trajectory_representation_waypoints_t, pos_yaw) }, \
|
||||
{ "vel_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 208, offsetof(mavlink_trajectory_representation_waypoints_t, vel_yaw) }, \
|
||||
{ { "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) }, \
|
||||
{ "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) }, \
|
||||
{ "vel_x", NULL, MAVLINK_TYPE_FLOAT, 5, 64, offsetof(mavlink_trajectory_representation_waypoints_t, vel_x) }, \
|
||||
{ "vel_y", NULL, MAVLINK_TYPE_FLOAT, 5, 84, offsetof(mavlink_trajectory_representation_waypoints_t, vel_y) }, \
|
||||
{ "vel_z", NULL, MAVLINK_TYPE_FLOAT, 5, 104, offsetof(mavlink_trajectory_representation_waypoints_t, vel_z) }, \
|
||||
{ "acc_x", NULL, MAVLINK_TYPE_FLOAT, 5, 124, offsetof(mavlink_trajectory_representation_waypoints_t, acc_x) }, \
|
||||
{ "acc_y", NULL, MAVLINK_TYPE_FLOAT, 5, 144, offsetof(mavlink_trajectory_representation_waypoints_t, acc_y) }, \
|
||||
{ "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) }, \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
@@ -102,24 +102,24 @@ typedef struct __mavlink_trajectory_representation_waypoints_t {
|
||||
* @param vel_yaw [rad/s] Yaw rate, set to NaN 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(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint64_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 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)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_uint8_t(buf, 228, valid_points);
|
||||
_mav_put_float_array(buf, 8, pos_x, 5);
|
||||
_mav_put_float_array(buf, 28, pos_y, 5);
|
||||
_mav_put_float_array(buf, 48, pos_z, 5);
|
||||
_mav_put_float_array(buf, 68, vel_x, 5);
|
||||
_mav_put_float_array(buf, 88, vel_y, 5);
|
||||
_mav_put_float_array(buf, 108, vel_z, 5);
|
||||
_mav_put_float_array(buf, 128, acc_x, 5);
|
||||
_mav_put_float_array(buf, 148, acc_y, 5);
|
||||
_mav_put_float_array(buf, 168, acc_z, 5);
|
||||
_mav_put_float_array(buf, 188, pos_yaw, 5);
|
||||
_mav_put_float_array(buf, 208, vel_yaw, 5);
|
||||
_mav_put_uint32_t(buf, 0, time_usec);
|
||||
_mav_put_uint8_t(buf, 224, 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);
|
||||
_mav_put_float_array(buf, 64, vel_x, 5);
|
||||
_mav_put_float_array(buf, 84, vel_y, 5);
|
||||
_mav_put_float_array(buf, 104, vel_z, 5);
|
||||
_mav_put_float_array(buf, 124, acc_x, 5);
|
||||
_mav_put_float_array(buf, 144, acc_y, 5);
|
||||
_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);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN);
|
||||
#else
|
||||
mavlink_trajectory_representation_waypoints_t packet;
|
||||
@@ -164,25 +164,25 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack(uint
|
||||
* @param vel_yaw [rad/s] Yaw rate, set to NaN 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(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
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,
|
||||
uint64_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)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_uint8_t(buf, 228, valid_points);
|
||||
_mav_put_float_array(buf, 8, pos_x, 5);
|
||||
_mav_put_float_array(buf, 28, pos_y, 5);
|
||||
_mav_put_float_array(buf, 48, pos_z, 5);
|
||||
_mav_put_float_array(buf, 68, vel_x, 5);
|
||||
_mav_put_float_array(buf, 88, vel_y, 5);
|
||||
_mav_put_float_array(buf, 108, vel_z, 5);
|
||||
_mav_put_float_array(buf, 128, acc_x, 5);
|
||||
_mav_put_float_array(buf, 148, acc_y, 5);
|
||||
_mav_put_float_array(buf, 168, acc_z, 5);
|
||||
_mav_put_float_array(buf, 188, pos_yaw, 5);
|
||||
_mav_put_float_array(buf, 208, vel_yaw, 5);
|
||||
_mav_put_uint32_t(buf, 0, time_usec);
|
||||
_mav_put_uint8_t(buf, 224, 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);
|
||||
_mav_put_float_array(buf, 64, vel_x, 5);
|
||||
_mav_put_float_array(buf, 84, vel_y, 5);
|
||||
_mav_put_float_array(buf, 104, vel_z, 5);
|
||||
_mav_put_float_array(buf, 124, acc_x, 5);
|
||||
_mav_put_float_array(buf, 144, acc_y, 5);
|
||||
_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);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN);
|
||||
#else
|
||||
mavlink_trajectory_representation_waypoints_t packet;
|
||||
@@ -214,7 +214,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack_chan
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param trajectory_representation_waypoints C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_trajectory_representation_waypoints_t* trajectory_representation_waypoints)
|
||||
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);
|
||||
}
|
||||
@@ -228,7 +228,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_encode(ui
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param trajectory_representation_waypoints C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_trajectory_representation_waypoints_t* trajectory_representation_waypoints)
|
||||
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);
|
||||
}
|
||||
@@ -253,23 +253,23 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_encode_ch
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_trajectory_representation_waypoints_send(mavlink_channel_t chan, uint64_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)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_uint8_t(buf, 228, valid_points);
|
||||
_mav_put_float_array(buf, 8, pos_x, 5);
|
||||
_mav_put_float_array(buf, 28, pos_y, 5);
|
||||
_mav_put_float_array(buf, 48, pos_z, 5);
|
||||
_mav_put_float_array(buf, 68, vel_x, 5);
|
||||
_mav_put_float_array(buf, 88, vel_y, 5);
|
||||
_mav_put_float_array(buf, 108, vel_z, 5);
|
||||
_mav_put_float_array(buf, 128, acc_x, 5);
|
||||
_mav_put_float_array(buf, 148, acc_y, 5);
|
||||
_mav_put_float_array(buf, 168, acc_z, 5);
|
||||
_mav_put_float_array(buf, 188, pos_yaw, 5);
|
||||
_mav_put_float_array(buf, 208, vel_yaw, 5);
|
||||
_mav_put_uint32_t(buf, 0, time_usec);
|
||||
_mav_put_uint8_t(buf, 224, 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);
|
||||
_mav_put_float_array(buf, 64, vel_x, 5);
|
||||
_mav_put_float_array(buf, 84, vel_y, 5);
|
||||
_mav_put_float_array(buf, 104, vel_z, 5);
|
||||
_mav_put_float_array(buf, 124, acc_x, 5);
|
||||
_mav_put_float_array(buf, 144, acc_y, 5);
|
||||
_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_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;
|
||||
@@ -312,23 +312,23 @@ 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, uint64_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)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_uint8_t(buf, 228, valid_points);
|
||||
_mav_put_float_array(buf, 8, pos_x, 5);
|
||||
_mav_put_float_array(buf, 28, pos_y, 5);
|
||||
_mav_put_float_array(buf, 48, pos_z, 5);
|
||||
_mav_put_float_array(buf, 68, vel_x, 5);
|
||||
_mav_put_float_array(buf, 88, vel_y, 5);
|
||||
_mav_put_float_array(buf, 108, vel_z, 5);
|
||||
_mav_put_float_array(buf, 128, acc_x, 5);
|
||||
_mav_put_float_array(buf, 148, acc_y, 5);
|
||||
_mav_put_float_array(buf, 168, acc_z, 5);
|
||||
_mav_put_float_array(buf, 188, pos_yaw, 5);
|
||||
_mav_put_float_array(buf, 208, vel_yaw, 5);
|
||||
_mav_put_uint32_t(buf, 0, time_usec);
|
||||
_mav_put_uint8_t(buf, 224, 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);
|
||||
_mav_put_float_array(buf, 64, vel_x, 5);
|
||||
_mav_put_float_array(buf, 84, vel_y, 5);
|
||||
_mav_put_float_array(buf, 104, vel_z, 5);
|
||||
_mav_put_float_array(buf, 124, acc_x, 5);
|
||||
_mav_put_float_array(buf, 144, acc_y, 5);
|
||||
_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_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;
|
||||
@@ -360,9 +360,9 @@ static inline void mavlink_msg_trajectory_representation_waypoints_send_buf(mavl
|
||||
*
|
||||
* @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.
|
||||
*/
|
||||
static inline uint64_t mavlink_msg_trajectory_representation_waypoints_get_time_usec(const mavlink_message_t* msg)
|
||||
static inline uint32_t mavlink_msg_trajectory_representation_waypoints_get_time_usec(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint64_t(msg, 0);
|
||||
return _MAV_RETURN_uint32_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -372,7 +372,7 @@ static inline uint64_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, 228);
|
||||
return _MAV_RETURN_uint8_t(msg, 224);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -382,7 +382,7 @@ static inline uint8_t mavlink_msg_trajectory_representation_waypoints_get_valid_
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_pos_x(const mavlink_message_t* msg, float *pos_x)
|
||||
{
|
||||
return _MAV_RETURN_float_array(msg, pos_x, 5, 8);
|
||||
return _MAV_RETURN_float_array(msg, pos_x, 5, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -392,7 +392,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_pos_x
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_pos_y(const mavlink_message_t* msg, float *pos_y)
|
||||
{
|
||||
return _MAV_RETURN_float_array(msg, pos_y, 5, 28);
|
||||
return _MAV_RETURN_float_array(msg, pos_y, 5, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -402,7 +402,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_pos_y
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_pos_z(const mavlink_message_t* msg, float *pos_z)
|
||||
{
|
||||
return _MAV_RETURN_float_array(msg, pos_z, 5, 48);
|
||||
return _MAV_RETURN_float_array(msg, pos_z, 5, 44);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -412,7 +412,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_pos_z
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_vel_x(const mavlink_message_t* msg, float *vel_x)
|
||||
{
|
||||
return _MAV_RETURN_float_array(msg, vel_x, 5, 68);
|
||||
return _MAV_RETURN_float_array(msg, vel_x, 5, 64);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -422,7 +422,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_vel_x
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_vel_y(const mavlink_message_t* msg, float *vel_y)
|
||||
{
|
||||
return _MAV_RETURN_float_array(msg, vel_y, 5, 88);
|
||||
return _MAV_RETURN_float_array(msg, vel_y, 5, 84);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -432,7 +432,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_vel_y
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_vel_z(const mavlink_message_t* msg, float *vel_z)
|
||||
{
|
||||
return _MAV_RETURN_float_array(msg, vel_z, 5, 108);
|
||||
return _MAV_RETURN_float_array(msg, vel_z, 5, 104);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -442,7 +442,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_vel_z
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_acc_x(const mavlink_message_t* msg, float *acc_x)
|
||||
{
|
||||
return _MAV_RETURN_float_array(msg, acc_x, 5, 128);
|
||||
return _MAV_RETURN_float_array(msg, acc_x, 5, 124);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -452,7 +452,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_acc_x
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_acc_y(const mavlink_message_t* msg, float *acc_y)
|
||||
{
|
||||
return _MAV_RETURN_float_array(msg, acc_y, 5, 148);
|
||||
return _MAV_RETURN_float_array(msg, acc_y, 5, 144);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -462,7 +462,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_acc_y
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_acc_z(const mavlink_message_t* msg, float *acc_z)
|
||||
{
|
||||
return _MAV_RETURN_float_array(msg, acc_z, 5, 168);
|
||||
return _MAV_RETURN_float_array(msg, acc_z, 5, 164);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -472,7 +472,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_acc_z
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_pos_yaw(const mavlink_message_t* msg, float *pos_yaw)
|
||||
{
|
||||
return _MAV_RETURN_float_array(msg, pos_yaw, 5, 188);
|
||||
return _MAV_RETURN_float_array(msg, pos_yaw, 5, 184);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -482,7 +482,7 @@ static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_pos_y
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_vel_yaw(const mavlink_message_t* msg, float *vel_yaw)
|
||||
{
|
||||
return _MAV_RETURN_float_array(msg, vel_yaw, 5, 208);
|
||||
return _MAV_RETURN_float_array(msg, vel_yaw, 5, 204);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user