4#define MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION 283
7typedef struct __mavlink_gimbal_device_information_t {
10 uint32_t firmware_version;
11 uint32_t hardware_version;
19 uint16_t custom_cap_flags;
23 uint8_t gimbal_device_id;
25}) mavlink_gimbal_device_information_t;
27#define MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN 149
28#define MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_MIN_LEN 144
29#define MAVLINK_MSG_ID_283_LEN 149
30#define MAVLINK_MSG_ID_283_MIN_LEN 144
32#define MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_CRC 74
33#define MAVLINK_MSG_ID_283_CRC 74
35#define MAVLINK_MSG_GIMBAL_DEVICE_INFORMATION_FIELD_VENDOR_NAME_LEN 32
36#define MAVLINK_MSG_GIMBAL_DEVICE_INFORMATION_FIELD_MODEL_NAME_LEN 32
37#define MAVLINK_MSG_GIMBAL_DEVICE_INFORMATION_FIELD_CUSTOM_NAME_LEN 32
39#if MAVLINK_COMMAND_24BIT
40#define MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION {
42 "GIMBAL_DEVICE_INFORMATION",
44 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 8
, offsetof(mavlink_gimbal_device_information_t, time_boot_ms) },
45 { "vendor_name", NULL, MAVLINK_TYPE_CHAR, 32
, 48
, offsetof(mavlink_gimbal_device_information_t, vendor_name) },
46 { "model_name", NULL, MAVLINK_TYPE_CHAR, 32
, 80
, offsetof(mavlink_gimbal_device_information_t, model_name) },
47 { "custom_name", NULL, MAVLINK_TYPE_CHAR, 32
, 112
, offsetof(mavlink_gimbal_device_information_t, custom_name) },
48 { "firmware_version", NULL, MAVLINK_TYPE_UINT32_T, 0
, 12
, offsetof(mavlink_gimbal_device_information_t, firmware_version) },
49 { "hardware_version", NULL, MAVLINK_TYPE_UINT32_T, 0
, 16
, offsetof(mavlink_gimbal_device_information_t, hardware_version) },
50 { "uid", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_gimbal_device_information_t, uid) },
51 { "cap_flags", NULL, MAVLINK_TYPE_UINT16_T, 0
, 44
, offsetof(mavlink_gimbal_device_information_t, cap_flags) },
52 { "custom_cap_flags", NULL, MAVLINK_TYPE_UINT16_T, 0
, 46
, offsetof(mavlink_gimbal_device_information_t, custom_cap_flags) },
53 { "roll_min", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_gimbal_device_information_t, roll_min) },
54 { "roll_max", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_gimbal_device_information_t, roll_max) },
55 { "pitch_min", NULL, MAVLINK_TYPE_FLOAT, 0
, 28
, offsetof(mavlink_gimbal_device_information_t, pitch_min) },
56 { "pitch_max", NULL, MAVLINK_TYPE_FLOAT, 0
, 32
, offsetof(mavlink_gimbal_device_information_t, pitch_max) },
57 { "yaw_min", NULL, MAVLINK_TYPE_FLOAT, 0
, 36
, offsetof(mavlink_gimbal_device_information_t, yaw_min) },
58 { "yaw_max", NULL, MAVLINK_TYPE_FLOAT, 0
, 40
, offsetof(mavlink_gimbal_device_information_t, yaw_max) },
59 { "gimbal_device_id", NULL, MAVLINK_TYPE_UINT8_T, 0
, 144
, offsetof(mavlink_gimbal_device_information_t, gimbal_device_id) },
60 { "cap_flags2", NULL, MAVLINK_TYPE_UINT32_T, 0
, 145
, offsetof(mavlink_gimbal_device_information_t, cap_flags2) },
62}
64#define MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION {
65 "GIMBAL_DEVICE_INFORMATION",
67 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 8
, offsetof(mavlink_gimbal_device_information_t, time_boot_ms) },
68 { "vendor_name", NULL, MAVLINK_TYPE_CHAR, 32
, 48
, offsetof(mavlink_gimbal_device_information_t, vendor_name) },
69 { "model_name", NULL, MAVLINK_TYPE_CHAR, 32
, 80
, offsetof(mavlink_gimbal_device_information_t, model_name) },
70 { "custom_name", NULL, MAVLINK_TYPE_CHAR, 32
, 112
, offsetof(mavlink_gimbal_device_information_t, custom_name) },
71 { "firmware_version", NULL, MAVLINK_TYPE_UINT32_T, 0
, 12
, offsetof(mavlink_gimbal_device_information_t, firmware_version) },
72 { "hardware_version", NULL, MAVLINK_TYPE_UINT32_T, 0
, 16
, offsetof(mavlink_gimbal_device_information_t, hardware_version) },
73 { "uid", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_gimbal_device_information_t, uid) },
74 { "cap_flags", NULL, MAVLINK_TYPE_UINT16_T, 0
, 44
, offsetof(mavlink_gimbal_device_information_t, cap_flags) },
75 { "custom_cap_flags", NULL, MAVLINK_TYPE_UINT16_T, 0
, 46
, offsetof(mavlink_gimbal_device_information_t, custom_cap_flags) },
76 { "roll_min", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_gimbal_device_information_t, roll_min) },
77 { "roll_max", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_gimbal_device_information_t, roll_max) },
78 { "pitch_min", NULL, MAVLINK_TYPE_FLOAT, 0
, 28
, offsetof(mavlink_gimbal_device_information_t, pitch_min) },
79 { "pitch_max", NULL, MAVLINK_TYPE_FLOAT, 0
, 32
, offsetof(mavlink_gimbal_device_information_t, pitch_max) },
80 { "yaw_min", NULL, MAVLINK_TYPE_FLOAT, 0
, 36
, offsetof(mavlink_gimbal_device_information_t, yaw_min) },
81 { "yaw_max", NULL, MAVLINK_TYPE_FLOAT, 0
, 40
, offsetof(mavlink_gimbal_device_information_t, yaw_max) },
82 { "gimbal_device_id", NULL, MAVLINK_TYPE_UINT8_T, 0
, 144
, offsetof(mavlink_gimbal_device_information_t, gimbal_device_id) },
83 { "cap_flags2", NULL, MAVLINK_TYPE_UINT32_T, 0
, 145
, offsetof(mavlink_gimbal_device_information_t, cap_flags2) },
85}
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113static inline uint16_t mavlink_msg_gimbal_device_information_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
114 uint32_t time_boot_ms,
const char *vendor_name,
const char *model_name,
const char *custom_name, uint32_t firmware_version, uint32_t hardware_version, uint64_t uid, uint16_t cap_flags, uint16_t custom_cap_flags,
float roll_min,
float roll_max,
float pitch_min,
float pitch_max,
float yaw_min,
float yaw_max, uint8_t gimbal_device_id, uint32_t cap_flags2)
116#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
118 _mav_put_uint64_t(buf, 0, uid);
119 _mav_put_uint32_t(buf, 8, time_boot_ms);
120 _mav_put_uint32_t(buf, 12, firmware_version);
121 _mav_put_uint32_t(buf, 16, hardware_version);
122 _mav_put_float(buf, 20, roll_min);
123 _mav_put_float(buf, 24, roll_max);
124 _mav_put_float(buf, 28, pitch_min);
125 _mav_put_float(buf, 32, pitch_max);
126 _mav_put_float(buf, 36, yaw_min);
127 _mav_put_float(buf, 40, yaw_max);
128 _mav_put_uint16_t(buf, 44, cap_flags);
129 _mav_put_uint16_t(buf, 46, custom_cap_flags);
130 _mav_put_uint8_t(buf, 144, gimbal_device_id);
131 _mav_put_uint32_t(buf, 145, cap_flags2);
132 _mav_put_char_array(buf, 48, vendor_name, 32);
133 _mav_put_char_array(buf, 80, model_name, 32);
134 _mav_put_char_array(buf, 112, custom_name, 32);
137 mavlink_gimbal_device_information_t packet;
139 packet.time_boot_ms = time_boot_ms;
140 packet.firmware_version = firmware_version;
141 packet.hardware_version = hardware_version;
142 packet.roll_min = roll_min;
143 packet.roll_max = roll_max;
144 packet.pitch_min = pitch_min;
145 packet.pitch_max = pitch_max;
146 packet.yaw_min = yaw_min;
147 packet.yaw_max = yaw_max;
148 packet.cap_flags = cap_flags;
149 packet.custom_cap_flags = custom_cap_flags;
150 packet.gimbal_device_id = gimbal_device_id;
151 packet.cap_flags2 = cap_flags2;
152 mav_array_memcpy(packet.vendor_name, vendor_name,
sizeof(
char)*32);
153 mav_array_memcpy(packet.model_name, model_name,
sizeof(
char)*32);
154 mav_array_memcpy(packet.custom_name, custom_name,
sizeof(
char)*32);
155 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN);
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188static inline uint16_t mavlink_msg_gimbal_device_information_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
189 uint32_t time_boot_ms,
const char *vendor_name,
const char *model_name,
const char *custom_name, uint32_t firmware_version, uint32_t hardware_version, uint64_t uid, uint16_t cap_flags, uint16_t custom_cap_flags,
float roll_min,
float roll_max,
float pitch_min,
float pitch_max,
float yaw_min,
float yaw_max, uint8_t gimbal_device_id, uint32_t cap_flags2)
191#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
193 _mav_put_uint64_t(buf, 0, uid);
194 _mav_put_uint32_t(buf, 8, time_boot_ms);
195 _mav_put_uint32_t(buf, 12, firmware_version);
196 _mav_put_uint32_t(buf, 16, hardware_version);
197 _mav_put_float(buf, 20, roll_min);
198 _mav_put_float(buf, 24, roll_max);
199 _mav_put_float(buf, 28, pitch_min);
200 _mav_put_float(buf, 32, pitch_max);
201 _mav_put_float(buf, 36, yaw_min);
202 _mav_put_float(buf, 40, yaw_max);
203 _mav_put_uint16_t(buf, 44, cap_flags);
204 _mav_put_uint16_t(buf, 46, custom_cap_flags);
205 _mav_put_uint8_t(buf, 144, gimbal_device_id);
206 _mav_put_uint32_t(buf, 145, cap_flags2);
207 _mav_put_char_array(buf, 48, vendor_name, 32);
208 _mav_put_char_array(buf, 80, model_name, 32);
209 _mav_put_char_array(buf, 112, custom_name, 32);
212 mavlink_gimbal_device_information_t packet;
214 packet.time_boot_ms = time_boot_ms;
215 packet.firmware_version = firmware_version;
216 packet.hardware_version = hardware_version;
217 packet.roll_min = roll_min;
218 packet.roll_max = roll_max;
219 packet.pitch_min = pitch_min;
220 packet.pitch_max = pitch_max;
221 packet.yaw_min = yaw_min;
222 packet.yaw_max = yaw_max;
223 packet.cap_flags = cap_flags;
224 packet.custom_cap_flags = custom_cap_flags;
225 packet.gimbal_device_id = gimbal_device_id;
226 packet.cap_flags2 = cap_flags2;
227 mav_array_memcpy(packet.vendor_name, vendor_name,
sizeof(
char)*32);
228 mav_array_memcpy(packet.model_name, model_name,
sizeof(
char)*32);
229 mav_array_memcpy(packet.custom_name, custom_name,
sizeof(
char)*32);
230 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN);
235 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_CRC);
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266static inline uint16_t mavlink_msg_gimbal_device_information_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
267 mavlink_message_t* msg,
268 uint32_t time_boot_ms,
const char *vendor_name,
const char *model_name,
const char *custom_name,uint32_t firmware_version,uint32_t hardware_version,uint64_t uid,uint16_t cap_flags,uint16_t custom_cap_flags,
float roll_min,
float roll_max,
float pitch_min,
float pitch_max,
float yaw_min,
float yaw_max,uint8_t gimbal_device_id,uint32_t cap_flags2)
270#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
272 _mav_put_uint64_t(buf, 0, uid);
273 _mav_put_uint32_t(buf, 8, time_boot_ms);
274 _mav_put_uint32_t(buf, 12, firmware_version);
275 _mav_put_uint32_t(buf, 16, hardware_version);
276 _mav_put_float(buf, 20, roll_min);
277 _mav_put_float(buf, 24, roll_max);
278 _mav_put_float(buf, 28, pitch_min);
279 _mav_put_float(buf, 32, pitch_max);
280 _mav_put_float(buf, 36, yaw_min);
281 _mav_put_float(buf, 40, yaw_max);
282 _mav_put_uint16_t(buf, 44, cap_flags);
283 _mav_put_uint16_t(buf, 46, custom_cap_flags);
284 _mav_put_uint8_t(buf, 144, gimbal_device_id);
285 _mav_put_uint32_t(buf, 145, cap_flags2);
286 _mav_put_char_array(buf, 48, vendor_name, 32);
287 _mav_put_char_array(buf, 80, model_name, 32);
288 _mav_put_char_array(buf, 112, custom_name, 32);
291 mavlink_gimbal_device_information_t packet;
293 packet.time_boot_ms = time_boot_ms;
294 packet.firmware_version = firmware_version;
295 packet.hardware_version = hardware_version;
296 packet.roll_min = roll_min;
297 packet.roll_max = roll_max;
298 packet.pitch_min = pitch_min;
299 packet.pitch_max = pitch_max;
300 packet.yaw_min = yaw_min;
301 packet.yaw_max = yaw_max;
302 packet.cap_flags = cap_flags;
303 packet.custom_cap_flags = custom_cap_flags;
304 packet.gimbal_device_id = gimbal_device_id;
305 packet.cap_flags2 = cap_flags2;
306 mav_array_memcpy(packet.vendor_name, vendor_name,
sizeof(
char)*32);
307 mav_array_memcpy(packet.model_name, model_name,
sizeof(
char)*32);
308 mav_array_memcpy(packet.custom_name, custom_name,
sizeof(
char)*32);
309 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN);
317
318
319
320
321
322
323
324static inline uint16_t mavlink_msg_gimbal_device_information_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_gimbal_device_information_t* gimbal_device_information)
326 return mavlink_msg_gimbal_device_information_pack(system_id, component_id, msg, gimbal_device_information->time_boot_ms, gimbal_device_information->vendor_name, gimbal_device_information->model_name, gimbal_device_information->custom_name, gimbal_device_information->firmware_version, gimbal_device_information->hardware_version, gimbal_device_information->uid, gimbal_device_information->cap_flags, gimbal_device_information->custom_cap_flags, gimbal_device_information->roll_min, gimbal_device_information->roll_max, gimbal_device_information->pitch_min, gimbal_device_information->pitch_max, gimbal_device_information->yaw_min, gimbal_device_information->yaw_max, gimbal_device_information->gimbal_device_id, gimbal_device_information->cap_flags2);
330
331
332
333
334
335
336
337
338static inline uint16_t mavlink_msg_gimbal_device_information_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_gimbal_device_information_t* gimbal_device_information)
340 return mavlink_msg_gimbal_device_information_pack_chan(system_id, component_id, chan, msg, gimbal_device_information->time_boot_ms, gimbal_device_information->vendor_name, gimbal_device_information->model_name, gimbal_device_information->custom_name, gimbal_device_information->firmware_version, gimbal_device_information->hardware_version, gimbal_device_information->uid, gimbal_device_information->cap_flags, gimbal_device_information->custom_cap_flags, gimbal_device_information->roll_min, gimbal_device_information->roll_max, gimbal_device_information->pitch_min, gimbal_device_information->pitch_max, gimbal_device_information->yaw_min, gimbal_device_information->yaw_max, gimbal_device_information->gimbal_device_id, gimbal_device_information->cap_flags2);
344
345
346
347
348
349
350
351
352static inline uint16_t mavlink_msg_gimbal_device_information_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_gimbal_device_information_t* gimbal_device_information)
354 return mavlink_msg_gimbal_device_information_pack_status(system_id, component_id, _status, msg, gimbal_device_information->time_boot_ms, gimbal_device_information->vendor_name, gimbal_device_information->model_name, gimbal_device_information->custom_name, gimbal_device_information->firmware_version, gimbal_device_information->hardware_version, gimbal_device_information->uid, gimbal_device_information->cap_flags, gimbal_device_information->custom_cap_flags, gimbal_device_information->roll_min, gimbal_device_information->roll_max, gimbal_device_information->pitch_min, gimbal_device_information->pitch_max, gimbal_device_information->yaw_min, gimbal_device_information->yaw_max, gimbal_device_information->gimbal_device_id, gimbal_device_information->cap_flags2);
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
381static inline void mavlink_msg_gimbal_device_information_send(mavlink_channel_t chan, uint32_t time_boot_ms,
const char *vendor_name,
const char *model_name,
const char *custom_name, uint32_t firmware_version, uint32_t hardware_version, uint64_t uid, uint16_t cap_flags, uint16_t custom_cap_flags,
float roll_min,
float roll_max,
float pitch_min,
float pitch_max,
float yaw_min,
float yaw_max, uint8_t gimbal_device_id, uint32_t cap_flags2)
383#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
384 char buf[MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN];
385 _mav_put_uint64_t(buf, 0, uid);
386 _mav_put_uint32_t(buf, 8, time_boot_ms);
387 _mav_put_uint32_t(buf, 12, firmware_version);
388 _mav_put_uint32_t(buf, 16, hardware_version);
389 _mav_put_float(buf, 20, roll_min);
390 _mav_put_float(buf, 24, roll_max);
391 _mav_put_float(buf, 28, pitch_min);
392 _mav_put_float(buf, 32, pitch_max);
393 _mav_put_float(buf, 36, yaw_min);
394 _mav_put_float(buf, 40, yaw_max);
395 _mav_put_uint16_t(buf, 44, cap_flags);
396 _mav_put_uint16_t(buf, 46, custom_cap_flags);
397 _mav_put_uint8_t(buf, 144, gimbal_device_id);
398 _mav_put_uint32_t(buf, 145, cap_flags2);
399 _mav_put_char_array(buf, 48, vendor_name, 32);
400 _mav_put_char_array(buf, 80, model_name, 32);
401 _mav_put_char_array(buf, 112, custom_name, 32);
402 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION, buf, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_CRC);
404 mavlink_gimbal_device_information_t packet;
406 packet.time_boot_ms = time_boot_ms;
407 packet.firmware_version = firmware_version;
408 packet.hardware_version = hardware_version;
409 packet.roll_min = roll_min;
410 packet.roll_max = roll_max;
411 packet.pitch_min = pitch_min;
412 packet.pitch_max = pitch_max;
413 packet.yaw_min = yaw_min;
414 packet.yaw_max = yaw_max;
415 packet.cap_flags = cap_flags;
416 packet.custom_cap_flags = custom_cap_flags;
417 packet.gimbal_device_id = gimbal_device_id;
418 packet.cap_flags2 = cap_flags2;
419 mav_array_memcpy(packet.vendor_name, vendor_name,
sizeof(
char)*32);
420 mav_array_memcpy(packet.model_name, model_name,
sizeof(
char)*32);
421 mav_array_memcpy(packet.custom_name, custom_name,
sizeof(
char)*32);
422 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION, (
const char *)&packet, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_CRC);
427
428
429
430
431static inline void mavlink_msg_gimbal_device_information_send_struct(mavlink_channel_t chan,
const mavlink_gimbal_device_information_t* gimbal_device_information)
433#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
434 mavlink_msg_gimbal_device_information_send(chan, gimbal_device_information->time_boot_ms, gimbal_device_information->vendor_name, gimbal_device_information->model_name, gimbal_device_information->custom_name, gimbal_device_information->firmware_version, gimbal_device_information->hardware_version, gimbal_device_information->uid, gimbal_device_information->cap_flags, gimbal_device_information->custom_cap_flags, gimbal_device_information->roll_min, gimbal_device_information->roll_max, gimbal_device_information->pitch_min, gimbal_device_information->pitch_max, gimbal_device_information->yaw_min, gimbal_device_information->yaw_max, gimbal_device_information->gimbal_device_id, gimbal_device_information->cap_flags2);
436 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION, (
const char *)gimbal_device_information, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_CRC);
440#if MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
442
443
444
445
446
447
448static inline void mavlink_msg_gimbal_device_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms,
const char *vendor_name,
const char *model_name,
const char *custom_name, uint32_t firmware_version, uint32_t hardware_version, uint64_t uid, uint16_t cap_flags, uint16_t custom_cap_flags,
float roll_min,
float roll_max,
float pitch_min,
float pitch_max,
float yaw_min,
float yaw_max, uint8_t gimbal_device_id, uint32_t cap_flags2)
450#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
451 char *buf = (
char *)msgbuf;
452 _mav_put_uint64_t(buf, 0, uid);
453 _mav_put_uint32_t(buf, 8, time_boot_ms);
454 _mav_put_uint32_t(buf, 12, firmware_version);
455 _mav_put_uint32_t(buf, 16, hardware_version);
456 _mav_put_float(buf, 20, roll_min);
457 _mav_put_float(buf, 24, roll_max);
458 _mav_put_float(buf, 28, pitch_min);
459 _mav_put_float(buf, 32, pitch_max);
460 _mav_put_float(buf, 36, yaw_min);
461 _mav_put_float(buf, 40, yaw_max);
462 _mav_put_uint16_t(buf, 44, cap_flags);
463 _mav_put_uint16_t(buf, 46, custom_cap_flags);
464 _mav_put_uint8_t(buf, 144, gimbal_device_id);
465 _mav_put_uint32_t(buf, 145, cap_flags2);
466 _mav_put_char_array(buf, 48, vendor_name, 32);
467 _mav_put_char_array(buf, 80, model_name, 32);
468 _mav_put_char_array(buf, 112, custom_name, 32);
469 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION, buf, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_CRC);
471 mavlink_gimbal_device_information_t *packet = (mavlink_gimbal_device_information_t *)msgbuf;
473 packet->time_boot_ms = time_boot_ms;
474 packet->firmware_version = firmware_version;
475 packet->hardware_version = hardware_version;
476 packet->roll_min = roll_min;
477 packet->roll_max = roll_max;
478 packet->pitch_min = pitch_min;
479 packet->pitch_max = pitch_max;
480 packet->yaw_min = yaw_min;
481 packet->yaw_max = yaw_max;
482 packet->cap_flags = cap_flags;
483 packet->custom_cap_flags = custom_cap_flags;
484 packet->gimbal_device_id = gimbal_device_id;
485 packet->cap_flags2 = cap_flags2;
486 mav_array_memcpy(packet->vendor_name, vendor_name,
sizeof(
char)*32);
487 mav_array_memcpy(packet->model_name, model_name,
sizeof(
char)*32);
488 mav_array_memcpy(packet->custom_name, custom_name,
sizeof(
char)*32);
489 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION, (
const char *)packet, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_CRC);
500
501
502
503
504static inline uint32_t mavlink_msg_gimbal_device_information_get_time_boot_ms(
const mavlink_message_t* msg)
506 return _MAV_RETURN_uint32_t(msg, 8);
510
511
512
513
514static inline uint16_t mavlink_msg_gimbal_device_information_get_vendor_name(
const mavlink_message_t* msg,
char *vendor_name)
516 return _MAV_RETURN_char_array(msg, vendor_name, 32, 48);
520
521
522
523
524static inline uint16_t mavlink_msg_gimbal_device_information_get_model_name(
const mavlink_message_t* msg,
char *model_name)
526 return _MAV_RETURN_char_array(msg, model_name, 32, 80);
530
531
532
533
534static inline uint16_t mavlink_msg_gimbal_device_information_get_custom_name(
const mavlink_message_t* msg,
char *custom_name)
536 return _MAV_RETURN_char_array(msg, custom_name, 32, 112);
540
541
542
543
544static inline uint32_t mavlink_msg_gimbal_device_information_get_firmware_version(
const mavlink_message_t* msg)
546 return _MAV_RETURN_uint32_t(msg, 12);
550
551
552
553
554static inline uint32_t mavlink_msg_gimbal_device_information_get_hardware_version(
const mavlink_message_t* msg)
556 return _MAV_RETURN_uint32_t(msg, 16);
560
561
562
563
564static inline uint64_t mavlink_msg_gimbal_device_information_get_uid(
const mavlink_message_t* msg)
566 return _MAV_RETURN_uint64_t(msg, 0);
570
571
572
573
574static inline uint16_t mavlink_msg_gimbal_device_information_get_cap_flags(
const mavlink_message_t* msg)
576 return _MAV_RETURN_uint16_t(msg, 44);
580
581
582
583
584static inline uint16_t mavlink_msg_gimbal_device_information_get_custom_cap_flags(
const mavlink_message_t* msg)
586 return _MAV_RETURN_uint16_t(msg, 46);
590
591
592
593
594static inline float mavlink_msg_gimbal_device_information_get_roll_min(
const mavlink_message_t* msg)
596 return _MAV_RETURN_float(msg, 20);
600
601
602
603
604static inline float mavlink_msg_gimbal_device_information_get_roll_max(
const mavlink_message_t* msg)
606 return _MAV_RETURN_float(msg, 24);
610
611
612
613
614static inline float mavlink_msg_gimbal_device_information_get_pitch_min(
const mavlink_message_t* msg)
616 return _MAV_RETURN_float(msg, 28);
620
621
622
623
624static inline float mavlink_msg_gimbal_device_information_get_pitch_max(
const mavlink_message_t* msg)
626 return _MAV_RETURN_float(msg, 32);
630
631
632
633
634static inline float mavlink_msg_gimbal_device_information_get_yaw_min(
const mavlink_message_t* msg)
636 return _MAV_RETURN_float(msg, 36);
640
641
642
643
644static inline float mavlink_msg_gimbal_device_information_get_yaw_max(
const mavlink_message_t* msg)
646 return _MAV_RETURN_float(msg, 40);
650
651
652
653
654static inline uint8_t mavlink_msg_gimbal_device_information_get_gimbal_device_id(
const mavlink_message_t* msg)
656 return _MAV_RETURN_uint8_t(msg, 144);
660
661
662
663
664static inline uint32_t mavlink_msg_gimbal_device_information_get_cap_flags2(
const mavlink_message_t* msg)
666 return _MAV_RETURN_uint32_t(msg, 145);
670
671
672
673
674
675static inline void mavlink_msg_gimbal_device_information_decode(
const mavlink_message_t* msg, mavlink_gimbal_device_information_t* gimbal_device_information)
677#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
678 gimbal_device_information->uid = mavlink_msg_gimbal_device_information_get_uid(msg);
679 gimbal_device_information->time_boot_ms = mavlink_msg_gimbal_device_information_get_time_boot_ms(msg);
680 gimbal_device_information->firmware_version = mavlink_msg_gimbal_device_information_get_firmware_version(msg);
681 gimbal_device_information->hardware_version = mavlink_msg_gimbal_device_information_get_hardware_version(msg);
682 gimbal_device_information->roll_min = mavlink_msg_gimbal_device_information_get_roll_min(msg);
683 gimbal_device_information->roll_max = mavlink_msg_gimbal_device_information_get_roll_max(msg);
684 gimbal_device_information->pitch_min = mavlink_msg_gimbal_device_information_get_pitch_min(msg);
685 gimbal_device_information->pitch_max = mavlink_msg_gimbal_device_information_get_pitch_max(msg);
686 gimbal_device_information->yaw_min = mavlink_msg_gimbal_device_information_get_yaw_min(msg);
687 gimbal_device_information->yaw_max = mavlink_msg_gimbal_device_information_get_yaw_max(msg);
688 gimbal_device_information->cap_flags = mavlink_msg_gimbal_device_information_get_cap_flags(msg);
689 gimbal_device_information->custom_cap_flags = mavlink_msg_gimbal_device_information_get_custom_cap_flags(msg);
690 mavlink_msg_gimbal_device_information_get_vendor_name(msg, gimbal_device_information->vendor_name);
691 mavlink_msg_gimbal_device_information_get_model_name(msg, gimbal_device_information->model_name);
692 mavlink_msg_gimbal_device_information_get_custom_name(msg, gimbal_device_information->custom_name);
693 gimbal_device_information->gimbal_device_id = mavlink_msg_gimbal_device_information_get_gimbal_device_id(msg);
694 gimbal_device_information->cap_flags2 = mavlink_msg_gimbal_device_information_get_cap_flags2(msg);
696 uint8_t len = msg->len < MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN? msg->len : MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN;
697 memset(gimbal_device_information, 0, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN);
698 memcpy(gimbal_device_information, _MAV_PAYLOAD(msg), len);