This commit is contained in:
matt
2020-09-20 14:09:03 +08:00
parent b2baf4bffc
commit 991dc1353a
96 changed files with 4166 additions and 4166 deletions
+68 -68
View File
@@ -6,7 +6,7 @@
typedef struct __mavlink_device_op_read_t {
uint32_t request_id; /*< Request ID - copied to reply.*/
uint8_t target_system; /*< System ID.*/
uint16_t target_system; /*< System ID.*/
uint8_t target_component; /*< Component ID.*/
uint8_t bustype; /*< The bus type.*/
uint8_t bus; /*< Bus number.*/
@@ -16,13 +16,13 @@ typedef struct __mavlink_device_op_read_t {
uint8_t count; /*< Count of registers to read.*/
} mavlink_device_op_read_t;
#define MAVLINK_MSG_ID_DEVICE_OP_READ_LEN 51
#define MAVLINK_MSG_ID_DEVICE_OP_READ_MIN_LEN 51
#define MAVLINK_MSG_ID_11000_LEN 51
#define MAVLINK_MSG_ID_11000_MIN_LEN 51
#define MAVLINK_MSG_ID_DEVICE_OP_READ_LEN 52
#define MAVLINK_MSG_ID_DEVICE_OP_READ_MIN_LEN 52
#define MAVLINK_MSG_ID_11000_LEN 52
#define MAVLINK_MSG_ID_11000_MIN_LEN 52
#define MAVLINK_MSG_ID_DEVICE_OP_READ_CRC 134
#define MAVLINK_MSG_ID_11000_CRC 134
#define MAVLINK_MSG_ID_DEVICE_OP_READ_CRC 193
#define MAVLINK_MSG_ID_11000_CRC 193
#define MAVLINK_MSG_DEVICE_OP_READ_FIELD_BUSNAME_LEN 40
@@ -31,30 +31,30 @@ typedef struct __mavlink_device_op_read_t {
11000, \
"DEVICE_OP_READ", \
9, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_device_op_read_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_device_op_read_t, target_component) }, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_device_op_read_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_device_op_read_t, target_component) }, \
{ "request_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_device_op_read_t, request_id) }, \
{ "bustype", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_device_op_read_t, bustype) }, \
{ "bus", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_device_op_read_t, bus) }, \
{ "address", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_device_op_read_t, address) }, \
{ "busname", NULL, MAVLINK_TYPE_CHAR, 40, 9, offsetof(mavlink_device_op_read_t, busname) }, \
{ "regstart", NULL, MAVLINK_TYPE_UINT8_T, 0, 49, offsetof(mavlink_device_op_read_t, regstart) }, \
{ "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 50, offsetof(mavlink_device_op_read_t, count) }, \
{ "bustype", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_device_op_read_t, bustype) }, \
{ "bus", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_device_op_read_t, bus) }, \
{ "address", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_device_op_read_t, address) }, \
{ "busname", NULL, MAVLINK_TYPE_CHAR, 40, 10, offsetof(mavlink_device_op_read_t, busname) }, \
{ "regstart", NULL, MAVLINK_TYPE_UINT8_T, 0, 50, offsetof(mavlink_device_op_read_t, regstart) }, \
{ "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 51, offsetof(mavlink_device_op_read_t, count) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_DEVICE_OP_READ { \
"DEVICE_OP_READ", \
9, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_device_op_read_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_device_op_read_t, target_component) }, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_device_op_read_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_device_op_read_t, target_component) }, \
{ "request_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_device_op_read_t, request_id) }, \
{ "bustype", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_device_op_read_t, bustype) }, \
{ "bus", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_device_op_read_t, bus) }, \
{ "address", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_device_op_read_t, address) }, \
{ "busname", NULL, MAVLINK_TYPE_CHAR, 40, 9, offsetof(mavlink_device_op_read_t, busname) }, \
{ "regstart", NULL, MAVLINK_TYPE_UINT8_T, 0, 49, offsetof(mavlink_device_op_read_t, regstart) }, \
{ "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 50, offsetof(mavlink_device_op_read_t, count) }, \
{ "bustype", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_device_op_read_t, bustype) }, \
{ "bus", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_device_op_read_t, bus) }, \
{ "address", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_device_op_read_t, address) }, \
{ "busname", NULL, MAVLINK_TYPE_CHAR, 40, 10, offsetof(mavlink_device_op_read_t, busname) }, \
{ "regstart", NULL, MAVLINK_TYPE_UINT8_T, 0, 50, offsetof(mavlink_device_op_read_t, regstart) }, \
{ "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 51, offsetof(mavlink_device_op_read_t, count) }, \
} \
}
#endif
@@ -77,19 +77,19 @@ typedef struct __mavlink_device_op_read_t {
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_device_op_read_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint32_t request_id, uint8_t bustype, uint8_t bus, uint8_t address, const char *busname, uint8_t regstart, uint8_t count)
uint16_t target_system, uint8_t target_component, uint32_t request_id, uint8_t bustype, uint8_t bus, uint8_t address, const char *busname, uint8_t regstart, uint8_t count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_DEVICE_OP_READ_LEN];
_mav_put_uint32_t(buf, 0, request_id);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
_mav_put_uint8_t(buf, 6, bustype);
_mav_put_uint8_t(buf, 7, bus);
_mav_put_uint8_t(buf, 8, address);
_mav_put_uint8_t(buf, 49, regstart);
_mav_put_uint8_t(buf, 50, count);
_mav_put_char_array(buf, 9, busname, 40);
_mav_put_uint16_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 6, target_component);
_mav_put_uint8_t(buf, 7, bustype);
_mav_put_uint8_t(buf, 8, bus);
_mav_put_uint8_t(buf, 9, address);
_mav_put_uint8_t(buf, 50, regstart);
_mav_put_uint8_t(buf, 51, count);
_mav_put_char_array(buf, 10, busname, 40);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEVICE_OP_READ_LEN);
#else
mavlink_device_op_read_t packet;
@@ -128,19 +128,19 @@ static inline uint16_t mavlink_msg_device_op_read_pack(uint16_t system_id, uint8
*/
static inline uint16_t mavlink_msg_device_op_read_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint32_t request_id,uint8_t bustype,uint8_t bus,uint8_t address,const char *busname,uint8_t regstart,uint8_t count)
uint16_t target_system,uint8_t target_component,uint32_t request_id,uint8_t bustype,uint8_t bus,uint8_t address,const char *busname,uint8_t regstart,uint8_t count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_DEVICE_OP_READ_LEN];
_mav_put_uint32_t(buf, 0, request_id);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
_mav_put_uint8_t(buf, 6, bustype);
_mav_put_uint8_t(buf, 7, bus);
_mav_put_uint8_t(buf, 8, address);
_mav_put_uint8_t(buf, 49, regstart);
_mav_put_uint8_t(buf, 50, count);
_mav_put_char_array(buf, 9, busname, 40);
_mav_put_uint16_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 6, target_component);
_mav_put_uint8_t(buf, 7, bustype);
_mav_put_uint8_t(buf, 8, bus);
_mav_put_uint8_t(buf, 9, address);
_mav_put_uint8_t(buf, 50, regstart);
_mav_put_uint8_t(buf, 51, count);
_mav_put_char_array(buf, 10, busname, 40);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEVICE_OP_READ_LEN);
#else
mavlink_device_op_read_t packet;
@@ -203,19 +203,19 @@ static inline uint16_t mavlink_msg_device_op_read_encode_chan(uint16_t system_id
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_device_op_read_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t request_id, uint8_t bustype, uint8_t bus, uint8_t address, const char *busname, uint8_t regstart, uint8_t count)
static inline void mavlink_msg_device_op_read_send(mavlink_channel_t chan, uint16_t target_system, uint8_t target_component, uint32_t request_id, uint8_t bustype, uint8_t bus, uint8_t address, const char *busname, uint8_t regstart, uint8_t count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_DEVICE_OP_READ_LEN];
_mav_put_uint32_t(buf, 0, request_id);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
_mav_put_uint8_t(buf, 6, bustype);
_mav_put_uint8_t(buf, 7, bus);
_mav_put_uint8_t(buf, 8, address);
_mav_put_uint8_t(buf, 49, regstart);
_mav_put_uint8_t(buf, 50, count);
_mav_put_char_array(buf, 9, busname, 40);
_mav_put_uint16_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 6, target_component);
_mav_put_uint8_t(buf, 7, bustype);
_mav_put_uint8_t(buf, 8, bus);
_mav_put_uint8_t(buf, 9, address);
_mav_put_uint8_t(buf, 50, regstart);
_mav_put_uint8_t(buf, 51, count);
_mav_put_char_array(buf, 10, busname, 40);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEVICE_OP_READ, buf, MAVLINK_MSG_ID_DEVICE_OP_READ_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_CRC);
#else
mavlink_device_op_read_t packet;
@@ -254,19 +254,19 @@ static inline void mavlink_msg_device_op_read_send_struct(mavlink_channel_t chan
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_device_op_read_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t request_id, uint8_t bustype, uint8_t bus, uint8_t address, const char *busname, uint8_t regstart, uint8_t count)
static inline void mavlink_msg_device_op_read_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t target_system, uint8_t target_component, uint32_t request_id, uint8_t bustype, uint8_t bus, uint8_t address, const char *busname, uint8_t regstart, uint8_t count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint32_t(buf, 0, request_id);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
_mav_put_uint8_t(buf, 6, bustype);
_mav_put_uint8_t(buf, 7, bus);
_mav_put_uint8_t(buf, 8, address);
_mav_put_uint8_t(buf, 49, regstart);
_mav_put_uint8_t(buf, 50, count);
_mav_put_char_array(buf, 9, busname, 40);
_mav_put_uint16_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 6, target_component);
_mav_put_uint8_t(buf, 7, bustype);
_mav_put_uint8_t(buf, 8, bus);
_mav_put_uint8_t(buf, 9, address);
_mav_put_uint8_t(buf, 50, regstart);
_mav_put_uint8_t(buf, 51, count);
_mav_put_char_array(buf, 10, busname, 40);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEVICE_OP_READ, buf, MAVLINK_MSG_ID_DEVICE_OP_READ_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_CRC);
#else
mavlink_device_op_read_t *packet = (mavlink_device_op_read_t *)msgbuf;
@@ -294,9 +294,9 @@ static inline void mavlink_msg_device_op_read_send_buf(mavlink_message_t *msgbuf
*
* @return System ID.
*/
static inline uint8_t mavlink_msg_device_op_read_get_target_system(const mavlink_message_t* msg)
static inline uint16_t mavlink_msg_device_op_read_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
return _MAV_RETURN_uint16_t(msg, 4);
}
/**
@@ -306,7 +306,7 @@ static inline uint8_t mavlink_msg_device_op_read_get_target_system(const mavlink
*/
static inline uint8_t mavlink_msg_device_op_read_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
return _MAV_RETURN_uint8_t(msg, 6);
}
/**
@@ -326,7 +326,7 @@ static inline uint32_t mavlink_msg_device_op_read_get_request_id(const mavlink_m
*/
static inline uint8_t mavlink_msg_device_op_read_get_bustype(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 6);
return _MAV_RETURN_uint8_t(msg, 7);
}
/**
@@ -336,7 +336,7 @@ static inline uint8_t mavlink_msg_device_op_read_get_bustype(const mavlink_messa
*/
static inline uint8_t mavlink_msg_device_op_read_get_bus(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 7);
return _MAV_RETURN_uint8_t(msg, 8);
}
/**
@@ -346,7 +346,7 @@ static inline uint8_t mavlink_msg_device_op_read_get_bus(const mavlink_message_t
*/
static inline uint8_t mavlink_msg_device_op_read_get_address(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
return _MAV_RETURN_uint8_t(msg, 9);
}
/**
@@ -356,7 +356,7 @@ static inline uint8_t mavlink_msg_device_op_read_get_address(const mavlink_messa
*/
static inline uint16_t mavlink_msg_device_op_read_get_busname(const mavlink_message_t* msg, char *busname)
{
return _MAV_RETURN_char_array(msg, busname, 40, 9);
return _MAV_RETURN_char_array(msg, busname, 40, 10);
}
/**
@@ -366,7 +366,7 @@ static inline uint16_t mavlink_msg_device_op_read_get_busname(const mavlink_mess
*/
static inline uint8_t mavlink_msg_device_op_read_get_regstart(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 49);
return _MAV_RETURN_uint8_t(msg, 50);
}
/**
@@ -376,7 +376,7 @@ static inline uint8_t mavlink_msg_device_op_read_get_regstart(const mavlink_mess
*/
static inline uint8_t mavlink_msg_device_op_read_get_count(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 50);
return _MAV_RETURN_uint8_t(msg, 51);
}
/**