✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_TERRAIN_REPORT 136
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_terrain_report_t {
|
||||
int32_t lat; /*< [degE7] Latitude*/
|
||||
int32_t lon; /*< [degE7] Longitude*/
|
||||
@@ -12,7 +12,7 @@ typedef struct __mavlink_terrain_report_t {
|
||||
uint16_t spacing; /*< grid spacing (zero if terrain at this location unavailable)*/
|
||||
uint16_t pending; /*< Number of 4x4 terrain blocks waiting to be received or read from disk*/
|
||||
uint16_t loaded; /*< Number of 4x4 terrain blocks in memory*/
|
||||
}) mavlink_terrain_report_t;
|
||||
} mavlink_terrain_report_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_TERRAIN_REPORT_LEN 22
|
||||
#define MAVLINK_MSG_ID_TERRAIN_REPORT_MIN_LEN 22
|
||||
@@ -68,7 +68,7 @@ typedef struct __mavlink_terrain_report_t {
|
||||
* @param loaded Number of 4x4 terrain blocks in memory
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_terrain_report_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
static inline uint16_t mavlink_msg_terrain_report_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
int32_t lat, int32_t lon, uint16_t spacing, float terrain_height, float current_height, uint16_t pending, uint16_t loaded)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
@@ -114,7 +114,7 @@ static inline uint16_t mavlink_msg_terrain_report_pack(uint8_t system_id, uint8_
|
||||
* @param loaded Number of 4x4 terrain blocks in memory
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_terrain_report_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
static inline uint16_t mavlink_msg_terrain_report_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
int32_t lat,int32_t lon,uint16_t spacing,float terrain_height,float current_height,uint16_t pending,uint16_t loaded)
|
||||
{
|
||||
@@ -154,7 +154,7 @@ static inline uint16_t mavlink_msg_terrain_report_pack_chan(uint8_t system_id, u
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param terrain_report C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_terrain_report_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_terrain_report_t* terrain_report)
|
||||
static inline uint16_t mavlink_msg_terrain_report_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_terrain_report_t* terrain_report)
|
||||
{
|
||||
return mavlink_msg_terrain_report_pack(system_id, component_id, msg, terrain_report->lat, terrain_report->lon, terrain_report->spacing, terrain_report->terrain_height, terrain_report->current_height, terrain_report->pending, terrain_report->loaded);
|
||||
}
|
||||
@@ -168,7 +168,7 @@ static inline uint16_t mavlink_msg_terrain_report_encode(uint8_t system_id, uint
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param terrain_report C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_terrain_report_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_terrain_report_t* terrain_report)
|
||||
static inline uint16_t mavlink_msg_terrain_report_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_terrain_report_t* terrain_report)
|
||||
{
|
||||
return mavlink_msg_terrain_report_pack_chan(system_id, component_id, chan, msg, terrain_report->lat, terrain_report->lon, terrain_report->spacing, terrain_report->terrain_height, terrain_report->current_height, terrain_report->pending, terrain_report->loaded);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user