before merging master
[inav.git] / lib / main / MAVLink / common / mavlink_msg_mission_item_int.h
blob74ad3a5ed53e92d83e6ce58225fec5c5b39414c5
1 #pragma once
2 // MESSAGE MISSION_ITEM_INT PACKING
4 #define MAVLINK_MSG_ID_MISSION_ITEM_INT 73
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 waypoint.*/
17 uint8_t target_system; /*< System ID*/
18 uint8_t target_component; /*< Component ID*/
19 uint8_t frame; /*< The coordinate system of the waypoint.*/
20 uint8_t current; /*< false:0, true:1*/
21 uint8_t autocontinue; /*< Autocontinue to next waypoint*/
22 uint8_t mission_type; /*< Mission type.*/
23 } mavlink_mission_item_int_t;
25 #define MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN 38
26 #define MAVLINK_MSG_ID_MISSION_ITEM_INT_MIN_LEN 37
27 #define MAVLINK_MSG_ID_73_LEN 38
28 #define MAVLINK_MSG_ID_73_MIN_LEN 37
30 #define MAVLINK_MSG_ID_MISSION_ITEM_INT_CRC 38
31 #define MAVLINK_MSG_ID_73_CRC 38
35 #if MAVLINK_COMMAND_24BIT
36 #define MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT { \
37 73, \
38 "MISSION_ITEM_INT", \
39 15, \
40 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_mission_item_int_t, target_system) }, \
41 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_mission_item_int_t, target_component) }, \
42 { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_mission_item_int_t, seq) }, \
43 { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_mission_item_int_t, frame) }, \
44 { "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_mission_item_int_t, command) }, \
45 { "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_mission_item_int_t, current) }, \
46 { "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_mission_item_int_t, autocontinue) }, \
47 { "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mission_item_int_t, param1) }, \
48 { "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mission_item_int_t, param2) }, \
49 { "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mission_item_int_t, param3) }, \
50 { "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_mission_item_int_t, param4) }, \
51 { "x", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_mission_item_int_t, x) }, \
52 { "y", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_mission_item_int_t, y) }, \
53 { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_mission_item_int_t, z) }, \
54 { "mission_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_mission_item_int_t, mission_type) }, \
55 } \
57 #else
58 #define MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT { \
59 "MISSION_ITEM_INT", \
60 15, \
61 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_mission_item_int_t, target_system) }, \
62 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_mission_item_int_t, target_component) }, \
63 { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_mission_item_int_t, seq) }, \
64 { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_mission_item_int_t, frame) }, \
65 { "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_mission_item_int_t, command) }, \
66 { "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_mission_item_int_t, current) }, \
67 { "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_mission_item_int_t, autocontinue) }, \
68 { "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mission_item_int_t, param1) }, \
69 { "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mission_item_int_t, param2) }, \
70 { "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mission_item_int_t, param3) }, \
71 { "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_mission_item_int_t, param4) }, \
72 { "x", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_mission_item_int_t, x) }, \
73 { "y", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_mission_item_int_t, y) }, \
74 { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_mission_item_int_t, z) }, \
75 { "mission_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_mission_item_int_t, mission_type) }, \
76 } \
78 #endif
80 /**
81 * @brief Pack a mission_item_int message
82 * @param system_id ID of this system
83 * @param component_id ID of this component (e.g. 200 for IMU)
84 * @param msg The MAVLink message to compress the data into
86 * @param target_system System ID
87 * @param target_component Component ID
88 * @param seq Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4).
89 * @param frame The coordinate system of the waypoint.
90 * @param command The scheduled action for the waypoint.
91 * @param current false:0, true:1
92 * @param autocontinue Autocontinue to next waypoint
93 * @param param1 PARAM1, see MAV_CMD enum
94 * @param param2 PARAM2, see MAV_CMD enum
95 * @param param3 PARAM3, see MAV_CMD enum
96 * @param param4 PARAM4, see MAV_CMD enum
97 * @param x PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7
98 * @param y PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7
99 * @param z PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame.
100 * @param mission_type Mission type.
101 * @return length of the message in bytes (excluding serial stream start sign)
103 static inline uint16_t mavlink_msg_mission_item_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
104 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, uint8_t mission_type)
106 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
107 char buf[MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN];
108 _mav_put_float(buf, 0, param1);
109 _mav_put_float(buf, 4, param2);
110 _mav_put_float(buf, 8, param3);
111 _mav_put_float(buf, 12, param4);
112 _mav_put_int32_t(buf, 16, x);
113 _mav_put_int32_t(buf, 20, y);
114 _mav_put_float(buf, 24, z);
115 _mav_put_uint16_t(buf, 28, seq);
116 _mav_put_uint16_t(buf, 30, command);
117 _mav_put_uint8_t(buf, 32, target_system);
118 _mav_put_uint8_t(buf, 33, target_component);
119 _mav_put_uint8_t(buf, 34, frame);
120 _mav_put_uint8_t(buf, 35, current);
121 _mav_put_uint8_t(buf, 36, autocontinue);
122 _mav_put_uint8_t(buf, 37, mission_type);
124 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN);
125 #else
126 mavlink_mission_item_int_t packet;
127 packet.param1 = param1;
128 packet.param2 = param2;
129 packet.param3 = param3;
130 packet.param4 = param4;
131 packet.x = x;
132 packet.y = y;
133 packet.z = z;
134 packet.seq = seq;
135 packet.command = command;
136 packet.target_system = target_system;
137 packet.target_component = target_component;
138 packet.frame = frame;
139 packet.current = current;
140 packet.autocontinue = autocontinue;
141 packet.mission_type = mission_type;
143 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN);
144 #endif
146 msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM_INT;
147 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);
151 * @brief Pack a mission_item_int message on a channel
152 * @param system_id ID of this system
153 * @param component_id ID of this component (e.g. 200 for IMU)
154 * @param chan The MAVLink channel this message will be sent over
155 * @param msg The MAVLink message to compress the data into
156 * @param target_system System ID
157 * @param target_component Component ID
158 * @param seq Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4).
159 * @param frame The coordinate system of the waypoint.
160 * @param command The scheduled action for the waypoint.
161 * @param current false:0, true:1
162 * @param autocontinue Autocontinue to next waypoint
163 * @param param1 PARAM1, see MAV_CMD enum
164 * @param param2 PARAM2, see MAV_CMD enum
165 * @param param3 PARAM3, see MAV_CMD enum
166 * @param param4 PARAM4, see MAV_CMD enum
167 * @param x PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7
168 * @param y PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7
169 * @param z PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame.
170 * @param mission_type Mission type.
171 * @return length of the message in bytes (excluding serial stream start sign)
173 static inline uint16_t mavlink_msg_mission_item_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
174 mavlink_message_t* msg,
175 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,uint8_t mission_type)
177 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
178 char buf[MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN];
179 _mav_put_float(buf, 0, param1);
180 _mav_put_float(buf, 4, param2);
181 _mav_put_float(buf, 8, param3);
182 _mav_put_float(buf, 12, param4);
183 _mav_put_int32_t(buf, 16, x);
184 _mav_put_int32_t(buf, 20, y);
185 _mav_put_float(buf, 24, z);
186 _mav_put_uint16_t(buf, 28, seq);
187 _mav_put_uint16_t(buf, 30, command);
188 _mav_put_uint8_t(buf, 32, target_system);
189 _mav_put_uint8_t(buf, 33, target_component);
190 _mav_put_uint8_t(buf, 34, frame);
191 _mav_put_uint8_t(buf, 35, current);
192 _mav_put_uint8_t(buf, 36, autocontinue);
193 _mav_put_uint8_t(buf, 37, mission_type);
195 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN);
196 #else
197 mavlink_mission_item_int_t packet;
198 packet.param1 = param1;
199 packet.param2 = param2;
200 packet.param3 = param3;
201 packet.param4 = param4;
202 packet.x = x;
203 packet.y = y;
204 packet.z = z;
205 packet.seq = seq;
206 packet.command = command;
207 packet.target_system = target_system;
208 packet.target_component = target_component;
209 packet.frame = frame;
210 packet.current = current;
211 packet.autocontinue = autocontinue;
212 packet.mission_type = mission_type;
214 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN);
215 #endif
217 msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM_INT;
218 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);
222 * @brief Encode a mission_item_int struct
224 * @param system_id ID of this system
225 * @param component_id ID of this component (e.g. 200 for IMU)
226 * @param msg The MAVLink message to compress the data into
227 * @param mission_item_int C-struct to read the message contents from
229 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)
231 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, mission_item_int->mission_type);
235 * @brief Encode a mission_item_int struct on a channel
237 * @param system_id ID of this system
238 * @param component_id ID of this component (e.g. 200 for IMU)
239 * @param chan The MAVLink channel this message will be sent over
240 * @param msg The MAVLink message to compress the data into
241 * @param mission_item_int C-struct to read the message contents from
243 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)
245 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, mission_item_int->mission_type);
249 * @brief Send a mission_item_int message
250 * @param chan MAVLink channel to send the message
252 * @param target_system System ID
253 * @param target_component Component ID
254 * @param seq Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4).
255 * @param frame The coordinate system of the waypoint.
256 * @param command The scheduled action for the waypoint.
257 * @param current false:0, true:1
258 * @param autocontinue Autocontinue to next waypoint
259 * @param param1 PARAM1, see MAV_CMD enum
260 * @param param2 PARAM2, see MAV_CMD enum
261 * @param param3 PARAM3, see MAV_CMD enum
262 * @param param4 PARAM4, see MAV_CMD enum
263 * @param x PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7
264 * @param y PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7
265 * @param z PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame.
266 * @param mission_type Mission type.
268 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
270 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, uint8_t mission_type)
272 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
273 char buf[MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN];
274 _mav_put_float(buf, 0, param1);
275 _mav_put_float(buf, 4, param2);
276 _mav_put_float(buf, 8, param3);
277 _mav_put_float(buf, 12, param4);
278 _mav_put_int32_t(buf, 16, x);
279 _mav_put_int32_t(buf, 20, y);
280 _mav_put_float(buf, 24, z);
281 _mav_put_uint16_t(buf, 28, seq);
282 _mav_put_uint16_t(buf, 30, command);
283 _mav_put_uint8_t(buf, 32, target_system);
284 _mav_put_uint8_t(buf, 33, target_component);
285 _mav_put_uint8_t(buf, 34, frame);
286 _mav_put_uint8_t(buf, 35, current);
287 _mav_put_uint8_t(buf, 36, autocontinue);
288 _mav_put_uint8_t(buf, 37, mission_type);
290 _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);
291 #else
292 mavlink_mission_item_int_t packet;
293 packet.param1 = param1;
294 packet.param2 = param2;
295 packet.param3 = param3;
296 packet.param4 = param4;
297 packet.x = x;
298 packet.y = y;
299 packet.z = z;
300 packet.seq = seq;
301 packet.command = command;
302 packet.target_system = target_system;
303 packet.target_component = target_component;
304 packet.frame = frame;
305 packet.current = current;
306 packet.autocontinue = autocontinue;
307 packet.mission_type = mission_type;
309 _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);
310 #endif
314 * @brief Send a mission_item_int message
315 * @param chan MAVLink channel to send the message
316 * @param struct The MAVLink struct to serialize
318 static inline void mavlink_msg_mission_item_int_send_struct(mavlink_channel_t chan, const mavlink_mission_item_int_t* mission_item_int)
320 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
321 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, mission_item_int->mission_type);
322 #else
323 _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);
324 #endif
327 #if MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
329 This varient of _send() can be used to save stack space by re-using
330 memory from the receive buffer. The caller provides a
331 mavlink_message_t which is the size of a full mavlink message. This
332 is usually the receive buffer for the channel, and allows a reply to an
333 incoming message with minimum stack space usage.
335 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, uint8_t mission_type)
337 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
338 char *buf = (char *)msgbuf;
339 _mav_put_float(buf, 0, param1);
340 _mav_put_float(buf, 4, param2);
341 _mav_put_float(buf, 8, param3);
342 _mav_put_float(buf, 12, param4);
343 _mav_put_int32_t(buf, 16, x);
344 _mav_put_int32_t(buf, 20, y);
345 _mav_put_float(buf, 24, z);
346 _mav_put_uint16_t(buf, 28, seq);
347 _mav_put_uint16_t(buf, 30, command);
348 _mav_put_uint8_t(buf, 32, target_system);
349 _mav_put_uint8_t(buf, 33, target_component);
350 _mav_put_uint8_t(buf, 34, frame);
351 _mav_put_uint8_t(buf, 35, current);
352 _mav_put_uint8_t(buf, 36, autocontinue);
353 _mav_put_uint8_t(buf, 37, mission_type);
355 _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);
356 #else
357 mavlink_mission_item_int_t *packet = (mavlink_mission_item_int_t *)msgbuf;
358 packet->param1 = param1;
359 packet->param2 = param2;
360 packet->param3 = param3;
361 packet->param4 = param4;
362 packet->x = x;
363 packet->y = y;
364 packet->z = z;
365 packet->seq = seq;
366 packet->command = command;
367 packet->target_system = target_system;
368 packet->target_component = target_component;
369 packet->frame = frame;
370 packet->current = current;
371 packet->autocontinue = autocontinue;
372 packet->mission_type = mission_type;
374 _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);
375 #endif
377 #endif
379 #endif
381 // MESSAGE MISSION_ITEM_INT UNPACKING
385 * @brief Get field target_system from mission_item_int message
387 * @return System ID
389 static inline uint8_t mavlink_msg_mission_item_int_get_target_system(const mavlink_message_t* msg)
391 return _MAV_RETURN_uint8_t(msg, 32);
395 * @brief Get field target_component from mission_item_int message
397 * @return Component ID
399 static inline uint8_t mavlink_msg_mission_item_int_get_target_component(const mavlink_message_t* msg)
401 return _MAV_RETURN_uint8_t(msg, 33);
405 * @brief Get field seq from mission_item_int message
407 * @return Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4).
409 static inline uint16_t mavlink_msg_mission_item_int_get_seq(const mavlink_message_t* msg)
411 return _MAV_RETURN_uint16_t(msg, 28);
415 * @brief Get field frame from mission_item_int message
417 * @return The coordinate system of the waypoint.
419 static inline uint8_t mavlink_msg_mission_item_int_get_frame(const mavlink_message_t* msg)
421 return _MAV_RETURN_uint8_t(msg, 34);
425 * @brief Get field command from mission_item_int message
427 * @return The scheduled action for the waypoint.
429 static inline uint16_t mavlink_msg_mission_item_int_get_command(const mavlink_message_t* msg)
431 return _MAV_RETURN_uint16_t(msg, 30);
435 * @brief Get field current from mission_item_int message
437 * @return false:0, true:1
439 static inline uint8_t mavlink_msg_mission_item_int_get_current(const mavlink_message_t* msg)
441 return _MAV_RETURN_uint8_t(msg, 35);
445 * @brief Get field autocontinue from mission_item_int message
447 * @return Autocontinue to next waypoint
449 static inline uint8_t mavlink_msg_mission_item_int_get_autocontinue(const mavlink_message_t* msg)
451 return _MAV_RETURN_uint8_t(msg, 36);
455 * @brief Get field param1 from mission_item_int message
457 * @return PARAM1, see MAV_CMD enum
459 static inline float mavlink_msg_mission_item_int_get_param1(const mavlink_message_t* msg)
461 return _MAV_RETURN_float(msg, 0);
465 * @brief Get field param2 from mission_item_int message
467 * @return PARAM2, see MAV_CMD enum
469 static inline float mavlink_msg_mission_item_int_get_param2(const mavlink_message_t* msg)
471 return _MAV_RETURN_float(msg, 4);
475 * @brief Get field param3 from mission_item_int message
477 * @return PARAM3, see MAV_CMD enum
479 static inline float mavlink_msg_mission_item_int_get_param3(const mavlink_message_t* msg)
481 return _MAV_RETURN_float(msg, 8);
485 * @brief Get field param4 from mission_item_int message
487 * @return PARAM4, see MAV_CMD enum
489 static inline float mavlink_msg_mission_item_int_get_param4(const mavlink_message_t* msg)
491 return _MAV_RETURN_float(msg, 12);
495 * @brief Get field x from mission_item_int message
497 * @return PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7
499 static inline int32_t mavlink_msg_mission_item_int_get_x(const mavlink_message_t* msg)
501 return _MAV_RETURN_int32_t(msg, 16);
505 * @brief Get field y from mission_item_int message
507 * @return PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7
509 static inline int32_t mavlink_msg_mission_item_int_get_y(const mavlink_message_t* msg)
511 return _MAV_RETURN_int32_t(msg, 20);
515 * @brief Get field z from mission_item_int message
517 * @return PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame.
519 static inline float mavlink_msg_mission_item_int_get_z(const mavlink_message_t* msg)
521 return _MAV_RETURN_float(msg, 24);
525 * @brief Get field mission_type from mission_item_int message
527 * @return Mission type.
529 static inline uint8_t mavlink_msg_mission_item_int_get_mission_type(const mavlink_message_t* msg)
531 return _MAV_RETURN_uint8_t(msg, 37);
535 * @brief Decode a mission_item_int message into a struct
537 * @param msg The message to decode
538 * @param mission_item_int C-struct to decode the message contents into
540 static inline void mavlink_msg_mission_item_int_decode(const mavlink_message_t* msg, mavlink_mission_item_int_t* mission_item_int)
542 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
543 mission_item_int->param1 = mavlink_msg_mission_item_int_get_param1(msg);
544 mission_item_int->param2 = mavlink_msg_mission_item_int_get_param2(msg);
545 mission_item_int->param3 = mavlink_msg_mission_item_int_get_param3(msg);
546 mission_item_int->param4 = mavlink_msg_mission_item_int_get_param4(msg);
547 mission_item_int->x = mavlink_msg_mission_item_int_get_x(msg);
548 mission_item_int->y = mavlink_msg_mission_item_int_get_y(msg);
549 mission_item_int->z = mavlink_msg_mission_item_int_get_z(msg);
550 mission_item_int->seq = mavlink_msg_mission_item_int_get_seq(msg);
551 mission_item_int->command = mavlink_msg_mission_item_int_get_command(msg);
552 mission_item_int->target_system = mavlink_msg_mission_item_int_get_target_system(msg);
553 mission_item_int->target_component = mavlink_msg_mission_item_int_get_target_component(msg);
554 mission_item_int->frame = mavlink_msg_mission_item_int_get_frame(msg);
555 mission_item_int->current = mavlink_msg_mission_item_int_get_current(msg);
556 mission_item_int->autocontinue = mavlink_msg_mission_item_int_get_autocontinue(msg);
557 mission_item_int->mission_type = mavlink_msg_mission_item_int_get_mission_type(msg);
558 #else
559 uint8_t len = msg->len < MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN? msg->len : MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN;
560 memset(mission_item_int, 0, MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN);
561 memcpy(mission_item_int, _MAV_PAYLOAD(msg), len);
562 #endif