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