Arduino Mavlink
Loading...
Searching...
No Matches
mavlink_msg_rc_channels_override.h
Go to the documentation of this file.
1#pragma once
2// MESSAGE RC_CHANNELS_OVERRIDE PACKING
3
4#define MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE 70
5
6
8 uint16_t chan1_raw; /*< [us] RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.*/
9 uint16_t chan2_raw; /*< [us] RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.*/
10 uint16_t chan3_raw; /*< [us] RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.*/
11 uint16_t chan4_raw; /*< [us] RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.*/
12 uint16_t chan5_raw; /*< [us] RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.*/
13 uint16_t chan6_raw; /*< [us] RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.*/
14 uint16_t chan7_raw; /*< [us] RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.*/
15 uint16_t chan8_raw; /*< [us] RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.*/
16 uint8_t target_system; /*< System ID*/
17 uint8_t target_component; /*< Component ID*/
18 uint16_t chan9_raw; /*< [us] RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.*/
19 uint16_t chan10_raw; /*< [us] RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.*/
20 uint16_t chan11_raw; /*< [us] RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.*/
21 uint16_t chan12_raw; /*< [us] RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.*/
22 uint16_t chan13_raw; /*< [us] RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.*/
23 uint16_t chan14_raw; /*< [us] RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.*/
24 uint16_t chan15_raw; /*< [us] RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.*/
25 uint16_t chan16_raw; /*< [us] RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.*/
26 uint16_t chan17_raw; /*< [us] RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.*/
27 uint16_t chan18_raw; /*< [us] RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.*/
28} mavlink_rc_channels_override_t;
29
30#define MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN 38
31#define MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_MIN_LEN 18
32#define MAVLINK_MSG_ID_70_LEN 38
33#define MAVLINK_MSG_ID_70_MIN_LEN 18
34
35#define MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_CRC 124
36#define MAVLINK_MSG_ID_70_CRC 124
37
38
39
40#if MAVLINK_COMMAND_24BIT
41#define MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE {
42 70,
43 "RC_CHANNELS_OVERRIDE",
44 20,
45 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_rc_channels_override_t, target_system) },
46 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_rc_channels_override_t, target_component) },
47 { "chan1_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_rc_channels_override_t, chan1_raw) },
48 { "chan2_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_rc_channels_override_t, chan2_raw) },
49 { "chan3_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_rc_channels_override_t, chan3_raw) },
50 { "chan4_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_rc_channels_override_t, chan4_raw) },
51 { "chan5_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_rc_channels_override_t, chan5_raw) },
52 { "chan6_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_rc_channels_override_t, chan6_raw) },
53 { "chan7_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_rc_channels_override_t, chan7_raw) },
54 { "chan8_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_rc_channels_override_t, chan8_raw) },
55 { "chan9_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_rc_channels_override_t, chan9_raw) },
56 { "chan10_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_rc_channels_override_t, chan10_raw) },
57 { "chan11_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_rc_channels_override_t, chan11_raw) },
58 { "chan12_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_rc_channels_override_t, chan12_raw) },
59 { "chan13_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_rc_channels_override_t, chan13_raw) },
60 { "chan14_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_rc_channels_override_t, chan14_raw) },
61 { "chan15_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_rc_channels_override_t, chan15_raw) },
62 { "chan16_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_rc_channels_override_t, chan16_raw) },
63 { "chan17_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 34, offsetof(mavlink_rc_channels_override_t, chan17_raw) },
64 { "chan18_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_rc_channels_override_t, chan18_raw) },
65 } \
66}
67#else
68#define MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE {
69 "RC_CHANNELS_OVERRIDE",
70 20,
71 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_rc_channels_override_t, target_system) },
72 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_rc_channels_override_t, target_component) },
73 { "chan1_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_rc_channels_override_t, chan1_raw) },
74 { "chan2_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_rc_channels_override_t, chan2_raw) },
75 { "chan3_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_rc_channels_override_t, chan3_raw) },
76 { "chan4_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_rc_channels_override_t, chan4_raw) },
77 { "chan5_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_rc_channels_override_t, chan5_raw) },
78 { "chan6_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_rc_channels_override_t, chan6_raw) },
79 { "chan7_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_rc_channels_override_t, chan7_raw) },
80 { "chan8_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_rc_channels_override_t, chan8_raw) },
81 { "chan9_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_rc_channels_override_t, chan9_raw) },
82 { "chan10_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_rc_channels_override_t, chan10_raw) },
83 { "chan11_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_rc_channels_override_t, chan11_raw) },
84 { "chan12_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_rc_channels_override_t, chan12_raw) },
85 { "chan13_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_rc_channels_override_t, chan13_raw) },
86 { "chan14_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_rc_channels_override_t, chan14_raw) },
87 { "chan15_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_rc_channels_override_t, chan15_raw) },
88 { "chan16_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_rc_channels_override_t, chan16_raw) },
89 { "chan17_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 34, offsetof(mavlink_rc_channels_override_t, chan17_raw) },
90 { "chan18_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_rc_channels_override_t, chan18_raw) },
91 } \
92}
93#endif
94
95/**
96 * @brief Pack a rc_channels_override message
97 * @param system_id ID of this system
98 * @param component_id ID of this component (e.g. 200 for IMU)
99 * @param msg The MAVLink message to compress the data into
100 *
101 * @param target_system System ID
102 * @param target_component Component ID
103 * @param chan1_raw [us] RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
104 * @param chan2_raw [us] RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
105 * @param chan3_raw [us] RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
106 * @param chan4_raw [us] RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
107 * @param chan5_raw [us] RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
108 * @param chan6_raw [us] RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
109 * @param chan7_raw [us] RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
110 * @param chan8_raw [us] RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
111 * @param chan9_raw [us] RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
112 * @param chan10_raw [us] RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
113 * @param chan11_raw [us] RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
114 * @param chan12_raw [us] RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
115 * @param chan13_raw [us] RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
116 * @param chan14_raw [us] RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
117 * @param chan15_raw [us] RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
118 * @param chan16_raw [us] RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
119 * @param chan17_raw [us] RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
120 * @param chan18_raw [us] RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
121 * @return length of the message in bytes (excluding serial stream start sign)
122 */
123static inline uint16_t mavlink_msg_rc_channels_override_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
124 uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint16_t chan9_raw, uint16_t chan10_raw, uint16_t chan11_raw, uint16_t chan12_raw, uint16_t chan13_raw, uint16_t chan14_raw, uint16_t chan15_raw, uint16_t chan16_raw, uint16_t chan17_raw, uint16_t chan18_raw)
125{
126#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
128 _mav_put_uint16_t(buf, 0, chan1_raw);
129 _mav_put_uint16_t(buf, 2, chan2_raw);
130 _mav_put_uint16_t(buf, 4, chan3_raw);
131 _mav_put_uint16_t(buf, 6, chan4_raw);
132 _mav_put_uint16_t(buf, 8, chan5_raw);
133 _mav_put_uint16_t(buf, 10, chan6_raw);
134 _mav_put_uint16_t(buf, 12, chan7_raw);
135 _mav_put_uint16_t(buf, 14, chan8_raw);
136 _mav_put_uint8_t(buf, 16, target_system);
137 _mav_put_uint8_t(buf, 17, target_component);
138 _mav_put_uint16_t(buf, 18, chan9_raw);
139 _mav_put_uint16_t(buf, 20, chan10_raw);
140 _mav_put_uint16_t(buf, 22, chan11_raw);
141 _mav_put_uint16_t(buf, 24, chan12_raw);
142 _mav_put_uint16_t(buf, 26, chan13_raw);
143 _mav_put_uint16_t(buf, 28, chan14_raw);
144 _mav_put_uint16_t(buf, 30, chan15_raw);
145 _mav_put_uint16_t(buf, 32, chan16_raw);
146 _mav_put_uint16_t(buf, 34, chan17_raw);
147 _mav_put_uint16_t(buf, 36, chan18_raw);
148
149 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
150#else
151 mavlink_rc_channels_override_t packet;
152 packet.chan1_raw = chan1_raw;
153 packet.chan2_raw = chan2_raw;
154 packet.chan3_raw = chan3_raw;
155 packet.chan4_raw = chan4_raw;
156 packet.chan5_raw = chan5_raw;
157 packet.chan6_raw = chan6_raw;
158 packet.chan7_raw = chan7_raw;
159 packet.chan8_raw = chan8_raw;
160 packet.target_system = target_system;
161 packet.target_component = target_component;
162 packet.chan9_raw = chan9_raw;
163 packet.chan10_raw = chan10_raw;
164 packet.chan11_raw = chan11_raw;
165 packet.chan12_raw = chan12_raw;
166 packet.chan13_raw = chan13_raw;
167 packet.chan14_raw = chan14_raw;
168 packet.chan15_raw = chan15_raw;
169 packet.chan16_raw = chan16_raw;
170 packet.chan17_raw = chan17_raw;
171 packet.chan18_raw = chan18_raw;
172
173 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
174#endif
175
178}
179
180/**
181 * @brief Pack a rc_channels_override message
182 * @param system_id ID of this system
183 * @param component_id ID of this component (e.g. 200 for IMU)
184 * @param status MAVLink status structure
185 * @param msg The MAVLink message to compress the data into
186 *
187 * @param target_system System ID
188 * @param target_component Component ID
189 * @param chan1_raw [us] RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
190 * @param chan2_raw [us] RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
191 * @param chan3_raw [us] RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
192 * @param chan4_raw [us] RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
193 * @param chan5_raw [us] RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
194 * @param chan6_raw [us] RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
195 * @param chan7_raw [us] RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
196 * @param chan8_raw [us] RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
197 * @param chan9_raw [us] RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
198 * @param chan10_raw [us] RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
199 * @param chan11_raw [us] RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
200 * @param chan12_raw [us] RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
201 * @param chan13_raw [us] RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
202 * @param chan14_raw [us] RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
203 * @param chan15_raw [us] RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
204 * @param chan16_raw [us] RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
205 * @param chan17_raw [us] RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
206 * @param chan18_raw [us] RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
207 * @return length of the message in bytes (excluding serial stream start sign)
208 */
209static inline uint16_t mavlink_msg_rc_channels_override_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
210 uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint16_t chan9_raw, uint16_t chan10_raw, uint16_t chan11_raw, uint16_t chan12_raw, uint16_t chan13_raw, uint16_t chan14_raw, uint16_t chan15_raw, uint16_t chan16_raw, uint16_t chan17_raw, uint16_t chan18_raw)
211{
212#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
214 _mav_put_uint16_t(buf, 0, chan1_raw);
215 _mav_put_uint16_t(buf, 2, chan2_raw);
216 _mav_put_uint16_t(buf, 4, chan3_raw);
217 _mav_put_uint16_t(buf, 6, chan4_raw);
218 _mav_put_uint16_t(buf, 8, chan5_raw);
219 _mav_put_uint16_t(buf, 10, chan6_raw);
220 _mav_put_uint16_t(buf, 12, chan7_raw);
221 _mav_put_uint16_t(buf, 14, chan8_raw);
222 _mav_put_uint8_t(buf, 16, target_system);
223 _mav_put_uint8_t(buf, 17, target_component);
224 _mav_put_uint16_t(buf, 18, chan9_raw);
225 _mav_put_uint16_t(buf, 20, chan10_raw);
226 _mav_put_uint16_t(buf, 22, chan11_raw);
227 _mav_put_uint16_t(buf, 24, chan12_raw);
228 _mav_put_uint16_t(buf, 26, chan13_raw);
229 _mav_put_uint16_t(buf, 28, chan14_raw);
230 _mav_put_uint16_t(buf, 30, chan15_raw);
231 _mav_put_uint16_t(buf, 32, chan16_raw);
232 _mav_put_uint16_t(buf, 34, chan17_raw);
233 _mav_put_uint16_t(buf, 36, chan18_raw);
234
235 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
236#else
237 mavlink_rc_channels_override_t packet;
238 packet.chan1_raw = chan1_raw;
239 packet.chan2_raw = chan2_raw;
240 packet.chan3_raw = chan3_raw;
241 packet.chan4_raw = chan4_raw;
242 packet.chan5_raw = chan5_raw;
243 packet.chan6_raw = chan6_raw;
244 packet.chan7_raw = chan7_raw;
245 packet.chan8_raw = chan8_raw;
246 packet.target_system = target_system;
247 packet.target_component = target_component;
248 packet.chan9_raw = chan9_raw;
249 packet.chan10_raw = chan10_raw;
250 packet.chan11_raw = chan11_raw;
251 packet.chan12_raw = chan12_raw;
252 packet.chan13_raw = chan13_raw;
253 packet.chan14_raw = chan14_raw;
254 packet.chan15_raw = chan15_raw;
255 packet.chan16_raw = chan16_raw;
256 packet.chan17_raw = chan17_raw;
257 packet.chan18_raw = chan18_raw;
258
259 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
260#endif
261
263#if MAVLINK_CRC_EXTRA
264 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_MIN_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_CRC);
265#else
266 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_MIN_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
267#endif
268}
269
270/**
271 * @brief Pack a rc_channels_override message on a channel
272 * @param system_id ID of this system
273 * @param component_id ID of this component (e.g. 200 for IMU)
274 * @param chan The MAVLink channel this message will be sent over
275 * @param msg The MAVLink message to compress the data into
276 * @param target_system System ID
277 * @param target_component Component ID
278 * @param chan1_raw [us] RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
279 * @param chan2_raw [us] RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
280 * @param chan3_raw [us] RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
281 * @param chan4_raw [us] RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
282 * @param chan5_raw [us] RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
283 * @param chan6_raw [us] RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
284 * @param chan7_raw [us] RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
285 * @param chan8_raw [us] RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
286 * @param chan9_raw [us] RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
287 * @param chan10_raw [us] RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
288 * @param chan11_raw [us] RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
289 * @param chan12_raw [us] RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
290 * @param chan13_raw [us] RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
291 * @param chan14_raw [us] RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
292 * @param chan15_raw [us] RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
293 * @param chan16_raw [us] RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
294 * @param chan17_raw [us] RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
295 * @param chan18_raw [us] RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
296 * @return length of the message in bytes (excluding serial stream start sign)
297 */
298static inline uint16_t mavlink_msg_rc_channels_override_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
299 mavlink_message_t* msg,
300 uint8_t target_system,uint8_t target_component,uint16_t chan1_raw,uint16_t chan2_raw,uint16_t chan3_raw,uint16_t chan4_raw,uint16_t chan5_raw,uint16_t chan6_raw,uint16_t chan7_raw,uint16_t chan8_raw,uint16_t chan9_raw,uint16_t chan10_raw,uint16_t chan11_raw,uint16_t chan12_raw,uint16_t chan13_raw,uint16_t chan14_raw,uint16_t chan15_raw,uint16_t chan16_raw,uint16_t chan17_raw,uint16_t chan18_raw)
301{
302#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
304 _mav_put_uint16_t(buf, 0, chan1_raw);
305 _mav_put_uint16_t(buf, 2, chan2_raw);
306 _mav_put_uint16_t(buf, 4, chan3_raw);
307 _mav_put_uint16_t(buf, 6, chan4_raw);
308 _mav_put_uint16_t(buf, 8, chan5_raw);
309 _mav_put_uint16_t(buf, 10, chan6_raw);
310 _mav_put_uint16_t(buf, 12, chan7_raw);
311 _mav_put_uint16_t(buf, 14, chan8_raw);
312 _mav_put_uint8_t(buf, 16, target_system);
313 _mav_put_uint8_t(buf, 17, target_component);
314 _mav_put_uint16_t(buf, 18, chan9_raw);
315 _mav_put_uint16_t(buf, 20, chan10_raw);
316 _mav_put_uint16_t(buf, 22, chan11_raw);
317 _mav_put_uint16_t(buf, 24, chan12_raw);
318 _mav_put_uint16_t(buf, 26, chan13_raw);
319 _mav_put_uint16_t(buf, 28, chan14_raw);
320 _mav_put_uint16_t(buf, 30, chan15_raw);
321 _mav_put_uint16_t(buf, 32, chan16_raw);
322 _mav_put_uint16_t(buf, 34, chan17_raw);
323 _mav_put_uint16_t(buf, 36, chan18_raw);
324
325 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
326#else
327 mavlink_rc_channels_override_t packet;
328 packet.chan1_raw = chan1_raw;
329 packet.chan2_raw = chan2_raw;
330 packet.chan3_raw = chan3_raw;
331 packet.chan4_raw = chan4_raw;
332 packet.chan5_raw = chan5_raw;
333 packet.chan6_raw = chan6_raw;
334 packet.chan7_raw = chan7_raw;
335 packet.chan8_raw = chan8_raw;
336 packet.target_system = target_system;
337 packet.target_component = target_component;
338 packet.chan9_raw = chan9_raw;
339 packet.chan10_raw = chan10_raw;
340 packet.chan11_raw = chan11_raw;
341 packet.chan12_raw = chan12_raw;
342 packet.chan13_raw = chan13_raw;
343 packet.chan14_raw = chan14_raw;
344 packet.chan15_raw = chan15_raw;
345 packet.chan16_raw = chan16_raw;
346 packet.chan17_raw = chan17_raw;
347 packet.chan18_raw = chan18_raw;
348
349 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
350#endif
351
353 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_MIN_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_CRC);
354}
355
356/**
357 * @brief Encode a rc_channels_override struct
358 *
359 * @param system_id ID of this system
360 * @param component_id ID of this component (e.g. 200 for IMU)
361 * @param msg The MAVLink message to compress the data into
362 * @param rc_channels_override C-struct to read the message contents from
363 */
364static inline uint16_t mavlink_msg_rc_channels_override_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_rc_channels_override_t* rc_channels_override)
365{
366 return mavlink_msg_rc_channels_override_pack(system_id, component_id, msg, rc_channels_override->target_system, rc_channels_override->target_component, rc_channels_override->chan1_raw, rc_channels_override->chan2_raw, rc_channels_override->chan3_raw, rc_channels_override->chan4_raw, rc_channels_override->chan5_raw, rc_channels_override->chan6_raw, rc_channels_override->chan7_raw, rc_channels_override->chan8_raw, rc_channels_override->chan9_raw, rc_channels_override->chan10_raw, rc_channels_override->chan11_raw, rc_channels_override->chan12_raw, rc_channels_override->chan13_raw, rc_channels_override->chan14_raw, rc_channels_override->chan15_raw, rc_channels_override->chan16_raw, rc_channels_override->chan17_raw, rc_channels_override->chan18_raw);
367}
368
369/**
370 * @brief Encode a rc_channels_override struct on a channel
371 *
372 * @param system_id ID of this system
373 * @param component_id ID of this component (e.g. 200 for IMU)
374 * @param chan The MAVLink channel this message will be sent over
375 * @param msg The MAVLink message to compress the data into
376 * @param rc_channels_override C-struct to read the message contents from
377 */
378static inline uint16_t mavlink_msg_rc_channels_override_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_rc_channels_override_t* rc_channels_override)
379{
380 return mavlink_msg_rc_channels_override_pack_chan(system_id, component_id, chan, msg, rc_channels_override->target_system, rc_channels_override->target_component, rc_channels_override->chan1_raw, rc_channels_override->chan2_raw, rc_channels_override->chan3_raw, rc_channels_override->chan4_raw, rc_channels_override->chan5_raw, rc_channels_override->chan6_raw, rc_channels_override->chan7_raw, rc_channels_override->chan8_raw, rc_channels_override->chan9_raw, rc_channels_override->chan10_raw, rc_channels_override->chan11_raw, rc_channels_override->chan12_raw, rc_channels_override->chan13_raw, rc_channels_override->chan14_raw, rc_channels_override->chan15_raw, rc_channels_override->chan16_raw, rc_channels_override->chan17_raw, rc_channels_override->chan18_raw);
381}
382
383/**
384 * @brief Encode a rc_channels_override struct with provided status structure
385 *
386 * @param system_id ID of this system
387 * @param component_id ID of this component (e.g. 200 for IMU)
388 * @param status MAVLink status structure
389 * @param msg The MAVLink message to compress the data into
390 * @param rc_channels_override C-struct to read the message contents from
391 */
392static inline uint16_t mavlink_msg_rc_channels_override_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_rc_channels_override_t* rc_channels_override)
393{
394 return mavlink_msg_rc_channels_override_pack_status(system_id, component_id, _status, msg, rc_channels_override->target_system, rc_channels_override->target_component, rc_channels_override->chan1_raw, rc_channels_override->chan2_raw, rc_channels_override->chan3_raw, rc_channels_override->chan4_raw, rc_channels_override->chan5_raw, rc_channels_override->chan6_raw, rc_channels_override->chan7_raw, rc_channels_override->chan8_raw, rc_channels_override->chan9_raw, rc_channels_override->chan10_raw, rc_channels_override->chan11_raw, rc_channels_override->chan12_raw, rc_channels_override->chan13_raw, rc_channels_override->chan14_raw, rc_channels_override->chan15_raw, rc_channels_override->chan16_raw, rc_channels_override->chan17_raw, rc_channels_override->chan18_raw);
395}
396
397/**
398 * @brief Send a rc_channels_override message
399 * @param chan MAVLink channel to send the message
400 *
401 * @param target_system System ID
402 * @param target_component Component ID
403 * @param chan1_raw [us] RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
404 * @param chan2_raw [us] RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
405 * @param chan3_raw [us] RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
406 * @param chan4_raw [us] RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
407 * @param chan5_raw [us] RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
408 * @param chan6_raw [us] RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
409 * @param chan7_raw [us] RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
410 * @param chan8_raw [us] RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
411 * @param chan9_raw [us] RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
412 * @param chan10_raw [us] RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
413 * @param chan11_raw [us] RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
414 * @param chan12_raw [us] RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
415 * @param chan13_raw [us] RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
416 * @param chan14_raw [us] RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
417 * @param chan15_raw [us] RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
418 * @param chan16_raw [us] RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
419 * @param chan17_raw [us] RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
420 * @param chan18_raw [us] RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
421 */
422#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
423
424static inline void mavlink_msg_rc_channels_override_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint16_t chan9_raw, uint16_t chan10_raw, uint16_t chan11_raw, uint16_t chan12_raw, uint16_t chan13_raw, uint16_t chan14_raw, uint16_t chan15_raw, uint16_t chan16_raw, uint16_t chan17_raw, uint16_t chan18_raw)
425{
426#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
427 char buf[MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN];
428 _mav_put_uint16_t(buf, 0, chan1_raw);
429 _mav_put_uint16_t(buf, 2, chan2_raw);
430 _mav_put_uint16_t(buf, 4, chan3_raw);
431 _mav_put_uint16_t(buf, 6, chan4_raw);
432 _mav_put_uint16_t(buf, 8, chan5_raw);
433 _mav_put_uint16_t(buf, 10, chan6_raw);
434 _mav_put_uint16_t(buf, 12, chan7_raw);
435 _mav_put_uint16_t(buf, 14, chan8_raw);
436 _mav_put_uint8_t(buf, 16, target_system);
437 _mav_put_uint8_t(buf, 17, target_component);
438 _mav_put_uint16_t(buf, 18, chan9_raw);
439 _mav_put_uint16_t(buf, 20, chan10_raw);
440 _mav_put_uint16_t(buf, 22, chan11_raw);
441 _mav_put_uint16_t(buf, 24, chan12_raw);
442 _mav_put_uint16_t(buf, 26, chan13_raw);
443 _mav_put_uint16_t(buf, 28, chan14_raw);
444 _mav_put_uint16_t(buf, 30, chan15_raw);
445 _mav_put_uint16_t(buf, 32, chan16_raw);
446 _mav_put_uint16_t(buf, 34, chan17_raw);
447 _mav_put_uint16_t(buf, 36, chan18_raw);
448
449 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, buf, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_MIN_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_CRC);
450#else
451 mavlink_rc_channels_override_t packet;
452 packet.chan1_raw = chan1_raw;
453 packet.chan2_raw = chan2_raw;
454 packet.chan3_raw = chan3_raw;
455 packet.chan4_raw = chan4_raw;
456 packet.chan5_raw = chan5_raw;
457 packet.chan6_raw = chan6_raw;
458 packet.chan7_raw = chan7_raw;
459 packet.chan8_raw = chan8_raw;
460 packet.target_system = target_system;
461 packet.target_component = target_component;
462 packet.chan9_raw = chan9_raw;
463 packet.chan10_raw = chan10_raw;
464 packet.chan11_raw = chan11_raw;
465 packet.chan12_raw = chan12_raw;
466 packet.chan13_raw = chan13_raw;
467 packet.chan14_raw = chan14_raw;
468 packet.chan15_raw = chan15_raw;
469 packet.chan16_raw = chan16_raw;
470 packet.chan17_raw = chan17_raw;
471 packet.chan18_raw = chan18_raw;
472
473 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, (const char *)&packet, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_MIN_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_CRC);
474#endif
475}
476
477/**
478 * @brief Send a rc_channels_override message
479 * @param chan MAVLink channel to send the message
480 * @param struct The MAVLink struct to serialize
481 */
482static inline void mavlink_msg_rc_channels_override_send_struct(mavlink_channel_t chan, const mavlink_rc_channels_override_t* rc_channels_override)
483{
484#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
485 mavlink_msg_rc_channels_override_send(chan, rc_channels_override->target_system, rc_channels_override->target_component, rc_channels_override->chan1_raw, rc_channels_override->chan2_raw, rc_channels_override->chan3_raw, rc_channels_override->chan4_raw, rc_channels_override->chan5_raw, rc_channels_override->chan6_raw, rc_channels_override->chan7_raw, rc_channels_override->chan8_raw, rc_channels_override->chan9_raw, rc_channels_override->chan10_raw, rc_channels_override->chan11_raw, rc_channels_override->chan12_raw, rc_channels_override->chan13_raw, rc_channels_override->chan14_raw, rc_channels_override->chan15_raw, rc_channels_override->chan16_raw, rc_channels_override->chan17_raw, rc_channels_override->chan18_raw);
486#else
487 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, (const char *)rc_channels_override, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_MIN_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_CRC);
488#endif
489}
490
491#if MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
492/*
493 This variant of _send() can be used to save stack space by reusing
494 memory from the receive buffer. The caller provides a
495 mavlink_message_t which is the size of a full mavlink message. This
496 is usually the receive buffer for the channel, and allows a reply to an
497 incoming message with minimum stack space usage.
498 */
499static inline void mavlink_msg_rc_channels_override_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint16_t chan9_raw, uint16_t chan10_raw, uint16_t chan11_raw, uint16_t chan12_raw, uint16_t chan13_raw, uint16_t chan14_raw, uint16_t chan15_raw, uint16_t chan16_raw, uint16_t chan17_raw, uint16_t chan18_raw)
500{
501#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
502 char *buf = (char *)msgbuf;
503 _mav_put_uint16_t(buf, 0, chan1_raw);
504 _mav_put_uint16_t(buf, 2, chan2_raw);
505 _mav_put_uint16_t(buf, 4, chan3_raw);
506 _mav_put_uint16_t(buf, 6, chan4_raw);
507 _mav_put_uint16_t(buf, 8, chan5_raw);
508 _mav_put_uint16_t(buf, 10, chan6_raw);
509 _mav_put_uint16_t(buf, 12, chan7_raw);
510 _mav_put_uint16_t(buf, 14, chan8_raw);
511 _mav_put_uint8_t(buf, 16, target_system);
512 _mav_put_uint8_t(buf, 17, target_component);
513 _mav_put_uint16_t(buf, 18, chan9_raw);
514 _mav_put_uint16_t(buf, 20, chan10_raw);
515 _mav_put_uint16_t(buf, 22, chan11_raw);
516 _mav_put_uint16_t(buf, 24, chan12_raw);
517 _mav_put_uint16_t(buf, 26, chan13_raw);
518 _mav_put_uint16_t(buf, 28, chan14_raw);
519 _mav_put_uint16_t(buf, 30, chan15_raw);
520 _mav_put_uint16_t(buf, 32, chan16_raw);
521 _mav_put_uint16_t(buf, 34, chan17_raw);
522 _mav_put_uint16_t(buf, 36, chan18_raw);
523
524 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, buf, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_MIN_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_CRC);
525#else
526 mavlink_rc_channels_override_t *packet = (mavlink_rc_channels_override_t *)msgbuf;
527 packet->chan1_raw = chan1_raw;
528 packet->chan2_raw = chan2_raw;
529 packet->chan3_raw = chan3_raw;
530 packet->chan4_raw = chan4_raw;
531 packet->chan5_raw = chan5_raw;
532 packet->chan6_raw = chan6_raw;
533 packet->chan7_raw = chan7_raw;
534 packet->chan8_raw = chan8_raw;
535 packet->target_system = target_system;
536 packet->target_component = target_component;
537 packet->chan9_raw = chan9_raw;
538 packet->chan10_raw = chan10_raw;
539 packet->chan11_raw = chan11_raw;
540 packet->chan12_raw = chan12_raw;
541 packet->chan13_raw = chan13_raw;
542 packet->chan14_raw = chan14_raw;
543 packet->chan15_raw = chan15_raw;
544 packet->chan16_raw = chan16_raw;
545 packet->chan17_raw = chan17_raw;
546 packet->chan18_raw = chan18_raw;
547
548 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, (const char *)packet, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_MIN_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_CRC);
549#endif
550}
551#endif
552
553#endif
554
555// MESSAGE RC_CHANNELS_OVERRIDE UNPACKING
556
557
558/**
559 * @brief Get field target_system from rc_channels_override message
560 *
561 * @return System ID
562 */
563static inline uint8_t mavlink_msg_rc_channels_override_get_target_system(const mavlink_message_t* msg)
564{
565 return _MAV_RETURN_uint8_t(msg, 16);
566}
567
568/**
569 * @brief Get field target_component from rc_channels_override message
570 *
571 * @return Component ID
572 */
573static inline uint8_t mavlink_msg_rc_channels_override_get_target_component(const mavlink_message_t* msg)
574{
575 return _MAV_RETURN_uint8_t(msg, 17);
576}
577
578/**
579 * @brief Get field chan1_raw from rc_channels_override message
580 *
581 * @return [us] RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
582 */
583static inline uint16_t mavlink_msg_rc_channels_override_get_chan1_raw(const mavlink_message_t* msg)
584{
585 return _MAV_RETURN_uint16_t(msg, 0);
586}
587
588/**
589 * @brief Get field chan2_raw from rc_channels_override message
590 *
591 * @return [us] RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
592 */
593static inline uint16_t mavlink_msg_rc_channels_override_get_chan2_raw(const mavlink_message_t* msg)
594{
595 return _MAV_RETURN_uint16_t(msg, 2);
596}
597
598/**
599 * @brief Get field chan3_raw from rc_channels_override message
600 *
601 * @return [us] RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
602 */
603static inline uint16_t mavlink_msg_rc_channels_override_get_chan3_raw(const mavlink_message_t* msg)
604{
605 return _MAV_RETURN_uint16_t(msg, 4);
606}
607
608/**
609 * @brief Get field chan4_raw from rc_channels_override message
610 *
611 * @return [us] RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
612 */
613static inline uint16_t mavlink_msg_rc_channels_override_get_chan4_raw(const mavlink_message_t* msg)
614{
615 return _MAV_RETURN_uint16_t(msg, 6);
616}
617
618/**
619 * @brief Get field chan5_raw from rc_channels_override message
620 *
621 * @return [us] RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
622 */
623static inline uint16_t mavlink_msg_rc_channels_override_get_chan5_raw(const mavlink_message_t* msg)
624{
625 return _MAV_RETURN_uint16_t(msg, 8);
626}
627
628/**
629 * @brief Get field chan6_raw from rc_channels_override message
630 *
631 * @return [us] RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
632 */
633static inline uint16_t mavlink_msg_rc_channels_override_get_chan6_raw(const mavlink_message_t* msg)
634{
635 return _MAV_RETURN_uint16_t(msg, 10);
636}
637
638/**
639 * @brief Get field chan7_raw from rc_channels_override message
640 *
641 * @return [us] RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
642 */
643static inline uint16_t mavlink_msg_rc_channels_override_get_chan7_raw(const mavlink_message_t* msg)
644{
645 return _MAV_RETURN_uint16_t(msg, 12);
646}
647
648/**
649 * @brief Get field chan8_raw from rc_channels_override message
650 *
651 * @return [us] RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio.
652 */
653static inline uint16_t mavlink_msg_rc_channels_override_get_chan8_raw(const mavlink_message_t* msg)
654{
655 return _MAV_RETURN_uint16_t(msg, 14);
656}
657
658/**
659 * @brief Get field chan9_raw from rc_channels_override message
660 *
661 * @return [us] RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
662 */
663static inline uint16_t mavlink_msg_rc_channels_override_get_chan9_raw(const mavlink_message_t* msg)
664{
665 return _MAV_RETURN_uint16_t(msg, 18);
666}
667
668/**
669 * @brief Get field chan10_raw from rc_channels_override message
670 *
671 * @return [us] RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
672 */
673static inline uint16_t mavlink_msg_rc_channels_override_get_chan10_raw(const mavlink_message_t* msg)
674{
675 return _MAV_RETURN_uint16_t(msg, 20);
676}
677
678/**
679 * @brief Get field chan11_raw from rc_channels_override message
680 *
681 * @return [us] RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
682 */
683static inline uint16_t mavlink_msg_rc_channels_override_get_chan11_raw(const mavlink_message_t* msg)
684{
685 return _MAV_RETURN_uint16_t(msg, 22);
686}
687
688/**
689 * @brief Get field chan12_raw from rc_channels_override message
690 *
691 * @return [us] RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
692 */
693static inline uint16_t mavlink_msg_rc_channels_override_get_chan12_raw(const mavlink_message_t* msg)
694{
695 return _MAV_RETURN_uint16_t(msg, 24);
696}
697
698/**
699 * @brief Get field chan13_raw from rc_channels_override message
700 *
701 * @return [us] RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
702 */
703static inline uint16_t mavlink_msg_rc_channels_override_get_chan13_raw(const mavlink_message_t* msg)
704{
705 return _MAV_RETURN_uint16_t(msg, 26);
706}
707
708/**
709 * @brief Get field chan14_raw from rc_channels_override message
710 *
711 * @return [us] RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
712 */
713static inline uint16_t mavlink_msg_rc_channels_override_get_chan14_raw(const mavlink_message_t* msg)
714{
715 return _MAV_RETURN_uint16_t(msg, 28);
716}
717
718/**
719 * @brief Get field chan15_raw from rc_channels_override message
720 *
721 * @return [us] RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
722 */
723static inline uint16_t mavlink_msg_rc_channels_override_get_chan15_raw(const mavlink_message_t* msg)
724{
725 return _MAV_RETURN_uint16_t(msg, 30);
726}
727
728/**
729 * @brief Get field chan16_raw from rc_channels_override message
730 *
731 * @return [us] RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
732 */
733static inline uint16_t mavlink_msg_rc_channels_override_get_chan16_raw(const mavlink_message_t* msg)
734{
735 return _MAV_RETURN_uint16_t(msg, 32);
736}
737
738/**
739 * @brief Get field chan17_raw from rc_channels_override message
740 *
741 * @return [us] RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
742 */
743static inline uint16_t mavlink_msg_rc_channels_override_get_chan17_raw(const mavlink_message_t* msg)
744{
745 return _MAV_RETURN_uint16_t(msg, 34);
746}
747
748/**
749 * @brief Get field chan18_raw from rc_channels_override message
750 *
751 * @return [us] RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio.
752 */
753static inline uint16_t mavlink_msg_rc_channels_override_get_chan18_raw(const mavlink_message_t* msg)
754{
755 return _MAV_RETURN_uint16_t(msg, 36);
756}
757
758/**
759 * @brief Decode a rc_channels_override message into a struct
760 *
761 * @param msg The message to decode
762 * @param rc_channels_override C-struct to decode the message contents into
763 */
764static inline void mavlink_msg_rc_channels_override_decode(const mavlink_message_t* msg, mavlink_rc_channels_override_t* rc_channels_override)
765{
766#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
767 rc_channels_override->chan1_raw = mavlink_msg_rc_channels_override_get_chan1_raw(msg);
768 rc_channels_override->chan2_raw = mavlink_msg_rc_channels_override_get_chan2_raw(msg);
769 rc_channels_override->chan3_raw = mavlink_msg_rc_channels_override_get_chan3_raw(msg);
770 rc_channels_override->chan4_raw = mavlink_msg_rc_channels_override_get_chan4_raw(msg);
771 rc_channels_override->chan5_raw = mavlink_msg_rc_channels_override_get_chan5_raw(msg);
772 rc_channels_override->chan6_raw = mavlink_msg_rc_channels_override_get_chan6_raw(msg);
773 rc_channels_override->chan7_raw = mavlink_msg_rc_channels_override_get_chan7_raw(msg);
774 rc_channels_override->chan8_raw = mavlink_msg_rc_channels_override_get_chan8_raw(msg);
775 rc_channels_override->target_system = mavlink_msg_rc_channels_override_get_target_system(msg);
776 rc_channels_override->target_component = mavlink_msg_rc_channels_override_get_target_component(msg);
777 rc_channels_override->chan9_raw = mavlink_msg_rc_channels_override_get_chan9_raw(msg);
778 rc_channels_override->chan10_raw = mavlink_msg_rc_channels_override_get_chan10_raw(msg);
779 rc_channels_override->chan11_raw = mavlink_msg_rc_channels_override_get_chan11_raw(msg);
780 rc_channels_override->chan12_raw = mavlink_msg_rc_channels_override_get_chan12_raw(msg);
781 rc_channels_override->chan13_raw = mavlink_msg_rc_channels_override_get_chan13_raw(msg);
782 rc_channels_override->chan14_raw = mavlink_msg_rc_channels_override_get_chan14_raw(msg);
783 rc_channels_override->chan15_raw = mavlink_msg_rc_channels_override_get_chan15_raw(msg);
784 rc_channels_override->chan16_raw = mavlink_msg_rc_channels_override_get_chan16_raw(msg);
785 rc_channels_override->chan17_raw = mavlink_msg_rc_channels_override_get_chan17_raw(msg);
786 rc_channels_override->chan18_raw = mavlink_msg_rc_channels_override_get_chan18_raw(msg);
787#else
788 uint8_t len = msg->len < MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN? msg->len : MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN;
789 memset(rc_channels_override, 0, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
790 memcpy(rc_channels_override, _MAV_PAYLOAD(msg), len);
791#endif
792}