3 #define MAVLINK_MSG_ID_RAW_AUX 172
16 #define MAVLINK_MSG_ID_RAW_AUX_LEN 16
17 #define MAVLINK_MSG_ID_172_LEN 16
19 #define MAVLINK_MSG_ID_RAW_AUX_CRC 182
20 #define MAVLINK_MSG_ID_172_CRC 182
24 #define MAVLINK_MESSAGE_INFO_RAW_AUX { \
27 { { "baro", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_raw_aux_t, baro) }, \
28 { "adc1", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_raw_aux_t, adc1) }, \
29 { "adc2", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_raw_aux_t, adc2) }, \
30 { "adc3", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_raw_aux_t, adc3) }, \
31 { "adc4", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_raw_aux_t, adc4) }, \
32 { "vbat", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_raw_aux_t, vbat) }, \
33 { "temp", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_raw_aux_t, temp) }, \
53 static inline uint16_t mavlink_msg_raw_aux_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
54 uint16_t adc1, uint16_t adc2, uint16_t adc3, uint16_t adc4, uint16_t vbat, int16_t temp, int32_t
baro)
56 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
103 static inline uint16_t mavlink_msg_raw_aux_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
104 mavlink_message_t* msg,
105 uint16_t adc1,uint16_t adc2,uint16_t adc3,uint16_t adc4,uint16_t vbat,int16_t temp,int32_t
baro)
107 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
132 #if MAVLINK_CRC_EXTRA
147 static inline uint16_t mavlink_msg_raw_aux_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_raw_aux_t* raw_aux)
149 return mavlink_msg_raw_aux_pack(system_id, component_id, msg, raw_aux->
adc1, raw_aux->
adc2, raw_aux->
adc3, raw_aux->
adc4, raw_aux->
vbat, raw_aux->
temp, raw_aux->
baro);
161 static inline uint16_t mavlink_msg_raw_aux_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_raw_aux_t* raw_aux)
163 return mavlink_msg_raw_aux_pack_chan(system_id, component_id, chan, msg, raw_aux->
adc1, raw_aux->
adc2, raw_aux->
adc3, raw_aux->
adc4, raw_aux->
vbat, raw_aux->
temp, raw_aux->
baro);
178 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
180 static inline void mavlink_msg_raw_aux_send(
mavlink_channel_t chan, uint16_t adc1, uint16_t adc2, uint16_t adc3, uint16_t adc4, uint16_t vbat, int16_t temp, int32_t baro)
182 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
192 #if MAVLINK_CRC_EXTRA
207 #if MAVLINK_CRC_EXTRA
215 #if MAVLINK_MSG_ID_RAW_AUX_LEN <= MAVLINK_MAX_PAYLOAD_LEN
223 static inline void mavlink_msg_raw_aux_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint16_t adc1, uint16_t adc2, uint16_t adc3, uint16_t adc4, uint16_t vbat, int16_t temp, int32_t baro)
225 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
226 char *buf = (
char *)msgbuf;
235 #if MAVLINK_CRC_EXTRA
250 #if MAVLINK_CRC_EXTRA
269 static inline uint16_t mavlink_msg_raw_aux_get_adc1(
const mavlink_message_t* msg)
271 return _MAV_RETURN_uint16_t(msg, 4);
279 static inline uint16_t mavlink_msg_raw_aux_get_adc2(
const mavlink_message_t* msg)
281 return _MAV_RETURN_uint16_t(msg, 6);
289 static inline uint16_t mavlink_msg_raw_aux_get_adc3(
const mavlink_message_t* msg)
291 return _MAV_RETURN_uint16_t(msg, 8);
299 static inline uint16_t mavlink_msg_raw_aux_get_adc4(
const mavlink_message_t* msg)
301 return _MAV_RETURN_uint16_t(msg, 10);
309 static inline uint16_t mavlink_msg_raw_aux_get_vbat(
const mavlink_message_t* msg)
311 return _MAV_RETURN_uint16_t(msg, 12);
319 static inline int16_t mavlink_msg_raw_aux_get_temp(
const mavlink_message_t* msg)
321 return _MAV_RETURN_int16_t(msg, 14);
329 static inline int32_t mavlink_msg_raw_aux_get_baro(
const mavlink_message_t* msg)
331 return _MAV_RETURN_int32_t(msg, 0);
340 static inline void mavlink_msg_raw_aux_decode(
const mavlink_message_t* msg,
mavlink_raw_aux_t* raw_aux)
342 #if MAVLINK_NEED_BYTE_SWAP
343 raw_aux->
baro = mavlink_msg_raw_aux_get_baro(msg);
344 raw_aux->
adc1 = mavlink_msg_raw_aux_get_adc1(msg);
345 raw_aux->
adc2 = mavlink_msg_raw_aux_get_adc2(msg);
346 raw_aux->
adc3 = mavlink_msg_raw_aux_get_adc3(msg);
347 raw_aux->
adc4 = mavlink_msg_raw_aux_get_adc4(msg);
348 raw_aux->
vbat = mavlink_msg_raw_aux_get_vbat(msg);
349 raw_aux->
temp = mavlink_msg_raw_aux_get_temp(msg);
Definition: mavlink_msg_raw_aux.h:5
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_put_int32_t(buf, wire_offset, b)
Definition: protocol.h:142
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
uint16_t adc1
ADC1 (J405 ADC3, LPC2148 AD0.6)
Definition: mavlink_msg_raw_aux.h:8
mavlink_channel_t
Definition: mavlink_types.h:178
uint16_t adc4
ADC4 (J405 ADC7, LPC2148 AD1.3)
Definition: mavlink_msg_raw_aux.h:11
uint16_t adc3
ADC3 (J405 ADC6, LPC2148 AD0.1)
Definition: mavlink_msg_raw_aux.h:10
int16_t temp
Temperature (degrees celcius)
Definition: mavlink_msg_raw_aux.h:13
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
struct __mavlink_raw_aux_t mavlink_raw_aux_t
int32_t baro
Barometric pressure (hecto Pascal)
Definition: mavlink_msg_raw_aux.h:7
#define MAVLINK_MSG_ID_RAW_AUX
Definition: mavlink_msg_raw_aux.h:3
struct barometer_config baro
Definition: config.h:95
#define MAVLINK_MSG_ID_RAW_AUX_LEN
Definition: mavlink_msg_raw_aux.h:16
#define _mav_put_uint16_t(buf, wire_offset, b)
Definition: protocol.h:139
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
#define _mav_put_int16_t(buf, wire_offset, b)
Definition: protocol.h:140
#define MAVLINK_MSG_ID_RAW_AUX_CRC
Definition: mavlink_msg_raw_aux.h:19
Definition: barometer.h:33
uint16_t vbat
Battery voltage.
Definition: mavlink_msg_raw_aux.h:12
uint16_t adc2
ADC2 (J405 ADC5, LPC2148 AD0.2)
Definition: mavlink_msg_raw_aux.h:9