4#define MAVLINK_MSG_ID_DEBUG 254
7typedef struct __mavlink_debug_t {
13#define MAVLINK_MSG_ID_DEBUG_LEN 9
14#define MAVLINK_MSG_ID_DEBUG_MIN_LEN 9
15#define MAVLINK_MSG_ID_254_LEN 9
16#define MAVLINK_MSG_ID_254_MIN_LEN 9
18#define MAVLINK_MSG_ID_DEBUG_CRC 46
19#define MAVLINK_MSG_ID_254_CRC 46
23#if MAVLINK_COMMAND_24BIT
24#define MAVLINK_MESSAGE_INFO_DEBUG { \
28 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_debug_t, time_boot_ms) }, \
29 { "ind", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_debug_t, ind) }, \
30 { "value", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_debug_t, value) }, \
34#define MAVLINK_MESSAGE_INFO_DEBUG { \
37 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_debug_t, time_boot_ms) }, \
38 { "ind", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_debug_t, ind) }, \
39 { "value", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_debug_t, value) }, \
55static inline uint16_t mavlink_msg_debug_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
56 uint32_t time_boot_ms, uint8_t ind,
float value)
58#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
59 char buf[MAVLINK_MSG_ID_DEBUG_LEN];
60 _mav_put_uint32_t(buf, 0, time_boot_ms);
61 _mav_put_float(buf, 4, value);
62 _mav_put_uint8_t(buf, 8, ind);
64 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEBUG_LEN);
66 mavlink_debug_t packet;
67 packet.time_boot_ms = time_boot_ms;
71 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DEBUG_LEN);
74 msg->msgid = MAVLINK_MSG_ID_DEBUG;
75 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DEBUG_MIN_LEN, MAVLINK_MSG_ID_DEBUG_LEN, MAVLINK_MSG_ID_DEBUG_CRC);
89static inline uint16_t mavlink_msg_debug_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
90 mavlink_message_t* msg,
91 uint32_t time_boot_ms,uint8_t ind,
float value)
93#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
94 char buf[MAVLINK_MSG_ID_DEBUG_LEN];
95 _mav_put_uint32_t(buf, 0, time_boot_ms);
96 _mav_put_float(buf, 4, value);
97 _mav_put_uint8_t(buf, 8, ind);
99 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEBUG_LEN);
101 mavlink_debug_t packet;
102 packet.time_boot_ms = time_boot_ms;
103 packet.value = value;
106 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DEBUG_LEN);
109 msg->msgid = MAVLINK_MSG_ID_DEBUG;
110 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DEBUG_MIN_LEN, MAVLINK_MSG_ID_DEBUG_LEN, MAVLINK_MSG_ID_DEBUG_CRC);
121static inline uint16_t mavlink_msg_debug_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_debug_t* debug)
123 return mavlink_msg_debug_pack(system_id, component_id, msg, debug->time_boot_ms, debug->ind, debug->value);
135static inline uint16_t mavlink_msg_debug_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_debug_t* debug)
137 return mavlink_msg_debug_pack_chan(system_id, component_id, chan, msg, debug->time_boot_ms, debug->ind, debug->value);
148#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
150static inline void mavlink_msg_debug_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t ind,
float value)
152#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
153 char buf[MAVLINK_MSG_ID_DEBUG_LEN];
154 _mav_put_uint32_t(buf, 0, time_boot_ms);
155 _mav_put_float(buf, 4, value);
156 _mav_put_uint8_t(buf, 8, ind);
158 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, buf, MAVLINK_MSG_ID_DEBUG_MIN_LEN, MAVLINK_MSG_ID_DEBUG_LEN, MAVLINK_MSG_ID_DEBUG_CRC);
160 mavlink_debug_t packet;
161 packet.time_boot_ms = time_boot_ms;
162 packet.value = value;
165 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, (
const char *)&packet, MAVLINK_MSG_ID_DEBUG_MIN_LEN, MAVLINK_MSG_ID_DEBUG_LEN, MAVLINK_MSG_ID_DEBUG_CRC);
174static inline void mavlink_msg_debug_send_struct(mavlink_channel_t chan,
const mavlink_debug_t* debug)
176#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
177 mavlink_msg_debug_send(chan, debug->time_boot_ms, debug->ind, debug->value);
179 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, (
const char *)debug, MAVLINK_MSG_ID_DEBUG_MIN_LEN, MAVLINK_MSG_ID_DEBUG_LEN, MAVLINK_MSG_ID_DEBUG_CRC);
183#if MAVLINK_MSG_ID_DEBUG_LEN <= MAVLINK_MAX_PAYLOAD_LEN
191static inline void mavlink_msg_debug_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t ind,
float value)
193#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
194 char *buf = (
char *)msgbuf;
195 _mav_put_uint32_t(buf, 0, time_boot_ms);
196 _mav_put_float(buf, 4, value);
197 _mav_put_uint8_t(buf, 8, ind);
199 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, buf, MAVLINK_MSG_ID_DEBUG_MIN_LEN, MAVLINK_MSG_ID_DEBUG_LEN, MAVLINK_MSG_ID_DEBUG_CRC);
201 mavlink_debug_t *packet = (mavlink_debug_t *)msgbuf;
202 packet->time_boot_ms = time_boot_ms;
203 packet->value = value;
206 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, (
const char *)packet, MAVLINK_MSG_ID_DEBUG_MIN_LEN, MAVLINK_MSG_ID_DEBUG_LEN, MAVLINK_MSG_ID_DEBUG_CRC);
221static inline uint32_t mavlink_msg_debug_get_time_boot_ms(
const mavlink_message_t* msg)
223 return _MAV_RETURN_uint32_t(msg, 0);
231static inline uint8_t mavlink_msg_debug_get_ind(
const mavlink_message_t* msg)
233 return _MAV_RETURN_uint8_t(msg, 8);
241static inline float mavlink_msg_debug_get_value(
const mavlink_message_t* msg)
243 return _MAV_RETURN_float(msg, 4);
252static inline void mavlink_msg_debug_decode(
const mavlink_message_t* msg, mavlink_debug_t* debug)
254#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
255 debug->time_boot_ms = mavlink_msg_debug_get_time_boot_ms(msg);
256 debug->value = mavlink_msg_debug_get_value(msg);
257 debug->ind = mavlink_msg_debug_get_ind(msg);
259 uint8_t len = msg->len < MAVLINK_MSG_ID_DEBUG_LEN? msg->len : MAVLINK_MSG_ID_DEBUG_LEN;
260 memset(debug, 0, MAVLINK_MSG_ID_DEBUG_LEN);
261 memcpy(debug, _MAV_PAYLOAD(msg), len);