4#define MAVLINK_MSG_ID_HIL_CONTROLS 91
7typedef struct __mavlink_hil_controls_t {
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) }, \
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) }, \
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
91 char buf[MAVLINK_MSG_ID_HIL_CONTROLS_LEN];
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);
104 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
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);
122 msg->msgid = MAVLINK_MSG_ID_HIL_CONTROLS;
123 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_CRC);
145static inline uint16_t mavlink_msg_hil_controls_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
146 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
150 char buf[MAVLINK_MSG_ID_HIL_CONTROLS_LEN];
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);
163 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
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);
181 msg->msgid = MAVLINK_MSG_ID_HIL_CONTROLS;
182 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_CRC);
193static 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)
195 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);
207static 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)
209 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);
228#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
230static 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)
232#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
233 char buf[MAVLINK_MSG_ID_HIL_CONTROLS_LEN];
234 _mav_put_uint64_t(buf, 0, time_usec);
235 _mav_put_float(buf, 8, roll_ailerons);
236 _mav_put_float(buf, 12, pitch_elevator);
237 _mav_put_float(buf, 16, yaw_rudder);
238 _mav_put_float(buf, 20, throttle);
239 _mav_put_float(buf, 24, aux1);
240 _mav_put_float(buf, 28, aux2);
241 _mav_put_float(buf, 32, aux3);
242 _mav_put_float(buf, 36, aux4);
243 _mav_put_uint8_t(buf, 40, mode);
244 _mav_put_uint8_t(buf, 41, nav_mode);
246 _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);
248 mavlink_hil_controls_t packet;
249 packet.time_usec = time_usec;
250 packet.roll_ailerons = roll_ailerons;
251 packet.pitch_elevator = pitch_elevator;
252 packet.yaw_rudder = yaw_rudder;
253 packet.throttle = throttle;
259 packet.nav_mode = nav_mode;
261 _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);
270static inline void mavlink_msg_hil_controls_send_struct(mavlink_channel_t chan,
const mavlink_hil_controls_t* hil_controls)
272#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
273 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);
275 _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);
279#if MAVLINK_MSG_ID_HIL_CONTROLS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
287static 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)
289#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
290 char *buf = (
char *)msgbuf;
291 _mav_put_uint64_t(buf, 0, time_usec);
292 _mav_put_float(buf, 8, roll_ailerons);
293 _mav_put_float(buf, 12, pitch_elevator);
294 _mav_put_float(buf, 16, yaw_rudder);
295 _mav_put_float(buf, 20, throttle);
296 _mav_put_float(buf, 24, aux1);
297 _mav_put_float(buf, 28, aux2);
298 _mav_put_float(buf, 32, aux3);
299 _mav_put_float(buf, 36, aux4);
300 _mav_put_uint8_t(buf, 40, mode);
301 _mav_put_uint8_t(buf, 41, nav_mode);
303 _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);
305 mavlink_hil_controls_t *packet = (mavlink_hil_controls_t *)msgbuf;
306 packet->time_usec = time_usec;
307 packet->roll_ailerons = roll_ailerons;
308 packet->pitch_elevator = pitch_elevator;
309 packet->yaw_rudder = yaw_rudder;
310 packet->throttle = throttle;
316 packet->nav_mode = nav_mode;
318 _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);
333static inline uint64_t mavlink_msg_hil_controls_get_time_usec(
const mavlink_message_t* msg)
335 return _MAV_RETURN_uint64_t(msg, 0);
343static inline float mavlink_msg_hil_controls_get_roll_ailerons(
const mavlink_message_t* msg)
345 return _MAV_RETURN_float(msg, 8);
353static inline float mavlink_msg_hil_controls_get_pitch_elevator(
const mavlink_message_t* msg)
355 return _MAV_RETURN_float(msg, 12);
363static inline float mavlink_msg_hil_controls_get_yaw_rudder(
const mavlink_message_t* msg)
365 return _MAV_RETURN_float(msg, 16);
373static inline float mavlink_msg_hil_controls_get_throttle(
const mavlink_message_t* msg)
375 return _MAV_RETURN_float(msg, 20);
383static inline float mavlink_msg_hil_controls_get_aux1(
const mavlink_message_t* msg)
385 return _MAV_RETURN_float(msg, 24);
393static inline float mavlink_msg_hil_controls_get_aux2(
const mavlink_message_t* msg)
395 return _MAV_RETURN_float(msg, 28);
403static inline float mavlink_msg_hil_controls_get_aux3(
const mavlink_message_t* msg)
405 return _MAV_RETURN_float(msg, 32);
413static inline float mavlink_msg_hil_controls_get_aux4(
const mavlink_message_t* msg)
415 return _MAV_RETURN_float(msg, 36);
423static inline uint8_t mavlink_msg_hil_controls_get_mode(
const mavlink_message_t* msg)
425 return _MAV_RETURN_uint8_t(msg, 40);
433static inline uint8_t mavlink_msg_hil_controls_get_nav_mode(
const mavlink_message_t* msg)
435 return _MAV_RETURN_uint8_t(msg, 41);
444static inline void mavlink_msg_hil_controls_decode(
const mavlink_message_t* msg, mavlink_hil_controls_t* hil_controls)
446#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
447 hil_controls->time_usec = mavlink_msg_hil_controls_get_time_usec(msg);
448 hil_controls->roll_ailerons = mavlink_msg_hil_controls_get_roll_ailerons(msg);
449 hil_controls->pitch_elevator = mavlink_msg_hil_controls_get_pitch_elevator(msg);
450 hil_controls->yaw_rudder = mavlink_msg_hil_controls_get_yaw_rudder(msg);
451 hil_controls->throttle = mavlink_msg_hil_controls_get_throttle(msg);
452 hil_controls->aux1 = mavlink_msg_hil_controls_get_aux1(msg);
453 hil_controls->aux2 = mavlink_msg_hil_controls_get_aux2(msg);
454 hil_controls->aux3 = mavlink_msg_hil_controls_get_aux3(msg);
455 hil_controls->aux4 = mavlink_msg_hil_controls_get_aux4(msg);
456 hil_controls->mode = mavlink_msg_hil_controls_get_mode(msg);
457 hil_controls->nav_mode = mavlink_msg_hil_controls_get_nav_mode(msg);
459 uint8_t len = msg->len < MAVLINK_MSG_ID_HIL_CONTROLS_LEN? msg->len : MAVLINK_MSG_ID_HIL_CONTROLS_LEN;
460 memset(hil_controls, 0, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
461 memcpy(hil_controls, _MAV_PAYLOAD(msg), len);