feat: 更好兼容matlab

uin64->uint32
payload64->payload
This commit is contained in:
matt
2020-09-20 10:12:24 +08:00
parent 1465895353
commit e79d1f21fb
289 changed files with 6428 additions and 15915 deletions
+6 -6
View File
@@ -3,7 +3,7 @@
#define MAVLINK_MSG_ID_SERVOS 20106
MAVPACKED(
typedef struct __mavlink_servos_t {
uint32_t time_boot_ms; /*< [ms] Timestamp (milliseconds since system boot)*/
float cmd1[2]; /*< ActuatorCmd1(deg)*/
@@ -13,7 +13,7 @@ typedef struct __mavlink_servos_t {
uint8_t out_seq; /*< output index*/
uint8_t in1_seq; /*< input1 index*/
uint8_t in2_seq; /*< input2 index*/
}) mavlink_servos_t;
} mavlink_servos_t;
#define MAVLINK_MSG_ID_SERVOS_LEN 39
#define MAVLINK_MSG_ID_SERVOS_MIN_LEN 39
@@ -75,7 +75,7 @@ typedef struct __mavlink_servos_t {
* @param in2_seq input2 index
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_servos_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
static inline uint16_t mavlink_msg_servos_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, const float *cmd1, const float *cmd2, const float *pos1, const float *pos2, uint8_t out_seq, uint8_t in1_seq, uint8_t in2_seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
@@ -122,7 +122,7 @@ static inline uint16_t mavlink_msg_servos_pack(uint8_t system_id, uint8_t compon
* @param in2_seq input2 index
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_servos_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
static inline uint16_t mavlink_msg_servos_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,const float *cmd1,const float *cmd2,const float *pos1,const float *pos2,uint8_t out_seq,uint8_t in1_seq,uint8_t in2_seq)
{
@@ -162,7 +162,7 @@ static inline uint16_t mavlink_msg_servos_pack_chan(uint8_t system_id, uint8_t c
* @param msg The MAVLink message to compress the data into
* @param servos C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_servos_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_servos_t* servos)
static inline uint16_t mavlink_msg_servos_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_servos_t* servos)
{
return mavlink_msg_servos_pack(system_id, component_id, msg, servos->time_boot_ms, servos->cmd1, servos->cmd2, servos->pos1, servos->pos2, servos->out_seq, servos->in1_seq, servos->in2_seq);
}
@@ -176,7 +176,7 @@ static inline uint16_t mavlink_msg_servos_encode(uint8_t system_id, uint8_t comp
* @param msg The MAVLink message to compress the data into
* @param servos C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_servos_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_servos_t* servos)
static inline uint16_t mavlink_msg_servos_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_servos_t* servos)
{
return mavlink_msg_servos_pack_chan(system_id, component_id, chan, msg, servos->time_boot_ms, servos->cmd1, servos->cmd2, servos->pos1, servos->pos2, servos->out_seq, servos->in1_seq, servos->in2_seq);
}