✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_MEMINFO 152
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_meminfo_t {
|
||||
uint16_t brkval; /*< Heap top.*/
|
||||
uint16_t freemem; /*< [bytes] Free memory.*/
|
||||
uint32_t freemem32; /*< [bytes] Free memory (32 bit).*/
|
||||
}) mavlink_meminfo_t;
|
||||
} mavlink_meminfo_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_MEMINFO_LEN 8
|
||||
#define MAVLINK_MSG_ID_MEMINFO_MIN_LEN 4
|
||||
@@ -52,7 +52,7 @@ typedef struct __mavlink_meminfo_t {
|
||||
* @param freemem32 [bytes] Free memory (32 bit).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_meminfo_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
static inline uint16_t mavlink_msg_meminfo_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint16_t brkval, uint16_t freemem, uint32_t freemem32)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
@@ -86,7 +86,7 @@ static inline uint16_t mavlink_msg_meminfo_pack(uint8_t system_id, uint8_t compo
|
||||
* @param freemem32 [bytes] Free memory (32 bit).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_meminfo_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
static inline uint16_t mavlink_msg_meminfo_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint16_t brkval,uint16_t freemem,uint32_t freemem32)
|
||||
{
|
||||
@@ -118,7 +118,7 @@ static inline uint16_t mavlink_msg_meminfo_pack_chan(uint8_t system_id, uint8_t
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param meminfo C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_meminfo_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_meminfo_t* meminfo)
|
||||
static inline uint16_t mavlink_msg_meminfo_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_meminfo_t* meminfo)
|
||||
{
|
||||
return mavlink_msg_meminfo_pack(system_id, component_id, msg, meminfo->brkval, meminfo->freemem, meminfo->freemem32);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ static inline uint16_t mavlink_msg_meminfo_encode(uint8_t system_id, uint8_t com
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param meminfo C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_meminfo_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_meminfo_t* meminfo)
|
||||
static inline uint16_t mavlink_msg_meminfo_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_meminfo_t* meminfo)
|
||||
{
|
||||
return mavlink_msg_meminfo_pack_chan(system_id, component_id, chan, msg, meminfo->brkval, meminfo->freemem, meminfo->freemem32);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user