Merge pull request #10476 from radiolinkW/RADIOLINKF722
[inav.git] / lib / main / MAVLink / common / mavlink_msg_gimbal_manager_set_manual_control.h
blobd3096c49bb9c8aea5f55f3ca692db7a11470a0d4
1 #pragma once
2 // MESSAGE GIMBAL_MANAGER_SET_MANUAL_CONTROL PACKING
4 #define MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_MANUAL_CONTROL 288
7 typedef struct __mavlink_gimbal_manager_set_manual_control_t {
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;
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
23 #define MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_MANUAL_CONTROL_CRC 20
24 #define MAVLINK_MSG_ID_288_CRC 20
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 } \
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 } \
57 #endif
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
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)
75 static 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)
78 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
79 char buf[MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_MANUAL_CONTROL_LEN];
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);
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;
101 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_MANUAL_CONTROL_LEN);
102 #endif
104 msg->msgid = MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_MANUAL_CONTROL;
105 return mavlink_finalize_message(msg, system_id, component_id, 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);
109 * @brief Pack a gimbal_manager_set_manual_control message on a channel
110 * @param system_id ID of this system
111 * @param component_id ID of this component (e.g. 200 for IMU)
112 * @param chan The MAVLink channel this message will be sent over
113 * @param msg The MAVLink message to compress the data into
114 * @param target_system System ID
115 * @param target_component Component ID
116 * @param flags High level gimbal manager flags.
117 * @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).
118 * @param pitch Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored).
119 * @param yaw Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored).
120 * @param pitch_rate Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored).
121 * @param yaw_rate Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored).
122 * @return length of the message in bytes (excluding serial stream start sign)
124 static inline uint16_t mavlink_msg_gimbal_manager_set_manual_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
125 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)
128 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
129 char buf[MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_MANUAL_CONTROL_LEN];
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);
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;
151 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_MANUAL_CONTROL_LEN);
152 #endif
154 msg->msgid = MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_MANUAL_CONTROL;
155 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 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);
159 * @brief Encode a gimbal_manager_set_manual_control struct
161 * @param system_id ID of this system
162 * @param component_id ID of this component (e.g. 200 for IMU)
163 * @param msg The MAVLink message to compress the data into
164 * @param gimbal_manager_set_manual_control C-struct to read the message contents from
166 static 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)
168 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);
172 * @brief Encode a gimbal_manager_set_manual_control struct on a channel
174 * @param system_id ID of this system
175 * @param component_id ID of this component (e.g. 200 for IMU)
176 * @param chan The MAVLink channel this message will be sent over
177 * @param msg The MAVLink message to compress the data into
178 * @param gimbal_manager_set_manual_control C-struct to read the message contents from
180 static 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)
182 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);
186 * @brief Send a gimbal_manager_set_manual_control message
187 * @param chan MAVLink channel to send the message
189 * @param target_system System ID
190 * @param target_component Component ID
191 * @param flags High level gimbal manager flags.
192 * @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).
193 * @param pitch Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored).
194 * @param yaw Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored).
195 * @param pitch_rate Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored).
196 * @param yaw_rate Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored).
198 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
200 static 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)
202 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
203 char buf[MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_MANUAL_CONTROL_LEN];
204 _mav_put_uint32_t(buf, 0, flags);
205 _mav_put_float(buf, 4, pitch);
206 _mav_put_float(buf, 8, yaw);
207 _mav_put_float(buf, 12, pitch_rate);
208 _mav_put_float(buf, 16, yaw_rate);
209 _mav_put_uint8_t(buf, 20, target_system);
210 _mav_put_uint8_t(buf, 21, target_component);
211 _mav_put_uint8_t(buf, 22, gimbal_device_id);
213 _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);
214 #else
215 mavlink_gimbal_manager_set_manual_control_t packet;
216 packet.flags = flags;
217 packet.pitch = pitch;
218 packet.yaw = yaw;
219 packet.pitch_rate = pitch_rate;
220 packet.yaw_rate = yaw_rate;
221 packet.target_system = target_system;
222 packet.target_component = target_component;
223 packet.gimbal_device_id = gimbal_device_id;
225 _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);
226 #endif
230 * @brief Send a gimbal_manager_set_manual_control message
231 * @param chan MAVLink channel to send the message
232 * @param struct The MAVLink struct to serialize
234 static 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)
236 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
237 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);
238 #else
239 _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);
240 #endif
243 #if MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_MANUAL_CONTROL_LEN <= MAVLINK_MAX_PAYLOAD_LEN
245 This varient of _send() can be used to save stack space by re-using
246 memory from the receive buffer. The caller provides a
247 mavlink_message_t which is the size of a full mavlink message. This
248 is usually the receive buffer for the channel, and allows a reply to an
249 incoming message with minimum stack space usage.
251 static 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)
253 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
254 char *buf = (char *)msgbuf;
255 _mav_put_uint32_t(buf, 0, flags);
256 _mav_put_float(buf, 4, pitch);
257 _mav_put_float(buf, 8, yaw);
258 _mav_put_float(buf, 12, pitch_rate);
259 _mav_put_float(buf, 16, yaw_rate);
260 _mav_put_uint8_t(buf, 20, target_system);
261 _mav_put_uint8_t(buf, 21, target_component);
262 _mav_put_uint8_t(buf, 22, gimbal_device_id);
264 _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);
265 #else
266 mavlink_gimbal_manager_set_manual_control_t *packet = (mavlink_gimbal_manager_set_manual_control_t *)msgbuf;
267 packet->flags = flags;
268 packet->pitch = pitch;
269 packet->yaw = yaw;
270 packet->pitch_rate = pitch_rate;
271 packet->yaw_rate = yaw_rate;
272 packet->target_system = target_system;
273 packet->target_component = target_component;
274 packet->gimbal_device_id = gimbal_device_id;
276 _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);
277 #endif
279 #endif
281 #endif
283 // MESSAGE GIMBAL_MANAGER_SET_MANUAL_CONTROL UNPACKING
287 * @brief Get field target_system from gimbal_manager_set_manual_control message
289 * @return System ID
291 static inline uint8_t mavlink_msg_gimbal_manager_set_manual_control_get_target_system(const mavlink_message_t* msg)
293 return _MAV_RETURN_uint8_t(msg, 20);
297 * @brief Get field target_component from gimbal_manager_set_manual_control message
299 * @return Component ID
301 static inline uint8_t mavlink_msg_gimbal_manager_set_manual_control_get_target_component(const mavlink_message_t* msg)
303 return _MAV_RETURN_uint8_t(msg, 21);
307 * @brief Get field flags from gimbal_manager_set_manual_control message
309 * @return High level gimbal manager flags.
311 static inline uint32_t mavlink_msg_gimbal_manager_set_manual_control_get_flags(const mavlink_message_t* msg)
313 return _MAV_RETURN_uint32_t(msg, 0);
317 * @brief Get field gimbal_device_id from gimbal_manager_set_manual_control message
319 * @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).
321 static inline uint8_t mavlink_msg_gimbal_manager_set_manual_control_get_gimbal_device_id(const mavlink_message_t* msg)
323 return _MAV_RETURN_uint8_t(msg, 22);
327 * @brief Get field pitch from gimbal_manager_set_manual_control message
329 * @return Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored).
331 static inline float mavlink_msg_gimbal_manager_set_manual_control_get_pitch(const mavlink_message_t* msg)
333 return _MAV_RETURN_float(msg, 4);
337 * @brief Get field yaw from gimbal_manager_set_manual_control message
339 * @return Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored).
341 static inline float mavlink_msg_gimbal_manager_set_manual_control_get_yaw(const mavlink_message_t* msg)
343 return _MAV_RETURN_float(msg, 8);
347 * @brief Get field pitch_rate from gimbal_manager_set_manual_control message
349 * @return Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored).
351 static inline float mavlink_msg_gimbal_manager_set_manual_control_get_pitch_rate(const mavlink_message_t* msg)
353 return _MAV_RETURN_float(msg, 12);
357 * @brief Get field yaw_rate from gimbal_manager_set_manual_control message
359 * @return Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored).
361 static inline float mavlink_msg_gimbal_manager_set_manual_control_get_yaw_rate(const mavlink_message_t* msg)
363 return _MAV_RETURN_float(msg, 16);
367 * @brief Decode a gimbal_manager_set_manual_control message into a struct
369 * @param msg The message to decode
370 * @param gimbal_manager_set_manual_control C-struct to decode the message contents into
372 static 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)
374 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
375 gimbal_manager_set_manual_control->flags = mavlink_msg_gimbal_manager_set_manual_control_get_flags(msg);
376 gimbal_manager_set_manual_control->pitch = mavlink_msg_gimbal_manager_set_manual_control_get_pitch(msg);
377 gimbal_manager_set_manual_control->yaw = mavlink_msg_gimbal_manager_set_manual_control_get_yaw(msg);
378 gimbal_manager_set_manual_control->pitch_rate = mavlink_msg_gimbal_manager_set_manual_control_get_pitch_rate(msg);
379 gimbal_manager_set_manual_control->yaw_rate = mavlink_msg_gimbal_manager_set_manual_control_get_yaw_rate(msg);
380 gimbal_manager_set_manual_control->target_system = mavlink_msg_gimbal_manager_set_manual_control_get_target_system(msg);
381 gimbal_manager_set_manual_control->target_component = mavlink_msg_gimbal_manager_set_manual_control_get_target_component(msg);
382 gimbal_manager_set_manual_control->gimbal_device_id = mavlink_msg_gimbal_manager_set_manual_control_get_gimbal_device_id(msg);
383 #else
384 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;
385 memset(gimbal_manager_set_manual_control, 0, MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_MANUAL_CONTROL_LEN);
386 memcpy(gimbal_manager_set_manual_control, _MAV_PAYLOAD(msg), len);
387 #endif