4#define MAVLINK_MSG_ID_SCALED_IMU2 116
19} mavlink_scaled_imu2_t;
21#define MAVLINK_MSG_ID_SCALED_IMU2_LEN 24
22#define MAVLINK_MSG_ID_SCALED_IMU2_MIN_LEN 22
23#define MAVLINK_MSG_ID_116_LEN 24
24#define MAVLINK_MSG_ID_116_MIN_LEN 22
26#define MAVLINK_MSG_ID_SCALED_IMU2_CRC 76
27#define MAVLINK_MSG_ID_116_CRC 76
31#if MAVLINK_COMMAND_24BIT
32#define MAVLINK_MESSAGE_INFO_SCALED_IMU2 {
36 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 0
, offsetof(mavlink_scaled_imu2_t, time_boot_ms) },
37 { "xacc", NULL, MAVLINK_TYPE_INT16_T, 0
, 4
, offsetof(mavlink_scaled_imu2_t, xacc) },
38 { "yacc", NULL, MAVLINK_TYPE_INT16_T, 0
, 6
, offsetof(mavlink_scaled_imu2_t, yacc) },
39 { "zacc", NULL, MAVLINK_TYPE_INT16_T, 0
, 8
, offsetof(mavlink_scaled_imu2_t, zacc) },
40 { "xgyro", NULL, MAVLINK_TYPE_INT16_T, 0
, 10
, offsetof(mavlink_scaled_imu2_t, xgyro) },
41 { "ygyro", NULL, MAVLINK_TYPE_INT16_T, 0
, 12
, offsetof(mavlink_scaled_imu2_t, ygyro) },
42 { "zgyro", NULL, MAVLINK_TYPE_INT16_T, 0
, 14
, offsetof(mavlink_scaled_imu2_t, zgyro) },
43 { "xmag", NULL, MAVLINK_TYPE_INT16_T, 0
, 16
, offsetof(mavlink_scaled_imu2_t, xmag) },
44 { "ymag", NULL, MAVLINK_TYPE_INT16_T, 0
, 18
, offsetof(mavlink_scaled_imu2_t, ymag) },
45 { "zmag", NULL, MAVLINK_TYPE_INT16_T, 0
, 20
, offsetof(mavlink_scaled_imu2_t, zmag) },
46 { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0
, 22
, offsetof(mavlink_scaled_imu2_t, temperature) },
48}
50#define MAVLINK_MESSAGE_INFO_SCALED_IMU2 {
53 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 0
, offsetof(mavlink_scaled_imu2_t, time_boot_ms) },
54 { "xacc", NULL, MAVLINK_TYPE_INT16_T, 0
, 4
, offsetof(mavlink_scaled_imu2_t, xacc) },
55 { "yacc", NULL, MAVLINK_TYPE_INT16_T, 0
, 6
, offsetof(mavlink_scaled_imu2_t, yacc) },
56 { "zacc", NULL, MAVLINK_TYPE_INT16_T, 0
, 8
, offsetof(mavlink_scaled_imu2_t, zacc) },
57 { "xgyro", NULL, MAVLINK_TYPE_INT16_T, 0
, 10
, offsetof(mavlink_scaled_imu2_t, xgyro) },
58 { "ygyro", NULL, MAVLINK_TYPE_INT16_T, 0
, 12
, offsetof(mavlink_scaled_imu2_t, ygyro) },
59 { "zgyro", NULL, MAVLINK_TYPE_INT16_T, 0
, 14
, offsetof(mavlink_scaled_imu2_t, zgyro) },
60 { "xmag", NULL, MAVLINK_TYPE_INT16_T, 0
, 16
, offsetof(mavlink_scaled_imu2_t, xmag) },
61 { "ymag", NULL, MAVLINK_TYPE_INT16_T, 0
, 18
, offsetof(mavlink_scaled_imu2_t, ymag) },
62 { "zmag", NULL, MAVLINK_TYPE_INT16_T, 0
, 20
, offsetof(mavlink_scaled_imu2_t, zmag) },
63 { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0
, 22
, offsetof(mavlink_scaled_imu2_t, temperature) },
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_scaled_imu2_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
88 uint32_t time_boot_ms, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag, int16_t temperature)
90#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
92 _mav_put_uint32_t(buf, 0, time_boot_ms);
93 _mav_put_int16_t(buf, 4, xacc);
94 _mav_put_int16_t(buf, 6, yacc);
95 _mav_put_int16_t(buf, 8, zacc);
96 _mav_put_int16_t(buf, 10, xgyro);
97 _mav_put_int16_t(buf, 12, ygyro);
98 _mav_put_int16_t(buf, 14, zgyro);
99 _mav_put_int16_t(buf, 16, xmag);
100 _mav_put_int16_t(buf, 18, ymag);
101 _mav_put_int16_t(buf, 20, zmag);
102 _mav_put_int16_t(buf, 22, temperature);
106 mavlink_scaled_imu2_t packet;
107 packet.time_boot_ms = time_boot_ms;
111 packet.xgyro = xgyro;
112 packet.ygyro = ygyro;
113 packet.zgyro = zgyro;
117 packet.temperature = temperature;
119 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCALED_IMU2_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_scaled_imu2_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
147 uint32_t time_boot_ms, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag, int16_t temperature)
149#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
151 _mav_put_uint32_t(buf, 0, time_boot_ms);
152 _mav_put_int16_t(buf, 4, xacc);
153 _mav_put_int16_t(buf, 6, yacc);
154 _mav_put_int16_t(buf, 8, zacc);
155 _mav_put_int16_t(buf, 10, xgyro);
156 _mav_put_int16_t(buf, 12, ygyro);
157 _mav_put_int16_t(buf, 14, zgyro);
158 _mav_put_int16_t(buf, 16, xmag);
159 _mav_put_int16_t(buf, 18, ymag);
160 _mav_put_int16_t(buf, 20, zmag);
161 _mav_put_int16_t(buf, 22, temperature);
165 mavlink_scaled_imu2_t packet;
166 packet.time_boot_ms = time_boot_ms;
170 packet.xgyro = xgyro;
171 packet.ygyro = ygyro;
172 packet.zgyro = zgyro;
176 packet.temperature = temperature;
178 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCALED_IMU2_LEN);
183 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SCALED_IMU2_MIN_LEN, MAVLINK_MSG_ID_SCALED_IMU2_LEN, MAVLINK_MSG_ID_SCALED_IMU2_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_scaled_imu2_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
209 mavlink_message_t* msg,
210 uint32_t time_boot_ms,int16_t xacc,int16_t yacc,int16_t zacc,int16_t xgyro,int16_t ygyro,int16_t zgyro,int16_t xmag,int16_t ymag,int16_t zmag,int16_t temperature)
212#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
214 _mav_put_uint32_t(buf, 0, time_boot_ms);
215 _mav_put_int16_t(buf, 4, xacc);
216 _mav_put_int16_t(buf, 6, yacc);
217 _mav_put_int16_t(buf, 8, zacc);
218 _mav_put_int16_t(buf, 10, xgyro);
219 _mav_put_int16_t(buf, 12, ygyro);
220 _mav_put_int16_t(buf, 14, zgyro);
221 _mav_put_int16_t(buf, 16, xmag);
222 _mav_put_int16_t(buf, 18, ymag);
223 _mav_put_int16_t(buf, 20, zmag);
224 _mav_put_int16_t(buf, 22, temperature);
228 mavlink_scaled_imu2_t packet;
229 packet.time_boot_ms = time_boot_ms;
233 packet.xgyro = xgyro;
234 packet.ygyro = ygyro;
235 packet.zgyro = zgyro;
239 packet.temperature = temperature;
241 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCALED_IMU2_LEN);
249
250
251
252
253
254
255
256static inline uint16_t mavlink_msg_scaled_imu2_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_scaled_imu2_t* scaled_imu2)
258 return mavlink_msg_scaled_imu2_pack(system_id, component_id, msg, scaled_imu2->time_boot_ms, scaled_imu2->xacc, scaled_imu2->yacc, scaled_imu2->zacc, scaled_imu2->xgyro, scaled_imu2->ygyro, scaled_imu2->zgyro, scaled_imu2->xmag, scaled_imu2->ymag, scaled_imu2->zmag, scaled_imu2->temperature);
262
263
264
265
266
267
268
269
270static inline uint16_t mavlink_msg_scaled_imu2_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_scaled_imu2_t* scaled_imu2)
272 return mavlink_msg_scaled_imu2_pack_chan(system_id, component_id, chan, msg, scaled_imu2->time_boot_ms, scaled_imu2->xacc, scaled_imu2->yacc, scaled_imu2->zacc, scaled_imu2->xgyro, scaled_imu2->ygyro, scaled_imu2->zgyro, scaled_imu2->xmag, scaled_imu2->ymag, scaled_imu2->zmag, scaled_imu2->temperature);
276
277
278
279
280
281
282
283
284static inline uint16_t mavlink_msg_scaled_imu2_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_scaled_imu2_t* scaled_imu2)
286 return mavlink_msg_scaled_imu2_pack_status(system_id, component_id, _status, msg, scaled_imu2->time_boot_ms, scaled_imu2->xacc, scaled_imu2->yacc, scaled_imu2->zacc, scaled_imu2->xgyro, scaled_imu2->ygyro, scaled_imu2->zgyro, scaled_imu2->xmag, scaled_imu2->ymag, scaled_imu2->zmag, scaled_imu2->temperature);
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_scaled_imu2_send(mavlink_channel_t chan, uint32_t time_boot_ms, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag, int16_t temperature)
309#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
310 char buf[MAVLINK_MSG_ID_SCALED_IMU2_LEN];
311 _mav_put_uint32_t(buf, 0, time_boot_ms);
312 _mav_put_int16_t(buf, 4, xacc);
313 _mav_put_int16_t(buf, 6, yacc);
314 _mav_put_int16_t(buf, 8, zacc);
315 _mav_put_int16_t(buf, 10, xgyro);
316 _mav_put_int16_t(buf, 12, ygyro);
317 _mav_put_int16_t(buf, 14, zgyro);
318 _mav_put_int16_t(buf, 16, xmag);
319 _mav_put_int16_t(buf, 18, ymag);
320 _mav_put_int16_t(buf, 20, zmag);
321 _mav_put_int16_t(buf, 22, temperature);
323 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_IMU2, buf, MAVLINK_MSG_ID_SCALED_IMU2_MIN_LEN, MAVLINK_MSG_ID_SCALED_IMU2_LEN, MAVLINK_MSG_ID_SCALED_IMU2_CRC);
325 mavlink_scaled_imu2_t packet;
326 packet.time_boot_ms = time_boot_ms;
330 packet.xgyro = xgyro;
331 packet.ygyro = ygyro;
332 packet.zgyro = zgyro;
336 packet.temperature = temperature;
338 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_IMU2, (
const char *)&packet, MAVLINK_MSG_ID_SCALED_IMU2_MIN_LEN, MAVLINK_MSG_ID_SCALED_IMU2_LEN, MAVLINK_MSG_ID_SCALED_IMU2_CRC);
343
344
345
346
347static inline void mavlink_msg_scaled_imu2_send_struct(mavlink_channel_t chan,
const mavlink_scaled_imu2_t* scaled_imu2)
349#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
350 mavlink_msg_scaled_imu2_send(chan, scaled_imu2->time_boot_ms, scaled_imu2->xacc, scaled_imu2->yacc, scaled_imu2->zacc, scaled_imu2->xgyro, scaled_imu2->ygyro, scaled_imu2->zgyro, scaled_imu2->xmag, scaled_imu2->ymag, scaled_imu2->zmag, scaled_imu2->temperature);
352 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_IMU2, (
const char *)scaled_imu2, MAVLINK_MSG_ID_SCALED_IMU2_MIN_LEN, MAVLINK_MSG_ID_SCALED_IMU2_LEN, MAVLINK_MSG_ID_SCALED_IMU2_CRC);
356#if MAVLINK_MSG_ID_SCALED_IMU2_LEN <= MAVLINK_MAX_PAYLOAD_LEN
358
359
360
361
362
363
364static inline void mavlink_msg_scaled_imu2_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag, int16_t temperature)
366#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
367 char *buf = (
char *)msgbuf;
368 _mav_put_uint32_t(buf, 0, time_boot_ms);
369 _mav_put_int16_t(buf, 4, xacc);
370 _mav_put_int16_t(buf, 6, yacc);
371 _mav_put_int16_t(buf, 8, zacc);
372 _mav_put_int16_t(buf, 10, xgyro);
373 _mav_put_int16_t(buf, 12, ygyro);
374 _mav_put_int16_t(buf, 14, zgyro);
375 _mav_put_int16_t(buf, 16, xmag);
376 _mav_put_int16_t(buf, 18, ymag);
377 _mav_put_int16_t(buf, 20, zmag);
378 _mav_put_int16_t(buf, 22, temperature);
380 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_IMU2, buf, MAVLINK_MSG_ID_SCALED_IMU2_MIN_LEN, MAVLINK_MSG_ID_SCALED_IMU2_LEN, MAVLINK_MSG_ID_SCALED_IMU2_CRC);
382 mavlink_scaled_imu2_t *packet = (mavlink_scaled_imu2_t *)msgbuf;
383 packet->time_boot_ms = time_boot_ms;
387 packet->xgyro = xgyro;
388 packet->ygyro = ygyro;
389 packet->zgyro = zgyro;
393 packet->temperature = temperature;
395 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_IMU2, (
const char *)packet, MAVLINK_MSG_ID_SCALED_IMU2_MIN_LEN, MAVLINK_MSG_ID_SCALED_IMU2_LEN, MAVLINK_MSG_ID_SCALED_IMU2_CRC);
406
407
408
409
410static inline uint32_t mavlink_msg_scaled_imu2_get_time_boot_ms(
const mavlink_message_t* msg)
412 return _MAV_RETURN_uint32_t(msg, 0);
416
417
418
419
420static inline int16_t mavlink_msg_scaled_imu2_get_xacc(
const mavlink_message_t* msg)
422 return _MAV_RETURN_int16_t(msg, 4);
426
427
428
429
430static inline int16_t mavlink_msg_scaled_imu2_get_yacc(
const mavlink_message_t* msg)
432 return _MAV_RETURN_int16_t(msg, 6);
436
437
438
439
440static inline int16_t mavlink_msg_scaled_imu2_get_zacc(
const mavlink_message_t* msg)
442 return _MAV_RETURN_int16_t(msg, 8);
446
447
448
449
450static inline int16_t mavlink_msg_scaled_imu2_get_xgyro(
const mavlink_message_t* msg)
452 return _MAV_RETURN_int16_t(msg, 10);
456
457
458
459
460static inline int16_t mavlink_msg_scaled_imu2_get_ygyro(
const mavlink_message_t* msg)
462 return _MAV_RETURN_int16_t(msg, 12);
466
467
468
469
470static inline int16_t mavlink_msg_scaled_imu2_get_zgyro(
const mavlink_message_t* msg)
472 return _MAV_RETURN_int16_t(msg, 14);
476
477
478
479
480static inline int16_t mavlink_msg_scaled_imu2_get_xmag(
const mavlink_message_t* msg)
482 return _MAV_RETURN_int16_t(msg, 16);
486
487
488
489
490static inline int16_t mavlink_msg_scaled_imu2_get_ymag(
const mavlink_message_t* msg)
492 return _MAV_RETURN_int16_t(msg, 18);
496
497
498
499
500static inline int16_t mavlink_msg_scaled_imu2_get_zmag(
const mavlink_message_t* msg)
502 return _MAV_RETURN_int16_t(msg, 20);
506
507
508
509
510static inline int16_t mavlink_msg_scaled_imu2_get_temperature(
const mavlink_message_t* msg)
512 return _MAV_RETURN_int16_t(msg, 22);
516
517
518
519
520
521static inline void mavlink_msg_scaled_imu2_decode(
const mavlink_message_t* msg, mavlink_scaled_imu2_t* scaled_imu2)
523#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
524 scaled_imu2->time_boot_ms = mavlink_msg_scaled_imu2_get_time_boot_ms(msg);
525 scaled_imu2->xacc = mavlink_msg_scaled_imu2_get_xacc(msg);
526 scaled_imu2->yacc = mavlink_msg_scaled_imu2_get_yacc(msg);
527 scaled_imu2->zacc = mavlink_msg_scaled_imu2_get_zacc(msg);
528 scaled_imu2->xgyro = mavlink_msg_scaled_imu2_get_xgyro(msg);
529 scaled_imu2->ygyro = mavlink_msg_scaled_imu2_get_ygyro(msg);
530 scaled_imu2->zgyro = mavlink_msg_scaled_imu2_get_zgyro(msg);
531 scaled_imu2->xmag = mavlink_msg_scaled_imu2_get_xmag(msg);
532 scaled_imu2->ymag = mavlink_msg_scaled_imu2_get_ymag(msg);
533 scaled_imu2->zmag = mavlink_msg_scaled_imu2_get_zmag(msg);
534 scaled_imu2->temperature = mavlink_msg_scaled_imu2_get_temperature(msg);
536 uint8_t len = msg->len < MAVLINK_MSG_ID_SCALED_IMU2_LEN? msg->len : MAVLINK_MSG_ID_SCALED_IMU2_LEN;
537 memset(scaled_imu2, 0, MAVLINK_MSG_ID_SCALED_IMU2_LEN);
538 memcpy(scaled_imu2, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_SCALED_IMU2_MIN_LEN
Definition: mavlink_msg_scaled_imu2.h:22
#define MAVLINK_MSG_ID_SCALED_IMU2_LEN
Definition: mavlink_msg_scaled_imu2.h:21
#define MAVLINK_MSG_ID_SCALED_IMU2_CRC
Definition: mavlink_msg_scaled_imu2.h:26
#define MAVLINK_MSG_ID_SCALED_IMU2
Definition: mavlink_msg_scaled_imu2.h:4
Definition: mavlink_msg_scaled_imu2.h:7
int16_t zgyro
Definition: mavlink_msg_scaled_imu2.h:14
int16_t zmag
Definition: mavlink_msg_scaled_imu2.h:17
int16_t temperature
Definition: mavlink_msg_scaled_imu2.h:18
int16_t xgyro
Definition: mavlink_msg_scaled_imu2.h:12
int16_t xmag
Definition: mavlink_msg_scaled_imu2.h:15
int16_t yacc
Definition: mavlink_msg_scaled_imu2.h:10
int16_t ygyro
Definition: mavlink_msg_scaled_imu2.h:13
int16_t zacc
Definition: mavlink_msg_scaled_imu2.h:11
int16_t xacc
Definition: mavlink_msg_scaled_imu2.h:9
int16_t ymag
Definition: mavlink_msg_scaled_imu2.h:16
uint32_t time_boot_ms
Definition: mavlink_msg_scaled_imu2.h:8