[GYRO] Refactor gyro driver for dual-gyro support
[inav.git] / lib / main / MAVLink / common / mavlink_msg_mission_item_int.h
blob66847236f24178f2a8a299173b3dbd8ba89742ef
1 #pragma once
2 // MESSAGE MISSION_ITEM_INT PACKING
4 #define MAVLINK_MSG_ID_MISSION_ITEM_INT 73
6 MAVPACKED(
7 typedef struct __mavlink_mission_item_int_t {
8 float param1; /*< PARAM1, see MAV_CMD enum*/
9 float param2; /*< PARAM2, see MAV_CMD enum*/
10 float param3; /*< PARAM3, see MAV_CMD enum*/
11 float param4; /*< PARAM4, see MAV_CMD enum*/
12 int32_t x; /*< PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7*/
13 int32_t y; /*< PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7*/
14 float z; /*< PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame.*/
15 uint16_t seq; /*< Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4).*/
16 uint16_t command; /*< The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs*/
17 uint8_t target_system; /*< System ID*/
18 uint8_t target_component; /*< Component ID*/
19 uint8_t frame; /*< The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h*/
20 uint8_t current; /*< false:0, true:1*/
21 uint8_t autocontinue; /*< autocontinue to next wp*/
22 }) mavlink_mission_item_int_t;
24 #define MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN 37
25 #define MAVLINK_MSG_ID_MISSION_ITEM_INT_MIN_LEN 37
26 #define MAVLINK_MSG_ID_73_LEN 37
27 #define MAVLINK_MSG_ID_73_MIN_LEN 37
29 #define MAVLINK_MSG_ID_MISSION_ITEM_INT_CRC 38
30 #define MAVLINK_MSG_ID_73_CRC 38
34 #if MAVLINK_COMMAND_24BIT
35 #define MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT { \
36 73, \
37 "MISSION_ITEM_INT", \
38 14, \
39 { { "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mission_item_int_t, param1) }, \
40 { "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mission_item_int_t, param2) }, \
41 { "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mission_item_int_t, param3) }, \
42 { "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_mission_item_int_t, param4) }, \
43 { "x", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_mission_item_int_t, x) }, \
44 { "y", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_mission_item_int_t, y) }, \
45 { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_mission_item_int_t, z) }, \
46 { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_mission_item_int_t, seq) }, \
47 { "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_mission_item_int_t, command) }, \
48 { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_mission_item_int_t, target_system) }, \
49 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_mission_item_int_t, target_component) }, \
50 { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_mission_item_int_t, frame) }, \
51 { "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_mission_item_int_t, current) }, \
52 { "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_mission_item_int_t, autocontinue) }, \
53 } \
55 #else
56 #define MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT { \
57 "MISSION_ITEM_INT", \
58 14, \
59 { { "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mission_item_int_t, param1) }, \
60 { "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mission_item_int_t, param2) }, \
61 { "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mission_item_int_t, param3) }, \
62 { "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_mission_item_int_t, param4) }, \
63 { "x", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_mission_item_int_t, x) }, \
64 { "y", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_mission_item_int_t, y) }, \
65 { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_mission_item_int_t, z) }, \
66 { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_mission_item_int_t, seq) }, \
67 { "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_mission_item_int_t, command) }, \
68 { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_mission_item_int_t, target_system) }, \
69 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_mission_item_int_t, target_component) }, \
70 { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_mission_item_int_t, frame) }, \
71 { "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_mission_item_int_t, current) }, \
72 { "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_mission_item_int_t, autocontinue) }, \
73 } \
75 #endif
77 /**
78 * @brief Pack a mission_item_int message
79 * @param system_id ID of this system
80 * @param component_id ID of this component (e.g. 200 for IMU)
81 * @param msg The MAVLink message to compress the data into
83 * @param target_system System ID
84 * @param target_component Component ID
85 * @param seq Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4).
86 * @param frame The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
87 * @param command The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
88 * @param current false:0, true:1
89 * @param autocontinue autocontinue to next wp
90 * @param param1 PARAM1, see MAV_CMD enum
91 * @param param2 PARAM2, see MAV_CMD enum
92 * @param param3 PARAM3, see MAV_CMD enum
93 * @param param4 PARAM4, see MAV_CMD enum
94 * @param x PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7
95 * @param y PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7
96 * @param z PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame.
97 * @return length of the message in bytes (excluding serial stream start sign)
99 static inline uint16_t mavlink_msg_mission_item_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
100 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, int32_t x, int32_t y, float z)
102 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
103 char buf[MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN];
104 _mav_put_float(buf, 0, param1);
105 _mav_put_float(buf, 4, param2);
106 _mav_put_float(buf, 8, param3);
107 _mav_put_float(buf, 12, param4);
108 _mav_put_int32_t(buf, 16, x);
109 _mav_put_int32_t(buf, 20, y);
110 _mav_put_float(buf, 24, z);
111 _mav_put_uint16_t(buf, 28, seq);
112 _mav_put_uint16_t(buf, 30, command);
113 _mav_put_uint8_t(buf, 32, target_system);
114 _mav_put_uint8_t(buf, 33, target_component);
115 _mav_put_uint8_t(buf, 34, frame);
116 _mav_put_uint8_t(buf, 35, current);
117 _mav_put_uint8_t(buf, 36, autocontinue);
119 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN);
120 #else
121 mavlink_mission_item_int_t packet;
122 packet.param1 = param1;
123 packet.param2 = param2;
124 packet.param3 = param3;
125 packet.param4 = param4;
126 packet.x = x;
127 packet.y = y;
128 packet.z = z;
129 packet.seq = seq;
130 packet.command = command;
131 packet.target_system = target_system;
132 packet.target_component = target_component;
133 packet.frame = frame;
134 packet.current = current;
135 packet.autocontinue = autocontinue;
137 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN);
138 #endif
140 msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM_INT;
141 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_ITEM_INT_MIN_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_CRC);
145 * @brief Pack a mission_item_int message on a channel
146 * @param system_id ID of this system
147 * @param component_id ID of this component (e.g. 200 for IMU)
148 * @param chan The MAVLink channel this message will be sent over
149 * @param msg The MAVLink message to compress the data into
150 * @param target_system System ID
151 * @param target_component Component ID
152 * @param seq Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4).
153 * @param frame The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
154 * @param command The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
155 * @param current false:0, true:1
156 * @param autocontinue autocontinue to next wp
157 * @param param1 PARAM1, see MAV_CMD enum
158 * @param param2 PARAM2, see MAV_CMD enum
159 * @param param3 PARAM3, see MAV_CMD enum
160 * @param param4 PARAM4, see MAV_CMD enum
161 * @param x PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7
162 * @param y PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7
163 * @param z PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame.
164 * @return length of the message in bytes (excluding serial stream start sign)
166 static inline uint16_t mavlink_msg_mission_item_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
167 mavlink_message_t* msg,
168 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,int32_t x,int32_t y,float z)
170 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
171 char buf[MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN];
172 _mav_put_float(buf, 0, param1);
173 _mav_put_float(buf, 4, param2);
174 _mav_put_float(buf, 8, param3);
175 _mav_put_float(buf, 12, param4);
176 _mav_put_int32_t(buf, 16, x);
177 _mav_put_int32_t(buf, 20, y);
178 _mav_put_float(buf, 24, z);
179 _mav_put_uint16_t(buf, 28, seq);
180 _mav_put_uint16_t(buf, 30, command);
181 _mav_put_uint8_t(buf, 32, target_system);
182 _mav_put_uint8_t(buf, 33, target_component);
183 _mav_put_uint8_t(buf, 34, frame);
184 _mav_put_uint8_t(buf, 35, current);
185 _mav_put_uint8_t(buf, 36, autocontinue);
187 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN);
188 #else
189 mavlink_mission_item_int_t packet;
190 packet.param1 = param1;
191 packet.param2 = param2;
192 packet.param3 = param3;
193 packet.param4 = param4;
194 packet.x = x;
195 packet.y = y;
196 packet.z = z;
197 packet.seq = seq;
198 packet.command = command;
199 packet.target_system = target_system;
200 packet.target_component = target_component;
201 packet.frame = frame;
202 packet.current = current;
203 packet.autocontinue = autocontinue;
205 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN);
206 #endif
208 msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM_INT;
209 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_ITEM_INT_MIN_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_CRC);
213 * @brief Encode a mission_item_int struct
215 * @param system_id ID of this system
216 * @param component_id ID of this component (e.g. 200 for IMU)
217 * @param msg The MAVLink message to compress the data into
218 * @param mission_item_int C-struct to read the message contents from
220 static inline uint16_t mavlink_msg_mission_item_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_item_int_t* mission_item_int)
222 return mavlink_msg_mission_item_int_pack(system_id, component_id, msg, mission_item_int->target_system, mission_item_int->target_component, mission_item_int->seq, mission_item_int->frame, mission_item_int->command, mission_item_int->current, mission_item_int->autocontinue, mission_item_int->param1, mission_item_int->param2, mission_item_int->param3, mission_item_int->param4, mission_item_int->x, mission_item_int->y, mission_item_int->z);
226 * @brief Encode a mission_item_int struct on a channel
228 * @param system_id ID of this system
229 * @param component_id ID of this component (e.g. 200 for IMU)
230 * @param chan The MAVLink channel this message will be sent over
231 * @param msg The MAVLink message to compress the data into
232 * @param mission_item_int C-struct to read the message contents from
234 static inline uint16_t mavlink_msg_mission_item_int_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_item_int_t* mission_item_int)
236 return mavlink_msg_mission_item_int_pack_chan(system_id, component_id, chan, msg, mission_item_int->target_system, mission_item_int->target_component, mission_item_int->seq, mission_item_int->frame, mission_item_int->command, mission_item_int->current, mission_item_int->autocontinue, mission_item_int->param1, mission_item_int->param2, mission_item_int->param3, mission_item_int->param4, mission_item_int->x, mission_item_int->y, mission_item_int->z);
240 * @brief Send a mission_item_int message
241 * @param chan MAVLink channel to send the message
243 * @param target_system System ID
244 * @param target_component Component ID
245 * @param seq Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4).
246 * @param frame The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
247 * @param command The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
248 * @param current false:0, true:1
249 * @param autocontinue autocontinue to next wp
250 * @param param1 PARAM1, see MAV_CMD enum
251 * @param param2 PARAM2, see MAV_CMD enum
252 * @param param3 PARAM3, see MAV_CMD enum
253 * @param param4 PARAM4, see MAV_CMD enum
254 * @param x PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7
255 * @param y PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7
256 * @param z PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame.
258 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
260 static inline void mavlink_msg_mission_item_int_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, int32_t x, int32_t y, float z)
262 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
263 char buf[MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN];
264 _mav_put_float(buf, 0, param1);
265 _mav_put_float(buf, 4, param2);
266 _mav_put_float(buf, 8, param3);
267 _mav_put_float(buf, 12, param4);
268 _mav_put_int32_t(buf, 16, x);
269 _mav_put_int32_t(buf, 20, y);
270 _mav_put_float(buf, 24, z);
271 _mav_put_uint16_t(buf, 28, seq);
272 _mav_put_uint16_t(buf, 30, command);
273 _mav_put_uint8_t(buf, 32, target_system);
274 _mav_put_uint8_t(buf, 33, target_component);
275 _mav_put_uint8_t(buf, 34, frame);
276 _mav_put_uint8_t(buf, 35, current);
277 _mav_put_uint8_t(buf, 36, autocontinue);
279 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_INT, buf, MAVLINK_MSG_ID_MISSION_ITEM_INT_MIN_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_CRC);
280 #else
281 mavlink_mission_item_int_t packet;
282 packet.param1 = param1;
283 packet.param2 = param2;
284 packet.param3 = param3;
285 packet.param4 = param4;
286 packet.x = x;
287 packet.y = y;
288 packet.z = z;
289 packet.seq = seq;
290 packet.command = command;
291 packet.target_system = target_system;
292 packet.target_component = target_component;
293 packet.frame = frame;
294 packet.current = current;
295 packet.autocontinue = autocontinue;
297 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_INT, (const char *)&packet, MAVLINK_MSG_ID_MISSION_ITEM_INT_MIN_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_CRC);
298 #endif
302 * @brief Send a mission_item_int message
303 * @param chan MAVLink channel to send the message
304 * @param struct The MAVLink struct to serialize
306 static inline void mavlink_msg_mission_item_int_send_struct(mavlink_channel_t chan, const mavlink_mission_item_int_t* mission_item_int)
308 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
309 mavlink_msg_mission_item_int_send(chan, mission_item_int->target_system, mission_item_int->target_component, mission_item_int->seq, mission_item_int->frame, mission_item_int->command, mission_item_int->current, mission_item_int->autocontinue, mission_item_int->param1, mission_item_int->param2, mission_item_int->param3, mission_item_int->param4, mission_item_int->x, mission_item_int->y, mission_item_int->z);
310 #else
311 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_INT, (const char *)mission_item_int, MAVLINK_MSG_ID_MISSION_ITEM_INT_MIN_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_CRC);
312 #endif
315 #if MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
317 This varient of _send() can be used to save stack space by re-using
318 memory from the receive buffer. The caller provides a
319 mavlink_message_t which is the size of a full mavlink message. This
320 is usually the receive buffer for the channel, and allows a reply to an
321 incoming message with minimum stack space usage.
323 static inline void mavlink_msg_mission_item_int_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, int32_t x, int32_t y, float z)
325 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
326 char *buf = (char *)msgbuf;
327 _mav_put_float(buf, 0, param1);
328 _mav_put_float(buf, 4, param2);
329 _mav_put_float(buf, 8, param3);
330 _mav_put_float(buf, 12, param4);
331 _mav_put_int32_t(buf, 16, x);
332 _mav_put_int32_t(buf, 20, y);
333 _mav_put_float(buf, 24, z);
334 _mav_put_uint16_t(buf, 28, seq);
335 _mav_put_uint16_t(buf, 30, command);
336 _mav_put_uint8_t(buf, 32, target_system);
337 _mav_put_uint8_t(buf, 33, target_component);
338 _mav_put_uint8_t(buf, 34, frame);
339 _mav_put_uint8_t(buf, 35, current);
340 _mav_put_uint8_t(buf, 36, autocontinue);
342 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_INT, buf, MAVLINK_MSG_ID_MISSION_ITEM_INT_MIN_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_CRC);
343 #else
344 mavlink_mission_item_int_t *packet = (mavlink_mission_item_int_t *)msgbuf;
345 packet->param1 = param1;
346 packet->param2 = param2;
347 packet->param3 = param3;
348 packet->param4 = param4;
349 packet->x = x;
350 packet->y = y;
351 packet->z = z;
352 packet->seq = seq;
353 packet->command = command;
354 packet->target_system = target_system;
355 packet->target_component = target_component;
356 packet->frame = frame;
357 packet->current = current;
358 packet->autocontinue = autocontinue;
360 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_INT, (const char *)packet, MAVLINK_MSG_ID_MISSION_ITEM_INT_MIN_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN, MAVLINK_MSG_ID_MISSION_ITEM_INT_CRC);
361 #endif
363 #endif
365 #endif
367 // MESSAGE MISSION_ITEM_INT UNPACKING
371 * @brief Get field target_system from mission_item_int message
373 * @return System ID
375 static inline uint8_t mavlink_msg_mission_item_int_get_target_system(const mavlink_message_t* msg)
377 return _MAV_RETURN_uint8_t(msg, 32);
381 * @brief Get field target_component from mission_item_int message
383 * @return Component ID
385 static inline uint8_t mavlink_msg_mission_item_int_get_target_component(const mavlink_message_t* msg)
387 return _MAV_RETURN_uint8_t(msg, 33);
391 * @brief Get field seq from mission_item_int message
393 * @return Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4).
395 static inline uint16_t mavlink_msg_mission_item_int_get_seq(const mavlink_message_t* msg)
397 return _MAV_RETURN_uint16_t(msg, 28);
401 * @brief Get field frame from mission_item_int message
403 * @return The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h
405 static inline uint8_t mavlink_msg_mission_item_int_get_frame(const mavlink_message_t* msg)
407 return _MAV_RETURN_uint8_t(msg, 34);
411 * @brief Get field command from mission_item_int message
413 * @return The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs
415 static inline uint16_t mavlink_msg_mission_item_int_get_command(const mavlink_message_t* msg)
417 return _MAV_RETURN_uint16_t(msg, 30);
421 * @brief Get field current from mission_item_int message
423 * @return false:0, true:1
425 static inline uint8_t mavlink_msg_mission_item_int_get_current(const mavlink_message_t* msg)
427 return _MAV_RETURN_uint8_t(msg, 35);
431 * @brief Get field autocontinue from mission_item_int message
433 * @return autocontinue to next wp
435 static inline uint8_t mavlink_msg_mission_item_int_get_autocontinue(const mavlink_message_t* msg)
437 return _MAV_RETURN_uint8_t(msg, 36);
441 * @brief Get field param1 from mission_item_int message
443 * @return PARAM1, see MAV_CMD enum
445 static inline float mavlink_msg_mission_item_int_get_param1(const mavlink_message_t* msg)
447 return _MAV_RETURN_float(msg, 0);
451 * @brief Get field param2 from mission_item_int message
453 * @return PARAM2, see MAV_CMD enum
455 static inline float mavlink_msg_mission_item_int_get_param2(const mavlink_message_t* msg)
457 return _MAV_RETURN_float(msg, 4);
461 * @brief Get field param3 from mission_item_int message
463 * @return PARAM3, see MAV_CMD enum
465 static inline float mavlink_msg_mission_item_int_get_param3(const mavlink_message_t* msg)
467 return _MAV_RETURN_float(msg, 8);
471 * @brief Get field param4 from mission_item_int message
473 * @return PARAM4, see MAV_CMD enum
475 static inline float mavlink_msg_mission_item_int_get_param4(const mavlink_message_t* msg)
477 return _MAV_RETURN_float(msg, 12);
481 * @brief Get field x from mission_item_int message
483 * @return PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7
485 static inline int32_t mavlink_msg_mission_item_int_get_x(const mavlink_message_t* msg)
487 return _MAV_RETURN_int32_t(msg, 16);
491 * @brief Get field y from mission_item_int message
493 * @return PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7
495 static inline int32_t mavlink_msg_mission_item_int_get_y(const mavlink_message_t* msg)
497 return _MAV_RETURN_int32_t(msg, 20);
501 * @brief Get field z from mission_item_int message
503 * @return PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame.
505 static inline float mavlink_msg_mission_item_int_get_z(const mavlink_message_t* msg)
507 return _MAV_RETURN_float(msg, 24);
511 * @brief Decode a mission_item_int message into a struct
513 * @param msg The message to decode
514 * @param mission_item_int C-struct to decode the message contents into
516 static inline void mavlink_msg_mission_item_int_decode(const mavlink_message_t* msg, mavlink_mission_item_int_t* mission_item_int)
518 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
519 mission_item_int->param1 = mavlink_msg_mission_item_int_get_param1(msg);
520 mission_item_int->param2 = mavlink_msg_mission_item_int_get_param2(msg);
521 mission_item_int->param3 = mavlink_msg_mission_item_int_get_param3(msg);
522 mission_item_int->param4 = mavlink_msg_mission_item_int_get_param4(msg);
523 mission_item_int->x = mavlink_msg_mission_item_int_get_x(msg);
524 mission_item_int->y = mavlink_msg_mission_item_int_get_y(msg);
525 mission_item_int->z = mavlink_msg_mission_item_int_get_z(msg);
526 mission_item_int->seq = mavlink_msg_mission_item_int_get_seq(msg);
527 mission_item_int->command = mavlink_msg_mission_item_int_get_command(msg);
528 mission_item_int->target_system = mavlink_msg_mission_item_int_get_target_system(msg);
529 mission_item_int->target_component = mavlink_msg_mission_item_int_get_target_component(msg);
530 mission_item_int->frame = mavlink_msg_mission_item_int_get_frame(msg);
531 mission_item_int->current = mavlink_msg_mission_item_int_get_current(msg);
532 mission_item_int->autocontinue = mavlink_msg_mission_item_int_get_autocontinue(msg);
533 #else
534 uint8_t len = msg->len < MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN? msg->len : MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN;
535 memset(mission_item_int, 0, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN);
536 memcpy(mission_item_int, _MAV_PAYLOAD(msg), len);
537 #endif