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_STORAGE_INFORMATION 261
MAVPACKED(
typedef struct __mavlink_storage_information_t {
uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/
float total_capacity; /*< [MiB] Total capacity.*/
@@ -14,7 +14,7 @@ typedef struct __mavlink_storage_information_t {
uint8_t storage_id; /*< Storage ID (1 for first, 2 for second, etc.)*/
uint8_t storage_count; /*< Number of storage devices*/
uint8_t status; /*< Status of storage (0 not available, 1 unformatted, 2 formatted)*/
}) mavlink_storage_information_t;
} mavlink_storage_information_t;
#define MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN 27
#define MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN 27
@@ -76,7 +76,7 @@ typedef struct __mavlink_storage_information_t {
* @param write_speed [MiB/s] Write speed.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_storage_information_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
static inline uint16_t mavlink_msg_storage_information_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, uint8_t storage_id, uint8_t storage_count, uint8_t status, float total_capacity, float used_capacity, float available_capacity, float read_speed, float write_speed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
@@ -128,7 +128,7 @@ static inline uint16_t mavlink_msg_storage_information_pack(uint8_t system_id, u
* @param write_speed [MiB/s] Write speed.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_storage_information_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
static inline uint16_t mavlink_msg_storage_information_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,uint8_t storage_id,uint8_t storage_count,uint8_t status,float total_capacity,float used_capacity,float available_capacity,float read_speed,float write_speed)
{
@@ -172,7 +172,7 @@ static inline uint16_t mavlink_msg_storage_information_pack_chan(uint8_t system_
* @param msg The MAVLink message to compress the data into
* @param storage_information C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_storage_information_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_storage_information_t* storage_information)
static inline uint16_t mavlink_msg_storage_information_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_storage_information_t* storage_information)
{
return mavlink_msg_storage_information_pack(system_id, component_id, msg, storage_information->time_boot_ms, storage_information->storage_id, storage_information->storage_count, storage_information->status, storage_information->total_capacity, storage_information->used_capacity, storage_information->available_capacity, storage_information->read_speed, storage_information->write_speed);
}
@@ -186,7 +186,7 @@ static inline uint16_t mavlink_msg_storage_information_encode(uint8_t system_id,
* @param msg The MAVLink message to compress the data into
* @param storage_information C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_storage_information_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_storage_information_t* storage_information)
static inline uint16_t mavlink_msg_storage_information_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_storage_information_t* storage_information)
{
return mavlink_msg_storage_information_pack_chan(system_id, component_id, chan, msg, storage_information->time_boot_ms, storage_information->storage_id, storage_information->storage_count, storage_information->status, storage_information->total_capacity, storage_information->used_capacity, storage_information->available_capacity, storage_information->read_speed, storage_information->write_speed);
}