Move telemetry displayport init and cms device registering
[betaflight.git] / lib / main / MAVLink / common / mavlink_msg_mission_clear_all.h
blob120986873fb0d6db16d7d97d2183ca1294287087
1 // MESSAGE MISSION_CLEAR_ALL PACKING
3 #define MAVLINK_MSG_ID_MISSION_CLEAR_ALL 45
5 typedef struct __mavlink_mission_clear_all_t
7 uint8_t target_system; ///< System ID
8 uint8_t target_component; ///< Component ID
9 } mavlink_mission_clear_all_t;
11 #define MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN 2
12 #define MAVLINK_MSG_ID_45_LEN 2
14 #define MAVLINK_MSG_ID_MISSION_CLEAR_ALL_CRC 232
15 #define MAVLINK_MSG_ID_45_CRC 232
19 #define MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL { \
20 "MISSION_CLEAR_ALL", \
21 2, \
22 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_mission_clear_all_t, target_system) }, \
23 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_mission_clear_all_t, target_component) }, \
24 } \
28 /**
29 * @brief Pack a mission_clear_all message
30 * @param system_id ID of this system
31 * @param component_id ID of this component (e.g. 200 for IMU)
32 * @param msg The MAVLink message to compress the data into
34 * @param target_system System ID
35 * @param target_component Component ID
36 * @return length of the message in bytes (excluding serial stream start sign)
38 static inline uint16_t mavlink_msg_mission_clear_all_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
39 uint8_t target_system, uint8_t target_component)
41 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
42 char buf[MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN];
43 _mav_put_uint8_t(buf, 0, target_system);
44 _mav_put_uint8_t(buf, 1, target_component);
46 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
47 #else
48 mavlink_mission_clear_all_t packet;
49 packet.target_system = target_system;
50 packet.target_component = target_component;
52 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
53 #endif
55 msg->msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
56 #if MAVLINK_CRC_EXTRA
57 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_CRC);
58 #else
59 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
60 #endif
63 /**
64 * @brief Pack a mission_clear_all message on a channel
65 * @param system_id ID of this system
66 * @param component_id ID of this component (e.g. 200 for IMU)
67 * @param chan The MAVLink channel this message will be sent over
68 * @param msg The MAVLink message to compress the data into
69 * @param target_system System ID
70 * @param target_component Component ID
71 * @return length of the message in bytes (excluding serial stream start sign)
73 static inline uint16_t mavlink_msg_mission_clear_all_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
74 mavlink_message_t* msg,
75 uint8_t target_system,uint8_t target_component)
77 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
78 char buf[MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN];
79 _mav_put_uint8_t(buf, 0, target_system);
80 _mav_put_uint8_t(buf, 1, target_component);
82 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
83 #else
84 mavlink_mission_clear_all_t packet;
85 packet.target_system = target_system;
86 packet.target_component = target_component;
88 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
89 #endif
91 msg->msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
92 #if MAVLINK_CRC_EXTRA
93 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_CRC);
94 #else
95 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
96 #endif
99 /**
100 * @brief Encode a mission_clear_all struct
102 * @param system_id ID of this system
103 * @param component_id ID of this component (e.g. 200 for IMU)
104 * @param msg The MAVLink message to compress the data into
105 * @param mission_clear_all C-struct to read the message contents from
107 static inline uint16_t mavlink_msg_mission_clear_all_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_clear_all_t* mission_clear_all)
109 return mavlink_msg_mission_clear_all_pack(system_id, component_id, msg, mission_clear_all->target_system, mission_clear_all->target_component);
113 * @brief Encode a mission_clear_all struct 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 mission_clear_all C-struct to read the message contents from
121 static inline uint16_t mavlink_msg_mission_clear_all_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_clear_all_t* mission_clear_all)
123 return mavlink_msg_mission_clear_all_pack_chan(system_id, component_id, chan, msg, mission_clear_all->target_system, mission_clear_all->target_component);
127 * @brief Send a mission_clear_all message
128 * @param chan MAVLink channel to send the message
130 * @param target_system System ID
131 * @param target_component Component ID
133 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
135 static inline void mavlink_msg_mission_clear_all_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
137 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
138 char buf[MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN];
139 _mav_put_uint8_t(buf, 0, target_system);
140 _mav_put_uint8_t(buf, 1, target_component);
142 #if MAVLINK_CRC_EXTRA
143 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, buf, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_CRC);
144 #else
145 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, buf, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
146 #endif
147 #else
148 mavlink_mission_clear_all_t packet;
149 packet.target_system = target_system;
150 packet.target_component = target_component;
152 #if MAVLINK_CRC_EXTRA
153 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, (const char *)&packet, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_CRC);
154 #else
155 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, (const char *)&packet, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
156 #endif
157 #endif
160 #if MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN <= MAVLINK_MAX_PAYLOAD_LEN
162 This varient of _send() can be used to save stack space by re-using
163 memory from the receive buffer. The caller provides a
164 mavlink_message_t which is the size of a full mavlink message. This
165 is usually the receive buffer for the channel, and allows a reply to an
166 incoming message with minimum stack space usage.
168 static inline void mavlink_msg_mission_clear_all_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
170 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
171 char *buf = (char *)msgbuf;
172 _mav_put_uint8_t(buf, 0, target_system);
173 _mav_put_uint8_t(buf, 1, target_component);
175 #if MAVLINK_CRC_EXTRA
176 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, buf, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_CRC);
177 #else
178 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, buf, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
179 #endif
180 #else
181 mavlink_mission_clear_all_t *packet = (mavlink_mission_clear_all_t *)msgbuf;
182 packet->target_system = target_system;
183 packet->target_component = target_component;
185 #if MAVLINK_CRC_EXTRA
186 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, (const char *)packet, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_CRC);
187 #else
188 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, (const char *)packet, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
189 #endif
190 #endif
192 #endif
194 #endif
196 // MESSAGE MISSION_CLEAR_ALL UNPACKING
200 * @brief Get field target_system from mission_clear_all message
202 * @return System ID
204 static inline uint8_t mavlink_msg_mission_clear_all_get_target_system(const mavlink_message_t* msg)
206 return _MAV_RETURN_uint8_t(msg, 0);
210 * @brief Get field target_component from mission_clear_all message
212 * @return Component ID
214 static inline uint8_t mavlink_msg_mission_clear_all_get_target_component(const mavlink_message_t* msg)
216 return _MAV_RETURN_uint8_t(msg, 1);
220 * @brief Decode a mission_clear_all message into a struct
222 * @param msg The message to decode
223 * @param mission_clear_all C-struct to decode the message contents into
225 static inline void mavlink_msg_mission_clear_all_decode(const mavlink_message_t* msg, mavlink_mission_clear_all_t* mission_clear_all)
227 #if MAVLINK_NEED_BYTE_SWAP
228 mission_clear_all->target_system = mavlink_msg_mission_clear_all_get_target_system(msg);
229 mission_clear_all->target_component = mavlink_msg_mission_clear_all_get_target_component(msg);
230 #else
231 memcpy(mission_clear_all, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
232 #endif