3 #define MAVLINK_MSG_ID_AQ_ESC_TELEMETRY 152
18 #define MAVLINK_MSG_ID_AQ_ESC_TELEMETRY_LEN 55
19 #define MAVLINK_MSG_ID_152_LEN 55
21 #define MAVLINK_MSG_ID_AQ_ESC_TELEMETRY_CRC 115
22 #define MAVLINK_MSG_ID_152_CRC 115
24 #define MAVLINK_MSG_AQ_ESC_TELEMETRY_FIELD_DATA0_LEN 4
25 #define MAVLINK_MSG_AQ_ESC_TELEMETRY_FIELD_DATA1_LEN 4
26 #define MAVLINK_MSG_AQ_ESC_TELEMETRY_FIELD_STATUS_AGE_LEN 4
27 #define MAVLINK_MSG_AQ_ESC_TELEMETRY_FIELD_ESCID_LEN 4
28 #define MAVLINK_MSG_AQ_ESC_TELEMETRY_FIELD_DATA_VERSION_LEN 4
30 #define MAVLINK_MESSAGE_INFO_AQ_ESC_TELEMETRY { \
33 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_aq_esc_telemetry_t, time_boot_ms) }, \
34 { "data0", NULL, MAVLINK_TYPE_UINT32_T, 4, 4, offsetof(mavlink_aq_esc_telemetry_t, data0) }, \
35 { "data1", NULL, MAVLINK_TYPE_UINT32_T, 4, 20, offsetof(mavlink_aq_esc_telemetry_t, data1) }, \
36 { "status_age", NULL, MAVLINK_TYPE_UINT16_T, 4, 36, offsetof(mavlink_aq_esc_telemetry_t, status_age) }, \
37 { "seq", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_aq_esc_telemetry_t, seq) }, \
38 { "num_motors", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_aq_esc_telemetry_t, num_motors) }, \
39 { "num_in_seq", NULL, MAVLINK_TYPE_UINT8_T, 0, 46, offsetof(mavlink_aq_esc_telemetry_t, num_in_seq) }, \
40 { "escid", NULL, MAVLINK_TYPE_UINT8_T, 4, 47, offsetof(mavlink_aq_esc_telemetry_t, escid) }, \
41 { "data_version", NULL, MAVLINK_TYPE_UINT8_T, 4, 51, offsetof(mavlink_aq_esc_telemetry_t, data_version) }, \
63 static inline uint16_t mavlink_msg_aq_esc_telemetry_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
64 uint32_t time_boot_ms, uint8_t seq, uint8_t num_motors, uint8_t num_in_seq,
const uint8_t *escid,
const uint16_t *status_age,
const uint8_t *data_version,
const uint32_t *data0,
const uint32_t *data1)
66 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
72 _mav_put_uint32_t_array(buf, 4, data0, 4);
73 _mav_put_uint32_t_array(buf, 20, data1, 4);
74 _mav_put_uint16_t_array(buf, 36, status_age, 4);
75 _mav_put_uint8_t_array(buf, 47, escid, 4);
76 _mav_put_uint8_t_array(buf, 51, data_version, 4);
84 mav_array_memcpy(packet.
data0, data0,
sizeof(uint32_t)*4);
85 mav_array_memcpy(packet.
data1, data1,
sizeof(uint32_t)*4);
86 mav_array_memcpy(packet.
status_age, status_age,
sizeof(uint16_t)*4);
87 mav_array_memcpy(packet.
escid, escid,
sizeof(uint8_t)*4);
88 mav_array_memcpy(packet.
data_version, data_version,
sizeof(uint8_t)*4);
117 static inline uint16_t mavlink_msg_aq_esc_telemetry_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
118 mavlink_message_t* msg,
119 uint32_t time_boot_ms,uint8_t seq,uint8_t num_motors,uint8_t num_in_seq,
const uint8_t *escid,
const uint16_t *status_age,
const uint8_t *data_version,
const uint32_t *data0,
const uint32_t *data1)
121 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
127 _mav_put_uint32_t_array(buf, 4, data0, 4);
128 _mav_put_uint32_t_array(buf, 20, data1, 4);
129 _mav_put_uint16_t_array(buf, 36, status_age, 4);
130 _mav_put_uint8_t_array(buf, 47, escid, 4);
131 _mav_put_uint8_t_array(buf, 51, data_version, 4);
139 mav_array_memcpy(packet.
data0, data0,
sizeof(uint32_t)*4);
140 mav_array_memcpy(packet.
data1, data1,
sizeof(uint32_t)*4);
141 mav_array_memcpy(packet.
status_age, status_age,
sizeof(uint16_t)*4);
142 mav_array_memcpy(packet.
escid, escid,
sizeof(uint8_t)*4);
143 mav_array_memcpy(packet.
data_version, data_version,
sizeof(uint8_t)*4);
148 #if MAVLINK_CRC_EXTRA
163 static inline uint16_t mavlink_msg_aq_esc_telemetry_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_aq_esc_telemetry_t* aq_esc_telemetry)
165 return mavlink_msg_aq_esc_telemetry_pack(system_id, component_id, msg, aq_esc_telemetry->
time_boot_ms, aq_esc_telemetry->
seq, aq_esc_telemetry->
num_motors, aq_esc_telemetry->
num_in_seq, aq_esc_telemetry->
escid, aq_esc_telemetry->
status_age, aq_esc_telemetry->
data_version, aq_esc_telemetry->
data0, aq_esc_telemetry->
data1);
177 static inline uint16_t mavlink_msg_aq_esc_telemetry_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_aq_esc_telemetry_t* aq_esc_telemetry)
179 return mavlink_msg_aq_esc_telemetry_pack_chan(system_id, component_id, chan, msg, aq_esc_telemetry->
time_boot_ms, aq_esc_telemetry->
seq, aq_esc_telemetry->
num_motors, aq_esc_telemetry->
num_in_seq, aq_esc_telemetry->
escid, aq_esc_telemetry->
status_age, aq_esc_telemetry->
data_version, aq_esc_telemetry->
data0, aq_esc_telemetry->
data1);
196 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
198 static inline void mavlink_msg_aq_esc_telemetry_send(
mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t seq, uint8_t num_motors, uint8_t num_in_seq,
const uint8_t *escid,
const uint16_t *status_age,
const uint8_t *data_version,
const uint32_t *data0,
const uint32_t *data1)
200 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
206 _mav_put_uint32_t_array(buf, 4, data0, 4);
207 _mav_put_uint32_t_array(buf, 20, data1, 4);
208 _mav_put_uint16_t_array(buf, 36, status_age, 4);
209 _mav_put_uint8_t_array(buf, 47, escid, 4);
210 _mav_put_uint8_t_array(buf, 51, data_version, 4);
211 #if MAVLINK_CRC_EXTRA
222 mav_array_memcpy(packet.
data0, data0,
sizeof(uint32_t)*4);
223 mav_array_memcpy(packet.
data1, data1,
sizeof(uint32_t)*4);
224 mav_array_memcpy(packet.
status_age, status_age,
sizeof(uint16_t)*4);
225 mav_array_memcpy(packet.
escid, escid,
sizeof(uint8_t)*4);
226 mav_array_memcpy(packet.
data_version, data_version,
sizeof(uint8_t)*4);
227 #if MAVLINK_CRC_EXTRA
235 #if MAVLINK_MSG_ID_AQ_ESC_TELEMETRY_LEN <= MAVLINK_MAX_PAYLOAD_LEN
243 static inline void mavlink_msg_aq_esc_telemetry_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t seq, uint8_t num_motors, uint8_t num_in_seq,
const uint8_t *escid,
const uint16_t *status_age,
const uint8_t *data_version,
const uint32_t *data0,
const uint32_t *data1)
245 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
246 char *buf = (
char *)msgbuf;
251 _mav_put_uint32_t_array(buf, 4, data0, 4);
252 _mav_put_uint32_t_array(buf, 20, data1, 4);
253 _mav_put_uint16_t_array(buf, 36, status_age, 4);
254 _mav_put_uint8_t_array(buf, 47, escid, 4);
255 _mav_put_uint8_t_array(buf, 51, data_version, 4);
256 #if MAVLINK_CRC_EXTRA
267 mav_array_memcpy(packet->
data0, data0,
sizeof(uint32_t)*4);
268 mav_array_memcpy(packet->
data1, data1,
sizeof(uint32_t)*4);
269 mav_array_memcpy(packet->
status_age, status_age,
sizeof(uint16_t)*4);
270 mav_array_memcpy(packet->
escid, escid,
sizeof(uint8_t)*4);
271 mav_array_memcpy(packet->
data_version, data_version,
sizeof(uint8_t)*4);
272 #if MAVLINK_CRC_EXTRA
291 static inline uint32_t mavlink_msg_aq_esc_telemetry_get_time_boot_ms(
const mavlink_message_t* msg)
293 return _MAV_RETURN_uint32_t(msg, 0);
301 static inline uint8_t mavlink_msg_aq_esc_telemetry_get_seq(
const mavlink_message_t* msg)
311 static inline uint8_t mavlink_msg_aq_esc_telemetry_get_num_motors(
const mavlink_message_t* msg)
321 static inline uint8_t mavlink_msg_aq_esc_telemetry_get_num_in_seq(
const mavlink_message_t* msg)
331 static inline uint16_t mavlink_msg_aq_esc_telemetry_get_escid(
const mavlink_message_t* msg, uint8_t *escid)
333 return _MAV_RETURN_uint8_t_array(msg, escid, 4, 47);
341 static inline uint16_t mavlink_msg_aq_esc_telemetry_get_status_age(
const mavlink_message_t* msg, uint16_t *status_age)
343 return _MAV_RETURN_uint16_t_array(msg, status_age, 4, 36);
351 static inline uint16_t mavlink_msg_aq_esc_telemetry_get_data_version(
const mavlink_message_t* msg, uint8_t *data_version)
353 return _MAV_RETURN_uint8_t_array(msg, data_version, 4, 51);
361 static inline uint16_t mavlink_msg_aq_esc_telemetry_get_data0(
const mavlink_message_t* msg, uint32_t *data0)
363 return _MAV_RETURN_uint32_t_array(msg, data0, 4, 4);
371 static inline uint16_t mavlink_msg_aq_esc_telemetry_get_data1(
const mavlink_message_t* msg, uint32_t *data1)
373 return _MAV_RETURN_uint32_t_array(msg, data1, 4, 20);
382 static inline void mavlink_msg_aq_esc_telemetry_decode(
const mavlink_message_t* msg,
mavlink_aq_esc_telemetry_t* aq_esc_telemetry)
384 #if MAVLINK_NEED_BYTE_SWAP
385 aq_esc_telemetry->
time_boot_ms = mavlink_msg_aq_esc_telemetry_get_time_boot_ms(msg);
386 mavlink_msg_aq_esc_telemetry_get_data0(msg, aq_esc_telemetry->
data0);
387 mavlink_msg_aq_esc_telemetry_get_data1(msg, aq_esc_telemetry->
data1);
388 mavlink_msg_aq_esc_telemetry_get_status_age(msg, aq_esc_telemetry->
status_age);
389 aq_esc_telemetry->
seq = mavlink_msg_aq_esc_telemetry_get_seq(msg);
390 aq_esc_telemetry->
num_motors = mavlink_msg_aq_esc_telemetry_get_num_motors(msg);
391 aq_esc_telemetry->
num_in_seq = mavlink_msg_aq_esc_telemetry_get_num_in_seq(msg);
392 mavlink_msg_aq_esc_telemetry_get_escid(msg, aq_esc_telemetry->
escid);
393 mavlink_msg_aq_esc_telemetry_get_data_version(msg, aq_esc_telemetry->
data_version);
#define MAVLINK_MSG_ID_AQ_ESC_TELEMETRY
Definition: mavlink_msg_aq_esc_telemetry.h:3
uint8_t seq
Sequence number of message (first set of 4 motors is #1, next 4 is #2, etc).
Definition: mavlink_msg_aq_esc_telemetry.h:11
uint8_t data_version[4]
Version of data structure (determines contents).
Definition: mavlink_msg_aq_esc_telemetry.h:15
uint8_t escid[4]
ESC/Motor ID.
Definition: mavlink_msg_aq_esc_telemetry.h:14
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
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_AQ_ESC_TELEMETRY_CRC
Definition: mavlink_msg_aq_esc_telemetry.h:21
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
#define MAVLINK_MSG_ID_AQ_ESC_TELEMETRY_LEN
Definition: mavlink_msg_aq_esc_telemetry.h:18
Definition: mavlink_msg_aq_esc_telemetry.h:5
mavlink_channel_t
Definition: mavlink_types.h:178
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
uint32_t time_boot_ms
Timestamp of the component clock since boot time in ms.
Definition: mavlink_msg_aq_esc_telemetry.h:7
uint32_t data1[4]
Data bits 33-64 for each ESC.
Definition: mavlink_msg_aq_esc_telemetry.h:9
uint16_t status_age[4]
Age of each ESC telemetry reading in ms compared to boot time. A value of 0xFFFF means timeout/no dat...
Definition: mavlink_msg_aq_esc_telemetry.h:10
uint32_t data0[4]
Data bits 1-32 for each ESC.
Definition: mavlink_msg_aq_esc_telemetry.h:8
struct __mavlink_aq_esc_telemetry_t mavlink_aq_esc_telemetry_t
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 num_in_seq
Number of active ESCs in this sequence (1 through this many array members will be populated with data...
Definition: mavlink_msg_aq_esc_telemetry.h:13
#define _mav_put_uint32_t(buf, wire_offset, b)
Definition: protocol.h:141
uint8_t num_motors
Total number of active ESCs/motors on the system.
Definition: mavlink_msg_aq_esc_telemetry.h:12