mavlink_msg_rc_channels.h
Go to the documentation of this file.
1 // MESSAGE RC_CHANNELS PACKING
2 
3 #define MAVLINK_MSG_ID_RC_CHANNELS 65
4 
5 typedef struct __mavlink_rc_channels_t
6 {
7  uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/
8  uint16_t chan1_raw; /*< RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
9  uint16_t chan2_raw; /*< RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
10  uint16_t chan3_raw; /*< RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
11  uint16_t chan4_raw; /*< RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
12  uint16_t chan5_raw; /*< RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
13  uint16_t chan6_raw; /*< RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
14  uint16_t chan7_raw; /*< RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
15  uint16_t chan8_raw; /*< RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
16  uint16_t chan9_raw; /*< RC channel 9 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
17  uint16_t chan10_raw; /*< RC channel 10 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
18  uint16_t chan11_raw; /*< RC channel 11 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
19  uint16_t chan12_raw; /*< RC channel 12 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
20  uint16_t chan13_raw; /*< RC channel 13 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
21  uint16_t chan14_raw; /*< RC channel 14 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
22  uint16_t chan15_raw; /*< RC channel 15 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
23  uint16_t chan16_raw; /*< RC channel 16 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
24  uint16_t chan17_raw; /*< RC channel 17 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
25  uint16_t chan18_raw; /*< RC channel 18 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/
26  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.*/
27  uint8_t rssi; /*< Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.*/
29 
30 #define MAVLINK_MSG_ID_RC_CHANNELS_LEN 42
31 #define MAVLINK_MSG_ID_65_LEN 42
32 
33 #define MAVLINK_MSG_ID_RC_CHANNELS_CRC 118
34 #define MAVLINK_MSG_ID_65_CRC 118
35 
36 
37 
38 #define MAVLINK_MESSAGE_INFO_RC_CHANNELS { \
39  "RC_CHANNELS", \
40  21, \
41  { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_rc_channels_t, time_boot_ms) }, \
42  { "chan1_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_rc_channels_t, chan1_raw) }, \
43  { "chan2_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_rc_channels_t, chan2_raw) }, \
44  { "chan3_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_rc_channels_t, chan3_raw) }, \
45  { "chan4_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_rc_channels_t, chan4_raw) }, \
46  { "chan5_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_rc_channels_t, chan5_raw) }, \
47  { "chan6_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_rc_channels_t, chan6_raw) }, \
48  { "chan7_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_rc_channels_t, chan7_raw) }, \
49  { "chan8_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_rc_channels_t, chan8_raw) }, \
50  { "chan9_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_rc_channels_t, chan9_raw) }, \
51  { "chan10_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_rc_channels_t, chan10_raw) }, \
52  { "chan11_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_rc_channels_t, chan11_raw) }, \
53  { "chan12_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_rc_channels_t, chan12_raw) }, \
54  { "chan13_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_rc_channels_t, chan13_raw) }, \
55  { "chan14_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_rc_channels_t, chan14_raw) }, \
56  { "chan15_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_rc_channels_t, chan15_raw) }, \
57  { "chan16_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 34, offsetof(mavlink_rc_channels_t, chan16_raw) }, \
58  { "chan17_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_rc_channels_t, chan17_raw) }, \
59  { "chan18_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 38, offsetof(mavlink_rc_channels_t, chan18_raw) }, \
60  { "chancount", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_rc_channels_t, chancount) }, \
61  { "rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_rc_channels_t, rssi) }, \
62  } \
63 }
64 
65 
95 static inline uint16_t mavlink_msg_rc_channels_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
96  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)
97 {
98 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
100  _mav_put_uint32_t(buf, 0, time_boot_ms);
101  _mav_put_uint16_t(buf, 4, chan1_raw);
102  _mav_put_uint16_t(buf, 6, chan2_raw);
103  _mav_put_uint16_t(buf, 8, chan3_raw);
104  _mav_put_uint16_t(buf, 10, chan4_raw);
105  _mav_put_uint16_t(buf, 12, chan5_raw);
106  _mav_put_uint16_t(buf, 14, chan6_raw);
107  _mav_put_uint16_t(buf, 16, chan7_raw);
108  _mav_put_uint16_t(buf, 18, chan8_raw);
109  _mav_put_uint16_t(buf, 20, chan9_raw);
110  _mav_put_uint16_t(buf, 22, chan10_raw);
111  _mav_put_uint16_t(buf, 24, chan11_raw);
112  _mav_put_uint16_t(buf, 26, chan12_raw);
113  _mav_put_uint16_t(buf, 28, chan13_raw);
114  _mav_put_uint16_t(buf, 30, chan14_raw);
115  _mav_put_uint16_t(buf, 32, chan15_raw);
116  _mav_put_uint16_t(buf, 34, chan16_raw);
117  _mav_put_uint16_t(buf, 36, chan17_raw);
118  _mav_put_uint16_t(buf, 38, chan18_raw);
119  _mav_put_uint8_t(buf, 40, chancount);
120  _mav_put_uint8_t(buf, 41, rssi);
121 
123 #else
124  mavlink_rc_channels_t packet;
125  packet.time_boot_ms = time_boot_ms;
126  packet.chan1_raw = chan1_raw;
127  packet.chan2_raw = chan2_raw;
128  packet.chan3_raw = chan3_raw;
129  packet.chan4_raw = chan4_raw;
130  packet.chan5_raw = chan5_raw;
131  packet.chan6_raw = chan6_raw;
132  packet.chan7_raw = chan7_raw;
133  packet.chan8_raw = chan8_raw;
134  packet.chan9_raw = chan9_raw;
135  packet.chan10_raw = chan10_raw;
136  packet.chan11_raw = chan11_raw;
137  packet.chan12_raw = chan12_raw;
138  packet.chan13_raw = chan13_raw;
139  packet.chan14_raw = chan14_raw;
140  packet.chan15_raw = chan15_raw;
141  packet.chan16_raw = chan16_raw;
142  packet.chan17_raw = chan17_raw;
143  packet.chan18_raw = chan18_raw;
144  packet.chancount = chancount;
145  packet.rssi = rssi;
146 
148 #endif
149 
150  msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS;
151 #if MAVLINK_CRC_EXTRA
153 #else
154  return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RC_CHANNELS_LEN);
155 #endif
156 }
157 
187 static inline uint16_t mavlink_msg_rc_channels_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
188  mavlink_message_t* msg,
189  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)
190 {
191 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
193  _mav_put_uint32_t(buf, 0, time_boot_ms);
194  _mav_put_uint16_t(buf, 4, chan1_raw);
195  _mav_put_uint16_t(buf, 6, chan2_raw);
196  _mav_put_uint16_t(buf, 8, chan3_raw);
197  _mav_put_uint16_t(buf, 10, chan4_raw);
198  _mav_put_uint16_t(buf, 12, chan5_raw);
199  _mav_put_uint16_t(buf, 14, chan6_raw);
200  _mav_put_uint16_t(buf, 16, chan7_raw);
201  _mav_put_uint16_t(buf, 18, chan8_raw);
202  _mav_put_uint16_t(buf, 20, chan9_raw);
203  _mav_put_uint16_t(buf, 22, chan10_raw);
204  _mav_put_uint16_t(buf, 24, chan11_raw);
205  _mav_put_uint16_t(buf, 26, chan12_raw);
206  _mav_put_uint16_t(buf, 28, chan13_raw);
207  _mav_put_uint16_t(buf, 30, chan14_raw);
208  _mav_put_uint16_t(buf, 32, chan15_raw);
209  _mav_put_uint16_t(buf, 34, chan16_raw);
210  _mav_put_uint16_t(buf, 36, chan17_raw);
211  _mav_put_uint16_t(buf, 38, chan18_raw);
212  _mav_put_uint8_t(buf, 40, chancount);
213  _mav_put_uint8_t(buf, 41, rssi);
214 
216 #else
217  mavlink_rc_channels_t packet;
218  packet.time_boot_ms = time_boot_ms;
219  packet.chan1_raw = chan1_raw;
220  packet.chan2_raw = chan2_raw;
221  packet.chan3_raw = chan3_raw;
222  packet.chan4_raw = chan4_raw;
223  packet.chan5_raw = chan5_raw;
224  packet.chan6_raw = chan6_raw;
225  packet.chan7_raw = chan7_raw;
226  packet.chan8_raw = chan8_raw;
227  packet.chan9_raw = chan9_raw;
228  packet.chan10_raw = chan10_raw;
229  packet.chan11_raw = chan11_raw;
230  packet.chan12_raw = chan12_raw;
231  packet.chan13_raw = chan13_raw;
232  packet.chan14_raw = chan14_raw;
233  packet.chan15_raw = chan15_raw;
234  packet.chan16_raw = chan16_raw;
235  packet.chan17_raw = chan17_raw;
236  packet.chan18_raw = chan18_raw;
237  packet.chancount = chancount;
238  packet.rssi = rssi;
239 
241 #endif
242 
243  msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS;
244 #if MAVLINK_CRC_EXTRA
246 #else
247  return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RC_CHANNELS_LEN);
248 #endif
249 }
250 
259 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)
260 {
261  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);
262 }
263 
273 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)
274 {
275  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);
276 }
277 
304 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
305 
306 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)
307 {
308 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
311  _mav_put_uint16_t(buf, 4, chan1_raw);
312  _mav_put_uint16_t(buf, 6, chan2_raw);
313  _mav_put_uint16_t(buf, 8, chan3_raw);
314  _mav_put_uint16_t(buf, 10, chan4_raw);
315  _mav_put_uint16_t(buf, 12, chan5_raw);
316  _mav_put_uint16_t(buf, 14, chan6_raw);
317  _mav_put_uint16_t(buf, 16, chan7_raw);
318  _mav_put_uint16_t(buf, 18, chan8_raw);
319  _mav_put_uint16_t(buf, 20, chan9_raw);
320  _mav_put_uint16_t(buf, 22, chan10_raw);
321  _mav_put_uint16_t(buf, 24, chan11_raw);
322  _mav_put_uint16_t(buf, 26, chan12_raw);
323  _mav_put_uint16_t(buf, 28, chan13_raw);
324  _mav_put_uint16_t(buf, 30, chan14_raw);
325  _mav_put_uint16_t(buf, 32, chan15_raw);
326  _mav_put_uint16_t(buf, 34, chan16_raw);
327  _mav_put_uint16_t(buf, 36, chan17_raw);
328  _mav_put_uint16_t(buf, 38, chan18_raw);
329  _mav_put_uint8_t(buf, 40, chancount);
330  _mav_put_uint8_t(buf, 41, rssi);
331 
332 #if MAVLINK_CRC_EXTRA
334 #else
335  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS, buf, MAVLINK_MSG_ID_RC_CHANNELS_LEN);
336 #endif
337 #else
338  mavlink_rc_channels_t packet;
339  packet.time_boot_ms = time_boot_ms;
340  packet.chan1_raw = chan1_raw;
341  packet.chan2_raw = chan2_raw;
342  packet.chan3_raw = chan3_raw;
343  packet.chan4_raw = chan4_raw;
344  packet.chan5_raw = chan5_raw;
345  packet.chan6_raw = chan6_raw;
346  packet.chan7_raw = chan7_raw;
347  packet.chan8_raw = chan8_raw;
348  packet.chan9_raw = chan9_raw;
349  packet.chan10_raw = chan10_raw;
350  packet.chan11_raw = chan11_raw;
351  packet.chan12_raw = chan12_raw;
352  packet.chan13_raw = chan13_raw;
353  packet.chan14_raw = chan14_raw;
354  packet.chan15_raw = chan15_raw;
355  packet.chan16_raw = chan16_raw;
356  packet.chan17_raw = chan17_raw;
357  packet.chan18_raw = chan18_raw;
358  packet.chancount = chancount;
359  packet.rssi = rssi;
360 
361 #if MAVLINK_CRC_EXTRA
362  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS, (const char *)&packet, MAVLINK_MSG_ID_RC_CHANNELS_LEN, MAVLINK_MSG_ID_RC_CHANNELS_CRC);
363 #else
364  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS, (const char *)&packet, MAVLINK_MSG_ID_RC_CHANNELS_LEN);
365 #endif
366 #endif
367 }
368 
369 #if MAVLINK_MSG_ID_RC_CHANNELS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
370 /*
371  This varient of _send() can be used to save stack space by re-using
372  memory from the receive buffer. The caller provides a
373  mavlink_message_t which is the size of a full mavlink message. This
374  is usually the receive buffer for the channel, and allows a reply to an
375  incoming message with minimum stack space usage.
376  */
377 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)
378 {
379 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
380  char *buf = (char *)msgbuf;
382  _mav_put_uint16_t(buf, 4, chan1_raw);
383  _mav_put_uint16_t(buf, 6, chan2_raw);
384  _mav_put_uint16_t(buf, 8, chan3_raw);
385  _mav_put_uint16_t(buf, 10, chan4_raw);
386  _mav_put_uint16_t(buf, 12, chan5_raw);
387  _mav_put_uint16_t(buf, 14, chan6_raw);
388  _mav_put_uint16_t(buf, 16, chan7_raw);
389  _mav_put_uint16_t(buf, 18, chan8_raw);
390  _mav_put_uint16_t(buf, 20, chan9_raw);
391  _mav_put_uint16_t(buf, 22, chan10_raw);
392  _mav_put_uint16_t(buf, 24, chan11_raw);
393  _mav_put_uint16_t(buf, 26, chan12_raw);
394  _mav_put_uint16_t(buf, 28, chan13_raw);
395  _mav_put_uint16_t(buf, 30, chan14_raw);
396  _mav_put_uint16_t(buf, 32, chan15_raw);
397  _mav_put_uint16_t(buf, 34, chan16_raw);
398  _mav_put_uint16_t(buf, 36, chan17_raw);
399  _mav_put_uint16_t(buf, 38, chan18_raw);
400  _mav_put_uint8_t(buf, 40, chancount);
401  _mav_put_uint8_t(buf, 41, rssi);
402 
403 #if MAVLINK_CRC_EXTRA
405 #else
406  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS, buf, MAVLINK_MSG_ID_RC_CHANNELS_LEN);
407 #endif
408 #else
409  mavlink_rc_channels_t *packet = (mavlink_rc_channels_t *)msgbuf;
410  packet->time_boot_ms = time_boot_ms;
411  packet->chan1_raw = chan1_raw;
412  packet->chan2_raw = chan2_raw;
413  packet->chan3_raw = chan3_raw;
414  packet->chan4_raw = chan4_raw;
415  packet->chan5_raw = chan5_raw;
416  packet->chan6_raw = chan6_raw;
417  packet->chan7_raw = chan7_raw;
418  packet->chan8_raw = chan8_raw;
419  packet->chan9_raw = chan9_raw;
420  packet->chan10_raw = chan10_raw;
421  packet->chan11_raw = chan11_raw;
422  packet->chan12_raw = chan12_raw;
423  packet->chan13_raw = chan13_raw;
424  packet->chan14_raw = chan14_raw;
425  packet->chan15_raw = chan15_raw;
426  packet->chan16_raw = chan16_raw;
427  packet->chan17_raw = chan17_raw;
428  packet->chan18_raw = chan18_raw;
429  packet->chancount = chancount;
430  packet->rssi = rssi;
431 
432 #if MAVLINK_CRC_EXTRA
433  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS, (const char *)packet, MAVLINK_MSG_ID_RC_CHANNELS_LEN, MAVLINK_MSG_ID_RC_CHANNELS_CRC);
434 #else
435  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS, (const char *)packet, MAVLINK_MSG_ID_RC_CHANNELS_LEN);
436 #endif
437 #endif
438 }
439 #endif
440 
441 #endif
442 
443 // MESSAGE RC_CHANNELS UNPACKING
444 
445 
451 static inline uint32_t mavlink_msg_rc_channels_get_time_boot_ms(const mavlink_message_t* msg)
452 {
453  return _MAV_RETURN_uint32_t(msg, 0);
454 }
455 
461 static inline uint8_t mavlink_msg_rc_channels_get_chancount(const mavlink_message_t* msg)
462 {
463  return _MAV_RETURN_uint8_t(msg, 40);
464 }
465 
471 static inline uint16_t mavlink_msg_rc_channels_get_chan1_raw(const mavlink_message_t* msg)
472 {
473  return _MAV_RETURN_uint16_t(msg, 4);
474 }
475 
481 static inline uint16_t mavlink_msg_rc_channels_get_chan2_raw(const mavlink_message_t* msg)
482 {
483  return _MAV_RETURN_uint16_t(msg, 6);
484 }
485 
491 static inline uint16_t mavlink_msg_rc_channels_get_chan3_raw(const mavlink_message_t* msg)
492 {
493  return _MAV_RETURN_uint16_t(msg, 8);
494 }
495 
501 static inline uint16_t mavlink_msg_rc_channels_get_chan4_raw(const mavlink_message_t* msg)
502 {
503  return _MAV_RETURN_uint16_t(msg, 10);
504 }
505 
511 static inline uint16_t mavlink_msg_rc_channels_get_chan5_raw(const mavlink_message_t* msg)
512 {
513  return _MAV_RETURN_uint16_t(msg, 12);
514 }
515 
521 static inline uint16_t mavlink_msg_rc_channels_get_chan6_raw(const mavlink_message_t* msg)
522 {
523  return _MAV_RETURN_uint16_t(msg, 14);
524 }
525 
531 static inline uint16_t mavlink_msg_rc_channels_get_chan7_raw(const mavlink_message_t* msg)
532 {
533  return _MAV_RETURN_uint16_t(msg, 16);
534 }
535 
541 static inline uint16_t mavlink_msg_rc_channels_get_chan8_raw(const mavlink_message_t* msg)
542 {
543  return _MAV_RETURN_uint16_t(msg, 18);
544 }
545 
551 static inline uint16_t mavlink_msg_rc_channels_get_chan9_raw(const mavlink_message_t* msg)
552 {
553  return _MAV_RETURN_uint16_t(msg, 20);
554 }
555 
561 static inline uint16_t mavlink_msg_rc_channels_get_chan10_raw(const mavlink_message_t* msg)
562 {
563  return _MAV_RETURN_uint16_t(msg, 22);
564 }
565 
571 static inline uint16_t mavlink_msg_rc_channels_get_chan11_raw(const mavlink_message_t* msg)
572 {
573  return _MAV_RETURN_uint16_t(msg, 24);
574 }
575 
581 static inline uint16_t mavlink_msg_rc_channels_get_chan12_raw(const mavlink_message_t* msg)
582 {
583  return _MAV_RETURN_uint16_t(msg, 26);
584 }
585 
591 static inline uint16_t mavlink_msg_rc_channels_get_chan13_raw(const mavlink_message_t* msg)
592 {
593  return _MAV_RETURN_uint16_t(msg, 28);
594 }
595 
601 static inline uint16_t mavlink_msg_rc_channels_get_chan14_raw(const mavlink_message_t* msg)
602 {
603  return _MAV_RETURN_uint16_t(msg, 30);
604 }
605 
611 static inline uint16_t mavlink_msg_rc_channels_get_chan15_raw(const mavlink_message_t* msg)
612 {
613  return _MAV_RETURN_uint16_t(msg, 32);
614 }
615 
621 static inline uint16_t mavlink_msg_rc_channels_get_chan16_raw(const mavlink_message_t* msg)
622 {
623  return _MAV_RETURN_uint16_t(msg, 34);
624 }
625 
631 static inline uint16_t mavlink_msg_rc_channels_get_chan17_raw(const mavlink_message_t* msg)
632 {
633  return _MAV_RETURN_uint16_t(msg, 36);
634 }
635 
641 static inline uint16_t mavlink_msg_rc_channels_get_chan18_raw(const mavlink_message_t* msg)
642 {
643  return _MAV_RETURN_uint16_t(msg, 38);
644 }
645 
651 static inline uint8_t mavlink_msg_rc_channels_get_rssi(const mavlink_message_t* msg)
652 {
653  return _MAV_RETURN_uint8_t(msg, 41);
654 }
655 
662 static inline void mavlink_msg_rc_channels_decode(const mavlink_message_t* msg, mavlink_rc_channels_t* rc_channels)
663 {
664 #if MAVLINK_NEED_BYTE_SWAP
685  rc_channels->rssi = mavlink_msg_rc_channels_get_rssi(msg);
686 #else
687  memcpy(rc_channels, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_RC_CHANNELS_LEN);
688 #endif
689 }
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:244
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:140
#define _mav_put_uint16_t(buf, wire_offset, b)
Definition: protocol.h:145
#define _mav_put_uint32_t(buf, wire_offset, b)
Definition: protocol.h:147


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Oct 24 2019 03:17:18