3 #define MAVLINK_MSG_ID_DIAGNOSTIC 173
15 #define MAVLINK_MSG_ID_DIAGNOSTIC_LEN 18
16 #define MAVLINK_MSG_ID_173_LEN 18
18 #define MAVLINK_MSG_ID_DIAGNOSTIC_CRC 2
19 #define MAVLINK_MSG_ID_173_CRC 2
23 #define MAVLINK_MESSAGE_INFO_DIAGNOSTIC { \
26 { { "diagFl1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_diagnostic_t, diagFl1) }, \
27 { "diagFl2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_diagnostic_t, diagFl2) }, \
28 { "diagFl3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_diagnostic_t, diagFl3) }, \
29 { "diagSh1", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_diagnostic_t, diagSh1) }, \
30 { "diagSh2", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_diagnostic_t, diagSh2) }, \
31 { "diagSh3", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_diagnostic_t, diagSh3) }, \
50 static inline uint16_t mavlink_msg_diagnostic_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
51 float diagFl1,
float diagFl2,
float diagFl3, int16_t diagSh1, int16_t diagSh2, int16_t diagSh3)
53 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
97 static inline uint16_t mavlink_msg_diagnostic_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
98 mavlink_message_t* msg,
99 float diagFl1,
float diagFl2,
float diagFl3,int16_t diagSh1,int16_t diagSh2,int16_t diagSh3)
101 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
124 #if MAVLINK_CRC_EXTRA
139 static inline uint16_t mavlink_msg_diagnostic_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_diagnostic_t* diagnostic)
153 static inline uint16_t mavlink_msg_diagnostic_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_diagnostic_t* diagnostic)
169 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
171 static inline void mavlink_msg_diagnostic_send(
mavlink_channel_t chan,
float diagFl1,
float diagFl2,
float diagFl3, int16_t diagSh1, int16_t diagSh2, int16_t diagSh3)
173 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
182 #if MAVLINK_CRC_EXTRA
196 #if MAVLINK_CRC_EXTRA
204 #if MAVLINK_MSG_ID_DIAGNOSTIC_LEN <= MAVLINK_MAX_PAYLOAD_LEN
212 static inline void mavlink_msg_diagnostic_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan,
float diagFl1,
float diagFl2,
float diagFl3, int16_t diagSh1, int16_t diagSh2, int16_t diagSh3)
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 float mavlink_msg_diagnostic_get_diagFl1(
const mavlink_message_t* msg)
258 return _MAV_RETURN_float(msg, 0);
266 static inline float mavlink_msg_diagnostic_get_diagFl2(
const mavlink_message_t* msg)
268 return _MAV_RETURN_float(msg, 4);
276 static inline float mavlink_msg_diagnostic_get_diagFl3(
const mavlink_message_t* msg)
278 return _MAV_RETURN_float(msg, 8);
286 static inline int16_t mavlink_msg_diagnostic_get_diagSh1(
const mavlink_message_t* msg)
288 return _MAV_RETURN_int16_t(msg, 12);
296 static inline int16_t mavlink_msg_diagnostic_get_diagSh2(
const mavlink_message_t* msg)
298 return _MAV_RETURN_int16_t(msg, 14);
306 static inline int16_t mavlink_msg_diagnostic_get_diagSh3(
const mavlink_message_t* msg)
308 return _MAV_RETURN_int16_t(msg, 16);
317 static inline void mavlink_msg_diagnostic_decode(
const mavlink_message_t* msg,
mavlink_diagnostic_t* diagnostic)
319 #if MAVLINK_NEED_BYTE_SWAP
320 diagnostic->
diagFl1 = mavlink_msg_diagnostic_get_diagFl1(msg);
321 diagnostic->
diagFl2 = mavlink_msg_diagnostic_get_diagFl2(msg);
322 diagnostic->
diagFl3 = mavlink_msg_diagnostic_get_diagFl3(msg);
323 diagnostic->
diagSh1 = mavlink_msg_diagnostic_get_diagSh1(msg);
324 diagnostic->
diagSh2 = mavlink_msg_diagnostic_get_diagSh2(msg);
325 diagnostic->
diagSh3 = mavlink_msg_diagnostic_get_diagSh3(msg);
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
int16_t diagSh3
Diagnostic short 3.
Definition: mavlink_msg_diagnostic.h:12
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 MAVLINK_MSG_ID_DIAGNOSTIC
Definition: mavlink_msg_diagnostic.h:3
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
mavlink_channel_t
Definition: mavlink_types.h:178
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
#define MAVLINK_MSG_ID_DIAGNOSTIC_CRC
Definition: mavlink_msg_diagnostic.h:18
float diagFl3
Diagnostic float 3.
Definition: mavlink_msg_diagnostic.h:9
int16_t diagSh2
Diagnostic short 2.
Definition: mavlink_msg_diagnostic.h:11
Definition: mavlink_msg_diagnostic.h:5
float diagFl2
Diagnostic float 2.
Definition: mavlink_msg_diagnostic.h:8
int16_t diagSh1
Diagnostic short 1.
Definition: mavlink_msg_diagnostic.h:10
struct __mavlink_diagnostic_t mavlink_diagnostic_t
float diagFl1
Diagnostic float 1.
Definition: mavlink_msg_diagnostic.h:7
#define MAVLINK_MSG_ID_DIAGNOSTIC_LEN
Definition: mavlink_msg_diagnostic.h:15
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