3 #define MAVLINK_MSG_ID_RADIO_CALIBRATION 221
15 #define MAVLINK_MSG_ID_RADIO_CALIBRATION_LEN 42
16 #define MAVLINK_MSG_ID_221_LEN 42
18 #define MAVLINK_MSG_ID_RADIO_CALIBRATION_CRC 71
19 #define MAVLINK_MSG_ID_221_CRC 71
21 #define MAVLINK_MSG_RADIO_CALIBRATION_FIELD_AILERON_LEN 3
22 #define MAVLINK_MSG_RADIO_CALIBRATION_FIELD_ELEVATOR_LEN 3
23 #define MAVLINK_MSG_RADIO_CALIBRATION_FIELD_RUDDER_LEN 3
24 #define MAVLINK_MSG_RADIO_CALIBRATION_FIELD_GYRO_LEN 2
25 #define MAVLINK_MSG_RADIO_CALIBRATION_FIELD_PITCH_LEN 5
26 #define MAVLINK_MSG_RADIO_CALIBRATION_FIELD_THROTTLE_LEN 5
28 #define MAVLINK_MESSAGE_INFO_RADIO_CALIBRATION { \
29 "RADIO_CALIBRATION", \
31 { { "aileron", NULL, MAVLINK_TYPE_UINT16_T, 3, 0, offsetof(mavlink_radio_calibration_t, aileron) }, \
32 { "elevator", NULL, MAVLINK_TYPE_UINT16_T, 3, 6, offsetof(mavlink_radio_calibration_t, elevator) }, \
33 { "rudder", NULL, MAVLINK_TYPE_UINT16_T, 3, 12, offsetof(mavlink_radio_calibration_t, rudder) }, \
34 { "gyro", NULL, MAVLINK_TYPE_UINT16_T, 2, 18, offsetof(mavlink_radio_calibration_t, gyro) }, \
35 { "pitch", NULL, MAVLINK_TYPE_UINT16_T, 5, 22, offsetof(mavlink_radio_calibration_t, pitch) }, \
36 { "throttle", NULL, MAVLINK_TYPE_UINT16_T, 5, 32, offsetof(mavlink_radio_calibration_t, throttle) }, \
55 static inline uint16_t mavlink_msg_radio_calibration_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
56 const uint16_t *aileron,
const uint16_t *elevator,
const uint16_t *rudder,
const uint16_t *
gyro,
const uint16_t *
pitch,
const uint16_t *
throttle)
58 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
61 _mav_put_uint16_t_array(buf, 0, aileron, 3);
62 _mav_put_uint16_t_array(buf, 6, elevator, 3);
63 _mav_put_uint16_t_array(buf, 12, rudder, 3);
64 _mav_put_uint16_t_array(buf, 18, gyro, 2);
65 _mav_put_uint16_t_array(buf, 22, pitch, 5);
66 _mav_put_uint16_t_array(buf, 32, throttle, 5);
71 mav_array_memcpy(packet.
aileron, aileron,
sizeof(uint16_t)*3);
72 mav_array_memcpy(packet.
elevator, elevator,
sizeof(uint16_t)*3);
73 mav_array_memcpy(packet.
rudder, rudder,
sizeof(uint16_t)*3);
74 mav_array_memcpy(packet.
gyro, gyro,
sizeof(uint16_t)*2);
75 mav_array_memcpy(packet.
pitch, pitch,
sizeof(uint16_t)*5);
76 mav_array_memcpy(packet.
throttle, throttle,
sizeof(uint16_t)*5);
102 static inline uint16_t mavlink_msg_radio_calibration_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
103 mavlink_message_t* msg,
104 const uint16_t *aileron,
const uint16_t *elevator,
const uint16_t *rudder,
const uint16_t *
gyro,
const uint16_t *
pitch,
const uint16_t *
throttle)
106 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
109 _mav_put_uint16_t_array(buf, 0, aileron, 3);
110 _mav_put_uint16_t_array(buf, 6, elevator, 3);
111 _mav_put_uint16_t_array(buf, 12, rudder, 3);
112 _mav_put_uint16_t_array(buf, 18, gyro, 2);
113 _mav_put_uint16_t_array(buf, 22, pitch, 5);
114 _mav_put_uint16_t_array(buf, 32, throttle, 5);
119 mav_array_memcpy(packet.
aileron, aileron,
sizeof(uint16_t)*3);
120 mav_array_memcpy(packet.
elevator, elevator,
sizeof(uint16_t)*3);
121 mav_array_memcpy(packet.
rudder, rudder,
sizeof(uint16_t)*3);
122 mav_array_memcpy(packet.
gyro, gyro,
sizeof(uint16_t)*2);
123 mav_array_memcpy(packet.
pitch, pitch,
sizeof(uint16_t)*5);
124 mav_array_memcpy(packet.
throttle, throttle,
sizeof(uint16_t)*5);
129 #if MAVLINK_CRC_EXTRA
144 static inline uint16_t mavlink_msg_radio_calibration_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_radio_calibration_t* radio_calibration)
146 return mavlink_msg_radio_calibration_pack(system_id, component_id, msg, radio_calibration->
aileron, radio_calibration->
elevator, radio_calibration->
rudder, radio_calibration->
gyro, radio_calibration->
pitch, radio_calibration->
throttle);
158 static inline uint16_t mavlink_msg_radio_calibration_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_radio_calibration_t* radio_calibration)
160 return mavlink_msg_radio_calibration_pack_chan(system_id, component_id, chan, msg, radio_calibration->
aileron, radio_calibration->
elevator, radio_calibration->
rudder, radio_calibration->
gyro, radio_calibration->
pitch, radio_calibration->
throttle);
174 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
176 static inline void mavlink_msg_radio_calibration_send(
mavlink_channel_t chan,
const uint16_t *aileron,
const uint16_t *elevator,
const uint16_t *rudder,
const uint16_t *gyro,
const uint16_t *pitch,
const uint16_t *throttle)
178 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
181 _mav_put_uint16_t_array(buf, 0, aileron, 3);
182 _mav_put_uint16_t_array(buf, 6, elevator, 3);
183 _mav_put_uint16_t_array(buf, 12, rudder, 3);
184 _mav_put_uint16_t_array(buf, 18, gyro, 2);
185 _mav_put_uint16_t_array(buf, 22, pitch, 5);
186 _mav_put_uint16_t_array(buf, 32, throttle, 5);
187 #if MAVLINK_CRC_EXTRA
195 mav_array_memcpy(packet.
aileron, aileron,
sizeof(uint16_t)*3);
196 mav_array_memcpy(packet.
elevator, elevator,
sizeof(uint16_t)*3);
197 mav_array_memcpy(packet.
rudder, rudder,
sizeof(uint16_t)*3);
198 mav_array_memcpy(packet.
gyro, gyro,
sizeof(uint16_t)*2);
199 mav_array_memcpy(packet.
pitch, pitch,
sizeof(uint16_t)*5);
200 mav_array_memcpy(packet.
throttle, throttle,
sizeof(uint16_t)*5);
201 #if MAVLINK_CRC_EXTRA
209 #if MAVLINK_MSG_ID_RADIO_CALIBRATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
217 static inline void mavlink_msg_radio_calibration_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan,
const uint16_t *aileron,
const uint16_t *elevator,
const uint16_t *rudder,
const uint16_t *gyro,
const uint16_t *pitch,
const uint16_t *throttle)
219 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
220 char *buf = (
char *)msgbuf;
222 _mav_put_uint16_t_array(buf, 0, aileron, 3);
223 _mav_put_uint16_t_array(buf, 6, elevator, 3);
224 _mav_put_uint16_t_array(buf, 12, rudder, 3);
225 _mav_put_uint16_t_array(buf, 18, gyro, 2);
226 _mav_put_uint16_t_array(buf, 22, pitch, 5);
227 _mav_put_uint16_t_array(buf, 32, throttle, 5);
228 #if MAVLINK_CRC_EXTRA
236 mav_array_memcpy(packet->
aileron, aileron,
sizeof(uint16_t)*3);
237 mav_array_memcpy(packet->
elevator, elevator,
sizeof(uint16_t)*3);
238 mav_array_memcpy(packet->
rudder, rudder,
sizeof(uint16_t)*3);
239 mav_array_memcpy(packet->
gyro, gyro,
sizeof(uint16_t)*2);
240 mav_array_memcpy(packet->
pitch, pitch,
sizeof(uint16_t)*5);
241 mav_array_memcpy(packet->
throttle, throttle,
sizeof(uint16_t)*5);
242 #if MAVLINK_CRC_EXTRA
261 static inline uint16_t mavlink_msg_radio_calibration_get_aileron(
const mavlink_message_t* msg, uint16_t *aileron)
263 return _MAV_RETURN_uint16_t_array(msg, aileron, 3, 0);
271 static inline uint16_t mavlink_msg_radio_calibration_get_elevator(
const mavlink_message_t* msg, uint16_t *elevator)
273 return _MAV_RETURN_uint16_t_array(msg, elevator, 3, 6);
281 static inline uint16_t mavlink_msg_radio_calibration_get_rudder(
const mavlink_message_t* msg, uint16_t *rudder)
283 return _MAV_RETURN_uint16_t_array(msg, rudder, 3, 12);
291 static inline uint16_t mavlink_msg_radio_calibration_get_gyro(
const mavlink_message_t* msg, uint16_t *gyro)
293 return _MAV_RETURN_uint16_t_array(msg, gyro, 2, 18);
301 static inline uint16_t mavlink_msg_radio_calibration_get_pitch(
const mavlink_message_t* msg, uint16_t *pitch)
303 return _MAV_RETURN_uint16_t_array(msg, pitch, 5, 22);
311 static inline uint16_t mavlink_msg_radio_calibration_get_throttle(
const mavlink_message_t* msg, uint16_t *throttle)
313 return _MAV_RETURN_uint16_t_array(msg, throttle, 5, 32);
322 static inline void mavlink_msg_radio_calibration_decode(
const mavlink_message_t* msg,
mavlink_radio_calibration_t* radio_calibration)
324 #if MAVLINK_NEED_BYTE_SWAP
325 mavlink_msg_radio_calibration_get_aileron(msg, radio_calibration->
aileron);
326 mavlink_msg_radio_calibration_get_elevator(msg, radio_calibration->
elevator);
327 mavlink_msg_radio_calibration_get_rudder(msg, radio_calibration->
rudder);
328 mavlink_msg_radio_calibration_get_gyro(msg, radio_calibration->
gyro);
329 mavlink_msg_radio_calibration_get_pitch(msg, radio_calibration->
pitch);
330 mavlink_msg_radio_calibration_get_throttle(msg, radio_calibration->
throttle);
uint16_t pitch[5]
Pitch curve setpoints (every 25%)
Definition: mavlink_msg_radio_calibration.h:11
MAVLINK_HELPER uint16_t mavlink_finalize_message(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t length)
Finalize a MAVLink message with MAVLINK_COMM_0 as default channel.
Definition: mavlink_helpers.h:105
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
struct throttle_correction_config throttle
Definition: config.h:98
#define MAVLINK_MSG_ID_RADIO_CALIBRATION_CRC
Definition: mavlink_msg_radio_calibration.h:18
mavlink_channel_t
Definition: mavlink_types.h:178
uint16_t elevator[3]
Elevator setpoints: nose down, center, nose up.
Definition: mavlink_msg_radio_calibration.h:8
uint16_t aileron[3]
Aileron setpoints: left, center, right.
Definition: mavlink_msg_radio_calibration.h:7
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
#define MAVLINK_MSG_ID_RADIO_CALIBRATION_LEN
Definition: mavlink_msg_radio_calibration.h:15
uint16_t rudder[3]
Rudder setpoints: nose left, center, nose right.
Definition: mavlink_msg_radio_calibration.h:9
struct gyro_config gyro
Definition: config.h:93
int16_t pitch
Definition: accelerometer.h:52
struct __mavlink_radio_calibration_t mavlink_radio_calibration_t
#define MAVLINK_MSG_ID_RADIO_CALIBRATION
Definition: mavlink_msg_radio_calibration.h:3
uint16_t throttle[5]
Throttle curve setpoints (every 25%)
Definition: mavlink_msg_radio_calibration.h:12
Definition: mavlink_msg_radio_calibration.h:5
uint16_t gyro[2]
Tail gyro mode/gain setpoints: heading hold, rate mode.
Definition: mavlink_msg_radio_calibration.h:10
MAVLINK_HELPER uint16_t mavlink_finalize_message_chan(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t chan, uint8_t length)
Finalize a MAVLink message with channel assignment.
Definition: mavlink_helpers.h:71