Move telemetry displayport init and cms device registering
[betaflight.git] / lib / main / MAVLink / common / mavlink_msg_hil_rc_inputs_raw.h
blob227cd9d94e4f5757873fc8a962d035dcda4d5e34
1 // MESSAGE HIL_RC_INPUTS_RAW PACKING
3 #define MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW 92
5 typedef struct __mavlink_hil_rc_inputs_raw_t
7 uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
8 uint16_t chan1_raw; ///< RC channel 1 value, in microseconds
9 uint16_t chan2_raw; ///< RC channel 2 value, in microseconds
10 uint16_t chan3_raw; ///< RC channel 3 value, in microseconds
11 uint16_t chan4_raw; ///< RC channel 4 value, in microseconds
12 uint16_t chan5_raw; ///< RC channel 5 value, in microseconds
13 uint16_t chan6_raw; ///< RC channel 6 value, in microseconds
14 uint16_t chan7_raw; ///< RC channel 7 value, in microseconds
15 uint16_t chan8_raw; ///< RC channel 8 value, in microseconds
16 uint16_t chan9_raw; ///< RC channel 9 value, in microseconds
17 uint16_t chan10_raw; ///< RC channel 10 value, in microseconds
18 uint16_t chan11_raw; ///< RC channel 11 value, in microseconds
19 uint16_t chan12_raw; ///< RC channel 12 value, in microseconds
20 uint8_t rssi; ///< Receive signal strength indicator, 0: 0%, 255: 100%
21 } mavlink_hil_rc_inputs_raw_t;
23 #define MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN 33
24 #define MAVLINK_MSG_ID_92_LEN 33
26 #define MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_CRC 54
27 #define MAVLINK_MSG_ID_92_CRC 54
31 #define MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW { \
32 "HIL_RC_INPUTS_RAW", \
33 14, \
34 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_rc_inputs_raw_t, time_usec) }, \
35 { "chan1_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_hil_rc_inputs_raw_t, chan1_raw) }, \
36 { "chan2_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_hil_rc_inputs_raw_t, chan2_raw) }, \
37 { "chan3_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_hil_rc_inputs_raw_t, chan3_raw) }, \
38 { "chan4_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_hil_rc_inputs_raw_t, chan4_raw) }, \
39 { "chan5_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_hil_rc_inputs_raw_t, chan5_raw) }, \
40 { "chan6_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_hil_rc_inputs_raw_t, chan6_raw) }, \
41 { "chan7_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_hil_rc_inputs_raw_t, chan7_raw) }, \
42 { "chan8_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_hil_rc_inputs_raw_t, chan8_raw) }, \
43 { "chan9_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_hil_rc_inputs_raw_t, chan9_raw) }, \
44 { "chan10_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_hil_rc_inputs_raw_t, chan10_raw) }, \
45 { "chan11_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_hil_rc_inputs_raw_t, chan11_raw) }, \
46 { "chan12_raw", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_hil_rc_inputs_raw_t, chan12_raw) }, \
47 { "rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_hil_rc_inputs_raw_t, rssi) }, \
48 } \
52 /**
53 * @brief Pack a hil_rc_inputs_raw message
54 * @param system_id ID of this system
55 * @param component_id ID of this component (e.g. 200 for IMU)
56 * @param msg The MAVLink message to compress the data into
58 * @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
59 * @param chan1_raw RC channel 1 value, in microseconds
60 * @param chan2_raw RC channel 2 value, in microseconds
61 * @param chan3_raw RC channel 3 value, in microseconds
62 * @param chan4_raw RC channel 4 value, in microseconds
63 * @param chan5_raw RC channel 5 value, in microseconds
64 * @param chan6_raw RC channel 6 value, in microseconds
65 * @param chan7_raw RC channel 7 value, in microseconds
66 * @param chan8_raw RC channel 8 value, in microseconds
67 * @param chan9_raw RC channel 9 value, in microseconds
68 * @param chan10_raw RC channel 10 value, in microseconds
69 * @param chan11_raw RC channel 11 value, in microseconds
70 * @param chan12_raw RC channel 12 value, in microseconds
71 * @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
72 * @return length of the message in bytes (excluding serial stream start sign)
74 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
75 uint64_t time_usec, 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, uint8_t rssi)
77 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
78 char buf[MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN];
79 _mav_put_uint64_t(buf, 0, time_usec);
80 _mav_put_uint16_t(buf, 8, chan1_raw);
81 _mav_put_uint16_t(buf, 10, chan2_raw);
82 _mav_put_uint16_t(buf, 12, chan3_raw);
83 _mav_put_uint16_t(buf, 14, chan4_raw);
84 _mav_put_uint16_t(buf, 16, chan5_raw);
85 _mav_put_uint16_t(buf, 18, chan6_raw);
86 _mav_put_uint16_t(buf, 20, chan7_raw);
87 _mav_put_uint16_t(buf, 22, chan8_raw);
88 _mav_put_uint16_t(buf, 24, chan9_raw);
89 _mav_put_uint16_t(buf, 26, chan10_raw);
90 _mav_put_uint16_t(buf, 28, chan11_raw);
91 _mav_put_uint16_t(buf, 30, chan12_raw);
92 _mav_put_uint8_t(buf, 32, rssi);
94 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
95 #else
96 mavlink_hil_rc_inputs_raw_t packet;
97 packet.time_usec = time_usec;
98 packet.chan1_raw = chan1_raw;
99 packet.chan2_raw = chan2_raw;
100 packet.chan3_raw = chan3_raw;
101 packet.chan4_raw = chan4_raw;
102 packet.chan5_raw = chan5_raw;
103 packet.chan6_raw = chan6_raw;
104 packet.chan7_raw = chan7_raw;
105 packet.chan8_raw = chan8_raw;
106 packet.chan9_raw = chan9_raw;
107 packet.chan10_raw = chan10_raw;
108 packet.chan11_raw = chan11_raw;
109 packet.chan12_raw = chan12_raw;
110 packet.rssi = rssi;
112 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
113 #endif
115 msg->msgid = MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW;
116 #if MAVLINK_CRC_EXTRA
117 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_CRC);
118 #else
119 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
120 #endif
124 * @brief Pack a hil_rc_inputs_raw message on a channel
125 * @param system_id ID of this system
126 * @param component_id ID of this component (e.g. 200 for IMU)
127 * @param chan The MAVLink channel this message will be sent over
128 * @param msg The MAVLink message to compress the data into
129 * @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
130 * @param chan1_raw RC channel 1 value, in microseconds
131 * @param chan2_raw RC channel 2 value, in microseconds
132 * @param chan3_raw RC channel 3 value, in microseconds
133 * @param chan4_raw RC channel 4 value, in microseconds
134 * @param chan5_raw RC channel 5 value, in microseconds
135 * @param chan6_raw RC channel 6 value, in microseconds
136 * @param chan7_raw RC channel 7 value, in microseconds
137 * @param chan8_raw RC channel 8 value, in microseconds
138 * @param chan9_raw RC channel 9 value, in microseconds
139 * @param chan10_raw RC channel 10 value, in microseconds
140 * @param chan11_raw RC channel 11 value, in microseconds
141 * @param chan12_raw RC channel 12 value, in microseconds
142 * @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
143 * @return length of the message in bytes (excluding serial stream start sign)
145 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
146 mavlink_message_t* msg,
147 uint64_t time_usec,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,uint8_t rssi)
149 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
150 char buf[MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN];
151 _mav_put_uint64_t(buf, 0, time_usec);
152 _mav_put_uint16_t(buf, 8, chan1_raw);
153 _mav_put_uint16_t(buf, 10, chan2_raw);
154 _mav_put_uint16_t(buf, 12, chan3_raw);
155 _mav_put_uint16_t(buf, 14, chan4_raw);
156 _mav_put_uint16_t(buf, 16, chan5_raw);
157 _mav_put_uint16_t(buf, 18, chan6_raw);
158 _mav_put_uint16_t(buf, 20, chan7_raw);
159 _mav_put_uint16_t(buf, 22, chan8_raw);
160 _mav_put_uint16_t(buf, 24, chan9_raw);
161 _mav_put_uint16_t(buf, 26, chan10_raw);
162 _mav_put_uint16_t(buf, 28, chan11_raw);
163 _mav_put_uint16_t(buf, 30, chan12_raw);
164 _mav_put_uint8_t(buf, 32, rssi);
166 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
167 #else
168 mavlink_hil_rc_inputs_raw_t packet;
169 packet.time_usec = time_usec;
170 packet.chan1_raw = chan1_raw;
171 packet.chan2_raw = chan2_raw;
172 packet.chan3_raw = chan3_raw;
173 packet.chan4_raw = chan4_raw;
174 packet.chan5_raw = chan5_raw;
175 packet.chan6_raw = chan6_raw;
176 packet.chan7_raw = chan7_raw;
177 packet.chan8_raw = chan8_raw;
178 packet.chan9_raw = chan9_raw;
179 packet.chan10_raw = chan10_raw;
180 packet.chan11_raw = chan11_raw;
181 packet.chan12_raw = chan12_raw;
182 packet.rssi = rssi;
184 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
185 #endif
187 msg->msgid = MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW;
188 #if MAVLINK_CRC_EXTRA
189 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_CRC);
190 #else
191 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
192 #endif
196 * @brief Encode a hil_rc_inputs_raw struct
198 * @param system_id ID of this system
199 * @param component_id ID of this component (e.g. 200 for IMU)
200 * @param msg The MAVLink message to compress the data into
201 * @param hil_rc_inputs_raw C-struct to read the message contents from
203 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_rc_inputs_raw_t* hil_rc_inputs_raw)
205 return mavlink_msg_hil_rc_inputs_raw_pack(system_id, component_id, msg, hil_rc_inputs_raw->time_usec, hil_rc_inputs_raw->chan1_raw, hil_rc_inputs_raw->chan2_raw, hil_rc_inputs_raw->chan3_raw, hil_rc_inputs_raw->chan4_raw, hil_rc_inputs_raw->chan5_raw, hil_rc_inputs_raw->chan6_raw, hil_rc_inputs_raw->chan7_raw, hil_rc_inputs_raw->chan8_raw, hil_rc_inputs_raw->chan9_raw, hil_rc_inputs_raw->chan10_raw, hil_rc_inputs_raw->chan11_raw, hil_rc_inputs_raw->chan12_raw, hil_rc_inputs_raw->rssi);
209 * @brief Encode a hil_rc_inputs_raw struct on a channel
211 * @param system_id ID of this system
212 * @param component_id ID of this component (e.g. 200 for IMU)
213 * @param chan The MAVLink channel this message will be sent over
214 * @param msg The MAVLink message to compress the data into
215 * @param hil_rc_inputs_raw C-struct to read the message contents from
217 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_hil_rc_inputs_raw_t* hil_rc_inputs_raw)
219 return mavlink_msg_hil_rc_inputs_raw_pack_chan(system_id, component_id, chan, msg, hil_rc_inputs_raw->time_usec, hil_rc_inputs_raw->chan1_raw, hil_rc_inputs_raw->chan2_raw, hil_rc_inputs_raw->chan3_raw, hil_rc_inputs_raw->chan4_raw, hil_rc_inputs_raw->chan5_raw, hil_rc_inputs_raw->chan6_raw, hil_rc_inputs_raw->chan7_raw, hil_rc_inputs_raw->chan8_raw, hil_rc_inputs_raw->chan9_raw, hil_rc_inputs_raw->chan10_raw, hil_rc_inputs_raw->chan11_raw, hil_rc_inputs_raw->chan12_raw, hil_rc_inputs_raw->rssi);
223 * @brief Send a hil_rc_inputs_raw message
224 * @param chan MAVLink channel to send the message
226 * @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
227 * @param chan1_raw RC channel 1 value, in microseconds
228 * @param chan2_raw RC channel 2 value, in microseconds
229 * @param chan3_raw RC channel 3 value, in microseconds
230 * @param chan4_raw RC channel 4 value, in microseconds
231 * @param chan5_raw RC channel 5 value, in microseconds
232 * @param chan6_raw RC channel 6 value, in microseconds
233 * @param chan7_raw RC channel 7 value, in microseconds
234 * @param chan8_raw RC channel 8 value, in microseconds
235 * @param chan9_raw RC channel 9 value, in microseconds
236 * @param chan10_raw RC channel 10 value, in microseconds
237 * @param chan11_raw RC channel 11 value, in microseconds
238 * @param chan12_raw RC channel 12 value, in microseconds
239 * @param rssi Receive signal strength indicator, 0: 0%, 255: 100%
241 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
243 static inline void mavlink_msg_hil_rc_inputs_raw_send(mavlink_channel_t chan, uint64_t time_usec, 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, uint8_t rssi)
245 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
246 char buf[MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN];
247 _mav_put_uint64_t(buf, 0, time_usec);
248 _mav_put_uint16_t(buf, 8, chan1_raw);
249 _mav_put_uint16_t(buf, 10, chan2_raw);
250 _mav_put_uint16_t(buf, 12, chan3_raw);
251 _mav_put_uint16_t(buf, 14, chan4_raw);
252 _mav_put_uint16_t(buf, 16, chan5_raw);
253 _mav_put_uint16_t(buf, 18, chan6_raw);
254 _mav_put_uint16_t(buf, 20, chan7_raw);
255 _mav_put_uint16_t(buf, 22, chan8_raw);
256 _mav_put_uint16_t(buf, 24, chan9_raw);
257 _mav_put_uint16_t(buf, 26, chan10_raw);
258 _mav_put_uint16_t(buf, 28, chan11_raw);
259 _mav_put_uint16_t(buf, 30, chan12_raw);
260 _mav_put_uint8_t(buf, 32, rssi);
262 #if MAVLINK_CRC_EXTRA
263 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, buf, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_CRC);
264 #else
265 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, buf, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
266 #endif
267 #else
268 mavlink_hil_rc_inputs_raw_t packet;
269 packet.time_usec = time_usec;
270 packet.chan1_raw = chan1_raw;
271 packet.chan2_raw = chan2_raw;
272 packet.chan3_raw = chan3_raw;
273 packet.chan4_raw = chan4_raw;
274 packet.chan5_raw = chan5_raw;
275 packet.chan6_raw = chan6_raw;
276 packet.chan7_raw = chan7_raw;
277 packet.chan8_raw = chan8_raw;
278 packet.chan9_raw = chan9_raw;
279 packet.chan10_raw = chan10_raw;
280 packet.chan11_raw = chan11_raw;
281 packet.chan12_raw = chan12_raw;
282 packet.rssi = rssi;
284 #if MAVLINK_CRC_EXTRA
285 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, (const char *)&packet, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_CRC);
286 #else
287 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, (const char *)&packet, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
288 #endif
289 #endif
292 #if MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN <= MAVLINK_MAX_PAYLOAD_LEN
294 This varient of _send() can be used to save stack space by re-using
295 memory from the receive buffer. The caller provides a
296 mavlink_message_t which is the size of a full mavlink message. This
297 is usually the receive buffer for the channel, and allows a reply to an
298 incoming message with minimum stack space usage.
300 static inline void mavlink_msg_hil_rc_inputs_raw_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, 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, uint8_t rssi)
302 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
303 char *buf = (char *)msgbuf;
304 _mav_put_uint64_t(buf, 0, time_usec);
305 _mav_put_uint16_t(buf, 8, chan1_raw);
306 _mav_put_uint16_t(buf, 10, chan2_raw);
307 _mav_put_uint16_t(buf, 12, chan3_raw);
308 _mav_put_uint16_t(buf, 14, chan4_raw);
309 _mav_put_uint16_t(buf, 16, chan5_raw);
310 _mav_put_uint16_t(buf, 18, chan6_raw);
311 _mav_put_uint16_t(buf, 20, chan7_raw);
312 _mav_put_uint16_t(buf, 22, chan8_raw);
313 _mav_put_uint16_t(buf, 24, chan9_raw);
314 _mav_put_uint16_t(buf, 26, chan10_raw);
315 _mav_put_uint16_t(buf, 28, chan11_raw);
316 _mav_put_uint16_t(buf, 30, chan12_raw);
317 _mav_put_uint8_t(buf, 32, rssi);
319 #if MAVLINK_CRC_EXTRA
320 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, buf, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_CRC);
321 #else
322 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, buf, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
323 #endif
324 #else
325 mavlink_hil_rc_inputs_raw_t *packet = (mavlink_hil_rc_inputs_raw_t *)msgbuf;
326 packet->time_usec = time_usec;
327 packet->chan1_raw = chan1_raw;
328 packet->chan2_raw = chan2_raw;
329 packet->chan3_raw = chan3_raw;
330 packet->chan4_raw = chan4_raw;
331 packet->chan5_raw = chan5_raw;
332 packet->chan6_raw = chan6_raw;
333 packet->chan7_raw = chan7_raw;
334 packet->chan8_raw = chan8_raw;
335 packet->chan9_raw = chan9_raw;
336 packet->chan10_raw = chan10_raw;
337 packet->chan11_raw = chan11_raw;
338 packet->chan12_raw = chan12_raw;
339 packet->rssi = rssi;
341 #if MAVLINK_CRC_EXTRA
342 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, (const char *)packet, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_CRC);
343 #else
344 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, (const char *)packet, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
345 #endif
346 #endif
348 #endif
350 #endif
352 // MESSAGE HIL_RC_INPUTS_RAW UNPACKING
356 * @brief Get field time_usec from hil_rc_inputs_raw message
358 * @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
360 static inline uint64_t mavlink_msg_hil_rc_inputs_raw_get_time_usec(const mavlink_message_t* msg)
362 return _MAV_RETURN_uint64_t(msg, 0);
366 * @brief Get field chan1_raw from hil_rc_inputs_raw message
368 * @return RC channel 1 value, in microseconds
370 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan1_raw(const mavlink_message_t* msg)
372 return _MAV_RETURN_uint16_t(msg, 8);
376 * @brief Get field chan2_raw from hil_rc_inputs_raw message
378 * @return RC channel 2 value, in microseconds
380 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan2_raw(const mavlink_message_t* msg)
382 return _MAV_RETURN_uint16_t(msg, 10);
386 * @brief Get field chan3_raw from hil_rc_inputs_raw message
388 * @return RC channel 3 value, in microseconds
390 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan3_raw(const mavlink_message_t* msg)
392 return _MAV_RETURN_uint16_t(msg, 12);
396 * @brief Get field chan4_raw from hil_rc_inputs_raw message
398 * @return RC channel 4 value, in microseconds
400 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan4_raw(const mavlink_message_t* msg)
402 return _MAV_RETURN_uint16_t(msg, 14);
406 * @brief Get field chan5_raw from hil_rc_inputs_raw message
408 * @return RC channel 5 value, in microseconds
410 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan5_raw(const mavlink_message_t* msg)
412 return _MAV_RETURN_uint16_t(msg, 16);
416 * @brief Get field chan6_raw from hil_rc_inputs_raw message
418 * @return RC channel 6 value, in microseconds
420 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan6_raw(const mavlink_message_t* msg)
422 return _MAV_RETURN_uint16_t(msg, 18);
426 * @brief Get field chan7_raw from hil_rc_inputs_raw message
428 * @return RC channel 7 value, in microseconds
430 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan7_raw(const mavlink_message_t* msg)
432 return _MAV_RETURN_uint16_t(msg, 20);
436 * @brief Get field chan8_raw from hil_rc_inputs_raw message
438 * @return RC channel 8 value, in microseconds
440 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan8_raw(const mavlink_message_t* msg)
442 return _MAV_RETURN_uint16_t(msg, 22);
446 * @brief Get field chan9_raw from hil_rc_inputs_raw message
448 * @return RC channel 9 value, in microseconds
450 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan9_raw(const mavlink_message_t* msg)
452 return _MAV_RETURN_uint16_t(msg, 24);
456 * @brief Get field chan10_raw from hil_rc_inputs_raw message
458 * @return RC channel 10 value, in microseconds
460 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan10_raw(const mavlink_message_t* msg)
462 return _MAV_RETURN_uint16_t(msg, 26);
466 * @brief Get field chan11_raw from hil_rc_inputs_raw message
468 * @return RC channel 11 value, in microseconds
470 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan11_raw(const mavlink_message_t* msg)
472 return _MAV_RETURN_uint16_t(msg, 28);
476 * @brief Get field chan12_raw from hil_rc_inputs_raw message
478 * @return RC channel 12 value, in microseconds
480 static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan12_raw(const mavlink_message_t* msg)
482 return _MAV_RETURN_uint16_t(msg, 30);
486 * @brief Get field rssi from hil_rc_inputs_raw message
488 * @return Receive signal strength indicator, 0: 0%, 255: 100%
490 static inline uint8_t mavlink_msg_hil_rc_inputs_raw_get_rssi(const mavlink_message_t* msg)
492 return _MAV_RETURN_uint8_t(msg, 32);
496 * @brief Decode a hil_rc_inputs_raw message into a struct
498 * @param msg The message to decode
499 * @param hil_rc_inputs_raw C-struct to decode the message contents into
501 static inline void mavlink_msg_hil_rc_inputs_raw_decode(const mavlink_message_t* msg, mavlink_hil_rc_inputs_raw_t* hil_rc_inputs_raw)
503 #if MAVLINK_NEED_BYTE_SWAP
504 hil_rc_inputs_raw->time_usec = mavlink_msg_hil_rc_inputs_raw_get_time_usec(msg);
505 hil_rc_inputs_raw->chan1_raw = mavlink_msg_hil_rc_inputs_raw_get_chan1_raw(msg);
506 hil_rc_inputs_raw->chan2_raw = mavlink_msg_hil_rc_inputs_raw_get_chan2_raw(msg);
507 hil_rc_inputs_raw->chan3_raw = mavlink_msg_hil_rc_inputs_raw_get_chan3_raw(msg);
508 hil_rc_inputs_raw->chan4_raw = mavlink_msg_hil_rc_inputs_raw_get_chan4_raw(msg);
509 hil_rc_inputs_raw->chan5_raw = mavlink_msg_hil_rc_inputs_raw_get_chan5_raw(msg);
510 hil_rc_inputs_raw->chan6_raw = mavlink_msg_hil_rc_inputs_raw_get_chan6_raw(msg);
511 hil_rc_inputs_raw->chan7_raw = mavlink_msg_hil_rc_inputs_raw_get_chan7_raw(msg);
512 hil_rc_inputs_raw->chan8_raw = mavlink_msg_hil_rc_inputs_raw_get_chan8_raw(msg);
513 hil_rc_inputs_raw->chan9_raw = mavlink_msg_hil_rc_inputs_raw_get_chan9_raw(msg);
514 hil_rc_inputs_raw->chan10_raw = mavlink_msg_hil_rc_inputs_raw_get_chan10_raw(msg);
515 hil_rc_inputs_raw->chan11_raw = mavlink_msg_hil_rc_inputs_raw_get_chan11_raw(msg);
516 hil_rc_inputs_raw->chan12_raw = mavlink_msg_hil_rc_inputs_raw_get_chan12_raw(msg);
517 hil_rc_inputs_raw->rssi = mavlink_msg_hil_rc_inputs_raw_get_rssi(msg);
518 #else
519 memcpy(hil_rc_inputs_raw, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
520 #endif