RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
mavlink_msg_serial_udb_extra_f22.h
1#pragma once
2// MESSAGE SERIAL_UDB_EXTRA_F22 PACKING
3
4#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22 188
5
6MAVPACKED(
7typedef struct __mavlink_serial_udb_extra_f22_t {
8 int16_t sue_accel_x_at_calibration; /*< SUE X accelerometer at calibration time*/
9 int16_t sue_accel_y_at_calibration; /*< SUE Y accelerometer at calibration time*/
10 int16_t sue_accel_z_at_calibration; /*< SUE Z accelerometer at calibration time*/
11 int16_t sue_gyro_x_at_calibration; /*< SUE X gyro at calibration time*/
12 int16_t sue_gyro_y_at_calibration; /*< SUE Y gyro at calibration time*/
13 int16_t sue_gyro_z_at_calibration; /*< SUE Z gyro at calibration time*/
14}) mavlink_serial_udb_extra_f22_t;
15
16#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN 12
17#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN 12
18#define MAVLINK_MSG_ID_188_LEN 12
19#define MAVLINK_MSG_ID_188_MIN_LEN 12
20
21#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC 91
22#define MAVLINK_MSG_ID_188_CRC 91
23
24
25
26#if MAVLINK_COMMAND_24BIT
27#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F22 { \
28 188, \
29 "SERIAL_UDB_EXTRA_F22", \
30 6, \
31 { { "sue_accel_x_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_serial_udb_extra_f22_t, sue_accel_x_at_calibration) }, \
32 { "sue_accel_y_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_serial_udb_extra_f22_t, sue_accel_y_at_calibration) }, \
33 { "sue_accel_z_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_serial_udb_extra_f22_t, sue_accel_z_at_calibration) }, \
34 { "sue_gyro_x_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_serial_udb_extra_f22_t, sue_gyro_x_at_calibration) }, \
35 { "sue_gyro_y_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_serial_udb_extra_f22_t, sue_gyro_y_at_calibration) }, \
36 { "sue_gyro_z_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_serial_udb_extra_f22_t, sue_gyro_z_at_calibration) }, \
37 } \
38}
39#else
40#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F22 { \
41 "SERIAL_UDB_EXTRA_F22", \
42 6, \
43 { { "sue_accel_x_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_serial_udb_extra_f22_t, sue_accel_x_at_calibration) }, \
44 { "sue_accel_y_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_serial_udb_extra_f22_t, sue_accel_y_at_calibration) }, \
45 { "sue_accel_z_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_serial_udb_extra_f22_t, sue_accel_z_at_calibration) }, \
46 { "sue_gyro_x_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_serial_udb_extra_f22_t, sue_gyro_x_at_calibration) }, \
47 { "sue_gyro_y_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_serial_udb_extra_f22_t, sue_gyro_y_at_calibration) }, \
48 { "sue_gyro_z_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_serial_udb_extra_f22_t, sue_gyro_z_at_calibration) }, \
49 } \
50}
51#endif
52
67static inline uint16_t mavlink_msg_serial_udb_extra_f22_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
68 int16_t sue_accel_x_at_calibration, int16_t sue_accel_y_at_calibration, int16_t sue_accel_z_at_calibration, int16_t sue_gyro_x_at_calibration, int16_t sue_gyro_y_at_calibration, int16_t sue_gyro_z_at_calibration)
69{
70#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
71 char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN];
72 _mav_put_int16_t(buf, 0, sue_accel_x_at_calibration);
73 _mav_put_int16_t(buf, 2, sue_accel_y_at_calibration);
74 _mav_put_int16_t(buf, 4, sue_accel_z_at_calibration);
75 _mav_put_int16_t(buf, 6, sue_gyro_x_at_calibration);
76 _mav_put_int16_t(buf, 8, sue_gyro_y_at_calibration);
77 _mav_put_int16_t(buf, 10, sue_gyro_z_at_calibration);
78
79 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN);
80#else
81 mavlink_serial_udb_extra_f22_t packet;
82 packet.sue_accel_x_at_calibration = sue_accel_x_at_calibration;
83 packet.sue_accel_y_at_calibration = sue_accel_y_at_calibration;
84 packet.sue_accel_z_at_calibration = sue_accel_z_at_calibration;
85 packet.sue_gyro_x_at_calibration = sue_gyro_x_at_calibration;
86 packet.sue_gyro_y_at_calibration = sue_gyro_y_at_calibration;
87 packet.sue_gyro_z_at_calibration = sue_gyro_z_at_calibration;
88
89 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN);
90#endif
91
92 msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22;
93 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC);
94}
95
110static inline uint16_t mavlink_msg_serial_udb_extra_f22_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
111 mavlink_message_t* msg,
112 int16_t sue_accel_x_at_calibration,int16_t sue_accel_y_at_calibration,int16_t sue_accel_z_at_calibration,int16_t sue_gyro_x_at_calibration,int16_t sue_gyro_y_at_calibration,int16_t sue_gyro_z_at_calibration)
113{
114#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
115 char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN];
116 _mav_put_int16_t(buf, 0, sue_accel_x_at_calibration);
117 _mav_put_int16_t(buf, 2, sue_accel_y_at_calibration);
118 _mav_put_int16_t(buf, 4, sue_accel_z_at_calibration);
119 _mav_put_int16_t(buf, 6, sue_gyro_x_at_calibration);
120 _mav_put_int16_t(buf, 8, sue_gyro_y_at_calibration);
121 _mav_put_int16_t(buf, 10, sue_gyro_z_at_calibration);
122
123 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN);
124#else
125 mavlink_serial_udb_extra_f22_t packet;
126 packet.sue_accel_x_at_calibration = sue_accel_x_at_calibration;
127 packet.sue_accel_y_at_calibration = sue_accel_y_at_calibration;
128 packet.sue_accel_z_at_calibration = sue_accel_z_at_calibration;
129 packet.sue_gyro_x_at_calibration = sue_gyro_x_at_calibration;
130 packet.sue_gyro_y_at_calibration = sue_gyro_y_at_calibration;
131 packet.sue_gyro_z_at_calibration = sue_gyro_z_at_calibration;
132
133 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN);
134#endif
135
136 msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22;
137 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC);
138}
139
148static inline uint16_t mavlink_msg_serial_udb_extra_f22_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f22_t* serial_udb_extra_f22)
149{
150 return mavlink_msg_serial_udb_extra_f22_pack(system_id, component_id, msg, serial_udb_extra_f22->sue_accel_x_at_calibration, serial_udb_extra_f22->sue_accel_y_at_calibration, serial_udb_extra_f22->sue_accel_z_at_calibration, serial_udb_extra_f22->sue_gyro_x_at_calibration, serial_udb_extra_f22->sue_gyro_y_at_calibration, serial_udb_extra_f22->sue_gyro_z_at_calibration);
151}
152
162static inline uint16_t mavlink_msg_serial_udb_extra_f22_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f22_t* serial_udb_extra_f22)
163{
164 return mavlink_msg_serial_udb_extra_f22_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f22->sue_accel_x_at_calibration, serial_udb_extra_f22->sue_accel_y_at_calibration, serial_udb_extra_f22->sue_accel_z_at_calibration, serial_udb_extra_f22->sue_gyro_x_at_calibration, serial_udb_extra_f22->sue_gyro_y_at_calibration, serial_udb_extra_f22->sue_gyro_z_at_calibration);
165}
166
178#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
179
180static inline void mavlink_msg_serial_udb_extra_f22_send(mavlink_channel_t chan, int16_t sue_accel_x_at_calibration, int16_t sue_accel_y_at_calibration, int16_t sue_accel_z_at_calibration, int16_t sue_gyro_x_at_calibration, int16_t sue_gyro_y_at_calibration, int16_t sue_gyro_z_at_calibration)
181{
182#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
183 char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN];
184 _mav_put_int16_t(buf, 0, sue_accel_x_at_calibration);
185 _mav_put_int16_t(buf, 2, sue_accel_y_at_calibration);
186 _mav_put_int16_t(buf, 4, sue_accel_z_at_calibration);
187 _mav_put_int16_t(buf, 6, sue_gyro_x_at_calibration);
188 _mav_put_int16_t(buf, 8, sue_gyro_y_at_calibration);
189 _mav_put_int16_t(buf, 10, sue_gyro_z_at_calibration);
190
191 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC);
192#else
193 mavlink_serial_udb_extra_f22_t packet;
194 packet.sue_accel_x_at_calibration = sue_accel_x_at_calibration;
195 packet.sue_accel_y_at_calibration = sue_accel_y_at_calibration;
196 packet.sue_accel_z_at_calibration = sue_accel_z_at_calibration;
197 packet.sue_gyro_x_at_calibration = sue_gyro_x_at_calibration;
198 packet.sue_gyro_y_at_calibration = sue_gyro_y_at_calibration;
199 packet.sue_gyro_z_at_calibration = sue_gyro_z_at_calibration;
200
201 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC);
202#endif
203}
204
210static inline void mavlink_msg_serial_udb_extra_f22_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f22_t* serial_udb_extra_f22)
211{
212#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
213 mavlink_msg_serial_udb_extra_f22_send(chan, serial_udb_extra_f22->sue_accel_x_at_calibration, serial_udb_extra_f22->sue_accel_y_at_calibration, serial_udb_extra_f22->sue_accel_z_at_calibration, serial_udb_extra_f22->sue_gyro_x_at_calibration, serial_udb_extra_f22->sue_gyro_y_at_calibration, serial_udb_extra_f22->sue_gyro_z_at_calibration);
214#else
215 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22, (const char *)serial_udb_extra_f22, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC);
216#endif
217}
218
219#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN <= MAVLINK_MAX_PAYLOAD_LEN
220/*
221 This varient of _send() can be used to save stack space by re-using
222 memory from the receive buffer. The caller provides a
223 mavlink_message_t which is the size of a full mavlink message. This
224 is usually the receive buffer for the channel, and allows a reply to an
225 incoming message with minimum stack space usage.
226 */
227static inline void mavlink_msg_serial_udb_extra_f22_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, int16_t sue_accel_x_at_calibration, int16_t sue_accel_y_at_calibration, int16_t sue_accel_z_at_calibration, int16_t sue_gyro_x_at_calibration, int16_t sue_gyro_y_at_calibration, int16_t sue_gyro_z_at_calibration)
228{
229#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
230 char *buf = (char *)msgbuf;
231 _mav_put_int16_t(buf, 0, sue_accel_x_at_calibration);
232 _mav_put_int16_t(buf, 2, sue_accel_y_at_calibration);
233 _mav_put_int16_t(buf, 4, sue_accel_z_at_calibration);
234 _mav_put_int16_t(buf, 6, sue_gyro_x_at_calibration);
235 _mav_put_int16_t(buf, 8, sue_gyro_y_at_calibration);
236 _mav_put_int16_t(buf, 10, sue_gyro_z_at_calibration);
237
238 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC);
239#else
240 mavlink_serial_udb_extra_f22_t *packet = (mavlink_serial_udb_extra_f22_t *)msgbuf;
241 packet->sue_accel_x_at_calibration = sue_accel_x_at_calibration;
242 packet->sue_accel_y_at_calibration = sue_accel_y_at_calibration;
243 packet->sue_accel_z_at_calibration = sue_accel_z_at_calibration;
244 packet->sue_gyro_x_at_calibration = sue_gyro_x_at_calibration;
245 packet->sue_gyro_y_at_calibration = sue_gyro_y_at_calibration;
246 packet->sue_gyro_z_at_calibration = sue_gyro_z_at_calibration;
247
248 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC);
249#endif
250}
251#endif
252
253#endif
254
255// MESSAGE SERIAL_UDB_EXTRA_F22 UNPACKING
256
257
263static inline int16_t mavlink_msg_serial_udb_extra_f22_get_sue_accel_x_at_calibration(const mavlink_message_t* msg)
264{
265 return _MAV_RETURN_int16_t(msg, 0);
266}
267
273static inline int16_t mavlink_msg_serial_udb_extra_f22_get_sue_accel_y_at_calibration(const mavlink_message_t* msg)
274{
275 return _MAV_RETURN_int16_t(msg, 2);
276}
277
283static inline int16_t mavlink_msg_serial_udb_extra_f22_get_sue_accel_z_at_calibration(const mavlink_message_t* msg)
284{
285 return _MAV_RETURN_int16_t(msg, 4);
286}
287
293static inline int16_t mavlink_msg_serial_udb_extra_f22_get_sue_gyro_x_at_calibration(const mavlink_message_t* msg)
294{
295 return _MAV_RETURN_int16_t(msg, 6);
296}
297
303static inline int16_t mavlink_msg_serial_udb_extra_f22_get_sue_gyro_y_at_calibration(const mavlink_message_t* msg)
304{
305 return _MAV_RETURN_int16_t(msg, 8);
306}
307
313static inline int16_t mavlink_msg_serial_udb_extra_f22_get_sue_gyro_z_at_calibration(const mavlink_message_t* msg)
314{
315 return _MAV_RETURN_int16_t(msg, 10);
316}
317
324static inline void mavlink_msg_serial_udb_extra_f22_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f22_t* serial_udb_extra_f22)
325{
326#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
327 serial_udb_extra_f22->sue_accel_x_at_calibration = mavlink_msg_serial_udb_extra_f22_get_sue_accel_x_at_calibration(msg);
328 serial_udb_extra_f22->sue_accel_y_at_calibration = mavlink_msg_serial_udb_extra_f22_get_sue_accel_y_at_calibration(msg);
329 serial_udb_extra_f22->sue_accel_z_at_calibration = mavlink_msg_serial_udb_extra_f22_get_sue_accel_z_at_calibration(msg);
330 serial_udb_extra_f22->sue_gyro_x_at_calibration = mavlink_msg_serial_udb_extra_f22_get_sue_gyro_x_at_calibration(msg);
331 serial_udb_extra_f22->sue_gyro_y_at_calibration = mavlink_msg_serial_udb_extra_f22_get_sue_gyro_y_at_calibration(msg);
332 serial_udb_extra_f22->sue_gyro_z_at_calibration = mavlink_msg_serial_udb_extra_f22_get_sue_gyro_z_at_calibration(msg);
333#else
334 uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN;
335 memset(serial_udb_extra_f22, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN);
336 memcpy(serial_udb_extra_f22, _MAV_PAYLOAD(msg), len);
337#endif
338}