2 // MESSAGE RC_CHANNELS PACKING
4 #define MAVLINK_MSG_ID_RC_CHANNELS 65
7 typedef struct __mavlink_rc_channels_t
{
8 uint32_t time_boot_ms
; /*< Timestamp (milliseconds since system boot)*/
9 uint16_t chan1_raw
; /*< RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
10 uint16_t chan2_raw
; /*< RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
11 uint16_t chan3_raw
; /*< RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
12 uint16_t chan4_raw
; /*< RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
13 uint16_t chan5_raw
; /*< RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
14 uint16_t chan6_raw
; /*< RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
15 uint16_t chan7_raw
; /*< RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
16 uint16_t chan8_raw
; /*< RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
17 uint16_t chan9_raw
; /*< RC channel 9 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
18 uint16_t chan10_raw
; /*< RC channel 10 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
19 uint16_t chan11_raw
; /*< RC channel 11 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
20 uint16_t chan12_raw
; /*< RC channel 12 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
21 uint16_t chan13_raw
; /*< RC channel 13 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
22 uint16_t chan14_raw
; /*< RC channel 14 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
23 uint16_t chan15_raw
; /*< RC channel 15 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
24 uint16_t chan16_raw
; /*< RC channel 16 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
25 uint16_t chan17_raw
; /*< RC channel 17 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
26 uint16_t chan18_raw
; /*< RC channel 18 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
27 uint8_t chancount
; /*< Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available.*/
28 uint8_t rssi
; /*< Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.*/
29 }) mavlink_rc_channels_t
;
31 #define MAVLINK_MSG_ID_RC_CHANNELS_LEN 42
32 #define MAVLINK_MSG_ID_RC_CHANNELS_MIN_LEN 42
33 #define MAVLINK_MSG_ID_65_LEN 42
34 #define MAVLINK_MSG_ID_65_MIN_LEN 42
36 #define MAVLINK_MSG_ID_RC_CHANNELS_CRC 118
37 #define MAVLINK_MSG_ID_65_CRC 118
41 #if MAVLINK_COMMAND_24BIT
42 #define MAVLINK_MESSAGE_INFO_RC_CHANNELS { \
46 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_rc_channels_t, time_boot_ms) }, \
47 { "chan1_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_rc_channels_t, chan1_raw) }, \
48 { "chan2_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_rc_channels_t, chan2_raw) }, \
49 { "chan3_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_rc_channels_t, chan3_raw) }, \
50 { "chan4_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_rc_channels_t, chan4_raw) }, \
51 { "chan5_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_rc_channels_t, chan5_raw) }, \
52 { "chan6_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_rc_channels_t, chan6_raw) }, \
53 { "chan7_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_rc_channels_t, chan7_raw) }, \
54 { "chan8_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_rc_channels_t, chan8_raw) }, \
55 { "chan9_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_rc_channels_t, chan9_raw) }, \
56 { "chan10_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_rc_channels_t, chan10_raw) }, \
57 { "chan11_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_rc_channels_t, chan11_raw) }, \
58 { "chan12_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_rc_channels_t, chan12_raw) }, \
59 { "chan13_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_rc_channels_t, chan13_raw) }, \
60 { "chan14_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_rc_channels_t, chan14_raw) }, \
61 { "chan15_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_rc_channels_t, chan15_raw) }, \
62 { "chan16_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 34, offsetof(mavlink_rc_channels_t, chan16_raw) }, \
63 { "chan17_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_rc_channels_t, chan17_raw) }, \
64 { "chan18_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 38, offsetof(mavlink_rc_channels_t, chan18_raw) }, \
65 { "chancount", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_rc_channels_t, chancount) }, \
66 { "rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_rc_channels_t, rssi) }, \
70 #define MAVLINK_MESSAGE_INFO_RC_CHANNELS { \
73 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_rc_channels_t, time_boot_ms) }, \
74 { "chan1_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_rc_channels_t, chan1_raw) }, \
75 { "chan2_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_rc_channels_t, chan2_raw) }, \
76 { "chan3_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_rc_channels_t, chan3_raw) }, \
77 { "chan4_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_rc_channels_t, chan4_raw) }, \
78 { "chan5_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_rc_channels_t, chan5_raw) }, \
79 { "chan6_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_rc_channels_t, chan6_raw) }, \
80 { "chan7_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_rc_channels_t, chan7_raw) }, \
81 { "chan8_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_rc_channels_t, chan8_raw) }, \
82 { "chan9_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_rc_channels_t, chan9_raw) }, \
83 { "chan10_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_rc_channels_t, chan10_raw) }, \
84 { "chan11_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_rc_channels_t, chan11_raw) }, \
85 { "chan12_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_rc_channels_t, chan12_raw) }, \
86 { "chan13_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_rc_channels_t, chan13_raw) }, \
87 { "chan14_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_rc_channels_t, chan14_raw) }, \
88 { "chan15_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_rc_channels_t, chan15_raw) }, \
89 { "chan16_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 34, offsetof(mavlink_rc_channels_t, chan16_raw) }, \
90 { "chan17_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_rc_channels_t, chan17_raw) }, \
91 { "chan18_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 38, offsetof(mavlink_rc_channels_t, chan18_raw) }, \
92 { "chancount", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_rc_channels_t, chancount) }, \
93 { "rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_rc_channels_t, rssi) }, \
99 * @brief Pack a rc_channels message
100 * @param system_id ID of this system
101 * @param component_id ID of this component (e.g. 200 for IMU)
102 * @param msg The MAVLink message to compress the data into
104 * @param time_boot_ms Timestamp (milliseconds since system boot)
105 * @param chancount Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available.
106 * @param chan1_raw RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
107 * @param chan2_raw RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
108 * @param chan3_raw RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
109 * @param chan4_raw RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
110 * @param chan5_raw RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
111 * @param chan6_raw RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
112 * @param chan7_raw RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
113 * @param chan8_raw RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
114 * @param chan9_raw RC channel 9 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
115 * @param chan10_raw RC channel 10 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
116 * @param chan11_raw RC channel 11 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
117 * @param chan12_raw RC channel 12 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
118 * @param chan13_raw RC channel 13 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
119 * @param chan14_raw RC channel 14 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
120 * @param chan15_raw RC channel 15 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
121 * @param chan16_raw RC channel 16 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
122 * @param chan17_raw RC channel 17 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
123 * @param chan18_raw RC channel 18 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
124 * @param rssi Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.
125 * @return length of the message in bytes (excluding serial stream start sign)
127 static inline uint16_t mavlink_msg_rc_channels_pack(uint8_t system_id
, uint8_t component_id
, mavlink_message_t
* msg
,
128 uint32_t time_boot_ms
, uint8_t chancount
, 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
, uint8_t rssi
)
130 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
131 char buf
[MAVLINK_MSG_ID_RC_CHANNELS_LEN
];
132 _mav_put_uint32_t(buf
, 0, time_boot_ms
);
133 _mav_put_uint16_t(buf
, 4, chan1_raw
);
134 _mav_put_uint16_t(buf
, 6, chan2_raw
);
135 _mav_put_uint16_t(buf
, 8, chan3_raw
);
136 _mav_put_uint16_t(buf
, 10, chan4_raw
);
137 _mav_put_uint16_t(buf
, 12, chan5_raw
);
138 _mav_put_uint16_t(buf
, 14, chan6_raw
);
139 _mav_put_uint16_t(buf
, 16, chan7_raw
);
140 _mav_put_uint16_t(buf
, 18, chan8_raw
);
141 _mav_put_uint16_t(buf
, 20, chan9_raw
);
142 _mav_put_uint16_t(buf
, 22, chan10_raw
);
143 _mav_put_uint16_t(buf
, 24, chan11_raw
);
144 _mav_put_uint16_t(buf
, 26, chan12_raw
);
145 _mav_put_uint16_t(buf
, 28, chan13_raw
);
146 _mav_put_uint16_t(buf
, 30, chan14_raw
);
147 _mav_put_uint16_t(buf
, 32, chan15_raw
);
148 _mav_put_uint16_t(buf
, 34, chan16_raw
);
149 _mav_put_uint16_t(buf
, 36, chan17_raw
);
150 _mav_put_uint16_t(buf
, 38, chan18_raw
);
151 _mav_put_uint8_t(buf
, 40, chancount
);
152 _mav_put_uint8_t(buf
, 41, rssi
);
154 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), buf
, MAVLINK_MSG_ID_RC_CHANNELS_LEN
);
156 mavlink_rc_channels_t packet
;
157 packet
.time_boot_ms
= time_boot_ms
;
158 packet
.chan1_raw
= chan1_raw
;
159 packet
.chan2_raw
= chan2_raw
;
160 packet
.chan3_raw
= chan3_raw
;
161 packet
.chan4_raw
= chan4_raw
;
162 packet
.chan5_raw
= chan5_raw
;
163 packet
.chan6_raw
= chan6_raw
;
164 packet
.chan7_raw
= chan7_raw
;
165 packet
.chan8_raw
= chan8_raw
;
166 packet
.chan9_raw
= chan9_raw
;
167 packet
.chan10_raw
= chan10_raw
;
168 packet
.chan11_raw
= chan11_raw
;
169 packet
.chan12_raw
= chan12_raw
;
170 packet
.chan13_raw
= chan13_raw
;
171 packet
.chan14_raw
= chan14_raw
;
172 packet
.chan15_raw
= chan15_raw
;
173 packet
.chan16_raw
= chan16_raw
;
174 packet
.chan17_raw
= chan17_raw
;
175 packet
.chan18_raw
= chan18_raw
;
176 packet
.chancount
= chancount
;
179 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), &packet
, MAVLINK_MSG_ID_RC_CHANNELS_LEN
);
182 msg
->msgid
= MAVLINK_MSG_ID_RC_CHANNELS
;
183 return mavlink_finalize_message(msg
, system_id
, component_id
, MAVLINK_MSG_ID_RC_CHANNELS_MIN_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_CRC
);
187 * @brief Pack a rc_channels message on a channel
188 * @param system_id ID of this system
189 * @param component_id ID of this component (e.g. 200 for IMU)
190 * @param chan The MAVLink channel this message will be sent over
191 * @param msg The MAVLink message to compress the data into
192 * @param time_boot_ms Timestamp (milliseconds since system boot)
193 * @param chancount Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available.
194 * @param chan1_raw RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
195 * @param chan2_raw RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
196 * @param chan3_raw RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
197 * @param chan4_raw RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
198 * @param chan5_raw RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
199 * @param chan6_raw RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
200 * @param chan7_raw RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
201 * @param chan8_raw RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
202 * @param chan9_raw RC channel 9 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
203 * @param chan10_raw RC channel 10 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
204 * @param chan11_raw RC channel 11 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
205 * @param chan12_raw RC channel 12 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
206 * @param chan13_raw RC channel 13 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
207 * @param chan14_raw RC channel 14 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
208 * @param chan15_raw RC channel 15 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
209 * @param chan16_raw RC channel 16 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
210 * @param chan17_raw RC channel 17 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
211 * @param chan18_raw RC channel 18 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
212 * @param rssi Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.
213 * @return length of the message in bytes (excluding serial stream start sign)
215 static inline uint16_t mavlink_msg_rc_channels_pack_chan(uint8_t system_id
, uint8_t component_id
, uint8_t chan
,
216 mavlink_message_t
* msg
,
217 uint32_t time_boot_ms
,uint8_t chancount
,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
,uint8_t rssi
)
219 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
220 char buf
[MAVLINK_MSG_ID_RC_CHANNELS_LEN
];
221 _mav_put_uint32_t(buf
, 0, time_boot_ms
);
222 _mav_put_uint16_t(buf
, 4, chan1_raw
);
223 _mav_put_uint16_t(buf
, 6, chan2_raw
);
224 _mav_put_uint16_t(buf
, 8, chan3_raw
);
225 _mav_put_uint16_t(buf
, 10, chan4_raw
);
226 _mav_put_uint16_t(buf
, 12, chan5_raw
);
227 _mav_put_uint16_t(buf
, 14, chan6_raw
);
228 _mav_put_uint16_t(buf
, 16, chan7_raw
);
229 _mav_put_uint16_t(buf
, 18, chan8_raw
);
230 _mav_put_uint16_t(buf
, 20, chan9_raw
);
231 _mav_put_uint16_t(buf
, 22, chan10_raw
);
232 _mav_put_uint16_t(buf
, 24, chan11_raw
);
233 _mav_put_uint16_t(buf
, 26, chan12_raw
);
234 _mav_put_uint16_t(buf
, 28, chan13_raw
);
235 _mav_put_uint16_t(buf
, 30, chan14_raw
);
236 _mav_put_uint16_t(buf
, 32, chan15_raw
);
237 _mav_put_uint16_t(buf
, 34, chan16_raw
);
238 _mav_put_uint16_t(buf
, 36, chan17_raw
);
239 _mav_put_uint16_t(buf
, 38, chan18_raw
);
240 _mav_put_uint8_t(buf
, 40, chancount
);
241 _mav_put_uint8_t(buf
, 41, rssi
);
243 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), buf
, MAVLINK_MSG_ID_RC_CHANNELS_LEN
);
245 mavlink_rc_channels_t packet
;
246 packet
.time_boot_ms
= time_boot_ms
;
247 packet
.chan1_raw
= chan1_raw
;
248 packet
.chan2_raw
= chan2_raw
;
249 packet
.chan3_raw
= chan3_raw
;
250 packet
.chan4_raw
= chan4_raw
;
251 packet
.chan5_raw
= chan5_raw
;
252 packet
.chan6_raw
= chan6_raw
;
253 packet
.chan7_raw
= chan7_raw
;
254 packet
.chan8_raw
= chan8_raw
;
255 packet
.chan9_raw
= chan9_raw
;
256 packet
.chan10_raw
= chan10_raw
;
257 packet
.chan11_raw
= chan11_raw
;
258 packet
.chan12_raw
= chan12_raw
;
259 packet
.chan13_raw
= chan13_raw
;
260 packet
.chan14_raw
= chan14_raw
;
261 packet
.chan15_raw
= chan15_raw
;
262 packet
.chan16_raw
= chan16_raw
;
263 packet
.chan17_raw
= chan17_raw
;
264 packet
.chan18_raw
= chan18_raw
;
265 packet
.chancount
= chancount
;
268 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), &packet
, MAVLINK_MSG_ID_RC_CHANNELS_LEN
);
271 msg
->msgid
= MAVLINK_MSG_ID_RC_CHANNELS
;
272 return mavlink_finalize_message_chan(msg
, system_id
, component_id
, chan
, MAVLINK_MSG_ID_RC_CHANNELS_MIN_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_CRC
);
276 * @brief Encode a rc_channels struct
278 * @param system_id ID of this system
279 * @param component_id ID of this component (e.g. 200 for IMU)
280 * @param msg The MAVLink message to compress the data into
281 * @param rc_channels C-struct to read the message contents from
283 static inline uint16_t mavlink_msg_rc_channels_encode(uint8_t system_id
, uint8_t component_id
, mavlink_message_t
* msg
, const mavlink_rc_channels_t
* rc_channels
)
285 return mavlink_msg_rc_channels_pack(system_id
, component_id
, msg
, rc_channels
->time_boot_ms
, rc_channels
->chancount
, rc_channels
->chan1_raw
, rc_channels
->chan2_raw
, rc_channels
->chan3_raw
, rc_channels
->chan4_raw
, rc_channels
->chan5_raw
, rc_channels
->chan6_raw
, rc_channels
->chan7_raw
, rc_channels
->chan8_raw
, rc_channels
->chan9_raw
, rc_channels
->chan10_raw
, rc_channels
->chan11_raw
, rc_channels
->chan12_raw
, rc_channels
->chan13_raw
, rc_channels
->chan14_raw
, rc_channels
->chan15_raw
, rc_channels
->chan16_raw
, rc_channels
->chan17_raw
, rc_channels
->chan18_raw
, rc_channels
->rssi
);
289 * @brief Encode a rc_channels struct on a channel
291 * @param system_id ID of this system
292 * @param component_id ID of this component (e.g. 200 for IMU)
293 * @param chan The MAVLink channel this message will be sent over
294 * @param msg The MAVLink message to compress the data into
295 * @param rc_channels C-struct to read the message contents from
297 static inline uint16_t mavlink_msg_rc_channels_encode_chan(uint8_t system_id
, uint8_t component_id
, uint8_t chan
, mavlink_message_t
* msg
, const mavlink_rc_channels_t
* rc_channels
)
299 return mavlink_msg_rc_channels_pack_chan(system_id
, component_id
, chan
, msg
, rc_channels
->time_boot_ms
, rc_channels
->chancount
, rc_channels
->chan1_raw
, rc_channels
->chan2_raw
, rc_channels
->chan3_raw
, rc_channels
->chan4_raw
, rc_channels
->chan5_raw
, rc_channels
->chan6_raw
, rc_channels
->chan7_raw
, rc_channels
->chan8_raw
, rc_channels
->chan9_raw
, rc_channels
->chan10_raw
, rc_channels
->chan11_raw
, rc_channels
->chan12_raw
, rc_channels
->chan13_raw
, rc_channels
->chan14_raw
, rc_channels
->chan15_raw
, rc_channels
->chan16_raw
, rc_channels
->chan17_raw
, rc_channels
->chan18_raw
, rc_channels
->rssi
);
303 * @brief Send a rc_channels message
304 * @param chan MAVLink channel to send the message
306 * @param time_boot_ms Timestamp (milliseconds since system boot)
307 * @param chancount Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available.
308 * @param chan1_raw RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
309 * @param chan2_raw RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
310 * @param chan3_raw RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
311 * @param chan4_raw RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
312 * @param chan5_raw RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
313 * @param chan6_raw RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
314 * @param chan7_raw RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
315 * @param chan8_raw RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
316 * @param chan9_raw RC channel 9 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
317 * @param chan10_raw RC channel 10 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
318 * @param chan11_raw RC channel 11 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
319 * @param chan12_raw RC channel 12 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
320 * @param chan13_raw RC channel 13 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
321 * @param chan14_raw RC channel 14 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
322 * @param chan15_raw RC channel 15 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
323 * @param chan16_raw RC channel 16 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
324 * @param chan17_raw RC channel 17 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
325 * @param chan18_raw RC channel 18 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
326 * @param rssi Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.
328 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
330 static inline void mavlink_msg_rc_channels_send(mavlink_channel_t chan
, uint32_t time_boot_ms
, uint8_t chancount
, 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
, uint8_t rssi
)
332 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
333 char buf
[MAVLINK_MSG_ID_RC_CHANNELS_LEN
];
334 _mav_put_uint32_t(buf
, 0, time_boot_ms
);
335 _mav_put_uint16_t(buf
, 4, chan1_raw
);
336 _mav_put_uint16_t(buf
, 6, chan2_raw
);
337 _mav_put_uint16_t(buf
, 8, chan3_raw
);
338 _mav_put_uint16_t(buf
, 10, chan4_raw
);
339 _mav_put_uint16_t(buf
, 12, chan5_raw
);
340 _mav_put_uint16_t(buf
, 14, chan6_raw
);
341 _mav_put_uint16_t(buf
, 16, chan7_raw
);
342 _mav_put_uint16_t(buf
, 18, chan8_raw
);
343 _mav_put_uint16_t(buf
, 20, chan9_raw
);
344 _mav_put_uint16_t(buf
, 22, chan10_raw
);
345 _mav_put_uint16_t(buf
, 24, chan11_raw
);
346 _mav_put_uint16_t(buf
, 26, chan12_raw
);
347 _mav_put_uint16_t(buf
, 28, chan13_raw
);
348 _mav_put_uint16_t(buf
, 30, chan14_raw
);
349 _mav_put_uint16_t(buf
, 32, chan15_raw
);
350 _mav_put_uint16_t(buf
, 34, chan16_raw
);
351 _mav_put_uint16_t(buf
, 36, chan17_raw
);
352 _mav_put_uint16_t(buf
, 38, chan18_raw
);
353 _mav_put_uint8_t(buf
, 40, chancount
);
354 _mav_put_uint8_t(buf
, 41, rssi
);
356 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_RC_CHANNELS
, buf
, MAVLINK_MSG_ID_RC_CHANNELS_MIN_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_CRC
);
358 mavlink_rc_channels_t packet
;
359 packet
.time_boot_ms
= time_boot_ms
;
360 packet
.chan1_raw
= chan1_raw
;
361 packet
.chan2_raw
= chan2_raw
;
362 packet
.chan3_raw
= chan3_raw
;
363 packet
.chan4_raw
= chan4_raw
;
364 packet
.chan5_raw
= chan5_raw
;
365 packet
.chan6_raw
= chan6_raw
;
366 packet
.chan7_raw
= chan7_raw
;
367 packet
.chan8_raw
= chan8_raw
;
368 packet
.chan9_raw
= chan9_raw
;
369 packet
.chan10_raw
= chan10_raw
;
370 packet
.chan11_raw
= chan11_raw
;
371 packet
.chan12_raw
= chan12_raw
;
372 packet
.chan13_raw
= chan13_raw
;
373 packet
.chan14_raw
= chan14_raw
;
374 packet
.chan15_raw
= chan15_raw
;
375 packet
.chan16_raw
= chan16_raw
;
376 packet
.chan17_raw
= chan17_raw
;
377 packet
.chan18_raw
= chan18_raw
;
378 packet
.chancount
= chancount
;
381 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_RC_CHANNELS
, (const char *)&packet
, MAVLINK_MSG_ID_RC_CHANNELS_MIN_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_CRC
);
386 * @brief Send a rc_channels message
387 * @param chan MAVLink channel to send the message
388 * @param struct The MAVLink struct to serialize
390 static inline void mavlink_msg_rc_channels_send_struct(mavlink_channel_t chan
, const mavlink_rc_channels_t
* rc_channels
)
392 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
393 mavlink_msg_rc_channels_send(chan
, rc_channels
->time_boot_ms
, rc_channels
->chancount
, rc_channels
->chan1_raw
, rc_channels
->chan2_raw
, rc_channels
->chan3_raw
, rc_channels
->chan4_raw
, rc_channels
->chan5_raw
, rc_channels
->chan6_raw
, rc_channels
->chan7_raw
, rc_channels
->chan8_raw
, rc_channels
->chan9_raw
, rc_channels
->chan10_raw
, rc_channels
->chan11_raw
, rc_channels
->chan12_raw
, rc_channels
->chan13_raw
, rc_channels
->chan14_raw
, rc_channels
->chan15_raw
, rc_channels
->chan16_raw
, rc_channels
->chan17_raw
, rc_channels
->chan18_raw
, rc_channels
->rssi
);
395 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_RC_CHANNELS
, (const char *)rc_channels
, MAVLINK_MSG_ID_RC_CHANNELS_MIN_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_CRC
);
399 #if MAVLINK_MSG_ID_RC_CHANNELS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
401 This varient of _send() can be used to save stack space by re-using
402 memory from the receive buffer. The caller provides a
403 mavlink_message_t which is the size of a full mavlink message. This
404 is usually the receive buffer for the channel, and allows a reply to an
405 incoming message with minimum stack space usage.
407 static inline void mavlink_msg_rc_channels_send_buf(mavlink_message_t
*msgbuf
, mavlink_channel_t chan
, uint32_t time_boot_ms
, uint8_t chancount
, 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
, uint8_t rssi
)
409 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
410 char *buf
= (char *)msgbuf
;
411 _mav_put_uint32_t(buf
, 0, time_boot_ms
);
412 _mav_put_uint16_t(buf
, 4, chan1_raw
);
413 _mav_put_uint16_t(buf
, 6, chan2_raw
);
414 _mav_put_uint16_t(buf
, 8, chan3_raw
);
415 _mav_put_uint16_t(buf
, 10, chan4_raw
);
416 _mav_put_uint16_t(buf
, 12, chan5_raw
);
417 _mav_put_uint16_t(buf
, 14, chan6_raw
);
418 _mav_put_uint16_t(buf
, 16, chan7_raw
);
419 _mav_put_uint16_t(buf
, 18, chan8_raw
);
420 _mav_put_uint16_t(buf
, 20, chan9_raw
);
421 _mav_put_uint16_t(buf
, 22, chan10_raw
);
422 _mav_put_uint16_t(buf
, 24, chan11_raw
);
423 _mav_put_uint16_t(buf
, 26, chan12_raw
);
424 _mav_put_uint16_t(buf
, 28, chan13_raw
);
425 _mav_put_uint16_t(buf
, 30, chan14_raw
);
426 _mav_put_uint16_t(buf
, 32, chan15_raw
);
427 _mav_put_uint16_t(buf
, 34, chan16_raw
);
428 _mav_put_uint16_t(buf
, 36, chan17_raw
);
429 _mav_put_uint16_t(buf
, 38, chan18_raw
);
430 _mav_put_uint8_t(buf
, 40, chancount
);
431 _mav_put_uint8_t(buf
, 41, rssi
);
433 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_RC_CHANNELS
, buf
, MAVLINK_MSG_ID_RC_CHANNELS_MIN_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_CRC
);
435 mavlink_rc_channels_t
*packet
= (mavlink_rc_channels_t
*)msgbuf
;
436 packet
->time_boot_ms
= time_boot_ms
;
437 packet
->chan1_raw
= chan1_raw
;
438 packet
->chan2_raw
= chan2_raw
;
439 packet
->chan3_raw
= chan3_raw
;
440 packet
->chan4_raw
= chan4_raw
;
441 packet
->chan5_raw
= chan5_raw
;
442 packet
->chan6_raw
= chan6_raw
;
443 packet
->chan7_raw
= chan7_raw
;
444 packet
->chan8_raw
= chan8_raw
;
445 packet
->chan9_raw
= chan9_raw
;
446 packet
->chan10_raw
= chan10_raw
;
447 packet
->chan11_raw
= chan11_raw
;
448 packet
->chan12_raw
= chan12_raw
;
449 packet
->chan13_raw
= chan13_raw
;
450 packet
->chan14_raw
= chan14_raw
;
451 packet
->chan15_raw
= chan15_raw
;
452 packet
->chan16_raw
= chan16_raw
;
453 packet
->chan17_raw
= chan17_raw
;
454 packet
->chan18_raw
= chan18_raw
;
455 packet
->chancount
= chancount
;
458 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_RC_CHANNELS
, (const char *)packet
, MAVLINK_MSG_ID_RC_CHANNELS_MIN_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_LEN
, MAVLINK_MSG_ID_RC_CHANNELS_CRC
);
465 // MESSAGE RC_CHANNELS UNPACKING
469 * @brief Get field time_boot_ms from rc_channels message
471 * @return Timestamp (milliseconds since system boot)
473 static inline uint32_t mavlink_msg_rc_channels_get_time_boot_ms(const mavlink_message_t
* msg
)
475 return _MAV_RETURN_uint32_t(msg
, 0);
479 * @brief Get field chancount from rc_channels message
481 * @return Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available.
483 static inline uint8_t mavlink_msg_rc_channels_get_chancount(const mavlink_message_t
* msg
)
485 return _MAV_RETURN_uint8_t(msg
, 40);
489 * @brief Get field chan1_raw from rc_channels message
491 * @return RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
493 static inline uint16_t mavlink_msg_rc_channels_get_chan1_raw(const mavlink_message_t
* msg
)
495 return _MAV_RETURN_uint16_t(msg
, 4);
499 * @brief Get field chan2_raw from rc_channels message
501 * @return RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
503 static inline uint16_t mavlink_msg_rc_channels_get_chan2_raw(const mavlink_message_t
* msg
)
505 return _MAV_RETURN_uint16_t(msg
, 6);
509 * @brief Get field chan3_raw from rc_channels message
511 * @return RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
513 static inline uint16_t mavlink_msg_rc_channels_get_chan3_raw(const mavlink_message_t
* msg
)
515 return _MAV_RETURN_uint16_t(msg
, 8);
519 * @brief Get field chan4_raw from rc_channels message
521 * @return RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
523 static inline uint16_t mavlink_msg_rc_channels_get_chan4_raw(const mavlink_message_t
* msg
)
525 return _MAV_RETURN_uint16_t(msg
, 10);
529 * @brief Get field chan5_raw from rc_channels message
531 * @return RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
533 static inline uint16_t mavlink_msg_rc_channels_get_chan5_raw(const mavlink_message_t
* msg
)
535 return _MAV_RETURN_uint16_t(msg
, 12);
539 * @brief Get field chan6_raw from rc_channels message
541 * @return RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
543 static inline uint16_t mavlink_msg_rc_channels_get_chan6_raw(const mavlink_message_t
* msg
)
545 return _MAV_RETURN_uint16_t(msg
, 14);
549 * @brief Get field chan7_raw from rc_channels message
551 * @return RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
553 static inline uint16_t mavlink_msg_rc_channels_get_chan7_raw(const mavlink_message_t
* msg
)
555 return _MAV_RETURN_uint16_t(msg
, 16);
559 * @brief Get field chan8_raw from rc_channels message
561 * @return RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
563 static inline uint16_t mavlink_msg_rc_channels_get_chan8_raw(const mavlink_message_t
* msg
)
565 return _MAV_RETURN_uint16_t(msg
, 18);
569 * @brief Get field chan9_raw from rc_channels message
571 * @return RC channel 9 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
573 static inline uint16_t mavlink_msg_rc_channels_get_chan9_raw(const mavlink_message_t
* msg
)
575 return _MAV_RETURN_uint16_t(msg
, 20);
579 * @brief Get field chan10_raw from rc_channels message
581 * @return RC channel 10 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
583 static inline uint16_t mavlink_msg_rc_channels_get_chan10_raw(const mavlink_message_t
* msg
)
585 return _MAV_RETURN_uint16_t(msg
, 22);
589 * @brief Get field chan11_raw from rc_channels message
591 * @return RC channel 11 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
593 static inline uint16_t mavlink_msg_rc_channels_get_chan11_raw(const mavlink_message_t
* msg
)
595 return _MAV_RETURN_uint16_t(msg
, 24);
599 * @brief Get field chan12_raw from rc_channels message
601 * @return RC channel 12 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
603 static inline uint16_t mavlink_msg_rc_channels_get_chan12_raw(const mavlink_message_t
* msg
)
605 return _MAV_RETURN_uint16_t(msg
, 26);
609 * @brief Get field chan13_raw from rc_channels message
611 * @return RC channel 13 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
613 static inline uint16_t mavlink_msg_rc_channels_get_chan13_raw(const mavlink_message_t
* msg
)
615 return _MAV_RETURN_uint16_t(msg
, 28);
619 * @brief Get field chan14_raw from rc_channels message
621 * @return RC channel 14 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
623 static inline uint16_t mavlink_msg_rc_channels_get_chan14_raw(const mavlink_message_t
* msg
)
625 return _MAV_RETURN_uint16_t(msg
, 30);
629 * @brief Get field chan15_raw from rc_channels message
631 * @return RC channel 15 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
633 static inline uint16_t mavlink_msg_rc_channels_get_chan15_raw(const mavlink_message_t
* msg
)
635 return _MAV_RETURN_uint16_t(msg
, 32);
639 * @brief Get field chan16_raw from rc_channels message
641 * @return RC channel 16 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
643 static inline uint16_t mavlink_msg_rc_channels_get_chan16_raw(const mavlink_message_t
* msg
)
645 return _MAV_RETURN_uint16_t(msg
, 34);
649 * @brief Get field chan17_raw from rc_channels message
651 * @return RC channel 17 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
653 static inline uint16_t mavlink_msg_rc_channels_get_chan17_raw(const mavlink_message_t
* msg
)
655 return _MAV_RETURN_uint16_t(msg
, 36);
659 * @brief Get field chan18_raw from rc_channels message
661 * @return RC channel 18 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
663 static inline uint16_t mavlink_msg_rc_channels_get_chan18_raw(const mavlink_message_t
* msg
)
665 return _MAV_RETURN_uint16_t(msg
, 38);
669 * @brief Get field rssi from rc_channels message
671 * @return Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.
673 static inline uint8_t mavlink_msg_rc_channels_get_rssi(const mavlink_message_t
* msg
)
675 return _MAV_RETURN_uint8_t(msg
, 41);
679 * @brief Decode a rc_channels message into a struct
681 * @param msg The message to decode
682 * @param rc_channels C-struct to decode the message contents into
684 static inline void mavlink_msg_rc_channels_decode(const mavlink_message_t
* msg
, mavlink_rc_channels_t
* rc_channels
)
686 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
687 rc_channels
->time_boot_ms
= mavlink_msg_rc_channels_get_time_boot_ms(msg
);
688 rc_channels
->chan1_raw
= mavlink_msg_rc_channels_get_chan1_raw(msg
);
689 rc_channels
->chan2_raw
= mavlink_msg_rc_channels_get_chan2_raw(msg
);
690 rc_channels
->chan3_raw
= mavlink_msg_rc_channels_get_chan3_raw(msg
);
691 rc_channels
->chan4_raw
= mavlink_msg_rc_channels_get_chan4_raw(msg
);
692 rc_channels
->chan5_raw
= mavlink_msg_rc_channels_get_chan5_raw(msg
);
693 rc_channels
->chan6_raw
= mavlink_msg_rc_channels_get_chan6_raw(msg
);
694 rc_channels
->chan7_raw
= mavlink_msg_rc_channels_get_chan7_raw(msg
);
695 rc_channels
->chan8_raw
= mavlink_msg_rc_channels_get_chan8_raw(msg
);
696 rc_channels
->chan9_raw
= mavlink_msg_rc_channels_get_chan9_raw(msg
);
697 rc_channels
->chan10_raw
= mavlink_msg_rc_channels_get_chan10_raw(msg
);
698 rc_channels
->chan11_raw
= mavlink_msg_rc_channels_get_chan11_raw(msg
);
699 rc_channels
->chan12_raw
= mavlink_msg_rc_channels_get_chan12_raw(msg
);
700 rc_channels
->chan13_raw
= mavlink_msg_rc_channels_get_chan13_raw(msg
);
701 rc_channels
->chan14_raw
= mavlink_msg_rc_channels_get_chan14_raw(msg
);
702 rc_channels
->chan15_raw
= mavlink_msg_rc_channels_get_chan15_raw(msg
);
703 rc_channels
->chan16_raw
= mavlink_msg_rc_channels_get_chan16_raw(msg
);
704 rc_channels
->chan17_raw
= mavlink_msg_rc_channels_get_chan17_raw(msg
);
705 rc_channels
->chan18_raw
= mavlink_msg_rc_channels_get_chan18_raw(msg
);
706 rc_channels
->chancount
= mavlink_msg_rc_channels_get_chancount(msg
);
707 rc_channels
->rssi
= mavlink_msg_rc_channels_get_rssi(msg
);
709 uint8_t len
= msg
->len
< MAVLINK_MSG_ID_RC_CHANNELS_LEN
? msg
->len
: MAVLINK_MSG_ID_RC_CHANNELS_LEN
;
710 memset(rc_channels
, 0, MAVLINK_MSG_ID_RC_CHANNELS_LEN
);
711 memcpy(rc_channels
, _MAV_PAYLOAD(msg
), len
);