Arduino Mavlink
Loading...
Searching...
No Matches
mavlink_msg_manual_control.h
Go to the documentation of this file.
1#pragma once
2// MESSAGE MANUAL_CONTROL PACKING
3
4#define MAVLINK_MSG_ID_MANUAL_CONTROL 69
5
6MAVPACKED(
7typedef struct __mavlink_manual_control_t {
8 int16_t x; /*< X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle.*/
9 int16_t y; /*< Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle.*/
10 int16_t z; /*< Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust.*/
11 int16_t r; /*< R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with clockwise being 1000 and counter-clockwise being -1000, and the yaw of a vehicle.*/
12 uint16_t buttons; /*< A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1.*/
13 uint8_t target; /*< The system to be controlled.*/
14 uint16_t buttons2; /*< A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16.*/
15 uint8_t enabled_extensions; /*< Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6*/
16 int16_t s; /*< Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid.*/
17 int16_t t; /*< Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid.*/
18 int16_t aux1; /*< Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset.*/
19 int16_t aux2; /*< Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset.*/
20 int16_t aux3; /*< Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset.*/
21 int16_t aux4; /*< Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset.*/
22 int16_t aux5; /*< Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset.*/
23 int16_t aux6; /*< Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset.*/
24}) mavlink_manual_control_t;
25
26#define MAVLINK_MSG_ID_MANUAL_CONTROL_LEN 30
27#define MAVLINK_MSG_ID_MANUAL_CONTROL_MIN_LEN 11
28#define MAVLINK_MSG_ID_69_LEN 30
29#define MAVLINK_MSG_ID_69_MIN_LEN 11
30
31#define MAVLINK_MSG_ID_MANUAL_CONTROL_CRC 243
32#define MAVLINK_MSG_ID_69_CRC 243
33
34
35
36#if MAVLINK_COMMAND_24BIT
37#define MAVLINK_MESSAGE_INFO_MANUAL_CONTROL {
38 69,
39 "MANUAL_CONTROL",
40 16,
41 { { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_manual_control_t, target) },
42 { "x", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_manual_control_t, x) },
43 { "y", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_manual_control_t, y) },
44 { "z", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_manual_control_t, z) },
45 { "r", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_manual_control_t, r) },
46 { "buttons", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_manual_control_t, buttons) },
47 { "buttons2", NULL, MAVLINK_TYPE_UINT16_T, 0, 11, offsetof(mavlink_manual_control_t, buttons2) },
48 { "enabled_extensions", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_manual_control_t, enabled_extensions) },
49 { "s", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_manual_control_t, s) },
50 { "t", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_manual_control_t, t) },
51 { "aux1", NULL, MAVLINK_TYPE_INT16_T, 0, 18, offsetof(mavlink_manual_control_t, aux1) },
52 { "aux2", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_manual_control_t, aux2) },
53 { "aux3", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_manual_control_t, aux3) },
54 { "aux4", NULL, MAVLINK_TYPE_INT16_T, 0, 24, offsetof(mavlink_manual_control_t, aux4) },
55 { "aux5", NULL, MAVLINK_TYPE_INT16_T, 0, 26, offsetof(mavlink_manual_control_t, aux5) },
56 { "aux6", NULL, MAVLINK_TYPE_INT16_T, 0, 28, offsetof(mavlink_manual_control_t, aux6) },
57 } \
58}
59#else
60#define MAVLINK_MESSAGE_INFO_MANUAL_CONTROL {
61 "MANUAL_CONTROL",
62 16,
63 { { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_manual_control_t, target) },
64 { "x", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_manual_control_t, x) },
65 { "y", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_manual_control_t, y) },
66 { "z", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_manual_control_t, z) },
67 { "r", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_manual_control_t, r) },
68 { "buttons", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_manual_control_t, buttons) },
69 { "buttons2", NULL, MAVLINK_TYPE_UINT16_T, 0, 11, offsetof(mavlink_manual_control_t, buttons2) },
70 { "enabled_extensions", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_manual_control_t, enabled_extensions) },
71 { "s", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_manual_control_t, s) },
72 { "t", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_manual_control_t, t) },
73 { "aux1", NULL, MAVLINK_TYPE_INT16_T, 0, 18, offsetof(mavlink_manual_control_t, aux1) },
74 { "aux2", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_manual_control_t, aux2) },
75 { "aux3", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_manual_control_t, aux3) },
76 { "aux4", NULL, MAVLINK_TYPE_INT16_T, 0, 24, offsetof(mavlink_manual_control_t, aux4) },
77 { "aux5", NULL, MAVLINK_TYPE_INT16_T, 0, 26, offsetof(mavlink_manual_control_t, aux5) },
78 { "aux6", NULL, MAVLINK_TYPE_INT16_T, 0, 28, offsetof(mavlink_manual_control_t, aux6) },
79 } \
80}
81#endif
82
83/**
84 * @brief Pack a manual_control message
85 * @param system_id ID of this system
86 * @param component_id ID of this component (e.g. 200 for IMU)
87 * @param msg The MAVLink message to compress the data into
88 *
89 * @param target The system to be controlled.
90 * @param x X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle.
91 * @param y Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle.
92 * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust.
93 * @param r R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with clockwise being 1000 and counter-clockwise being -1000, and the yaw of a vehicle.
94 * @param buttons A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1.
95 * @param buttons2 A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16.
96 * @param enabled_extensions Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6
97 * @param s Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid.
98 * @param t Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid.
99 * @param aux1 Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset.
100 * @param aux2 Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset.
101 * @param aux3 Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset.
102 * @param aux4 Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset.
103 * @param aux5 Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset.
104 * @param aux6 Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset.
105 * @return length of the message in bytes (excluding serial stream start sign)
106 */
107static inline uint16_t mavlink_msg_manual_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
108 uint8_t target, int16_t x, int16_t y, int16_t z, int16_t r, uint16_t buttons, uint16_t buttons2, uint8_t enabled_extensions, int16_t s, int16_t t, int16_t aux1, int16_t aux2, int16_t aux3, int16_t aux4, int16_t aux5, int16_t aux6)
109{
110#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
112 _mav_put_int16_t(buf, 0, x);
113 _mav_put_int16_t(buf, 2, y);
114 _mav_put_int16_t(buf, 4, z);
115 _mav_put_int16_t(buf, 6, r);
116 _mav_put_uint16_t(buf, 8, buttons);
117 _mav_put_uint8_t(buf, 10, target);
118 _mav_put_uint16_t(buf, 11, buttons2);
119 _mav_put_uint8_t(buf, 13, enabled_extensions);
120 _mav_put_int16_t(buf, 14, s);
121 _mav_put_int16_t(buf, 16, t);
122 _mav_put_int16_t(buf, 18, aux1);
123 _mav_put_int16_t(buf, 20, aux2);
124 _mav_put_int16_t(buf, 22, aux3);
125 _mav_put_int16_t(buf, 24, aux4);
126 _mav_put_int16_t(buf, 26, aux5);
127 _mav_put_int16_t(buf, 28, aux6);
128
129 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
130#else
131 mavlink_manual_control_t packet;
132 packet.x = x;
133 packet.y = y;
134 packet.z = z;
135 packet.r = r;
136 packet.buttons = buttons;
137 packet.target = target;
138 packet.buttons2 = buttons2;
139 packet.enabled_extensions = enabled_extensions;
140 packet.s = s;
141 packet.t = t;
142 packet.aux1 = aux1;
143 packet.aux2 = aux2;
144 packet.aux3 = aux3;
145 packet.aux4 = aux4;
146 packet.aux5 = aux5;
147 packet.aux6 = aux6;
148
149 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
150#endif
151
153 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MANUAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_CRC);
154}
155
156/**
157 * @brief Pack a manual_control message
158 * @param system_id ID of this system
159 * @param component_id ID of this component (e.g. 200 for IMU)
160 * @param status MAVLink status structure
161 * @param msg The MAVLink message to compress the data into
162 *
163 * @param target The system to be controlled.
164 * @param x X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle.
165 * @param y Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle.
166 * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust.
167 * @param r R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with clockwise being 1000 and counter-clockwise being -1000, and the yaw of a vehicle.
168 * @param buttons A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1.
169 * @param buttons2 A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16.
170 * @param enabled_extensions Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6
171 * @param s Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid.
172 * @param t Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid.
173 * @param aux1 Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset.
174 * @param aux2 Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset.
175 * @param aux3 Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset.
176 * @param aux4 Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset.
177 * @param aux5 Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset.
178 * @param aux6 Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset.
179 * @return length of the message in bytes (excluding serial stream start sign)
180 */
181static inline uint16_t mavlink_msg_manual_control_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
182 uint8_t target, int16_t x, int16_t y, int16_t z, int16_t r, uint16_t buttons, uint16_t buttons2, uint8_t enabled_extensions, int16_t s, int16_t t, int16_t aux1, int16_t aux2, int16_t aux3, int16_t aux4, int16_t aux5, int16_t aux6)
183{
184#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
186 _mav_put_int16_t(buf, 0, x);
187 _mav_put_int16_t(buf, 2, y);
188 _mav_put_int16_t(buf, 4, z);
189 _mav_put_int16_t(buf, 6, r);
190 _mav_put_uint16_t(buf, 8, buttons);
191 _mav_put_uint8_t(buf, 10, target);
192 _mav_put_uint16_t(buf, 11, buttons2);
193 _mav_put_uint8_t(buf, 13, enabled_extensions);
194 _mav_put_int16_t(buf, 14, s);
195 _mav_put_int16_t(buf, 16, t);
196 _mav_put_int16_t(buf, 18, aux1);
197 _mav_put_int16_t(buf, 20, aux2);
198 _mav_put_int16_t(buf, 22, aux3);
199 _mav_put_int16_t(buf, 24, aux4);
200 _mav_put_int16_t(buf, 26, aux5);
201 _mav_put_int16_t(buf, 28, aux6);
202
203 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
204#else
205 mavlink_manual_control_t packet;
206 packet.x = x;
207 packet.y = y;
208 packet.z = z;
209 packet.r = r;
210 packet.buttons = buttons;
211 packet.target = target;
212 packet.buttons2 = buttons2;
213 packet.enabled_extensions = enabled_extensions;
214 packet.s = s;
215 packet.t = t;
216 packet.aux1 = aux1;
217 packet.aux2 = aux2;
218 packet.aux3 = aux3;
219 packet.aux4 = aux4;
220 packet.aux5 = aux5;
221 packet.aux6 = aux6;
222
223 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
224#endif
225
227#if MAVLINK_CRC_EXTRA
228 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MANUAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_CRC);
229#else
230 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MANUAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
231#endif
232}
233
234/**
235 * @brief Pack a manual_control message on a channel
236 * @param system_id ID of this system
237 * @param component_id ID of this component (e.g. 200 for IMU)
238 * @param chan The MAVLink channel this message will be sent over
239 * @param msg The MAVLink message to compress the data into
240 * @param target The system to be controlled.
241 * @param x X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle.
242 * @param y Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle.
243 * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust.
244 * @param r R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with clockwise being 1000 and counter-clockwise being -1000, and the yaw of a vehicle.
245 * @param buttons A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1.
246 * @param buttons2 A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16.
247 * @param enabled_extensions Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6
248 * @param s Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid.
249 * @param t Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid.
250 * @param aux1 Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset.
251 * @param aux2 Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset.
252 * @param aux3 Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset.
253 * @param aux4 Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset.
254 * @param aux5 Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset.
255 * @param aux6 Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset.
256 * @return length of the message in bytes (excluding serial stream start sign)
257 */
258static inline uint16_t mavlink_msg_manual_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
259 mavlink_message_t* msg,
260 uint8_t target,int16_t x,int16_t y,int16_t z,int16_t r,uint16_t buttons,uint16_t buttons2,uint8_t enabled_extensions,int16_t s,int16_t t,int16_t aux1,int16_t aux2,int16_t aux3,int16_t aux4,int16_t aux5,int16_t aux6)
261{
262#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
264 _mav_put_int16_t(buf, 0, x);
265 _mav_put_int16_t(buf, 2, y);
266 _mav_put_int16_t(buf, 4, z);
267 _mav_put_int16_t(buf, 6, r);
268 _mav_put_uint16_t(buf, 8, buttons);
269 _mav_put_uint8_t(buf, 10, target);
270 _mav_put_uint16_t(buf, 11, buttons2);
271 _mav_put_uint8_t(buf, 13, enabled_extensions);
272 _mav_put_int16_t(buf, 14, s);
273 _mav_put_int16_t(buf, 16, t);
274 _mav_put_int16_t(buf, 18, aux1);
275 _mav_put_int16_t(buf, 20, aux2);
276 _mav_put_int16_t(buf, 22, aux3);
277 _mav_put_int16_t(buf, 24, aux4);
278 _mav_put_int16_t(buf, 26, aux5);
279 _mav_put_int16_t(buf, 28, aux6);
280
281 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
282#else
283 mavlink_manual_control_t packet;
284 packet.x = x;
285 packet.y = y;
286 packet.z = z;
287 packet.r = r;
288 packet.buttons = buttons;
289 packet.target = target;
290 packet.buttons2 = buttons2;
291 packet.enabled_extensions = enabled_extensions;
292 packet.s = s;
293 packet.t = t;
294 packet.aux1 = aux1;
295 packet.aux2 = aux2;
296 packet.aux3 = aux3;
297 packet.aux4 = aux4;
298 packet.aux5 = aux5;
299 packet.aux6 = aux6;
300
301 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
302#endif
303
305 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MANUAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_CRC);
306}
307
308/**
309 * @brief Encode a manual_control struct
310 *
311 * @param system_id ID of this system
312 * @param component_id ID of this component (e.g. 200 for IMU)
313 * @param msg The MAVLink message to compress the data into
314 * @param manual_control C-struct to read the message contents from
315 */
316static inline uint16_t mavlink_msg_manual_control_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_manual_control_t* manual_control)
317{
318 return mavlink_msg_manual_control_pack(system_id, component_id, msg, manual_control->target, manual_control->x, manual_control->y, manual_control->z, manual_control->r, manual_control->buttons, manual_control->buttons2, manual_control->enabled_extensions, manual_control->s, manual_control->t, manual_control->aux1, manual_control->aux2, manual_control->aux3, manual_control->aux4, manual_control->aux5, manual_control->aux6);
319}
320
321/**
322 * @brief Encode a manual_control struct on a channel
323 *
324 * @param system_id ID of this system
325 * @param component_id ID of this component (e.g. 200 for IMU)
326 * @param chan The MAVLink channel this message will be sent over
327 * @param msg The MAVLink message to compress the data into
328 * @param manual_control C-struct to read the message contents from
329 */
330static inline uint16_t mavlink_msg_manual_control_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_manual_control_t* manual_control)
331{
332 return mavlink_msg_manual_control_pack_chan(system_id, component_id, chan, msg, manual_control->target, manual_control->x, manual_control->y, manual_control->z, manual_control->r, manual_control->buttons, manual_control->buttons2, manual_control->enabled_extensions, manual_control->s, manual_control->t, manual_control->aux1, manual_control->aux2, manual_control->aux3, manual_control->aux4, manual_control->aux5, manual_control->aux6);
333}
334
335/**
336 * @brief Encode a manual_control struct with provided status structure
337 *
338 * @param system_id ID of this system
339 * @param component_id ID of this component (e.g. 200 for IMU)
340 * @param status MAVLink status structure
341 * @param msg The MAVLink message to compress the data into
342 * @param manual_control C-struct to read the message contents from
343 */
344static inline uint16_t mavlink_msg_manual_control_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_manual_control_t* manual_control)
345{
346 return mavlink_msg_manual_control_pack_status(system_id, component_id, _status, msg, manual_control->target, manual_control->x, manual_control->y, manual_control->z, manual_control->r, manual_control->buttons, manual_control->buttons2, manual_control->enabled_extensions, manual_control->s, manual_control->t, manual_control->aux1, manual_control->aux2, manual_control->aux3, manual_control->aux4, manual_control->aux5, manual_control->aux6);
347}
348
349/**
350 * @brief Send a manual_control message
351 * @param chan MAVLink channel to send the message
352 *
353 * @param target The system to be controlled.
354 * @param x X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle.
355 * @param y Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle.
356 * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust.
357 * @param r R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with clockwise being 1000 and counter-clockwise being -1000, and the yaw of a vehicle.
358 * @param buttons A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1.
359 * @param buttons2 A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16.
360 * @param enabled_extensions Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6
361 * @param s Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid.
362 * @param t Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid.
363 * @param aux1 Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset.
364 * @param aux2 Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset.
365 * @param aux3 Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset.
366 * @param aux4 Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset.
367 * @param aux5 Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset.
368 * @param aux6 Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset.
369 */
370#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
371
372static inline void mavlink_msg_manual_control_send(mavlink_channel_t chan, uint8_t target, int16_t x, int16_t y, int16_t z, int16_t r, uint16_t buttons, uint16_t buttons2, uint8_t enabled_extensions, int16_t s, int16_t t, int16_t aux1, int16_t aux2, int16_t aux3, int16_t aux4, int16_t aux5, int16_t aux6)
373{
374#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
375 char buf[MAVLINK_MSG_ID_MANUAL_CONTROL_LEN];
376 _mav_put_int16_t(buf, 0, x);
377 _mav_put_int16_t(buf, 2, y);
378 _mav_put_int16_t(buf, 4, z);
379 _mav_put_int16_t(buf, 6, r);
380 _mav_put_uint16_t(buf, 8, buttons);
381 _mav_put_uint8_t(buf, 10, target);
382 _mav_put_uint16_t(buf, 11, buttons2);
383 _mav_put_uint8_t(buf, 13, enabled_extensions);
384 _mav_put_int16_t(buf, 14, s);
385 _mav_put_int16_t(buf, 16, t);
386 _mav_put_int16_t(buf, 18, aux1);
387 _mav_put_int16_t(buf, 20, aux2);
388 _mav_put_int16_t(buf, 22, aux3);
389 _mav_put_int16_t(buf, 24, aux4);
390 _mav_put_int16_t(buf, 26, aux5);
391 _mav_put_int16_t(buf, 28, aux6);
392
393 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, buf, MAVLINK_MSG_ID_MANUAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_CRC);
394#else
395 mavlink_manual_control_t packet;
396 packet.x = x;
397 packet.y = y;
398 packet.z = z;
399 packet.r = r;
400 packet.buttons = buttons;
401 packet.target = target;
402 packet.buttons2 = buttons2;
403 packet.enabled_extensions = enabled_extensions;
404 packet.s = s;
405 packet.t = t;
406 packet.aux1 = aux1;
407 packet.aux2 = aux2;
408 packet.aux3 = aux3;
409 packet.aux4 = aux4;
410 packet.aux5 = aux5;
411 packet.aux6 = aux6;
412
413 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, (const char *)&packet, MAVLINK_MSG_ID_MANUAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_CRC);
414#endif
415}
416
417/**
418 * @brief Send a manual_control message
419 * @param chan MAVLink channel to send the message
420 * @param struct The MAVLink struct to serialize
421 */
422static inline void mavlink_msg_manual_control_send_struct(mavlink_channel_t chan, const mavlink_manual_control_t* manual_control)
423{
424#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
425 mavlink_msg_manual_control_send(chan, manual_control->target, manual_control->x, manual_control->y, manual_control->z, manual_control->r, manual_control->buttons, manual_control->buttons2, manual_control->enabled_extensions, manual_control->s, manual_control->t, manual_control->aux1, manual_control->aux2, manual_control->aux3, manual_control->aux4, manual_control->aux5, manual_control->aux6);
426#else
427 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, (const char *)manual_control, MAVLINK_MSG_ID_MANUAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_CRC);
428#endif
429}
430
431#if MAVLINK_MSG_ID_MANUAL_CONTROL_LEN <= MAVLINK_MAX_PAYLOAD_LEN
432/*
433 This variant of _send() can be used to save stack space by reusing
434 memory from the receive buffer. The caller provides a
435 mavlink_message_t which is the size of a full mavlink message. This
436 is usually the receive buffer for the channel, and allows a reply to an
437 incoming message with minimum stack space usage.
438 */
439static inline void mavlink_msg_manual_control_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target, int16_t x, int16_t y, int16_t z, int16_t r, uint16_t buttons, uint16_t buttons2, uint8_t enabled_extensions, int16_t s, int16_t t, int16_t aux1, int16_t aux2, int16_t aux3, int16_t aux4, int16_t aux5, int16_t aux6)
440{
441#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
442 char *buf = (char *)msgbuf;
443 _mav_put_int16_t(buf, 0, x);
444 _mav_put_int16_t(buf, 2, y);
445 _mav_put_int16_t(buf, 4, z);
446 _mav_put_int16_t(buf, 6, r);
447 _mav_put_uint16_t(buf, 8, buttons);
448 _mav_put_uint8_t(buf, 10, target);
449 _mav_put_uint16_t(buf, 11, buttons2);
450 _mav_put_uint8_t(buf, 13, enabled_extensions);
451 _mav_put_int16_t(buf, 14, s);
452 _mav_put_int16_t(buf, 16, t);
453 _mav_put_int16_t(buf, 18, aux1);
454 _mav_put_int16_t(buf, 20, aux2);
455 _mav_put_int16_t(buf, 22, aux3);
456 _mav_put_int16_t(buf, 24, aux4);
457 _mav_put_int16_t(buf, 26, aux5);
458 _mav_put_int16_t(buf, 28, aux6);
459
460 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, buf, MAVLINK_MSG_ID_MANUAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_CRC);
461#else
462 mavlink_manual_control_t *packet = (mavlink_manual_control_t *)msgbuf;
463 packet->x = x;
464 packet->y = y;
465 packet->z = z;
466 packet->r = r;
467 packet->buttons = buttons;
468 packet->target = target;
469 packet->buttons2 = buttons2;
470 packet->enabled_extensions = enabled_extensions;
471 packet->s = s;
472 packet->t = t;
473 packet->aux1 = aux1;
474 packet->aux2 = aux2;
475 packet->aux3 = aux3;
476 packet->aux4 = aux4;
477 packet->aux5 = aux5;
478 packet->aux6 = aux6;
479
480 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, (const char *)packet, MAVLINK_MSG_ID_MANUAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_CRC);
481#endif
482}
483#endif
484
485#endif
486
487// MESSAGE MANUAL_CONTROL UNPACKING
488
489
490/**
491 * @brief Get field target from manual_control message
492 *
493 * @return The system to be controlled.
494 */
495static inline uint8_t mavlink_msg_manual_control_get_target(const mavlink_message_t* msg)
496{
497 return _MAV_RETURN_uint8_t(msg, 10);
498}
499
500/**
501 * @brief Get field x from manual_control message
502 *
503 * @return X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle.
504 */
505static inline int16_t mavlink_msg_manual_control_get_x(const mavlink_message_t* msg)
506{
507 return _MAV_RETURN_int16_t(msg, 0);
508}
509
510/**
511 * @brief Get field y from manual_control message
512 *
513 * @return Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle.
514 */
515static inline int16_t mavlink_msg_manual_control_get_y(const mavlink_message_t* msg)
516{
517 return _MAV_RETURN_int16_t(msg, 2);
518}
519
520/**
521 * @brief Get field z from manual_control message
522 *
523 * @return Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust.
524 */
525static inline int16_t mavlink_msg_manual_control_get_z(const mavlink_message_t* msg)
526{
527 return _MAV_RETURN_int16_t(msg, 4);
528}
529
530/**
531 * @brief Get field r from manual_control message
532 *
533 * @return R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with clockwise being 1000 and counter-clockwise being -1000, and the yaw of a vehicle.
534 */
535static inline int16_t mavlink_msg_manual_control_get_r(const mavlink_message_t* msg)
536{
537 return _MAV_RETURN_int16_t(msg, 6);
538}
539
540/**
541 * @brief Get field buttons from manual_control message
542 *
543 * @return A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1.
544 */
545static inline uint16_t mavlink_msg_manual_control_get_buttons(const mavlink_message_t* msg)
546{
547 return _MAV_RETURN_uint16_t(msg, 8);
548}
549
550/**
551 * @brief Get field buttons2 from manual_control message
552 *
553 * @return A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16.
554 */
555static inline uint16_t mavlink_msg_manual_control_get_buttons2(const mavlink_message_t* msg)
556{
557 return _MAV_RETURN_uint16_t(msg, 11);
558}
559
560/**
561 * @brief Get field enabled_extensions from manual_control message
562 *
563 * @return Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6
564 */
565static inline uint8_t mavlink_msg_manual_control_get_enabled_extensions(const mavlink_message_t* msg)
566{
567 return _MAV_RETURN_uint8_t(msg, 13);
568}
569
570/**
571 * @brief Get field s from manual_control message
572 *
573 * @return Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid.
574 */
575static inline int16_t mavlink_msg_manual_control_get_s(const mavlink_message_t* msg)
576{
577 return _MAV_RETURN_int16_t(msg, 14);
578}
579
580/**
581 * @brief Get field t from manual_control message
582 *
583 * @return Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid.
584 */
585static inline int16_t mavlink_msg_manual_control_get_t(const mavlink_message_t* msg)
586{
587 return _MAV_RETURN_int16_t(msg, 16);
588}
589
590/**
591 * @brief Get field aux1 from manual_control message
592 *
593 * @return Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset.
594 */
595static inline int16_t mavlink_msg_manual_control_get_aux1(const mavlink_message_t* msg)
596{
597 return _MAV_RETURN_int16_t(msg, 18);
598}
599
600/**
601 * @brief Get field aux2 from manual_control message
602 *
603 * @return Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset.
604 */
605static inline int16_t mavlink_msg_manual_control_get_aux2(const mavlink_message_t* msg)
606{
607 return _MAV_RETURN_int16_t(msg, 20);
608}
609
610/**
611 * @brief Get field aux3 from manual_control message
612 *
613 * @return Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset.
614 */
615static inline int16_t mavlink_msg_manual_control_get_aux3(const mavlink_message_t* msg)
616{
617 return _MAV_RETURN_int16_t(msg, 22);
618}
619
620/**
621 * @brief Get field aux4 from manual_control message
622 *
623 * @return Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset.
624 */
625static inline int16_t mavlink_msg_manual_control_get_aux4(const mavlink_message_t* msg)
626{
627 return _MAV_RETURN_int16_t(msg, 24);
628}
629
630/**
631 * @brief Get field aux5 from manual_control message
632 *
633 * @return Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset.
634 */
635static inline int16_t mavlink_msg_manual_control_get_aux5(const mavlink_message_t* msg)
636{
637 return _MAV_RETURN_int16_t(msg, 26);
638}
639
640/**
641 * @brief Get field aux6 from manual_control message
642 *
643 * @return Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset.
644 */
645static inline int16_t mavlink_msg_manual_control_get_aux6(const mavlink_message_t* msg)
646{
647 return _MAV_RETURN_int16_t(msg, 28);
648}
649
650/**
651 * @brief Decode a manual_control message into a struct
652 *
653 * @param msg The message to decode
654 * @param manual_control C-struct to decode the message contents into
655 */
656static inline void mavlink_msg_manual_control_decode(const mavlink_message_t* msg, mavlink_manual_control_t* manual_control)
657{
658#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
659 manual_control->x = mavlink_msg_manual_control_get_x(msg);
660 manual_control->y = mavlink_msg_manual_control_get_y(msg);
661 manual_control->z = mavlink_msg_manual_control_get_z(msg);
662 manual_control->r = mavlink_msg_manual_control_get_r(msg);
663 manual_control->buttons = mavlink_msg_manual_control_get_buttons(msg);
664 manual_control->target = mavlink_msg_manual_control_get_target(msg);
665 manual_control->buttons2 = mavlink_msg_manual_control_get_buttons2(msg);
666 manual_control->enabled_extensions = mavlink_msg_manual_control_get_enabled_extensions(msg);
667 manual_control->s = mavlink_msg_manual_control_get_s(msg);
668 manual_control->t = mavlink_msg_manual_control_get_t(msg);
669 manual_control->aux1 = mavlink_msg_manual_control_get_aux1(msg);
670 manual_control->aux2 = mavlink_msg_manual_control_get_aux2(msg);
671 manual_control->aux3 = mavlink_msg_manual_control_get_aux3(msg);
672 manual_control->aux4 = mavlink_msg_manual_control_get_aux4(msg);
673 manual_control->aux5 = mavlink_msg_manual_control_get_aux5(msg);
674 manual_control->aux6 = mavlink_msg_manual_control_get_aux6(msg);
675#else
676 uint8_t len = msg->len < MAVLINK_MSG_ID_MANUAL_CONTROL_LEN? msg->len : MAVLINK_MSG_ID_MANUAL_CONTROL_LEN;
677 memset(manual_control, 0, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
678 memcpy(manual_control, _MAV_PAYLOAD(msg), len);
679#endif
680}