4#define MAVLINK_MSG_ID_MANUAL_SETPOINT 81
15} mavlink_manual_setpoint_t;
17#define MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN 22
18#define MAVLINK_MSG_ID_MANUAL_SETPOINT_MIN_LEN 22
19#define MAVLINK_MSG_ID_81_LEN 22
20#define MAVLINK_MSG_ID_81_MIN_LEN 22
22#define MAVLINK_MSG_ID_MANUAL_SETPOINT_CRC 106
23#define MAVLINK_MSG_ID_81_CRC 106
27#if MAVLINK_COMMAND_24BIT
28#define MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT {
32 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 0
, offsetof(mavlink_manual_setpoint_t, time_boot_ms) },
33 { "roll", NULL, MAVLINK_TYPE_FLOAT, 0
, 4
, offsetof(mavlink_manual_setpoint_t, roll) },
34 { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_manual_setpoint_t, pitch) },
35 { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_manual_setpoint_t, yaw) },
36 { "thrust", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_manual_setpoint_t, thrust) },
37 { "mode_switch", NULL, MAVLINK_TYPE_UINT8_T, 0
, 20
, offsetof(mavlink_manual_setpoint_t, mode_switch) },
38 { "manual_override_switch", NULL, MAVLINK_TYPE_UINT8_T, 0
, 21
, offsetof(mavlink_manual_setpoint_t, manual_override_switch) },
40}
42#define MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT {
45 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 0
, offsetof(mavlink_manual_setpoint_t, time_boot_ms) },
46 { "roll", NULL, MAVLINK_TYPE_FLOAT, 0
, 4
, offsetof(mavlink_manual_setpoint_t, roll) },
47 { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_manual_setpoint_t, pitch) },
48 { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_manual_setpoint_t, yaw) },
49 { "thrust", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_manual_setpoint_t, thrust) },
50 { "mode_switch", NULL, MAVLINK_TYPE_UINT8_T, 0
, 20
, offsetof(mavlink_manual_setpoint_t, mode_switch) },
51 { "manual_override_switch", NULL, MAVLINK_TYPE_UINT8_T, 0
, 21
, offsetof(mavlink_manual_setpoint_t, manual_override_switch) },
53}
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71static inline uint16_t mavlink_msg_manual_setpoint_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
72 uint32_t time_boot_ms,
float roll,
float pitch,
float yaw,
float thrust, uint8_t mode_switch, uint8_t manual_override_switch)
74#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
76 _mav_put_uint32_t(buf, 0, time_boot_ms);
77 _mav_put_float(buf, 4, roll);
78 _mav_put_float(buf, 8, pitch);
79 _mav_put_float(buf, 12, yaw);
80 _mav_put_float(buf, 16, thrust);
81 _mav_put_uint8_t(buf, 20, mode_switch);
82 _mav_put_uint8_t(buf, 21, manual_override_switch);
86 mavlink_manual_setpoint_t packet;
87 packet.time_boot_ms = time_boot_ms;
91 packet.thrust = thrust;
92 packet.mode_switch = mode_switch;
93 packet.manual_override_switch = manual_override_switch;
95 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN);
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118static inline uint16_t mavlink_msg_manual_setpoint_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
119 uint32_t time_boot_ms,
float roll,
float pitch,
float yaw,
float thrust, uint8_t mode_switch, uint8_t manual_override_switch)
121#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
123 _mav_put_uint32_t(buf, 0, time_boot_ms);
124 _mav_put_float(buf, 4, roll);
125 _mav_put_float(buf, 8, pitch);
126 _mav_put_float(buf, 12, yaw);
127 _mav_put_float(buf, 16, thrust);
128 _mav_put_uint8_t(buf, 20, mode_switch);
129 _mav_put_uint8_t(buf, 21, manual_override_switch);
133 mavlink_manual_setpoint_t packet;
134 packet.time_boot_ms = time_boot_ms;
136 packet.pitch = pitch;
138 packet.thrust = thrust;
139 packet.mode_switch = mode_switch;
140 packet.manual_override_switch = manual_override_switch;
142 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN);
147 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MANUAL_SETPOINT_MIN_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_CRC);
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168static inline uint16_t mavlink_msg_manual_setpoint_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
169 mavlink_message_t* msg,
170 uint32_t time_boot_ms,
float roll,
float pitch,
float yaw,
float thrust,uint8_t mode_switch,uint8_t manual_override_switch)
172#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
174 _mav_put_uint32_t(buf, 0, time_boot_ms);
175 _mav_put_float(buf, 4, roll);
176 _mav_put_float(buf, 8, pitch);
177 _mav_put_float(buf, 12, yaw);
178 _mav_put_float(buf, 16, thrust);
179 _mav_put_uint8_t(buf, 20, mode_switch);
180 _mav_put_uint8_t(buf, 21, manual_override_switch);
184 mavlink_manual_setpoint_t packet;
185 packet.time_boot_ms = time_boot_ms;
187 packet.pitch = pitch;
189 packet.thrust = thrust;
190 packet.mode_switch = mode_switch;
191 packet.manual_override_switch = manual_override_switch;
193 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN);
201
202
203
204
205
206
207
208static inline uint16_t mavlink_msg_manual_setpoint_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_manual_setpoint_t* manual_setpoint)
210 return mavlink_msg_manual_setpoint_pack(system_id, component_id, msg, manual_setpoint->time_boot_ms, manual_setpoint->roll, manual_setpoint->pitch, manual_setpoint->yaw, manual_setpoint->thrust, manual_setpoint->mode_switch, manual_setpoint->manual_override_switch);
214
215
216
217
218
219
220
221
222static inline uint16_t mavlink_msg_manual_setpoint_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_manual_setpoint_t* manual_setpoint)
224 return mavlink_msg_manual_setpoint_pack_chan(system_id, component_id, chan, msg, manual_setpoint->time_boot_ms, manual_setpoint->roll, manual_setpoint->pitch, manual_setpoint->yaw, manual_setpoint->thrust, manual_setpoint->mode_switch, manual_setpoint->manual_override_switch);
228
229
230
231
232
233
234
235
236static inline uint16_t mavlink_msg_manual_setpoint_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_manual_setpoint_t* manual_setpoint)
238 return mavlink_msg_manual_setpoint_pack_status(system_id, component_id, _status, msg, manual_setpoint->time_boot_ms, manual_setpoint->roll, manual_setpoint->pitch, manual_setpoint->yaw, manual_setpoint->thrust, manual_setpoint->mode_switch, manual_setpoint->manual_override_switch);
242
243
244
245
246
247
248
249
250
251
252
253#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
255static inline void mavlink_msg_manual_setpoint_send(mavlink_channel_t chan, uint32_t time_boot_ms,
float roll,
float pitch,
float yaw,
float thrust, uint8_t mode_switch, uint8_t manual_override_switch)
257#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
258 char buf[MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN];
259 _mav_put_uint32_t(buf, 0, time_boot_ms);
260 _mav_put_float(buf, 4, roll);
261 _mav_put_float(buf, 8, pitch);
262 _mav_put_float(buf, 12, yaw);
263 _mav_put_float(buf, 16, thrust);
264 _mav_put_uint8_t(buf, 20, mode_switch);
265 _mav_put_uint8_t(buf, 21, manual_override_switch);
267 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_SETPOINT, buf, MAVLINK_MSG_ID_MANUAL_SETPOINT_MIN_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_CRC);
269 mavlink_manual_setpoint_t packet;
270 packet.time_boot_ms = time_boot_ms;
272 packet.pitch = pitch;
274 packet.thrust = thrust;
275 packet.mode_switch = mode_switch;
276 packet.manual_override_switch = manual_override_switch;
278 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_SETPOINT, (
const char *)&packet, MAVLINK_MSG_ID_MANUAL_SETPOINT_MIN_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_CRC);
283
284
285
286
287static inline void mavlink_msg_manual_setpoint_send_struct(mavlink_channel_t chan,
const mavlink_manual_setpoint_t* manual_setpoint)
289#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
290 mavlink_msg_manual_setpoint_send(chan, manual_setpoint->time_boot_ms, manual_setpoint->roll, manual_setpoint->pitch, manual_setpoint->yaw, manual_setpoint->thrust, manual_setpoint->mode_switch, manual_setpoint->manual_override_switch);
292 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_SETPOINT, (
const char *)manual_setpoint, MAVLINK_MSG_ID_MANUAL_SETPOINT_MIN_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_CRC);
296#if MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
298
299
300
301
302
303
304static inline void mavlink_msg_manual_setpoint_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms,
float roll,
float pitch,
float yaw,
float thrust, uint8_t mode_switch, uint8_t manual_override_switch)
306#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
307 char *buf = (
char *)msgbuf;
308 _mav_put_uint32_t(buf, 0, time_boot_ms);
309 _mav_put_float(buf, 4, roll);
310 _mav_put_float(buf, 8, pitch);
311 _mav_put_float(buf, 12, yaw);
312 _mav_put_float(buf, 16, thrust);
313 _mav_put_uint8_t(buf, 20, mode_switch);
314 _mav_put_uint8_t(buf, 21, manual_override_switch);
316 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_SETPOINT, buf, MAVLINK_MSG_ID_MANUAL_SETPOINT_MIN_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_CRC);
318 mavlink_manual_setpoint_t *packet = (mavlink_manual_setpoint_t *)msgbuf;
319 packet->time_boot_ms = time_boot_ms;
321 packet->pitch = pitch;
323 packet->thrust = thrust;
324 packet->mode_switch = mode_switch;
325 packet->manual_override_switch = manual_override_switch;
327 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_SETPOINT, (
const char *)packet, MAVLINK_MSG_ID_MANUAL_SETPOINT_MIN_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_CRC);
338
339
340
341
342static inline uint32_t mavlink_msg_manual_setpoint_get_time_boot_ms(
const mavlink_message_t* msg)
344 return _MAV_RETURN_uint32_t(msg, 0);
348
349
350
351
352static inline float mavlink_msg_manual_setpoint_get_roll(
const mavlink_message_t* msg)
354 return _MAV_RETURN_float(msg, 4);
358
359
360
361
362static inline float mavlink_msg_manual_setpoint_get_pitch(
const mavlink_message_t* msg)
364 return _MAV_RETURN_float(msg, 8);
368
369
370
371
372static inline float mavlink_msg_manual_setpoint_get_yaw(
const mavlink_message_t* msg)
374 return _MAV_RETURN_float(msg, 12);
378
379
380
381
382static inline float mavlink_msg_manual_setpoint_get_thrust(
const mavlink_message_t* msg)
384 return _MAV_RETURN_float(msg, 16);
388
389
390
391
392static inline uint8_t mavlink_msg_manual_setpoint_get_mode_switch(
const mavlink_message_t* msg)
394 return _MAV_RETURN_uint8_t(msg, 20);
398
399
400
401
402static inline uint8_t mavlink_msg_manual_setpoint_get_manual_override_switch(
const mavlink_message_t* msg)
404 return _MAV_RETURN_uint8_t(msg, 21);
408
409
410
411
412
413static inline void mavlink_msg_manual_setpoint_decode(
const mavlink_message_t* msg, mavlink_manual_setpoint_t* manual_setpoint)
415#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
416 manual_setpoint->time_boot_ms = mavlink_msg_manual_setpoint_get_time_boot_ms(msg);
417 manual_setpoint->roll = mavlink_msg_manual_setpoint_get_roll(msg);
418 manual_setpoint->pitch = mavlink_msg_manual_setpoint_get_pitch(msg);
419 manual_setpoint->yaw = mavlink_msg_manual_setpoint_get_yaw(msg);
420 manual_setpoint->thrust = mavlink_msg_manual_setpoint_get_thrust(msg);
421 manual_setpoint->mode_switch = mavlink_msg_manual_setpoint_get_mode_switch(msg);
422 manual_setpoint->manual_override_switch = mavlink_msg_manual_setpoint_get_manual_override_switch(msg);
424 uint8_t len = msg->len < MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN? msg->len : MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN;
425 memset(manual_setpoint, 0, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN);
426 memcpy(manual_setpoint, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_MANUAL_SETPOINT
Definition: mavlink_msg_manual_setpoint.h:4
#define MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN
Definition: mavlink_msg_manual_setpoint.h:17
#define MAVLINK_MSG_ID_MANUAL_SETPOINT_CRC
Definition: mavlink_msg_manual_setpoint.h:22
#define MAVLINK_MSG_ID_MANUAL_SETPOINT_MIN_LEN
Definition: mavlink_msg_manual_setpoint.h:18
Definition: mavlink_msg_manual_setpoint.h:7
float roll
Definition: mavlink_msg_manual_setpoint.h:9
float pitch
Definition: mavlink_msg_manual_setpoint.h:10
uint8_t mode_switch
Definition: mavlink_msg_manual_setpoint.h:13
float yaw
Definition: mavlink_msg_manual_setpoint.h:11
float thrust
Definition: mavlink_msg_manual_setpoint.h:12
uint8_t manual_override_switch
Definition: mavlink_msg_manual_setpoint.h:14
uint32_t time_boot_ms
Definition: mavlink_msg_manual_setpoint.h:8