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_VFR_HUD 74
MAVPACKED(
typedef struct __mavlink_vfr_hud_t {
float airspeed; /*< [m/s] Current airspeed*/
float groundspeed; /*< [m/s] Current ground speed*/
@@ -11,7 +11,7 @@ typedef struct __mavlink_vfr_hud_t {
float climb; /*< [m/s] Current climb rate*/
int16_t heading; /*< [deg] Current heading in degrees, in compass units (0..360, 0=north)*/
uint16_t throttle; /*< [%] Current throttle setting in integer percent, 0 to 100*/
}) mavlink_vfr_hud_t;
} mavlink_vfr_hud_t;
#define MAVLINK_MSG_ID_VFR_HUD_LEN 20
#define MAVLINK_MSG_ID_VFR_HUD_MIN_LEN 20
@@ -64,7 +64,7 @@ typedef struct __mavlink_vfr_hud_t {
* @param climb [m/s] Current climb rate
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_vfr_hud_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
static inline uint16_t mavlink_msg_vfr_hud_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
float airspeed, float groundspeed, int16_t heading, uint16_t throttle, float alt, float climb)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
@@ -107,7 +107,7 @@ static inline uint16_t mavlink_msg_vfr_hud_pack(uint8_t system_id, uint8_t compo
* @param climb [m/s] Current climb rate
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_vfr_hud_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
static inline uint16_t mavlink_msg_vfr_hud_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
float airspeed,float groundspeed,int16_t heading,uint16_t throttle,float alt,float climb)
{
@@ -145,7 +145,7 @@ static inline uint16_t mavlink_msg_vfr_hud_pack_chan(uint8_t system_id, uint8_t
* @param msg The MAVLink message to compress the data into
* @param vfr_hud C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_vfr_hud_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vfr_hud_t* vfr_hud)
static inline uint16_t mavlink_msg_vfr_hud_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vfr_hud_t* vfr_hud)
{
return mavlink_msg_vfr_hud_pack(system_id, component_id, msg, vfr_hud->airspeed, vfr_hud->groundspeed, vfr_hud->heading, vfr_hud->throttle, vfr_hud->alt, vfr_hud->climb);
}
@@ -159,7 +159,7 @@ static inline uint16_t mavlink_msg_vfr_hud_encode(uint8_t system_id, uint8_t com
* @param msg The MAVLink message to compress the data into
* @param vfr_hud C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_vfr_hud_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vfr_hud_t* vfr_hud)
static inline uint16_t mavlink_msg_vfr_hud_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vfr_hud_t* vfr_hud)
{
return mavlink_msg_vfr_hud_pack_chan(system_id, component_id, chan, msg, vfr_hud->airspeed, vfr_hud->groundspeed, vfr_hud->heading, vfr_hud->throttle, vfr_hud->alt, vfr_hud->climb);
}