Merge pull request #10476 from radiolinkW/RADIOLINKF722
[inav.git] / lib / main / MAVLink / common / mavlink_msg_trajectory_representation_bezier.h
blobc535fd44162eee9ccef82fd102482995b65458af
1 #pragma once
2 // MESSAGE TRAJECTORY_REPRESENTATION_BEZIER PACKING
4 #define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER 333
7 typedef struct __mavlink_trajectory_representation_bezier_t {
8 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 of the number.*/
9 float pos_x[5]; /*< [m] X-coordinate of bezier control points. Set to NaN if not being used*/
10 float pos_y[5]; /*< [m] Y-coordinate of bezier control points. Set to NaN if not being used*/
11 float pos_z[5]; /*< [m] Z-coordinate of bezier control points. Set to NaN if not being used*/
12 float delta[5]; /*< [s] Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated*/
13 float pos_yaw[5]; /*< [rad] Yaw. Set to NaN for unchanged*/
14 uint8_t valid_points; /*< Number of valid control points (up-to 5 points are possible)*/
15 } mavlink_trajectory_representation_bezier_t;
17 #define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN 109
18 #define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN 109
19 #define MAVLINK_MSG_ID_333_LEN 109
20 #define MAVLINK_MSG_ID_333_MIN_LEN 109
22 #define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC 231
23 #define MAVLINK_MSG_ID_333_CRC 231
25 #define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_BEZIER_FIELD_POS_X_LEN 5
26 #define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_BEZIER_FIELD_POS_Y_LEN 5
27 #define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_BEZIER_FIELD_POS_Z_LEN 5
28 #define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_BEZIER_FIELD_DELTA_LEN 5
29 #define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_BEZIER_FIELD_POS_YAW_LEN 5
31 #if MAVLINK_COMMAND_24BIT
32 #define MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER { \
33 333, \
34 "TRAJECTORY_REPRESENTATION_BEZIER", \
35 7, \
36 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_trajectory_representation_bezier_t, time_usec) }, \
37 { "valid_points", NULL, MAVLINK_TYPE_UINT8_T, 0, 108, offsetof(mavlink_trajectory_representation_bezier_t, valid_points) }, \
38 { "pos_x", NULL, MAVLINK_TYPE_FLOAT, 5, 8, offsetof(mavlink_trajectory_representation_bezier_t, pos_x) }, \
39 { "pos_y", NULL, MAVLINK_TYPE_FLOAT, 5, 28, offsetof(mavlink_trajectory_representation_bezier_t, pos_y) }, \
40 { "pos_z", NULL, MAVLINK_TYPE_FLOAT, 5, 48, offsetof(mavlink_trajectory_representation_bezier_t, pos_z) }, \
41 { "delta", NULL, MAVLINK_TYPE_FLOAT, 5, 68, offsetof(mavlink_trajectory_representation_bezier_t, delta) }, \
42 { "pos_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 88, offsetof(mavlink_trajectory_representation_bezier_t, pos_yaw) }, \
43 } \
45 #else
46 #define MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER { \
47 "TRAJECTORY_REPRESENTATION_BEZIER", \
48 7, \
49 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_trajectory_representation_bezier_t, time_usec) }, \
50 { "valid_points", NULL, MAVLINK_TYPE_UINT8_T, 0, 108, offsetof(mavlink_trajectory_representation_bezier_t, valid_points) }, \
51 { "pos_x", NULL, MAVLINK_TYPE_FLOAT, 5, 8, offsetof(mavlink_trajectory_representation_bezier_t, pos_x) }, \
52 { "pos_y", NULL, MAVLINK_TYPE_FLOAT, 5, 28, offsetof(mavlink_trajectory_representation_bezier_t, pos_y) }, \
53 { "pos_z", NULL, MAVLINK_TYPE_FLOAT, 5, 48, offsetof(mavlink_trajectory_representation_bezier_t, pos_z) }, \
54 { "delta", NULL, MAVLINK_TYPE_FLOAT, 5, 68, offsetof(mavlink_trajectory_representation_bezier_t, delta) }, \
55 { "pos_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 88, offsetof(mavlink_trajectory_representation_bezier_t, pos_yaw) }, \
56 } \
58 #endif
60 /**
61 * @brief Pack a trajectory_representation_bezier message
62 * @param system_id ID of this system
63 * @param component_id ID of this component (e.g. 200 for IMU)
64 * @param msg The MAVLink message to compress the data into
66 * @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.
67 * @param valid_points Number of valid control points (up-to 5 points are possible)
68 * @param pos_x [m] X-coordinate of bezier control points. Set to NaN if not being used
69 * @param pos_y [m] Y-coordinate of bezier control points. Set to NaN if not being used
70 * @param pos_z [m] Z-coordinate of bezier control points. Set to NaN if not being used
71 * @param delta [s] Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated
72 * @param pos_yaw [rad] Yaw. Set to NaN for unchanged
73 * @return length of the message in bytes (excluding serial stream start sign)
75 static inline uint16_t mavlink_msg_trajectory_representation_bezier_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
76 uint64_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *delta, const float *pos_yaw)
78 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
79 char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN];
80 _mav_put_uint64_t(buf, 0, time_usec);
81 _mav_put_uint8_t(buf, 108, valid_points);
82 _mav_put_float_array(buf, 8, pos_x, 5);
83 _mav_put_float_array(buf, 28, pos_y, 5);
84 _mav_put_float_array(buf, 48, pos_z, 5);
85 _mav_put_float_array(buf, 68, delta, 5);
86 _mav_put_float_array(buf, 88, pos_yaw, 5);
87 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN);
88 #else
89 mavlink_trajectory_representation_bezier_t packet;
90 packet.time_usec = time_usec;
91 packet.valid_points = valid_points;
92 mav_array_memcpy(packet.pos_x, pos_x, sizeof(float)*5);
93 mav_array_memcpy(packet.pos_y, pos_y, sizeof(float)*5);
94 mav_array_memcpy(packet.pos_z, pos_z, sizeof(float)*5);
95 mav_array_memcpy(packet.delta, delta, sizeof(float)*5);
96 mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5);
97 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN);
98 #endif
100 msg->msgid = MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER;
101 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC);
105 * @brief Pack a trajectory_representation_bezier message on a channel
106 * @param system_id ID of this system
107 * @param component_id ID of this component (e.g. 200 for IMU)
108 * @param chan The MAVLink channel this message will be sent over
109 * @param msg The MAVLink message to compress the data into
110 * @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.
111 * @param valid_points Number of valid control points (up-to 5 points are possible)
112 * @param pos_x [m] X-coordinate of bezier control points. Set to NaN if not being used
113 * @param pos_y [m] Y-coordinate of bezier control points. Set to NaN if not being used
114 * @param pos_z [m] Z-coordinate of bezier control points. Set to NaN if not being used
115 * @param delta [s] Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated
116 * @param pos_yaw [rad] Yaw. Set to NaN for unchanged
117 * @return length of the message in bytes (excluding serial stream start sign)
119 static inline uint16_t mavlink_msg_trajectory_representation_bezier_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
120 mavlink_message_t* msg,
121 uint64_t time_usec,uint8_t valid_points,const float *pos_x,const float *pos_y,const float *pos_z,const float *delta,const float *pos_yaw)
123 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
124 char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN];
125 _mav_put_uint64_t(buf, 0, time_usec);
126 _mav_put_uint8_t(buf, 108, valid_points);
127 _mav_put_float_array(buf, 8, pos_x, 5);
128 _mav_put_float_array(buf, 28, pos_y, 5);
129 _mav_put_float_array(buf, 48, pos_z, 5);
130 _mav_put_float_array(buf, 68, delta, 5);
131 _mav_put_float_array(buf, 88, pos_yaw, 5);
132 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN);
133 #else
134 mavlink_trajectory_representation_bezier_t packet;
135 packet.time_usec = time_usec;
136 packet.valid_points = valid_points;
137 mav_array_memcpy(packet.pos_x, pos_x, sizeof(float)*5);
138 mav_array_memcpy(packet.pos_y, pos_y, sizeof(float)*5);
139 mav_array_memcpy(packet.pos_z, pos_z, sizeof(float)*5);
140 mav_array_memcpy(packet.delta, delta, sizeof(float)*5);
141 mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5);
142 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN);
143 #endif
145 msg->msgid = MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER;
146 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC);
150 * @brief Encode a trajectory_representation_bezier struct
152 * @param system_id ID of this system
153 * @param component_id ID of this component (e.g. 200 for IMU)
154 * @param msg The MAVLink message to compress the data into
155 * @param trajectory_representation_bezier C-struct to read the message contents from
157 static inline uint16_t mavlink_msg_trajectory_representation_bezier_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_trajectory_representation_bezier_t* trajectory_representation_bezier)
159 return mavlink_msg_trajectory_representation_bezier_pack(system_id, component_id, msg, trajectory_representation_bezier->time_usec, trajectory_representation_bezier->valid_points, trajectory_representation_bezier->pos_x, trajectory_representation_bezier->pos_y, trajectory_representation_bezier->pos_z, trajectory_representation_bezier->delta, trajectory_representation_bezier->pos_yaw);
163 * @brief Encode a trajectory_representation_bezier struct on a channel
165 * @param system_id ID of this system
166 * @param component_id ID of this component (e.g. 200 for IMU)
167 * @param chan The MAVLink channel this message will be sent over
168 * @param msg The MAVLink message to compress the data into
169 * @param trajectory_representation_bezier C-struct to read the message contents from
171 static inline uint16_t mavlink_msg_trajectory_representation_bezier_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_trajectory_representation_bezier_t* trajectory_representation_bezier)
173 return mavlink_msg_trajectory_representation_bezier_pack_chan(system_id, component_id, chan, msg, trajectory_representation_bezier->time_usec, trajectory_representation_bezier->valid_points, trajectory_representation_bezier->pos_x, trajectory_representation_bezier->pos_y, trajectory_representation_bezier->pos_z, trajectory_representation_bezier->delta, trajectory_representation_bezier->pos_yaw);
177 * @brief Send a trajectory_representation_bezier message
178 * @param chan MAVLink channel to send the message
180 * @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.
181 * @param valid_points Number of valid control points (up-to 5 points are possible)
182 * @param pos_x [m] X-coordinate of bezier control points. Set to NaN if not being used
183 * @param pos_y [m] Y-coordinate of bezier control points. Set to NaN if not being used
184 * @param pos_z [m] Z-coordinate of bezier control points. Set to NaN if not being used
185 * @param delta [s] Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated
186 * @param pos_yaw [rad] Yaw. Set to NaN for unchanged
188 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
190 static inline void mavlink_msg_trajectory_representation_bezier_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 *delta, const float *pos_yaw)
192 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
193 char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN];
194 _mav_put_uint64_t(buf, 0, time_usec);
195 _mav_put_uint8_t(buf, 108, valid_points);
196 _mav_put_float_array(buf, 8, pos_x, 5);
197 _mav_put_float_array(buf, 28, pos_y, 5);
198 _mav_put_float_array(buf, 48, pos_z, 5);
199 _mav_put_float_array(buf, 68, delta, 5);
200 _mav_put_float_array(buf, 88, pos_yaw, 5);
201 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER, buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC);
202 #else
203 mavlink_trajectory_representation_bezier_t packet;
204 packet.time_usec = time_usec;
205 packet.valid_points = valid_points;
206 mav_array_memcpy(packet.pos_x, pos_x, sizeof(float)*5);
207 mav_array_memcpy(packet.pos_y, pos_y, sizeof(float)*5);
208 mav_array_memcpy(packet.pos_z, pos_z, sizeof(float)*5);
209 mav_array_memcpy(packet.delta, delta, sizeof(float)*5);
210 mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5);
211 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER, (const char *)&packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC);
212 #endif
216 * @brief Send a trajectory_representation_bezier message
217 * @param chan MAVLink channel to send the message
218 * @param struct The MAVLink struct to serialize
220 static inline void mavlink_msg_trajectory_representation_bezier_send_struct(mavlink_channel_t chan, const mavlink_trajectory_representation_bezier_t* trajectory_representation_bezier)
222 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
223 mavlink_msg_trajectory_representation_bezier_send(chan, trajectory_representation_bezier->time_usec, trajectory_representation_bezier->valid_points, trajectory_representation_bezier->pos_x, trajectory_representation_bezier->pos_y, trajectory_representation_bezier->pos_z, trajectory_representation_bezier->delta, trajectory_representation_bezier->pos_yaw);
224 #else
225 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER, (const char *)trajectory_representation_bezier, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC);
226 #endif
229 #if MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN <= MAVLINK_MAX_PAYLOAD_LEN
231 This varient of _send() can be used to save stack space by re-using
232 memory from the receive buffer. The caller provides a
233 mavlink_message_t which is the size of a full mavlink message. This
234 is usually the receive buffer for the channel, and allows a reply to an
235 incoming message with minimum stack space usage.
237 static inline void mavlink_msg_trajectory_representation_bezier_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 *delta, const float *pos_yaw)
239 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
240 char *buf = (char *)msgbuf;
241 _mav_put_uint64_t(buf, 0, time_usec);
242 _mav_put_uint8_t(buf, 108, valid_points);
243 _mav_put_float_array(buf, 8, pos_x, 5);
244 _mav_put_float_array(buf, 28, pos_y, 5);
245 _mav_put_float_array(buf, 48, pos_z, 5);
246 _mav_put_float_array(buf, 68, delta, 5);
247 _mav_put_float_array(buf, 88, pos_yaw, 5);
248 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER, buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC);
249 #else
250 mavlink_trajectory_representation_bezier_t *packet = (mavlink_trajectory_representation_bezier_t *)msgbuf;
251 packet->time_usec = time_usec;
252 packet->valid_points = valid_points;
253 mav_array_memcpy(packet->pos_x, pos_x, sizeof(float)*5);
254 mav_array_memcpy(packet->pos_y, pos_y, sizeof(float)*5);
255 mav_array_memcpy(packet->pos_z, pos_z, sizeof(float)*5);
256 mav_array_memcpy(packet->delta, delta, sizeof(float)*5);
257 mav_array_memcpy(packet->pos_yaw, pos_yaw, sizeof(float)*5);
258 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER, (const char *)packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC);
259 #endif
261 #endif
263 #endif
265 // MESSAGE TRAJECTORY_REPRESENTATION_BEZIER UNPACKING
269 * @brief Get field time_usec from trajectory_representation_bezier message
271 * @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.
273 static inline uint64_t mavlink_msg_trajectory_representation_bezier_get_time_usec(const mavlink_message_t* msg)
275 return _MAV_RETURN_uint64_t(msg, 0);
279 * @brief Get field valid_points from trajectory_representation_bezier message
281 * @return Number of valid control points (up-to 5 points are possible)
283 static inline uint8_t mavlink_msg_trajectory_representation_bezier_get_valid_points(const mavlink_message_t* msg)
285 return _MAV_RETURN_uint8_t(msg, 108);
289 * @brief Get field pos_x from trajectory_representation_bezier message
291 * @return [m] X-coordinate of bezier control points. Set to NaN if not being used
293 static inline uint16_t mavlink_msg_trajectory_representation_bezier_get_pos_x(const mavlink_message_t* msg, float *pos_x)
295 return _MAV_RETURN_float_array(msg, pos_x, 5, 8);
299 * @brief Get field pos_y from trajectory_representation_bezier message
301 * @return [m] Y-coordinate of bezier control points. Set to NaN if not being used
303 static inline uint16_t mavlink_msg_trajectory_representation_bezier_get_pos_y(const mavlink_message_t* msg, float *pos_y)
305 return _MAV_RETURN_float_array(msg, pos_y, 5, 28);
309 * @brief Get field pos_z from trajectory_representation_bezier message
311 * @return [m] Z-coordinate of bezier control points. Set to NaN if not being used
313 static inline uint16_t mavlink_msg_trajectory_representation_bezier_get_pos_z(const mavlink_message_t* msg, float *pos_z)
315 return _MAV_RETURN_float_array(msg, pos_z, 5, 48);
319 * @brief Get field delta from trajectory_representation_bezier message
321 * @return [s] Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated
323 static inline uint16_t mavlink_msg_trajectory_representation_bezier_get_delta(const mavlink_message_t* msg, float *delta)
325 return _MAV_RETURN_float_array(msg, delta, 5, 68);
329 * @brief Get field pos_yaw from trajectory_representation_bezier message
331 * @return [rad] Yaw. Set to NaN for unchanged
333 static inline uint16_t mavlink_msg_trajectory_representation_bezier_get_pos_yaw(const mavlink_message_t* msg, float *pos_yaw)
335 return _MAV_RETURN_float_array(msg, pos_yaw, 5, 88);
339 * @brief Decode a trajectory_representation_bezier message into a struct
341 * @param msg The message to decode
342 * @param trajectory_representation_bezier C-struct to decode the message contents into
344 static inline void mavlink_msg_trajectory_representation_bezier_decode(const mavlink_message_t* msg, mavlink_trajectory_representation_bezier_t* trajectory_representation_bezier)
346 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
347 trajectory_representation_bezier->time_usec = mavlink_msg_trajectory_representation_bezier_get_time_usec(msg);
348 mavlink_msg_trajectory_representation_bezier_get_pos_x(msg, trajectory_representation_bezier->pos_x);
349 mavlink_msg_trajectory_representation_bezier_get_pos_y(msg, trajectory_representation_bezier->pos_y);
350 mavlink_msg_trajectory_representation_bezier_get_pos_z(msg, trajectory_representation_bezier->pos_z);
351 mavlink_msg_trajectory_representation_bezier_get_delta(msg, trajectory_representation_bezier->delta);
352 mavlink_msg_trajectory_representation_bezier_get_pos_yaw(msg, trajectory_representation_bezier->pos_yaw);
353 trajectory_representation_bezier->valid_points = mavlink_msg_trajectory_representation_bezier_get_valid_points(msg);
354 #else
355 uint8_t len = msg->len < MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN? msg->len : MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN;
356 memset(trajectory_representation_bezier, 0, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN);
357 memcpy(trajectory_representation_bezier, _MAV_PAYLOAD(msg), len);
358 #endif