Arduino Mavlink
Loading...
Searching...
No Matches
mavlink_msg_gimbal_device_information.h
Go to the documentation of this file.
1#pragma once
2// MESSAGE GIMBAL_DEVICE_INFORMATION PACKING
3
4#define MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION 283
5
6MAVPACKED(
7typedef struct __mavlink_gimbal_device_information_t {
8 uint64_t uid; /*< UID of gimbal hardware (0 if unknown).*/
9 uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/
10 uint32_t firmware_version; /*< Version of the gimbal firmware, encoded as: `(Dev & 0xff) << 24 + (Patch & 0xff) << 16 + (Minor & 0xff) << 8 + (Major & 0xff)`.*/
11 uint32_t hardware_version; /*< Version of the gimbal hardware, encoded as: `(Dev & 0xff) << 24 + (Patch & 0xff) << 16 + (Minor & 0xff) << 8 + (Major & 0xff)`.*/
12 float roll_min; /*< [rad] Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown.*/
13 float roll_max; /*< [rad] Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown.*/
14 float pitch_min; /*< [rad] Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown.*/
15 float pitch_max; /*< [rad] Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown.*/
16 float yaw_min; /*< [rad] Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown.*/
17 float yaw_max; /*< [rad] Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown.*/
18 uint16_t cap_flags; /*< Bitmap of gimbal capability flags.*/
19 uint16_t custom_cap_flags; /*< Bitmap for use for gimbal-specific capability flags.*/
20 char vendor_name[32]; /*< Name of the gimbal vendor.*/
21 char model_name[32]; /*< Name of the gimbal model.*/
22 char custom_name[32]; /*< Custom name of the gimbal given to it by the user.*/
23 uint8_t gimbal_device_id; /*< This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0.*/
24 uint32_t cap_flags2; /*< Extended bitmap of gimbal capability flags (32 bit). For backwards compatibility, the lower 16 bits should also be set in cap_flags. Ground stations should prefer this field if non-zero.*/
25}) mavlink_gimbal_device_information_t;
26
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
31
32#define MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_CRC 74
33#define MAVLINK_MSG_ID_283_CRC 74
34
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
38
39#if MAVLINK_COMMAND_24BIT
40#define MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION {
41 283,
42 "GIMBAL_DEVICE_INFORMATION",
43 17,
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) },
61 } \
62}
63#else
64#define MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION {
65 "GIMBAL_DEVICE_INFORMATION",
66 17,
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) },
84 } \
85}
86#endif
87
88/**
89 * @brief Pack a gimbal_device_information message
90 * @param system_id ID of this system
91 * @param component_id ID of this component (e.g. 200 for IMU)
92 * @param msg The MAVLink message to compress the data into
93 *
94 * @param time_boot_ms [ms] Timestamp (time since system boot).
95 * @param vendor_name Name of the gimbal vendor.
96 * @param model_name Name of the gimbal model.
97 * @param custom_name Custom name of the gimbal given to it by the user.
98 * @param firmware_version Version of the gimbal firmware, encoded as: `(Dev & 0xff) << 24 + (Patch & 0xff) << 16 + (Minor & 0xff) << 8 + (Major & 0xff)`.
99 * @param hardware_version Version of the gimbal hardware, encoded as: `(Dev & 0xff) << 24 + (Patch & 0xff) << 16 + (Minor & 0xff) << 8 + (Major & 0xff)`.
100 * @param uid UID of gimbal hardware (0 if unknown).
101 * @param cap_flags Bitmap of gimbal capability flags.
102 * @param custom_cap_flags Bitmap for use for gimbal-specific capability flags.
103 * @param roll_min [rad] Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown.
104 * @param roll_max [rad] Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown.
105 * @param pitch_min [rad] Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown.
106 * @param pitch_max [rad] Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown.
107 * @param yaw_min [rad] Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown.
108 * @param yaw_max [rad] Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown.
109 * @param gimbal_device_id This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0.
110 * @param cap_flags2 Extended bitmap of gimbal capability flags (32 bit). For backwards compatibility, the lower 16 bits should also be set in cap_flags. Ground stations should prefer this field if non-zero.
111 * @return length of the message in bytes (excluding serial stream start sign)
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)
115{
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);
135 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN);
136#else
137 mavlink_gimbal_device_information_t packet;
138 packet.uid = uid;
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);
156#endif
157
160}
161
162/**
163 * @brief Pack a gimbal_device_information message
164 * @param system_id ID of this system
165 * @param component_id ID of this component (e.g. 200 for IMU)
166 * @param status MAVLink status structure
167 * @param msg The MAVLink message to compress the data into
168 *
169 * @param time_boot_ms [ms] Timestamp (time since system boot).
170 * @param vendor_name Name of the gimbal vendor.
171 * @param model_name Name of the gimbal model.
172 * @param custom_name Custom name of the gimbal given to it by the user.
173 * @param firmware_version Version of the gimbal firmware, encoded as: `(Dev & 0xff) << 24 + (Patch & 0xff) << 16 + (Minor & 0xff) << 8 + (Major & 0xff)`.
174 * @param hardware_version Version of the gimbal hardware, encoded as: `(Dev & 0xff) << 24 + (Patch & 0xff) << 16 + (Minor & 0xff) << 8 + (Major & 0xff)`.
175 * @param uid UID of gimbal hardware (0 if unknown).
176 * @param cap_flags Bitmap of gimbal capability flags.
177 * @param custom_cap_flags Bitmap for use for gimbal-specific capability flags.
178 * @param roll_min [rad] Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown.
179 * @param roll_max [rad] Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown.
180 * @param pitch_min [rad] Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown.
181 * @param pitch_max [rad] Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown.
182 * @param yaw_min [rad] Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown.
183 * @param yaw_max [rad] Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown.
184 * @param gimbal_device_id This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0.
185 * @param cap_flags2 Extended bitmap of gimbal capability flags (32 bit). For backwards compatibility, the lower 16 bits should also be set in cap_flags. Ground stations should prefer this field if non-zero.
186 * @return length of the message in bytes (excluding serial stream start sign)
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)
190{
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);
210 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN);
211#else
212 mavlink_gimbal_device_information_t packet;
213 packet.uid = uid;
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);
231#endif
232
234#if MAVLINK_CRC_EXTRA
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);
236#else
237 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);
238#endif
239}
240
241/**
242 * @brief Pack a gimbal_device_information message on a channel
243 * @param system_id ID of this system
244 * @param component_id ID of this component (e.g. 200 for IMU)
245 * @param chan The MAVLink channel this message will be sent over
246 * @param msg The MAVLink message to compress the data into
247 * @param time_boot_ms [ms] Timestamp (time since system boot).
248 * @param vendor_name Name of the gimbal vendor.
249 * @param model_name Name of the gimbal model.
250 * @param custom_name Custom name of the gimbal given to it by the user.
251 * @param firmware_version Version of the gimbal firmware, encoded as: `(Dev & 0xff) << 24 + (Patch & 0xff) << 16 + (Minor & 0xff) << 8 + (Major & 0xff)`.
252 * @param hardware_version Version of the gimbal hardware, encoded as: `(Dev & 0xff) << 24 + (Patch & 0xff) << 16 + (Minor & 0xff) << 8 + (Major & 0xff)`.
253 * @param uid UID of gimbal hardware (0 if unknown).
254 * @param cap_flags Bitmap of gimbal capability flags.
255 * @param custom_cap_flags Bitmap for use for gimbal-specific capability flags.
256 * @param roll_min [rad] Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown.
257 * @param roll_max [rad] Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown.
258 * @param pitch_min [rad] Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown.
259 * @param pitch_max [rad] Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown.
260 * @param yaw_min [rad] Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown.
261 * @param yaw_max [rad] Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown.
262 * @param gimbal_device_id This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0.
263 * @param cap_flags2 Extended bitmap of gimbal capability flags (32 bit). For backwards compatibility, the lower 16 bits should also be set in cap_flags. Ground stations should prefer this field if non-zero.
264 * @return length of the message in bytes (excluding serial stream start sign)
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)
269{
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);
289 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN);
290#else
291 mavlink_gimbal_device_information_t packet;
292 packet.uid = uid;
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);
310#endif
311
314}
315
316/**
317 * @brief Encode a gimbal_device_information struct
318 *
319 * @param system_id ID of this system
320 * @param component_id ID of this component (e.g. 200 for IMU)
321 * @param msg The MAVLink message to compress the data into
322 * @param gimbal_device_information C-struct to read the message contents from
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)
325{
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);
327}
328
329/**
330 * @brief Encode a gimbal_device_information struct on a channel
331 *
332 * @param system_id ID of this system
333 * @param component_id ID of this component (e.g. 200 for IMU)
334 * @param chan The MAVLink channel this message will be sent over
335 * @param msg The MAVLink message to compress the data into
336 * @param gimbal_device_information C-struct to read the message contents from
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)
339{
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);
341}
342
343/**
344 * @brief Encode a gimbal_device_information struct with provided status structure
345 *
346 * @param system_id ID of this system
347 * @param component_id ID of this component (e.g. 200 for IMU)
348 * @param status MAVLink status structure
349 * @param msg The MAVLink message to compress the data into
350 * @param gimbal_device_information C-struct to read the message contents from
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)
353{
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);
355}
356
357/**
358 * @brief Send a gimbal_device_information message
359 * @param chan MAVLink channel to send the message
360 *
361 * @param time_boot_ms [ms] Timestamp (time since system boot).
362 * @param vendor_name Name of the gimbal vendor.
363 * @param model_name Name of the gimbal model.
364 * @param custom_name Custom name of the gimbal given to it by the user.
365 * @param firmware_version Version of the gimbal firmware, encoded as: `(Dev & 0xff) << 24 + (Patch & 0xff) << 16 + (Minor & 0xff) << 8 + (Major & 0xff)`.
366 * @param hardware_version Version of the gimbal hardware, encoded as: `(Dev & 0xff) << 24 + (Patch & 0xff) << 16 + (Minor & 0xff) << 8 + (Major & 0xff)`.
367 * @param uid UID of gimbal hardware (0 if unknown).
368 * @param cap_flags Bitmap of gimbal capability flags.
369 * @param custom_cap_flags Bitmap for use for gimbal-specific capability flags.
370 * @param roll_min [rad] Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown.
371 * @param roll_max [rad] Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown.
372 * @param pitch_min [rad] Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown.
373 * @param pitch_max [rad] Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown.
374 * @param yaw_min [rad] Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown.
375 * @param yaw_max [rad] Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown.
376 * @param gimbal_device_id This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0.
377 * @param cap_flags2 Extended bitmap of gimbal capability flags (32 bit). For backwards compatibility, the lower 16 bits should also be set in cap_flags. Ground stations should prefer this field if non-zero.
378 */
379#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
380
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)
382{
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);
403#else
404 mavlink_gimbal_device_information_t packet;
405 packet.uid = uid;
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);
423#endif
424}
425
426/**
427 * @brief Send a gimbal_device_information message
428 * @param chan MAVLink channel to send the message
429 * @param struct The MAVLink struct to serialize
430 */
431static inline void mavlink_msg_gimbal_device_information_send_struct(mavlink_channel_t chan, const mavlink_gimbal_device_information_t* gimbal_device_information)
432{
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);
435#else
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);
437#endif
438}
439
440#if MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
441/*
442 This variant of _send() can be used to save stack space by reusing
443 memory from the receive buffer. The caller provides a
444 mavlink_message_t which is the size of a full mavlink message. This
445 is usually the receive buffer for the channel, and allows a reply to an
446 incoming message with minimum stack space usage.
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)
449{
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);
470#else
471 mavlink_gimbal_device_information_t *packet = (mavlink_gimbal_device_information_t *)msgbuf;
472 packet->uid = uid;
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);
490#endif
491}
492#endif
493
494#endif
495
496// MESSAGE GIMBAL_DEVICE_INFORMATION UNPACKING
497
498
499/**
500 * @brief Get field time_boot_ms from gimbal_device_information message
501 *
502 * @return [ms] Timestamp (time since system boot).
503 */
504static inline uint32_t mavlink_msg_gimbal_device_information_get_time_boot_ms(const mavlink_message_t* msg)
505{
506 return _MAV_RETURN_uint32_t(msg, 8);
507}
508
509/**
510 * @brief Get field vendor_name from gimbal_device_information message
511 *
512 * @return Name of the gimbal vendor.
513 */
514static inline uint16_t mavlink_msg_gimbal_device_information_get_vendor_name(const mavlink_message_t* msg, char *vendor_name)
515{
516 return _MAV_RETURN_char_array(msg, vendor_name, 32, 48);
517}
518
519/**
520 * @brief Get field model_name from gimbal_device_information message
521 *
522 * @return Name of the gimbal model.
523 */
524static inline uint16_t mavlink_msg_gimbal_device_information_get_model_name(const mavlink_message_t* msg, char *model_name)
525{
526 return _MAV_RETURN_char_array(msg, model_name, 32, 80);
527}
528
529/**
530 * @brief Get field custom_name from gimbal_device_information message
531 *
532 * @return Custom name of the gimbal given to it by the user.
533 */
534static inline uint16_t mavlink_msg_gimbal_device_information_get_custom_name(const mavlink_message_t* msg, char *custom_name)
535{
536 return _MAV_RETURN_char_array(msg, custom_name, 32, 112);
537}
538
539/**
540 * @brief Get field firmware_version from gimbal_device_information message
541 *
542 * @return Version of the gimbal firmware, encoded as: `(Dev & 0xff) << 24 + (Patch & 0xff) << 16 + (Minor & 0xff) << 8 + (Major & 0xff)`.
543 */
544static inline uint32_t mavlink_msg_gimbal_device_information_get_firmware_version(const mavlink_message_t* msg)
545{
546 return _MAV_RETURN_uint32_t(msg, 12);
547}
548
549/**
550 * @brief Get field hardware_version from gimbal_device_information message
551 *
552 * @return Version of the gimbal hardware, encoded as: `(Dev & 0xff) << 24 + (Patch & 0xff) << 16 + (Minor & 0xff) << 8 + (Major & 0xff)`.
553 */
554static inline uint32_t mavlink_msg_gimbal_device_information_get_hardware_version(const mavlink_message_t* msg)
555{
556 return _MAV_RETURN_uint32_t(msg, 16);
557}
558
559/**
560 * @brief Get field uid from gimbal_device_information message
561 *
562 * @return UID of gimbal hardware (0 if unknown).
563 */
564static inline uint64_t mavlink_msg_gimbal_device_information_get_uid(const mavlink_message_t* msg)
565{
566 return _MAV_RETURN_uint64_t(msg, 0);
567}
568
569/**
570 * @brief Get field cap_flags from gimbal_device_information message
571 *
572 * @return Bitmap of gimbal capability flags.
573 */
574static inline uint16_t mavlink_msg_gimbal_device_information_get_cap_flags(const mavlink_message_t* msg)
575{
576 return _MAV_RETURN_uint16_t(msg, 44);
577}
578
579/**
580 * @brief Get field custom_cap_flags from gimbal_device_information message
581 *
582 * @return Bitmap for use for gimbal-specific capability flags.
583 */
584static inline uint16_t mavlink_msg_gimbal_device_information_get_custom_cap_flags(const mavlink_message_t* msg)
585{
586 return _MAV_RETURN_uint16_t(msg, 46);
587}
588
589/**
590 * @brief Get field roll_min from gimbal_device_information message
591 *
592 * @return [rad] Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown.
593 */
594static inline float mavlink_msg_gimbal_device_information_get_roll_min(const mavlink_message_t* msg)
595{
596 return _MAV_RETURN_float(msg, 20);
597}
598
599/**
600 * @brief Get field roll_max from gimbal_device_information message
601 *
602 * @return [rad] Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown.
603 */
604static inline float mavlink_msg_gimbal_device_information_get_roll_max(const mavlink_message_t* msg)
605{
606 return _MAV_RETURN_float(msg, 24);
607}
608
609/**
610 * @brief Get field pitch_min from gimbal_device_information message
611 *
612 * @return [rad] Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown.
613 */
614static inline float mavlink_msg_gimbal_device_information_get_pitch_min(const mavlink_message_t* msg)
615{
616 return _MAV_RETURN_float(msg, 28);
617}
618
619/**
620 * @brief Get field pitch_max from gimbal_device_information message
621 *
622 * @return [rad] Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown.
623 */
624static inline float mavlink_msg_gimbal_device_information_get_pitch_max(const mavlink_message_t* msg)
625{
626 return _MAV_RETURN_float(msg, 32);
627}
628
629/**
630 * @brief Get field yaw_min from gimbal_device_information message
631 *
632 * @return [rad] Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown.
633 */
634static inline float mavlink_msg_gimbal_device_information_get_yaw_min(const mavlink_message_t* msg)
635{
636 return _MAV_RETURN_float(msg, 36);
637}
638
639/**
640 * @brief Get field yaw_max from gimbal_device_information message
641 *
642 * @return [rad] Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown.
643 */
644static inline float mavlink_msg_gimbal_device_information_get_yaw_max(const mavlink_message_t* msg)
645{
646 return _MAV_RETURN_float(msg, 40);
647}
648
649/**
650 * @brief Get field gimbal_device_id from gimbal_device_information message
651 *
652 * @return This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0.
653 */
654static inline uint8_t mavlink_msg_gimbal_device_information_get_gimbal_device_id(const mavlink_message_t* msg)
655{
656 return _MAV_RETURN_uint8_t(msg, 144);
657}
658
659/**
660 * @brief Get field cap_flags2 from gimbal_device_information message
661 *
662 * @return Extended bitmap of gimbal capability flags (32 bit). For backwards compatibility, the lower 16 bits should also be set in cap_flags. Ground stations should prefer this field if non-zero.
663 */
664static inline uint32_t mavlink_msg_gimbal_device_information_get_cap_flags2(const mavlink_message_t* msg)
665{
666 return _MAV_RETURN_uint32_t(msg, 145);
667}
668
669/**
670 * @brief Decode a gimbal_device_information message into a struct
671 *
672 * @param msg The message to decode
673 * @param gimbal_device_information C-struct to decode the message contents into
674 */
675static inline void mavlink_msg_gimbal_device_information_decode(const mavlink_message_t* msg, mavlink_gimbal_device_information_t* gimbal_device_information)
676{
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);
695#else
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);
699#endif
700}