source: flair-src/trunk/tools/Controller/Mavlink/src/include/common/mavlink_msg_safety_set_allowed_area.h @ 88

Last change on this file since 88 was 88, checked in by Sanahuja Guillaume, 5 years ago

m

File size: 18.0 KB
Line 
1// MESSAGE SAFETY_SET_ALLOWED_AREA PACKING
2
3#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA 54
4
5typedef struct MAVLINK_PACKED __mavlink_safety_set_allowed_area_t
6{
7 float p1x; /*< x position 1 / Latitude 1*/
8 float p1y; /*< y position 1 / Longitude 1*/
9 float p1z; /*< z position 1 / Altitude 1*/
10 float p2x; /*< x position 2 / Latitude 2*/
11 float p2y; /*< y position 2 / Longitude 2*/
12 float p2z; /*< z position 2 / Altitude 2*/
13 uint8_t target_system; /*< System ID*/
14 uint8_t target_component; /*< Component ID*/
15 uint8_t frame; /*< Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.*/
16} mavlink_safety_set_allowed_area_t;
17
18#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN 27
19#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN 27
20#define MAVLINK_MSG_ID_54_LEN 27
21#define MAVLINK_MSG_ID_54_MIN_LEN 27
22
23#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC 15
24#define MAVLINK_MSG_ID_54_CRC 15
25
26
27
28#if MAVLINK_COMMAND_24BIT
29#define MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA { \
30        54, \
31        "SAFETY_SET_ALLOWED_AREA", \
32        9, \
33        {  { "p1x", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_safety_set_allowed_area_t, p1x) }, \
34         { "p1y", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_safety_set_allowed_area_t, p1y) }, \
35         { "p1z", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_safety_set_allowed_area_t, p1z) }, \
36         { "p2x", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_safety_set_allowed_area_t, p2x) }, \
37         { "p2y", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_safety_set_allowed_area_t, p2y) }, \
38         { "p2z", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_safety_set_allowed_area_t, p2z) }, \
39         { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_safety_set_allowed_area_t, target_system) }, \
40         { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_safety_set_allowed_area_t, target_component) }, \
41         { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_safety_set_allowed_area_t, frame) }, \
42         } \
43}
44#else
45#define MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA { \
46        "SAFETY_SET_ALLOWED_AREA", \
47        9, \
48        {  { "p1x", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_safety_set_allowed_area_t, p1x) }, \
49         { "p1y", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_safety_set_allowed_area_t, p1y) }, \
50         { "p1z", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_safety_set_allowed_area_t, p1z) }, \
51         { "p2x", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_safety_set_allowed_area_t, p2x) }, \
52         { "p2y", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_safety_set_allowed_area_t, p2y) }, \
53         { "p2z", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_safety_set_allowed_area_t, p2z) }, \
54         { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_safety_set_allowed_area_t, target_system) }, \
55         { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_safety_set_allowed_area_t, target_component) }, \
56         { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_safety_set_allowed_area_t, frame) }, \
57         } \
58}
59#endif
60
61/**
62 * @brief Pack a safety_set_allowed_area message
63 * @param system_id ID of this system
64 * @param component_id ID of this component (e.g. 200 for IMU)
65 * @param msg The MAVLink message to compress the data into
66 *
67 * @param target_system System ID
68 * @param target_component Component ID
69 * @param frame Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
70 * @param p1x x position 1 / Latitude 1
71 * @param p1y y position 1 / Longitude 1
72 * @param p1z z position 1 / Altitude 1
73 * @param p2x x position 2 / Latitude 2
74 * @param p2y y position 2 / Longitude 2
75 * @param p2z z position 2 / Altitude 2
76 * @return length of the message in bytes (excluding serial stream start sign)
77 */
78static inline uint16_t mavlink_msg_safety_set_allowed_area_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
79                                                       uint8_t target_system, uint8_t target_component, uint8_t frame, float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
80{
81#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
82        char buf[MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN];
83        _mav_put_float(buf, 0, p1x);
84        _mav_put_float(buf, 4, p1y);
85        _mav_put_float(buf, 8, p1z);
86        _mav_put_float(buf, 12, p2x);
87        _mav_put_float(buf, 16, p2y);
88        _mav_put_float(buf, 20, p2z);
89        _mav_put_uint8_t(buf, 24, target_system);
90        _mav_put_uint8_t(buf, 25, target_component);
91        _mav_put_uint8_t(buf, 26, frame);
92
93        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
94#else
95        mavlink_safety_set_allowed_area_t packet;
96        packet.p1x = p1x;
97        packet.p1y = p1y;
98        packet.p1z = p1z;
99        packet.p2x = p2x;
100        packet.p2y = p2y;
101        packet.p2z = p2z;
102        packet.target_system = target_system;
103        packet.target_component = target_component;
104        packet.frame = frame;
105
106        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
107#endif
108
109        msg->msgid = MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA;
110    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
111}
112
113/**
114 * @brief Pack a safety_set_allowed_area message on a channel
115 * @param system_id ID of this system
116 * @param component_id ID of this component (e.g. 200 for IMU)
117 * @param chan The MAVLink channel this message will be sent over
118 * @param msg The MAVLink message to compress the data into
119 * @param target_system System ID
120 * @param target_component Component ID
121 * @param frame Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
122 * @param p1x x position 1 / Latitude 1
123 * @param p1y y position 1 / Longitude 1
124 * @param p1z z position 1 / Altitude 1
125 * @param p2x x position 2 / Latitude 2
126 * @param p2y y position 2 / Longitude 2
127 * @param p2z z position 2 / Altitude 2
128 * @return length of the message in bytes (excluding serial stream start sign)
129 */
130static inline uint16_t mavlink_msg_safety_set_allowed_area_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
131                                                           mavlink_message_t* msg,
132                                                           uint8_t target_system,uint8_t target_component,uint8_t frame,float p1x,float p1y,float p1z,float p2x,float p2y,float p2z)
133{
134#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
135        char buf[MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN];
136        _mav_put_float(buf, 0, p1x);
137        _mav_put_float(buf, 4, p1y);
138        _mav_put_float(buf, 8, p1z);
139        _mav_put_float(buf, 12, p2x);
140        _mav_put_float(buf, 16, p2y);
141        _mav_put_float(buf, 20, p2z);
142        _mav_put_uint8_t(buf, 24, target_system);
143        _mav_put_uint8_t(buf, 25, target_component);
144        _mav_put_uint8_t(buf, 26, frame);
145
146        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
147#else
148        mavlink_safety_set_allowed_area_t packet;
149        packet.p1x = p1x;
150        packet.p1y = p1y;
151        packet.p1z = p1z;
152        packet.p2x = p2x;
153        packet.p2y = p2y;
154        packet.p2z = p2z;
155        packet.target_system = target_system;
156        packet.target_component = target_component;
157        packet.frame = frame;
158
159        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
160#endif
161
162        msg->msgid = MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA;
163    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
164}
165
166/**
167 * @brief Encode a safety_set_allowed_area struct
168 *
169 * @param system_id ID of this system
170 * @param component_id ID of this component (e.g. 200 for IMU)
171 * @param msg The MAVLink message to compress the data into
172 * @param safety_set_allowed_area C-struct to read the message contents from
173 */
174static inline uint16_t mavlink_msg_safety_set_allowed_area_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_safety_set_allowed_area_t* safety_set_allowed_area)
175{
176        return mavlink_msg_safety_set_allowed_area_pack(system_id, component_id, msg, safety_set_allowed_area->target_system, safety_set_allowed_area->target_component, safety_set_allowed_area->frame, safety_set_allowed_area->p1x, safety_set_allowed_area->p1y, safety_set_allowed_area->p1z, safety_set_allowed_area->p2x, safety_set_allowed_area->p2y, safety_set_allowed_area->p2z);
177}
178
179/**
180 * @brief Encode a safety_set_allowed_area struct on a channel
181 *
182 * @param system_id ID of this system
183 * @param component_id ID of this component (e.g. 200 for IMU)
184 * @param chan The MAVLink channel this message will be sent over
185 * @param msg The MAVLink message to compress the data into
186 * @param safety_set_allowed_area C-struct to read the message contents from
187 */
188static inline uint16_t mavlink_msg_safety_set_allowed_area_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_safety_set_allowed_area_t* safety_set_allowed_area)
189{
190        return mavlink_msg_safety_set_allowed_area_pack_chan(system_id, component_id, chan, msg, safety_set_allowed_area->target_system, safety_set_allowed_area->target_component, safety_set_allowed_area->frame, safety_set_allowed_area->p1x, safety_set_allowed_area->p1y, safety_set_allowed_area->p1z, safety_set_allowed_area->p2x, safety_set_allowed_area->p2y, safety_set_allowed_area->p2z);
191}
192
193/**
194 * @brief Send a safety_set_allowed_area message
195 * @param chan MAVLink channel to send the message
196 *
197 * @param target_system System ID
198 * @param target_component Component ID
199 * @param frame Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
200 * @param p1x x position 1 / Latitude 1
201 * @param p1y y position 1 / Longitude 1
202 * @param p1z z position 1 / Altitude 1
203 * @param p2x x position 2 / Latitude 2
204 * @param p2y y position 2 / Longitude 2
205 * @param p2z z position 2 / Altitude 2
206 */
207#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
208
209static inline void mavlink_msg_safety_set_allowed_area_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t frame, float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
210{
211#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
212        char buf[MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN];
213        _mav_put_float(buf, 0, p1x);
214        _mav_put_float(buf, 4, p1y);
215        _mav_put_float(buf, 8, p1z);
216        _mav_put_float(buf, 12, p2x);
217        _mav_put_float(buf, 16, p2y);
218        _mav_put_float(buf, 20, p2z);
219        _mav_put_uint8_t(buf, 24, target_system);
220        _mav_put_uint8_t(buf, 25, target_component);
221        _mav_put_uint8_t(buf, 26, frame);
222
223    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, buf, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
224#else
225        mavlink_safety_set_allowed_area_t packet;
226        packet.p1x = p1x;
227        packet.p1y = p1y;
228        packet.p1z = p1z;
229        packet.p2x = p2x;
230        packet.p2y = p2y;
231        packet.p2z = p2z;
232        packet.target_system = target_system;
233        packet.target_component = target_component;
234        packet.frame = frame;
235
236    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, (const char *)&packet, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
237#endif
238}
239
240/**
241 * @brief Send a safety_set_allowed_area message
242 * @param chan MAVLink channel to send the message
243 * @param struct The MAVLink struct to serialize
244 */
245static inline void mavlink_msg_safety_set_allowed_area_send_struct(mavlink_channel_t chan, const mavlink_safety_set_allowed_area_t* safety_set_allowed_area)
246{
247#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
248    mavlink_msg_safety_set_allowed_area_send(chan, safety_set_allowed_area->target_system, safety_set_allowed_area->target_component, safety_set_allowed_area->frame, safety_set_allowed_area->p1x, safety_set_allowed_area->p1y, safety_set_allowed_area->p1z, safety_set_allowed_area->p2x, safety_set_allowed_area->p2y, safety_set_allowed_area->p2z);
249#else
250    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, (const char *)safety_set_allowed_area, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
251#endif
252}
253
254#if MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN <= MAVLINK_MAX_PAYLOAD_LEN
255/*
256  This varient of _send() can be used to save stack space by re-using
257  memory from the receive buffer.  The caller provides a
258  mavlink_message_t which is the size of a full mavlink message. This
259  is usually the receive buffer for the channel, and allows a reply to an
260  incoming message with minimum stack space usage.
261 */
262static inline void mavlink_msg_safety_set_allowed_area_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint8_t target_system, uint8_t target_component, uint8_t frame, float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
263{
264#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
265        char *buf = (char *)msgbuf;
266        _mav_put_float(buf, 0, p1x);
267        _mav_put_float(buf, 4, p1y);
268        _mav_put_float(buf, 8, p1z);
269        _mav_put_float(buf, 12, p2x);
270        _mav_put_float(buf, 16, p2y);
271        _mav_put_float(buf, 20, p2z);
272        _mav_put_uint8_t(buf, 24, target_system);
273        _mav_put_uint8_t(buf, 25, target_component);
274        _mav_put_uint8_t(buf, 26, frame);
275
276    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, buf, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
277#else
278        mavlink_safety_set_allowed_area_t *packet = (mavlink_safety_set_allowed_area_t *)msgbuf;
279        packet->p1x = p1x;
280        packet->p1y = p1y;
281        packet->p1z = p1z;
282        packet->p2x = p2x;
283        packet->p2y = p2y;
284        packet->p2z = p2z;
285        packet->target_system = target_system;
286        packet->target_component = target_component;
287        packet->frame = frame;
288
289    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, (const char *)packet, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
290#endif
291}
292#endif
293
294#endif
295
296// MESSAGE SAFETY_SET_ALLOWED_AREA UNPACKING
297
298
299/**
300 * @brief Get field target_system from safety_set_allowed_area message
301 *
302 * @return System ID
303 */
304static inline uint8_t mavlink_msg_safety_set_allowed_area_get_target_system(const mavlink_message_t* msg)
305{
306        return _MAV_RETURN_uint8_t(msg,  24);
307}
308
309/**
310 * @brief Get field target_component from safety_set_allowed_area message
311 *
312 * @return Component ID
313 */
314static inline uint8_t mavlink_msg_safety_set_allowed_area_get_target_component(const mavlink_message_t* msg)
315{
316        return _MAV_RETURN_uint8_t(msg,  25);
317}
318
319/**
320 * @brief Get field frame from safety_set_allowed_area message
321 *
322 * @return Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
323 */
324static inline uint8_t mavlink_msg_safety_set_allowed_area_get_frame(const mavlink_message_t* msg)
325{
326        return _MAV_RETURN_uint8_t(msg,  26);
327}
328
329/**
330 * @brief Get field p1x from safety_set_allowed_area message
331 *
332 * @return x position 1 / Latitude 1
333 */
334static inline float mavlink_msg_safety_set_allowed_area_get_p1x(const mavlink_message_t* msg)
335{
336        return _MAV_RETURN_float(msg,  0);
337}
338
339/**
340 * @brief Get field p1y from safety_set_allowed_area message
341 *
342 * @return y position 1 / Longitude 1
343 */
344static inline float mavlink_msg_safety_set_allowed_area_get_p1y(const mavlink_message_t* msg)
345{
346        return _MAV_RETURN_float(msg,  4);
347}
348
349/**
350 * @brief Get field p1z from safety_set_allowed_area message
351 *
352 * @return z position 1 / Altitude 1
353 */
354static inline float mavlink_msg_safety_set_allowed_area_get_p1z(const mavlink_message_t* msg)
355{
356        return _MAV_RETURN_float(msg,  8);
357}
358
359/**
360 * @brief Get field p2x from safety_set_allowed_area message
361 *
362 * @return x position 2 / Latitude 2
363 */
364static inline float mavlink_msg_safety_set_allowed_area_get_p2x(const mavlink_message_t* msg)
365{
366        return _MAV_RETURN_float(msg,  12);
367}
368
369/**
370 * @brief Get field p2y from safety_set_allowed_area message
371 *
372 * @return y position 2 / Longitude 2
373 */
374static inline float mavlink_msg_safety_set_allowed_area_get_p2y(const mavlink_message_t* msg)
375{
376        return _MAV_RETURN_float(msg,  16);
377}
378
379/**
380 * @brief Get field p2z from safety_set_allowed_area message
381 *
382 * @return z position 2 / Altitude 2
383 */
384static inline float mavlink_msg_safety_set_allowed_area_get_p2z(const mavlink_message_t* msg)
385{
386        return _MAV_RETURN_float(msg,  20);
387}
388
389/**
390 * @brief Decode a safety_set_allowed_area message into a struct
391 *
392 * @param msg The message to decode
393 * @param safety_set_allowed_area C-struct to decode the message contents into
394 */
395static inline void mavlink_msg_safety_set_allowed_area_decode(const mavlink_message_t* msg, mavlink_safety_set_allowed_area_t* safety_set_allowed_area)
396{
397#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
398        safety_set_allowed_area->p1x = mavlink_msg_safety_set_allowed_area_get_p1x(msg);
399        safety_set_allowed_area->p1y = mavlink_msg_safety_set_allowed_area_get_p1y(msg);
400        safety_set_allowed_area->p1z = mavlink_msg_safety_set_allowed_area_get_p1z(msg);
401        safety_set_allowed_area->p2x = mavlink_msg_safety_set_allowed_area_get_p2x(msg);
402        safety_set_allowed_area->p2y = mavlink_msg_safety_set_allowed_area_get_p2y(msg);
403        safety_set_allowed_area->p2z = mavlink_msg_safety_set_allowed_area_get_p2z(msg);
404        safety_set_allowed_area->target_system = mavlink_msg_safety_set_allowed_area_get_target_system(msg);
405        safety_set_allowed_area->target_component = mavlink_msg_safety_set_allowed_area_get_target_component(msg);
406        safety_set_allowed_area->frame = mavlink_msg_safety_set_allowed_area_get_frame(msg);
407#else
408        uint8_t len = msg->len < MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN? msg->len : MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN;
409        memset(safety_set_allowed_area, 0, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
410        memcpy(safety_set_allowed_area, _MAV_PAYLOAD(msg), len);
411#endif
412}
Note: See TracBrowser for help on using the repository browser.