3 #define MAVLINK_MSG_ID_MAG_CAL_PROGRESS 191
18 #define MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN 27
19 #define MAVLINK_MSG_ID_191_LEN 27
21 #define MAVLINK_MSG_ID_MAG_CAL_PROGRESS_CRC 92
22 #define MAVLINK_MSG_ID_191_CRC 92
24 #define MAVLINK_MSG_MAG_CAL_PROGRESS_FIELD_COMPLETION_MASK_LEN 10
26 #define MAVLINK_MESSAGE_INFO_MAG_CAL_PROGRESS { \
29 { { "direction_x", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mag_cal_progress_t, direction_x) }, \
30 { "direction_y", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mag_cal_progress_t, direction_y) }, \
31 { "direction_z", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mag_cal_progress_t, direction_z) }, \
32 { "compass_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_mag_cal_progress_t, compass_id) }, \
33 { "cal_mask", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_mag_cal_progress_t, cal_mask) }, \
34 { "cal_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_mag_cal_progress_t, cal_status) }, \
35 { "attempt", NULL, MAVLINK_TYPE_UINT8_T, 0, 15, offsetof(mavlink_mag_cal_progress_t, attempt) }, \
36 { "completion_pct", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_mag_cal_progress_t, completion_pct) }, \
37 { "completion_mask", NULL, MAVLINK_TYPE_UINT8_T, 10, 17, offsetof(mavlink_mag_cal_progress_t, completion_mask) }, \
59 static inline uint16_t mavlink_msg_mag_cal_progress_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
60 uint8_t compass_id, uint8_t cal_mask, uint8_t cal_status, uint8_t attempt, uint8_t completion_pct,
const uint8_t *completion_mask,
float direction_x,
float direction_y,
float direction_z)
62 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
72 _mav_put_uint8_t_array(buf, 17, completion_mask, 10);
84 mav_array_memcpy(packet.
completion_mask, completion_mask,
sizeof(uint8_t)*10);
113 static inline uint16_t mavlink_msg_mag_cal_progress_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
114 mavlink_message_t* msg,
115 uint8_t compass_id,uint8_t cal_mask,uint8_t cal_status,uint8_t attempt,uint8_t completion_pct,
const uint8_t *completion_mask,
float direction_x,
float direction_y,
float direction_z)
117 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
127 _mav_put_uint8_t_array(buf, 17, completion_mask, 10);
139 mav_array_memcpy(packet.
completion_mask, completion_mask,
sizeof(uint8_t)*10);
144 #if MAVLINK_CRC_EXTRA
159 static inline uint16_t mavlink_msg_mag_cal_progress_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_mag_cal_progress_t* mag_cal_progress)
161 return mavlink_msg_mag_cal_progress_pack(system_id, component_id, msg, mag_cal_progress->
compass_id, mag_cal_progress->
cal_mask, mag_cal_progress->
cal_status, mag_cal_progress->
attempt, mag_cal_progress->
completion_pct, mag_cal_progress->
completion_mask, mag_cal_progress->
direction_x, mag_cal_progress->
direction_y, mag_cal_progress->
direction_z);
173 static inline uint16_t mavlink_msg_mag_cal_progress_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_mag_cal_progress_t* mag_cal_progress)
175 return mavlink_msg_mag_cal_progress_pack_chan(system_id, component_id, chan, msg, mag_cal_progress->
compass_id, mag_cal_progress->
cal_mask, mag_cal_progress->
cal_status, mag_cal_progress->
attempt, mag_cal_progress->
completion_pct, mag_cal_progress->
completion_mask, mag_cal_progress->
direction_x, mag_cal_progress->
direction_y, mag_cal_progress->
direction_z);
192 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
194 static inline void mavlink_msg_mag_cal_progress_send(
mavlink_channel_t chan, uint8_t compass_id, uint8_t cal_mask, uint8_t cal_status, uint8_t attempt, uint8_t completion_pct,
const uint8_t *completion_mask,
float direction_x,
float direction_y,
float direction_z)
196 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
206 _mav_put_uint8_t_array(buf, 17, completion_mask, 10);
207 #if MAVLINK_CRC_EXTRA
222 mav_array_memcpy(packet.
completion_mask, completion_mask,
sizeof(uint8_t)*10);
223 #if MAVLINK_CRC_EXTRA
231 #if MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
239 static inline void mavlink_msg_mag_cal_progress_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint8_t compass_id, uint8_t cal_mask, uint8_t cal_status, uint8_t attempt, uint8_t completion_pct,
const uint8_t *completion_mask,
float direction_x,
float direction_y,
float direction_z)
241 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
242 char *buf = (
char *)msgbuf;
251 _mav_put_uint8_t_array(buf, 17, completion_mask, 10);
252 #if MAVLINK_CRC_EXTRA
267 mav_array_memcpy(packet->
completion_mask, completion_mask,
sizeof(uint8_t)*10);
268 #if MAVLINK_CRC_EXTRA
287 static inline uint8_t mavlink_msg_mag_cal_progress_get_compass_id(
const mavlink_message_t* msg)
297 static inline uint8_t mavlink_msg_mag_cal_progress_get_cal_mask(
const mavlink_message_t* msg)
307 static inline uint8_t mavlink_msg_mag_cal_progress_get_cal_status(
const mavlink_message_t* msg)
317 static inline uint8_t mavlink_msg_mag_cal_progress_get_attempt(
const mavlink_message_t* msg)
327 static inline uint8_t mavlink_msg_mag_cal_progress_get_completion_pct(
const mavlink_message_t* msg)
337 static inline uint16_t mavlink_msg_mag_cal_progress_get_completion_mask(
const mavlink_message_t* msg, uint8_t *completion_mask)
339 return _MAV_RETURN_uint8_t_array(msg, completion_mask, 10, 17);
347 static inline float mavlink_msg_mag_cal_progress_get_direction_x(
const mavlink_message_t* msg)
349 return _MAV_RETURN_float(msg, 0);
357 static inline float mavlink_msg_mag_cal_progress_get_direction_y(
const mavlink_message_t* msg)
359 return _MAV_RETURN_float(msg, 4);
367 static inline float mavlink_msg_mag_cal_progress_get_direction_z(
const mavlink_message_t* msg)
369 return _MAV_RETURN_float(msg, 8);
378 static inline void mavlink_msg_mag_cal_progress_decode(
const mavlink_message_t* msg,
mavlink_mag_cal_progress_t* mag_cal_progress)
380 #if MAVLINK_NEED_BYTE_SWAP
381 mag_cal_progress->
direction_x = mavlink_msg_mag_cal_progress_get_direction_x(msg);
382 mag_cal_progress->
direction_y = mavlink_msg_mag_cal_progress_get_direction_y(msg);
383 mag_cal_progress->
direction_z = mavlink_msg_mag_cal_progress_get_direction_z(msg);
384 mag_cal_progress->
compass_id = mavlink_msg_mag_cal_progress_get_compass_id(msg);
385 mag_cal_progress->
cal_mask = mavlink_msg_mag_cal_progress_get_cal_mask(msg);
386 mag_cal_progress->
cal_status = mavlink_msg_mag_cal_progress_get_cal_status(msg);
387 mag_cal_progress->
attempt = mavlink_msg_mag_cal_progress_get_attempt(msg);
388 mag_cal_progress->
completion_pct = mavlink_msg_mag_cal_progress_get_completion_pct(msg);
389 mavlink_msg_mag_cal_progress_get_completion_mask(msg, mag_cal_progress->
completion_mask);
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
uint8_t cal_mask
Bitmask of compasses being calibrated.
Definition: mavlink_msg_mag_cal_progress.h:11
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
#define MAVLINK_MSG_ID_MAG_CAL_PROGRESS_CRC
Definition: mavlink_msg_mag_cal_progress.h:21
float direction_z
Body frame direction vector for display.
Definition: mavlink_msg_mag_cal_progress.h:9
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
uint8_t cal_status
Status (see MAG_CAL_STATUS enum)
Definition: mavlink_msg_mag_cal_progress.h:12
Definition: mavlink_msg_mag_cal_progress.h:5
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
float direction_y
Body frame direction vector for display.
Definition: mavlink_msg_mag_cal_progress.h:8
mavlink_channel_t
Definition: mavlink_types.h:178
#define MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN
Definition: mavlink_msg_mag_cal_progress.h:18
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
#define MAVLINK_MSG_ID_MAG_CAL_PROGRESS
Definition: mavlink_msg_mag_cal_progress.h:3
uint8_t compass_id
Compass being calibrated.
Definition: mavlink_msg_mag_cal_progress.h:10
float direction_x
Body frame direction vector for display.
Definition: mavlink_msg_mag_cal_progress.h:7
uint8_t attempt
Attempt number.
Definition: mavlink_msg_mag_cal_progress.h:13
struct __mavlink_mag_cal_progress_t mavlink_mag_cal_progress_t
uint8_t completion_pct
Completion percentage.
Definition: mavlink_msg_mag_cal_progress.h:14
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
uint8_t completion_mask[10]
Bitmask of sphere sections (see http://en.wikipedia.org/wiki/Geodesic_grid)
Definition: mavlink_msg_mag_cal_progress.h:15