4#define MAVLINK_MSG_ID_HIL_CONTROLS 91
19} mavlink_hil_controls_t;
21#define MAVLINK_MSG_ID_HIL_CONTROLS_LEN 42
22#define MAVLINK_MSG_ID_HIL_CONTROLS_MIN_LEN 42
23#define MAVLINK_MSG_ID_91_LEN 42
24#define MAVLINK_MSG_ID_91_MIN_LEN 42
26#define MAVLINK_MSG_ID_HIL_CONTROLS_CRC 63
27#define MAVLINK_MSG_ID_91_CRC 63
31#if MAVLINK_COMMAND_24BIT
32#define MAVLINK_MESSAGE_INFO_HIL_CONTROLS {
36 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_hil_controls_t, time_usec) },
37 { "roll_ailerons", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_hil_controls_t, roll_ailerons) },
38 { "pitch_elevator", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_hil_controls_t, pitch_elevator) },
39 { "yaw_rudder", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_hil_controls_t, yaw_rudder) },
40 { "throttle", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_hil_controls_t, throttle) },
41 { "aux1", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_hil_controls_t, aux1) },
42 { "aux2", NULL, MAVLINK_TYPE_FLOAT, 0
, 28
, offsetof(mavlink_hil_controls_t, aux2) },
43 { "aux3", NULL, MAVLINK_TYPE_FLOAT, 0
, 32
, offsetof(mavlink_hil_controls_t, aux3) },
44 { "aux4", NULL, MAVLINK_TYPE_FLOAT, 0
, 36
, offsetof(mavlink_hil_controls_t, aux4) },
45 { "mode", NULL, MAVLINK_TYPE_UINT8_T, 0
, 40
, offsetof(mavlink_hil_controls_t, mode) },
46 { "nav_mode", NULL, MAVLINK_TYPE_UINT8_T, 0
, 41
, offsetof(mavlink_hil_controls_t, nav_mode) },
48}
50#define MAVLINK_MESSAGE_INFO_HIL_CONTROLS {
53 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_hil_controls_t, time_usec) },
54 { "roll_ailerons", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_hil_controls_t, roll_ailerons) },
55 { "pitch_elevator", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_hil_controls_t, pitch_elevator) },
56 { "yaw_rudder", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_hil_controls_t, yaw_rudder) },
57 { "throttle", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_hil_controls_t, throttle) },
58 { "aux1", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_hil_controls_t, aux1) },
59 { "aux2", NULL, MAVLINK_TYPE_FLOAT, 0
, 28
, offsetof(mavlink_hil_controls_t, aux2) },
60 { "aux3", NULL, MAVLINK_TYPE_FLOAT, 0
, 32
, offsetof(mavlink_hil_controls_t, aux3) },
61 { "aux4", NULL, MAVLINK_TYPE_FLOAT, 0
, 36
, offsetof(mavlink_hil_controls_t, aux4) },
62 { "mode", NULL, MAVLINK_TYPE_UINT8_T, 0
, 40
, offsetof(mavlink_hil_controls_t, mode) },
63 { "nav_mode", NULL, MAVLINK_TYPE_UINT8_T, 0
, 41
, offsetof(mavlink_hil_controls_t, nav_mode) },
65}
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87static inline uint16_t mavlink_msg_hil_controls_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
88 uint64_t time_usec,
float roll_ailerons,
float pitch_elevator,
float yaw_rudder,
float throttle,
float aux1,
float aux2,
float aux3,
float aux4, uint8_t mode, uint8_t nav_mode)
90#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
92 _mav_put_uint64_t(buf, 0, time_usec);
93 _mav_put_float(buf, 8, roll_ailerons);
94 _mav_put_float(buf, 12, pitch_elevator);
95 _mav_put_float(buf, 16, yaw_rudder);
96 _mav_put_float(buf, 20, throttle);
97 _mav_put_float(buf, 24, aux1);
98 _mav_put_float(buf, 28, aux2);
99 _mav_put_float(buf, 32, aux3);
100 _mav_put_float(buf, 36, aux4);
101 _mav_put_uint8_t(buf, 40, mode);
102 _mav_put_uint8_t(buf, 41, nav_mode);
106 mavlink_hil_controls_t packet;
107 packet.time_usec = time_usec;
108 packet.roll_ailerons = roll_ailerons;
109 packet.pitch_elevator = pitch_elevator;
110 packet.yaw_rudder = yaw_rudder;
111 packet.throttle = throttle;
117 packet.nav_mode = nav_mode;
119 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146static inline uint16_t mavlink_msg_hil_controls_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
147 uint64_t time_usec,
float roll_ailerons,
float pitch_elevator,
float yaw_rudder,
float throttle,
float aux1,
float aux2,
float aux3,
float aux4, uint8_t mode, uint8_t nav_mode)
149#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
151 _mav_put_uint64_t(buf, 0, time_usec);
152 _mav_put_float(buf, 8, roll_ailerons);
153 _mav_put_float(buf, 12, pitch_elevator);
154 _mav_put_float(buf, 16, yaw_rudder);
155 _mav_put_float(buf, 20, throttle);
156 _mav_put_float(buf, 24, aux1);
157 _mav_put_float(buf, 28, aux2);
158 _mav_put_float(buf, 32, aux3);
159 _mav_put_float(buf, 36, aux4);
160 _mav_put_uint8_t(buf, 40, mode);
161 _mav_put_uint8_t(buf, 41, nav_mode);
165 mavlink_hil_controls_t packet;
166 packet.time_usec = time_usec;
167 packet.roll_ailerons = roll_ailerons;
168 packet.pitch_elevator = pitch_elevator;
169 packet.yaw_rudder = yaw_rudder;
170 packet.throttle = throttle;
176 packet.nav_mode = nav_mode;
178 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
183 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_HIL_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_CRC);
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208static inline uint16_t mavlink_msg_hil_controls_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
209 mavlink_message_t* msg,
210 uint64_t time_usec,
float roll_ailerons,
float pitch_elevator,
float yaw_rudder,
float throttle,
float aux1,
float aux2,
float aux3,
float aux4,uint8_t mode,uint8_t nav_mode)
212#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
214 _mav_put_uint64_t(buf, 0, time_usec);
215 _mav_put_float(buf, 8, roll_ailerons);
216 _mav_put_float(buf, 12, pitch_elevator);
217 _mav_put_float(buf, 16, yaw_rudder);
218 _mav_put_float(buf, 20, throttle);
219 _mav_put_float(buf, 24, aux1);
220 _mav_put_float(buf, 28, aux2);
221 _mav_put_float(buf, 32, aux3);
222 _mav_put_float(buf, 36, aux4);
223 _mav_put_uint8_t(buf, 40, mode);
224 _mav_put_uint8_t(buf, 41, nav_mode);
228 mavlink_hil_controls_t packet;
229 packet.time_usec = time_usec;
230 packet.roll_ailerons = roll_ailerons;
231 packet.pitch_elevator = pitch_elevator;
232 packet.yaw_rudder = yaw_rudder;
233 packet.throttle = throttle;
239 packet.nav_mode = nav_mode;
241 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
249
250
251
252
253
254
255
256static inline uint16_t mavlink_msg_hil_controls_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_hil_controls_t* hil_controls)
258 return mavlink_msg_hil_controls_pack(system_id, component_id, msg, hil_controls->time_usec, hil_controls->roll_ailerons, hil_controls->pitch_elevator, hil_controls->yaw_rudder, hil_controls->throttle, hil_controls->aux1, hil_controls->aux2, hil_controls->aux3, hil_controls->aux4, hil_controls->mode, hil_controls->nav_mode);
262
263
264
265
266
267
268
269
270static inline uint16_t mavlink_msg_hil_controls_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_hil_controls_t* hil_controls)
272 return mavlink_msg_hil_controls_pack_chan(system_id, component_id, chan, msg, hil_controls->time_usec, hil_controls->roll_ailerons, hil_controls->pitch_elevator, hil_controls->yaw_rudder, hil_controls->throttle, hil_controls->aux1, hil_controls->aux2, hil_controls->aux3, hil_controls->aux4, hil_controls->mode, hil_controls->nav_mode);
276
277
278
279
280
281
282
283
284static inline uint16_t mavlink_msg_hil_controls_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_hil_controls_t* hil_controls)
286 return mavlink_msg_hil_controls_pack_status(system_id, component_id, _status, msg, hil_controls->time_usec, hil_controls->roll_ailerons, hil_controls->pitch_elevator, hil_controls->yaw_rudder, hil_controls->throttle, hil_controls->aux1, hil_controls->aux2, hil_controls->aux3, hil_controls->aux4, hil_controls->mode, hil_controls->nav_mode);
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
307static inline void mavlink_msg_hil_controls_send(mavlink_channel_t chan, uint64_t time_usec,
float roll_ailerons,
float pitch_elevator,
float yaw_rudder,
float throttle,
float aux1,
float aux2,
float aux3,
float aux4, uint8_t mode, uint8_t nav_mode)
309#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
310 char buf[MAVLINK_MSG_ID_HIL_CONTROLS_LEN];
311 _mav_put_uint64_t(buf, 0, time_usec);
312 _mav_put_float(buf, 8, roll_ailerons);
313 _mav_put_float(buf, 12, pitch_elevator);
314 _mav_put_float(buf, 16, yaw_rudder);
315 _mav_put_float(buf, 20, throttle);
316 _mav_put_float(buf, 24, aux1);
317 _mav_put_float(buf, 28, aux2);
318 _mav_put_float(buf, 32, aux3);
319 _mav_put_float(buf, 36, aux4);
320 _mav_put_uint8_t(buf, 40, mode);
321 _mav_put_uint8_t(buf, 41, nav_mode);
323 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, buf, MAVLINK_MSG_ID_HIL_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_CRC);
325 mavlink_hil_controls_t packet;
326 packet.time_usec = time_usec;
327 packet.roll_ailerons = roll_ailerons;
328 packet.pitch_elevator = pitch_elevator;
329 packet.yaw_rudder = yaw_rudder;
330 packet.throttle = throttle;
336 packet.nav_mode = nav_mode;
338 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, (
const char *)&packet, MAVLINK_MSG_ID_HIL_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_CRC);
343
344
345
346
347static inline void mavlink_msg_hil_controls_send_struct(mavlink_channel_t chan,
const mavlink_hil_controls_t* hil_controls)
349#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
350 mavlink_msg_hil_controls_send(chan, hil_controls->time_usec, hil_controls->roll_ailerons, hil_controls->pitch_elevator, hil_controls->yaw_rudder, hil_controls->throttle, hil_controls->aux1, hil_controls->aux2, hil_controls->aux3, hil_controls->aux4, hil_controls->mode, hil_controls->nav_mode);
352 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, (
const char *)hil_controls, MAVLINK_MSG_ID_HIL_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_CRC);
356#if MAVLINK_MSG_ID_HIL_CONTROLS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
358
359
360
361
362
363
364static inline void mavlink_msg_hil_controls_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec,
float roll_ailerons,
float pitch_elevator,
float yaw_rudder,
float throttle,
float aux1,
float aux2,
float aux3,
float aux4, uint8_t mode, uint8_t nav_mode)
366#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
367 char *buf = (
char *)msgbuf;
368 _mav_put_uint64_t(buf, 0, time_usec);
369 _mav_put_float(buf, 8, roll_ailerons);
370 _mav_put_float(buf, 12, pitch_elevator);
371 _mav_put_float(buf, 16, yaw_rudder);
372 _mav_put_float(buf, 20, throttle);
373 _mav_put_float(buf, 24, aux1);
374 _mav_put_float(buf, 28, aux2);
375 _mav_put_float(buf, 32, aux3);
376 _mav_put_float(buf, 36, aux4);
377 _mav_put_uint8_t(buf, 40, mode);
378 _mav_put_uint8_t(buf, 41, nav_mode);
380 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, buf, MAVLINK_MSG_ID_HIL_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_CRC);
382 mavlink_hil_controls_t *packet = (mavlink_hil_controls_t *)msgbuf;
383 packet->time_usec = time_usec;
384 packet->roll_ailerons = roll_ailerons;
385 packet->pitch_elevator = pitch_elevator;
386 packet->yaw_rudder = yaw_rudder;
387 packet->throttle = throttle;
393 packet->nav_mode = nav_mode;
395 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, (
const char *)packet, MAVLINK_MSG_ID_HIL_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_CRC);
406
407
408
409
410static inline uint64_t mavlink_msg_hil_controls_get_time_usec(
const mavlink_message_t* msg)
412 return _MAV_RETURN_uint64_t(msg, 0);
416
417
418
419
420static inline float mavlink_msg_hil_controls_get_roll_ailerons(
const mavlink_message_t* msg)
422 return _MAV_RETURN_float(msg, 8);
426
427
428
429
430static inline float mavlink_msg_hil_controls_get_pitch_elevator(
const mavlink_message_t* msg)
432 return _MAV_RETURN_float(msg, 12);
436
437
438
439
440static inline float mavlink_msg_hil_controls_get_yaw_rudder(
const mavlink_message_t* msg)
442 return _MAV_RETURN_float(msg, 16);
446
447
448
449
450static inline float mavlink_msg_hil_controls_get_throttle(
const mavlink_message_t* msg)
452 return _MAV_RETURN_float(msg, 20);
456
457
458
459
460static inline float mavlink_msg_hil_controls_get_aux1(
const mavlink_message_t* msg)
462 return _MAV_RETURN_float(msg, 24);
466
467
468
469
470static inline float mavlink_msg_hil_controls_get_aux2(
const mavlink_message_t* msg)
472 return _MAV_RETURN_float(msg, 28);
476
477
478
479
480static inline float mavlink_msg_hil_controls_get_aux3(
const mavlink_message_t* msg)
482 return _MAV_RETURN_float(msg, 32);
486
487
488
489
490static inline float mavlink_msg_hil_controls_get_aux4(
const mavlink_message_t* msg)
492 return _MAV_RETURN_float(msg, 36);
496
497
498
499
500static inline uint8_t mavlink_msg_hil_controls_get_mode(
const mavlink_message_t* msg)
502 return _MAV_RETURN_uint8_t(msg, 40);
506
507
508
509
510static inline uint8_t mavlink_msg_hil_controls_get_nav_mode(
const mavlink_message_t* msg)
512 return _MAV_RETURN_uint8_t(msg, 41);
516
517
518
519
520
521static inline void mavlink_msg_hil_controls_decode(
const mavlink_message_t* msg, mavlink_hil_controls_t* hil_controls)
523#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
524 hil_controls->time_usec = mavlink_msg_hil_controls_get_time_usec(msg);
525 hil_controls->roll_ailerons = mavlink_msg_hil_controls_get_roll_ailerons(msg);
526 hil_controls->pitch_elevator = mavlink_msg_hil_controls_get_pitch_elevator(msg);
527 hil_controls->yaw_rudder = mavlink_msg_hil_controls_get_yaw_rudder(msg);
528 hil_controls->throttle = mavlink_msg_hil_controls_get_throttle(msg);
529 hil_controls->aux1 = mavlink_msg_hil_controls_get_aux1(msg);
530 hil_controls->aux2 = mavlink_msg_hil_controls_get_aux2(msg);
531 hil_controls->aux3 = mavlink_msg_hil_controls_get_aux3(msg);
532 hil_controls->aux4 = mavlink_msg_hil_controls_get_aux4(msg);
533 hil_controls->mode = mavlink_msg_hil_controls_get_mode(msg);
534 hil_controls->nav_mode = mavlink_msg_hil_controls_get_nav_mode(msg);
536 uint8_t len = msg->len < MAVLINK_MSG_ID_HIL_CONTROLS_LEN? msg->len : MAVLINK_MSG_ID_HIL_CONTROLS_LEN;
537 memset(hil_controls, 0, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
538 memcpy(hil_controls, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_HIL_CONTROLS_CRC
Definition: mavlink_msg_hil_controls.h:26
#define MAVLINK_MSG_ID_HIL_CONTROLS_LEN
Definition: mavlink_msg_hil_controls.h:21
#define MAVLINK_MSG_ID_HIL_CONTROLS
Definition: mavlink_msg_hil_controls.h:4
#define MAVLINK_MSG_ID_HIL_CONTROLS_MIN_LEN
Definition: mavlink_msg_hil_controls.h:22
Definition: mavlink_msg_hil_controls.h:7
float aux4
Definition: mavlink_msg_hil_controls.h:16
uint8_t nav_mode
Definition: mavlink_msg_hil_controls.h:18
float aux2
Definition: mavlink_msg_hil_controls.h:14
float aux1
Definition: mavlink_msg_hil_controls.h:13
uint64_t time_usec
Definition: mavlink_msg_hil_controls.h:8
uint8_t mode
Definition: mavlink_msg_hil_controls.h:17
float yaw_rudder
Definition: mavlink_msg_hil_controls.h:11
float roll_ailerons
Definition: mavlink_msg_hil_controls.h:9
float pitch_elevator
Definition: mavlink_msg_hil_controls.h:10
float throttle
Definition: mavlink_msg_hil_controls.h:12
float aux3
Definition: mavlink_msg_hil_controls.h:15