3 #define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA 54
18 #define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN 27
19 #define MAVLINK_MSG_ID_54_LEN 27
21 #define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC 15
22 #define MAVLINK_MSG_ID_54_CRC 15
26 #define MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA { \
27 "SAFETY_SET_ALLOWED_AREA", \
29 { { "p1x", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_safety_set_allowed_area_t, p1x) }, \
30 { "p1y", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_safety_set_allowed_area_t, p1y) }, \
31 { "p1z", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_safety_set_allowed_area_t, p1z) }, \
32 { "p2x", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_safety_set_allowed_area_t, p2x) }, \
33 { "p2y", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_safety_set_allowed_area_t, p2y) }, \
34 { "p2z", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_safety_set_allowed_area_t, p2z) }, \
35 { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_safety_set_allowed_area_t, target_system) }, \
36 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_safety_set_allowed_area_t, target_component) }, \
37 { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_safety_set_allowed_area_t, frame) }, \
59 static inline uint16_t mavlink_msg_safety_set_allowed_area_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
60 uint8_t target_system, uint8_t target_component, uint8_t frame,
float p1x,
float p1y,
float p1z,
float p2x,
float p2y,
float p2z)
62 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
115 static inline uint16_t mavlink_msg_safety_set_allowed_area_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
116 mavlink_message_t* msg,
117 uint8_t target_system,uint8_t target_component,uint8_t frame,
float p1x,
float p1y,
float p1z,
float p2x,
float p2y,
float p2z)
119 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
142 packet.
frame = frame;
148 #if MAVLINK_CRC_EXTRA
163 static 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)
165 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 static 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)
179 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);
196 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
198 static 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)
200 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
212 #if MAVLINK_CRC_EXTRA
227 packet.
frame = frame;
229 #if MAVLINK_CRC_EXTRA
237 #if MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN <= MAVLINK_MAX_PAYLOAD_LEN
245 static 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)
247 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
248 char *buf = (
char *)msgbuf;
259 #if MAVLINK_CRC_EXTRA
274 packet->
frame = frame;
276 #if MAVLINK_CRC_EXTRA
295 static inline uint8_t mavlink_msg_safety_set_allowed_area_get_target_system(
const mavlink_message_t* msg)
305 static inline uint8_t mavlink_msg_safety_set_allowed_area_get_target_component(
const mavlink_message_t* msg)
315 static inline uint8_t mavlink_msg_safety_set_allowed_area_get_frame(
const mavlink_message_t* msg)
325 static inline float mavlink_msg_safety_set_allowed_area_get_p1x(
const mavlink_message_t* msg)
327 return _MAV_RETURN_float(msg, 0);
335 static inline float mavlink_msg_safety_set_allowed_area_get_p1y(
const mavlink_message_t* msg)
337 return _MAV_RETURN_float(msg, 4);
345 static inline float mavlink_msg_safety_set_allowed_area_get_p1z(
const mavlink_message_t* msg)
347 return _MAV_RETURN_float(msg, 8);
355 static inline float mavlink_msg_safety_set_allowed_area_get_p2x(
const mavlink_message_t* msg)
357 return _MAV_RETURN_float(msg, 12);
365 static inline float mavlink_msg_safety_set_allowed_area_get_p2y(
const mavlink_message_t* msg)
367 return _MAV_RETURN_float(msg, 16);
375 static inline float mavlink_msg_safety_set_allowed_area_get_p2z(
const mavlink_message_t* msg)
377 return _MAV_RETURN_float(msg, 20);
388 #if MAVLINK_NEED_BYTE_SWAP
389 safety_set_allowed_area->
p1x = mavlink_msg_safety_set_allowed_area_get_p1x(msg);
390 safety_set_allowed_area->
p1y = mavlink_msg_safety_set_allowed_area_get_p1y(msg);
391 safety_set_allowed_area->
p1z = mavlink_msg_safety_set_allowed_area_get_p1z(msg);
392 safety_set_allowed_area->
p2x = mavlink_msg_safety_set_allowed_area_get_p2x(msg);
393 safety_set_allowed_area->
p2y = mavlink_msg_safety_set_allowed_area_get_p2y(msg);
394 safety_set_allowed_area->
p2z = mavlink_msg_safety_set_allowed_area_get_p2z(msg);
395 safety_set_allowed_area->
target_system = mavlink_msg_safety_set_allowed_area_get_target_system(msg);
396 safety_set_allowed_area->
target_component = mavlink_msg_safety_set_allowed_area_get_target_component(msg);
397 safety_set_allowed_area->
frame = mavlink_msg_safety_set_allowed_area_get_frame(msg);
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
struct __mavlink_safety_set_allowed_area_t mavlink_safety_set_allowed_area_t
float p1y
y position 1 / Longitude 1
Definition: mavlink_msg_safety_set_allowed_area.h:8
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
float p1z
z position 1 / Altitude 1
Definition: mavlink_msg_safety_set_allowed_area.h:9
Definition: mavlink_msg_safety_set_allowed_area.h:5
MAVLINK_HELPER uint16_t mavlink_finalize_message(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t length)
Finalize a MAVLink message with MAVLINK_COMM_0 as default channel.
Definition: mavlink_helpers.h:105
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
mavlink_channel_t
Definition: mavlink_types.h:178
#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA
Definition: mavlink_msg_safety_set_allowed_area.h:3
float p2y
y position 2 / Longitude 2
Definition: mavlink_msg_safety_set_allowed_area.h:11
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC
Definition: mavlink_msg_safety_set_allowed_area.h:21
float p1x
x position 1 / Latitude 1
Definition: mavlink_msg_safety_set_allowed_area.h:7
uint8_t target_system
System ID.
Definition: mavlink_msg_safety_set_allowed_area.h:13
uint8_t target_component
Component ID.
Definition: mavlink_msg_safety_set_allowed_area.h:14
float p2z
z position 2 / Altitude 2
Definition: mavlink_msg_safety_set_allowed_area.h:12
float p2x
x position 2 / Latitude 2
Definition: mavlink_msg_safety_set_allowed_area.h:10
MAVLINK_HELPER uint16_t mavlink_finalize_message_chan(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t chan, uint8_t length)
Finalize a MAVLink message with channel assignment.
Definition: mavlink_helpers.h:71
#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN
Definition: mavlink_msg_safety_set_allowed_area.h:18
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.
Definition: mavlink_msg_safety_set_allowed_area.h:15