Arduino Mavlink
Loading...
Searching...
No Matches
mavlink_msg_gimbal_manager_information.h
Go to the documentation of this file.
1#pragma once
2// MESSAGE GIMBAL_MANAGER_INFORMATION PACKING
3
4#define MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION 280
5
6
8 uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/
9 uint32_t cap_flags; /*< Bitmap of gimbal capability flags.*/
10 float roll_min; /*< [rad] Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)*/
11 float roll_max; /*< [rad] Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)*/
12 float pitch_min; /*< [rad] Minimum pitch angle (positive: up, negative: down)*/
13 float pitch_max; /*< [rad] Maximum pitch angle (positive: up, negative: down)*/
14 float yaw_min; /*< [rad] Minimum yaw angle (positive: to the right, negative: to the left)*/
15 float yaw_max; /*< [rad] Maximum yaw angle (positive: to the right, negative: to the left)*/
16 uint8_t gimbal_device_id; /*< Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal).*/
17} mavlink_gimbal_manager_information_t;
18
19#define MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN 33
20#define MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_MIN_LEN 33
21#define MAVLINK_MSG_ID_280_LEN 33
22#define MAVLINK_MSG_ID_280_MIN_LEN 33
23
24#define MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_CRC 70
25#define MAVLINK_MSG_ID_280_CRC 70
26
27
28
29#if MAVLINK_COMMAND_24BIT
30#define MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION {
31 280,
32 "GIMBAL_MANAGER_INFORMATION",
33 9,
34 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gimbal_manager_information_t, time_boot_ms) },
35 { "cap_flags", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_gimbal_manager_information_t, cap_flags) },
36 { "gimbal_device_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_gimbal_manager_information_t, gimbal_device_id) },
37 { "roll_min", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_gimbal_manager_information_t, roll_min) },
38 { "roll_max", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_gimbal_manager_information_t, roll_max) },
39 { "pitch_min", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_gimbal_manager_information_t, pitch_min) },
40 { "pitch_max", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_gimbal_manager_information_t, pitch_max) },
41 { "yaw_min", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_gimbal_manager_information_t, yaw_min) },
42 { "yaw_max", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_gimbal_manager_information_t, yaw_max) },
43 } \
44}
45#else
46#define MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION {
47 "GIMBAL_MANAGER_INFORMATION",
48 9,
49 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gimbal_manager_information_t, time_boot_ms) },
50 { "cap_flags", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_gimbal_manager_information_t, cap_flags) },
51 { "gimbal_device_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_gimbal_manager_information_t, gimbal_device_id) },
52 { "roll_min", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_gimbal_manager_information_t, roll_min) },
53 { "roll_max", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_gimbal_manager_information_t, roll_max) },
54 { "pitch_min", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_gimbal_manager_information_t, pitch_min) },
55 { "pitch_max", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_gimbal_manager_information_t, pitch_max) },
56 { "yaw_min", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_gimbal_manager_information_t, yaw_min) },
57 { "yaw_max", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_gimbal_manager_information_t, yaw_max) },
58 } \
59}
60#endif
61
62/**
63 * @brief Pack a gimbal_manager_information message
64 * @param system_id ID of this system
65 * @param component_id ID of this component (e.g. 200 for IMU)
66 * @param msg The MAVLink message to compress the data into
67 *
68 * @param time_boot_ms [ms] Timestamp (time since system boot).
69 * @param cap_flags Bitmap of gimbal capability flags.
70 * @param gimbal_device_id Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal).
71 * @param roll_min [rad] Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)
72 * @param roll_max [rad] Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)
73 * @param pitch_min [rad] Minimum pitch angle (positive: up, negative: down)
74 * @param pitch_max [rad] Maximum pitch angle (positive: up, negative: down)
75 * @param yaw_min [rad] Minimum yaw angle (positive: to the right, negative: to the left)
76 * @param yaw_max [rad] Maximum yaw angle (positive: to the right, negative: to the left)
77 * @return length of the message in bytes (excluding serial stream start sign)
78 */
79static inline uint16_t mavlink_msg_gimbal_manager_information_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
80 uint32_t time_boot_ms, uint32_t cap_flags, uint8_t gimbal_device_id, float roll_min, float roll_max, float pitch_min, float pitch_max, float yaw_min, float yaw_max)
81{
82#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
84 _mav_put_uint32_t(buf, 0, time_boot_ms);
85 _mav_put_uint32_t(buf, 4, cap_flags);
86 _mav_put_float(buf, 8, roll_min);
87 _mav_put_float(buf, 12, roll_max);
88 _mav_put_float(buf, 16, pitch_min);
89 _mav_put_float(buf, 20, pitch_max);
90 _mav_put_float(buf, 24, yaw_min);
91 _mav_put_float(buf, 28, yaw_max);
92 _mav_put_uint8_t(buf, 32, gimbal_device_id);
93
94 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN);
95#else
96 mavlink_gimbal_manager_information_t packet;
97 packet.time_boot_ms = time_boot_ms;
98 packet.cap_flags = cap_flags;
99 packet.roll_min = roll_min;
100 packet.roll_max = roll_max;
101 packet.pitch_min = pitch_min;
102 packet.pitch_max = pitch_max;
103 packet.yaw_min = yaw_min;
104 packet.yaw_max = yaw_max;
105 packet.gimbal_device_id = gimbal_device_id;
106
107 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN);
108#endif
109
112}
113
114/**
115 * @brief Pack a gimbal_manager_information message
116 * @param system_id ID of this system
117 * @param component_id ID of this component (e.g. 200 for IMU)
118 * @param status MAVLink status structure
119 * @param msg The MAVLink message to compress the data into
120 *
121 * @param time_boot_ms [ms] Timestamp (time since system boot).
122 * @param cap_flags Bitmap of gimbal capability flags.
123 * @param gimbal_device_id Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal).
124 * @param roll_min [rad] Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)
125 * @param roll_max [rad] Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)
126 * @param pitch_min [rad] Minimum pitch angle (positive: up, negative: down)
127 * @param pitch_max [rad] Maximum pitch angle (positive: up, negative: down)
128 * @param yaw_min [rad] Minimum yaw angle (positive: to the right, negative: to the left)
129 * @param yaw_max [rad] Maximum yaw angle (positive: to the right, negative: to the left)
130 * @return length of the message in bytes (excluding serial stream start sign)
131 */
132static inline uint16_t mavlink_msg_gimbal_manager_information_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
133 uint32_t time_boot_ms, uint32_t cap_flags, uint8_t gimbal_device_id, float roll_min, float roll_max, float pitch_min, float pitch_max, float yaw_min, float yaw_max)
134{
135#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
137 _mav_put_uint32_t(buf, 0, time_boot_ms);
138 _mav_put_uint32_t(buf, 4, cap_flags);
139 _mav_put_float(buf, 8, roll_min);
140 _mav_put_float(buf, 12, roll_max);
141 _mav_put_float(buf, 16, pitch_min);
142 _mav_put_float(buf, 20, pitch_max);
143 _mav_put_float(buf, 24, yaw_min);
144 _mav_put_float(buf, 28, yaw_max);
145 _mav_put_uint8_t(buf, 32, gimbal_device_id);
146
147 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN);
148#else
149 mavlink_gimbal_manager_information_t packet;
150 packet.time_boot_ms = time_boot_ms;
151 packet.cap_flags = cap_flags;
152 packet.roll_min = roll_min;
153 packet.roll_max = roll_max;
154 packet.pitch_min = pitch_min;
155 packet.pitch_max = pitch_max;
156 packet.yaw_min = yaw_min;
157 packet.yaw_max = yaw_max;
158 packet.gimbal_device_id = gimbal_device_id;
159
160 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN);
161#endif
162
164#if MAVLINK_CRC_EXTRA
165 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_CRC);
166#else
167 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN);
168#endif
169}
170
171/**
172 * @brief Pack a gimbal_manager_information message on a channel
173 * @param system_id ID of this system
174 * @param component_id ID of this component (e.g. 200 for IMU)
175 * @param chan The MAVLink channel this message will be sent over
176 * @param msg The MAVLink message to compress the data into
177 * @param time_boot_ms [ms] Timestamp (time since system boot).
178 * @param cap_flags Bitmap of gimbal capability flags.
179 * @param gimbal_device_id Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal).
180 * @param roll_min [rad] Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)
181 * @param roll_max [rad] Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)
182 * @param pitch_min [rad] Minimum pitch angle (positive: up, negative: down)
183 * @param pitch_max [rad] Maximum pitch angle (positive: up, negative: down)
184 * @param yaw_min [rad] Minimum yaw angle (positive: to the right, negative: to the left)
185 * @param yaw_max [rad] Maximum yaw angle (positive: to the right, negative: to the left)
186 * @return length of the message in bytes (excluding serial stream start sign)
187 */
188static inline uint16_t mavlink_msg_gimbal_manager_information_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
189 mavlink_message_t* msg,
190 uint32_t time_boot_ms,uint32_t cap_flags,uint8_t gimbal_device_id,float roll_min,float roll_max,float pitch_min,float pitch_max,float yaw_min,float yaw_max)
191{
192#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
194 _mav_put_uint32_t(buf, 0, time_boot_ms);
195 _mav_put_uint32_t(buf, 4, cap_flags);
196 _mav_put_float(buf, 8, roll_min);
197 _mav_put_float(buf, 12, roll_max);
198 _mav_put_float(buf, 16, pitch_min);
199 _mav_put_float(buf, 20, pitch_max);
200 _mav_put_float(buf, 24, yaw_min);
201 _mav_put_float(buf, 28, yaw_max);
202 _mav_put_uint8_t(buf, 32, gimbal_device_id);
203
204 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN);
205#else
206 mavlink_gimbal_manager_information_t packet;
207 packet.time_boot_ms = time_boot_ms;
208 packet.cap_flags = cap_flags;
209 packet.roll_min = roll_min;
210 packet.roll_max = roll_max;
211 packet.pitch_min = pitch_min;
212 packet.pitch_max = pitch_max;
213 packet.yaw_min = yaw_min;
214 packet.yaw_max = yaw_max;
215 packet.gimbal_device_id = gimbal_device_id;
216
217 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN);
218#endif
219
222}
223
224/**
225 * @brief Encode a gimbal_manager_information struct
226 *
227 * @param system_id ID of this system
228 * @param component_id ID of this component (e.g. 200 for IMU)
229 * @param msg The MAVLink message to compress the data into
230 * @param gimbal_manager_information C-struct to read the message contents from
231 */
232static inline uint16_t mavlink_msg_gimbal_manager_information_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_manager_information_t* gimbal_manager_information)
233{
234 return mavlink_msg_gimbal_manager_information_pack(system_id, component_id, msg, gimbal_manager_information->time_boot_ms, gimbal_manager_information->cap_flags, gimbal_manager_information->gimbal_device_id, gimbal_manager_information->roll_min, gimbal_manager_information->roll_max, gimbal_manager_information->pitch_min, gimbal_manager_information->pitch_max, gimbal_manager_information->yaw_min, gimbal_manager_information->yaw_max);
235}
236
237/**
238 * @brief Encode a gimbal_manager_information struct on a channel
239 *
240 * @param system_id ID of this system
241 * @param component_id ID of this component (e.g. 200 for IMU)
242 * @param chan The MAVLink channel this message will be sent over
243 * @param msg The MAVLink message to compress the data into
244 * @param gimbal_manager_information C-struct to read the message contents from
245 */
246static inline uint16_t mavlink_msg_gimbal_manager_information_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_manager_information_t* gimbal_manager_information)
247{
248 return mavlink_msg_gimbal_manager_information_pack_chan(system_id, component_id, chan, msg, gimbal_manager_information->time_boot_ms, gimbal_manager_information->cap_flags, gimbal_manager_information->gimbal_device_id, gimbal_manager_information->roll_min, gimbal_manager_information->roll_max, gimbal_manager_information->pitch_min, gimbal_manager_information->pitch_max, gimbal_manager_information->yaw_min, gimbal_manager_information->yaw_max);
249}
250
251/**
252 * @brief Encode a gimbal_manager_information struct with provided status structure
253 *
254 * @param system_id ID of this system
255 * @param component_id ID of this component (e.g. 200 for IMU)
256 * @param status MAVLink status structure
257 * @param msg The MAVLink message to compress the data into
258 * @param gimbal_manager_information C-struct to read the message contents from
259 */
260static inline uint16_t mavlink_msg_gimbal_manager_information_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_gimbal_manager_information_t* gimbal_manager_information)
261{
262 return mavlink_msg_gimbal_manager_information_pack_status(system_id, component_id, _status, msg, gimbal_manager_information->time_boot_ms, gimbal_manager_information->cap_flags, gimbal_manager_information->gimbal_device_id, gimbal_manager_information->roll_min, gimbal_manager_information->roll_max, gimbal_manager_information->pitch_min, gimbal_manager_information->pitch_max, gimbal_manager_information->yaw_min, gimbal_manager_information->yaw_max);
263}
264
265/**
266 * @brief Send a gimbal_manager_information message
267 * @param chan MAVLink channel to send the message
268 *
269 * @param time_boot_ms [ms] Timestamp (time since system boot).
270 * @param cap_flags Bitmap of gimbal capability flags.
271 * @param gimbal_device_id Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal).
272 * @param roll_min [rad] Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)
273 * @param roll_max [rad] Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)
274 * @param pitch_min [rad] Minimum pitch angle (positive: up, negative: down)
275 * @param pitch_max [rad] Maximum pitch angle (positive: up, negative: down)
276 * @param yaw_min [rad] Minimum yaw angle (positive: to the right, negative: to the left)
277 * @param yaw_max [rad] Maximum yaw angle (positive: to the right, negative: to the left)
278 */
279#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
280
281static inline void mavlink_msg_gimbal_manager_information_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint32_t cap_flags, uint8_t gimbal_device_id, float roll_min, float roll_max, float pitch_min, float pitch_max, float yaw_min, float yaw_max)
282{
283#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
284 char buf[MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN];
285 _mav_put_uint32_t(buf, 0, time_boot_ms);
286 _mav_put_uint32_t(buf, 4, cap_flags);
287 _mav_put_float(buf, 8, roll_min);
288 _mav_put_float(buf, 12, roll_max);
289 _mav_put_float(buf, 16, pitch_min);
290 _mav_put_float(buf, 20, pitch_max);
291 _mav_put_float(buf, 24, yaw_min);
292 _mav_put_float(buf, 28, yaw_max);
293 _mav_put_uint8_t(buf, 32, gimbal_device_id);
294
295 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION, buf, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_CRC);
296#else
297 mavlink_gimbal_manager_information_t packet;
298 packet.time_boot_ms = time_boot_ms;
299 packet.cap_flags = cap_flags;
300 packet.roll_min = roll_min;
301 packet.roll_max = roll_max;
302 packet.pitch_min = pitch_min;
303 packet.pitch_max = pitch_max;
304 packet.yaw_min = yaw_min;
305 packet.yaw_max = yaw_max;
306 packet.gimbal_device_id = gimbal_device_id;
307
308 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_CRC);
309#endif
310}
311
312/**
313 * @brief Send a gimbal_manager_information message
314 * @param chan MAVLink channel to send the message
315 * @param struct The MAVLink struct to serialize
316 */
317static inline void mavlink_msg_gimbal_manager_information_send_struct(mavlink_channel_t chan, const mavlink_gimbal_manager_information_t* gimbal_manager_information)
318{
319#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
320 mavlink_msg_gimbal_manager_information_send(chan, gimbal_manager_information->time_boot_ms, gimbal_manager_information->cap_flags, gimbal_manager_information->gimbal_device_id, gimbal_manager_information->roll_min, gimbal_manager_information->roll_max, gimbal_manager_information->pitch_min, gimbal_manager_information->pitch_max, gimbal_manager_information->yaw_min, gimbal_manager_information->yaw_max);
321#else
322 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION, (const char *)gimbal_manager_information, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_CRC);
323#endif
324}
325
326#if MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
327/*
328 This variant of _send() can be used to save stack space by reusing
329 memory from the receive buffer. The caller provides a
330 mavlink_message_t which is the size of a full mavlink message. This
331 is usually the receive buffer for the channel, and allows a reply to an
332 incoming message with minimum stack space usage.
333 */
334static inline void mavlink_msg_gimbal_manager_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint32_t cap_flags, uint8_t gimbal_device_id, float roll_min, float roll_max, float pitch_min, float pitch_max, float yaw_min, float yaw_max)
335{
336#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
337 char *buf = (char *)msgbuf;
338 _mav_put_uint32_t(buf, 0, time_boot_ms);
339 _mav_put_uint32_t(buf, 4, cap_flags);
340 _mav_put_float(buf, 8, roll_min);
341 _mav_put_float(buf, 12, roll_max);
342 _mav_put_float(buf, 16, pitch_min);
343 _mav_put_float(buf, 20, pitch_max);
344 _mav_put_float(buf, 24, yaw_min);
345 _mav_put_float(buf, 28, yaw_max);
346 _mav_put_uint8_t(buf, 32, gimbal_device_id);
347
348 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION, buf, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_CRC);
349#else
350 mavlink_gimbal_manager_information_t *packet = (mavlink_gimbal_manager_information_t *)msgbuf;
351 packet->time_boot_ms = time_boot_ms;
352 packet->cap_flags = cap_flags;
353 packet->roll_min = roll_min;
354 packet->roll_max = roll_max;
355 packet->pitch_min = pitch_min;
356 packet->pitch_max = pitch_max;
357 packet->yaw_min = yaw_min;
358 packet->yaw_max = yaw_max;
359 packet->gimbal_device_id = gimbal_device_id;
360
361 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_CRC);
362#endif
363}
364#endif
365
366#endif
367
368// MESSAGE GIMBAL_MANAGER_INFORMATION UNPACKING
369
370
371/**
372 * @brief Get field time_boot_ms from gimbal_manager_information message
373 *
374 * @return [ms] Timestamp (time since system boot).
375 */
376static inline uint32_t mavlink_msg_gimbal_manager_information_get_time_boot_ms(const mavlink_message_t* msg)
377{
378 return _MAV_RETURN_uint32_t(msg, 0);
379}
380
381/**
382 * @brief Get field cap_flags from gimbal_manager_information message
383 *
384 * @return Bitmap of gimbal capability flags.
385 */
386static inline uint32_t mavlink_msg_gimbal_manager_information_get_cap_flags(const mavlink_message_t* msg)
387{
388 return _MAV_RETURN_uint32_t(msg, 4);
389}
390
391/**
392 * @brief Get field gimbal_device_id from gimbal_manager_information message
393 *
394 * @return Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal).
395 */
396static inline uint8_t mavlink_msg_gimbal_manager_information_get_gimbal_device_id(const mavlink_message_t* msg)
397{
398 return _MAV_RETURN_uint8_t(msg, 32);
399}
400
401/**
402 * @brief Get field roll_min from gimbal_manager_information message
403 *
404 * @return [rad] Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)
405 */
406static inline float mavlink_msg_gimbal_manager_information_get_roll_min(const mavlink_message_t* msg)
407{
408 return _MAV_RETURN_float(msg, 8);
409}
410
411/**
412 * @brief Get field roll_max from gimbal_manager_information message
413 *
414 * @return [rad] Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)
415 */
416static inline float mavlink_msg_gimbal_manager_information_get_roll_max(const mavlink_message_t* msg)
417{
418 return _MAV_RETURN_float(msg, 12);
419}
420
421/**
422 * @brief Get field pitch_min from gimbal_manager_information message
423 *
424 * @return [rad] Minimum pitch angle (positive: up, negative: down)
425 */
426static inline float mavlink_msg_gimbal_manager_information_get_pitch_min(const mavlink_message_t* msg)
427{
428 return _MAV_RETURN_float(msg, 16);
429}
430
431/**
432 * @brief Get field pitch_max from gimbal_manager_information message
433 *
434 * @return [rad] Maximum pitch angle (positive: up, negative: down)
435 */
436static inline float mavlink_msg_gimbal_manager_information_get_pitch_max(const mavlink_message_t* msg)
437{
438 return _MAV_RETURN_float(msg, 20);
439}
440
441/**
442 * @brief Get field yaw_min from gimbal_manager_information message
443 *
444 * @return [rad] Minimum yaw angle (positive: to the right, negative: to the left)
445 */
446static inline float mavlink_msg_gimbal_manager_information_get_yaw_min(const mavlink_message_t* msg)
447{
448 return _MAV_RETURN_float(msg, 24);
449}
450
451/**
452 * @brief Get field yaw_max from gimbal_manager_information message
453 *
454 * @return [rad] Maximum yaw angle (positive: to the right, negative: to the left)
455 */
456static inline float mavlink_msg_gimbal_manager_information_get_yaw_max(const mavlink_message_t* msg)
457{
458 return _MAV_RETURN_float(msg, 28);
459}
460
461/**
462 * @brief Decode a gimbal_manager_information message into a struct
463 *
464 * @param msg The message to decode
465 * @param gimbal_manager_information C-struct to decode the message contents into
466 */
467static inline void mavlink_msg_gimbal_manager_information_decode(const mavlink_message_t* msg, mavlink_gimbal_manager_information_t* gimbal_manager_information)
468{
469#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
470 gimbal_manager_information->time_boot_ms = mavlink_msg_gimbal_manager_information_get_time_boot_ms(msg);
471 gimbal_manager_information->cap_flags = mavlink_msg_gimbal_manager_information_get_cap_flags(msg);
472 gimbal_manager_information->roll_min = mavlink_msg_gimbal_manager_information_get_roll_min(msg);
473 gimbal_manager_information->roll_max = mavlink_msg_gimbal_manager_information_get_roll_max(msg);
474 gimbal_manager_information->pitch_min = mavlink_msg_gimbal_manager_information_get_pitch_min(msg);
475 gimbal_manager_information->pitch_max = mavlink_msg_gimbal_manager_information_get_pitch_max(msg);
476 gimbal_manager_information->yaw_min = mavlink_msg_gimbal_manager_information_get_yaw_min(msg);
477 gimbal_manager_information->yaw_max = mavlink_msg_gimbal_manager_information_get_yaw_max(msg);
478 gimbal_manager_information->gimbal_device_id = mavlink_msg_gimbal_manager_information_get_gimbal_device_id(msg);
479#else
480 uint8_t len = msg->len < MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN? msg->len : MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN;
481 memset(gimbal_manager_information, 0, MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION_LEN);
482 memcpy(gimbal_manager_information, _MAV_PAYLOAD(msg), len);
483#endif
484}