3 #define MAVLINK_MSG_ID_AP_ADC 153
15 #define MAVLINK_MSG_ID_AP_ADC_LEN 12
16 #define MAVLINK_MSG_ID_153_LEN 12
18 #define MAVLINK_MSG_ID_AP_ADC_CRC 188
19 #define MAVLINK_MSG_ID_153_CRC 188
23 #define MAVLINK_MESSAGE_INFO_AP_ADC { \
26 { { "adc1", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_ap_adc_t, adc1) }, \
27 { "adc2", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_ap_adc_t, adc2) }, \
28 { "adc3", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_ap_adc_t, adc3) }, \
29 { "adc4", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_ap_adc_t, adc4) }, \
30 { "adc5", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_ap_adc_t, adc5) }, \
31 { "adc6", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_ap_adc_t, adc6) }, \
50 static inline uint16_t mavlink_msg_ap_adc_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
51 uint16_t adc1, uint16_t adc2, uint16_t adc3, uint16_t adc4, uint16_t adc5, uint16_t adc6)
53 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
97 static inline uint16_t mavlink_msg_ap_adc_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
98 mavlink_message_t* msg,
99 uint16_t adc1,uint16_t adc2,uint16_t adc3,uint16_t adc4,uint16_t adc5,uint16_t adc6)
101 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
124 #if MAVLINK_CRC_EXTRA
139 static inline uint16_t mavlink_msg_ap_adc_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_ap_adc_t* ap_adc)
141 return mavlink_msg_ap_adc_pack(system_id, component_id, msg, ap_adc->
adc1, ap_adc->
adc2, ap_adc->
adc3, ap_adc->
adc4, ap_adc->
adc5, ap_adc->
adc6);
153 static inline uint16_t mavlink_msg_ap_adc_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_ap_adc_t* ap_adc)
155 return mavlink_msg_ap_adc_pack_chan(system_id, component_id, chan, msg, ap_adc->
adc1, ap_adc->
adc2, ap_adc->
adc3, ap_adc->
adc4, ap_adc->
adc5, ap_adc->
adc6);
169 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
171 static inline void mavlink_msg_ap_adc_send(
mavlink_channel_t chan, uint16_t adc1, uint16_t adc2, uint16_t adc3, uint16_t adc4, uint16_t adc5, uint16_t adc6)
173 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
182 #if MAVLINK_CRC_EXTRA
196 #if MAVLINK_CRC_EXTRA
204 #if MAVLINK_MSG_ID_AP_ADC_LEN <= MAVLINK_MAX_PAYLOAD_LEN
212 static inline void mavlink_msg_ap_adc_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint16_t adc1, uint16_t adc2, uint16_t adc3, uint16_t adc4, uint16_t adc5, uint16_t adc6)
214 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
215 char *buf = (
char *)msgbuf;
223 #if MAVLINK_CRC_EXTRA
237 #if MAVLINK_CRC_EXTRA
256 static inline uint16_t mavlink_msg_ap_adc_get_adc1(
const mavlink_message_t* msg)
258 return _MAV_RETURN_uint16_t(msg, 0);
266 static inline uint16_t mavlink_msg_ap_adc_get_adc2(
const mavlink_message_t* msg)
268 return _MAV_RETURN_uint16_t(msg, 2);
276 static inline uint16_t mavlink_msg_ap_adc_get_adc3(
const mavlink_message_t* msg)
278 return _MAV_RETURN_uint16_t(msg, 4);
286 static inline uint16_t mavlink_msg_ap_adc_get_adc4(
const mavlink_message_t* msg)
288 return _MAV_RETURN_uint16_t(msg, 6);
296 static inline uint16_t mavlink_msg_ap_adc_get_adc5(
const mavlink_message_t* msg)
298 return _MAV_RETURN_uint16_t(msg, 8);
306 static inline uint16_t mavlink_msg_ap_adc_get_adc6(
const mavlink_message_t* msg)
308 return _MAV_RETURN_uint16_t(msg, 10);
317 static inline void mavlink_msg_ap_adc_decode(
const mavlink_message_t* msg,
mavlink_ap_adc_t* ap_adc)
319 #if MAVLINK_NEED_BYTE_SWAP
320 ap_adc->
adc1 = mavlink_msg_ap_adc_get_adc1(msg);
321 ap_adc->
adc2 = mavlink_msg_ap_adc_get_adc2(msg);
322 ap_adc->
adc3 = mavlink_msg_ap_adc_get_adc3(msg);
323 ap_adc->
adc4 = mavlink_msg_ap_adc_get_adc4(msg);
324 ap_adc->
adc5 = mavlink_msg_ap_adc_get_adc5(msg);
325 ap_adc->
adc6 = mavlink_msg_ap_adc_get_adc6(msg);
uint16_t adc5
ADC output 5.
Definition: mavlink_msg_ap_adc.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
uint16_t adc4
ADC output 4.
Definition: mavlink_msg_ap_adc.h:10
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
#define MAVLINK_MSG_ID_AP_ADC
Definition: mavlink_msg_ap_adc.h:3
mavlink_channel_t
Definition: mavlink_types.h:178
#define MAVLINK_MSG_ID_AP_ADC_CRC
Definition: mavlink_msg_ap_adc.h:18
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
#define MAVLINK_MSG_ID_AP_ADC_LEN
Definition: mavlink_msg_ap_adc.h:15
struct __mavlink_ap_adc_t mavlink_ap_adc_t
Definition: mavlink_msg_ap_adc.h:5
uint16_t adc3
ADC output 3.
Definition: mavlink_msg_ap_adc.h:9
#define _mav_put_uint16_t(buf, wire_offset, b)
Definition: protocol.h:139
uint16_t adc1
ADC output 1.
Definition: mavlink_msg_ap_adc.h:7
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
uint16_t adc6
ADC output 6.
Definition: mavlink_msg_ap_adc.h:12
uint16_t adc2
ADC output 2.
Definition: mavlink_msg_ap_adc.h:8