✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_ADSB_VEHICLE 246
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_adsb_vehicle_t {
|
||||
uint32_t ICAO_address; /*< ICAO address*/
|
||||
int32_t lat; /*< [degE7] Latitude*/
|
||||
@@ -18,7 +18,7 @@ typedef struct __mavlink_adsb_vehicle_t {
|
||||
char callsign[9]; /*< The callsign, 8+null*/
|
||||
uint8_t emitter_type; /*< ADSB emitter type.*/
|
||||
uint8_t tslc; /*< [s] Time since last communication in seconds*/
|
||||
}) mavlink_adsb_vehicle_t;
|
||||
} mavlink_adsb_vehicle_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_ADSB_VEHICLE_LEN 38
|
||||
#define MAVLINK_MSG_ID_ADSB_VEHICLE_MIN_LEN 38
|
||||
@@ -92,7 +92,7 @@ typedef struct __mavlink_adsb_vehicle_t {
|
||||
* @param squawk Squawk code
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_adsb_vehicle_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
static inline uint16_t mavlink_msg_adsb_vehicle_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint32_t ICAO_address, int32_t lat, int32_t lon, uint8_t altitude_type, int32_t altitude, uint16_t heading, uint16_t hor_velocity, int16_t ver_velocity, const char *callsign, uint8_t emitter_type, uint8_t tslc, uint16_t flags, uint16_t squawk)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
@@ -154,7 +154,7 @@ static inline uint16_t mavlink_msg_adsb_vehicle_pack(uint8_t system_id, uint8_t
|
||||
* @param squawk Squawk code
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_adsb_vehicle_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
static inline uint16_t mavlink_msg_adsb_vehicle_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint32_t ICAO_address,int32_t lat,int32_t lon,uint8_t altitude_type,int32_t altitude,uint16_t heading,uint16_t hor_velocity,int16_t ver_velocity,const char *callsign,uint8_t emitter_type,uint8_t tslc,uint16_t flags,uint16_t squawk)
|
||||
{
|
||||
@@ -204,7 +204,7 @@ static inline uint16_t mavlink_msg_adsb_vehicle_pack_chan(uint8_t system_id, uin
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param adsb_vehicle C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_adsb_vehicle_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_adsb_vehicle_t* adsb_vehicle)
|
||||
static inline uint16_t mavlink_msg_adsb_vehicle_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_adsb_vehicle_t* adsb_vehicle)
|
||||
{
|
||||
return mavlink_msg_adsb_vehicle_pack(system_id, component_id, msg, adsb_vehicle->ICAO_address, adsb_vehicle->lat, adsb_vehicle->lon, adsb_vehicle->altitude_type, adsb_vehicle->altitude, adsb_vehicle->heading, adsb_vehicle->hor_velocity, adsb_vehicle->ver_velocity, adsb_vehicle->callsign, adsb_vehicle->emitter_type, adsb_vehicle->tslc, adsb_vehicle->flags, adsb_vehicle->squawk);
|
||||
}
|
||||
@@ -218,7 +218,7 @@ static inline uint16_t mavlink_msg_adsb_vehicle_encode(uint8_t system_id, uint8_
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param adsb_vehicle C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_adsb_vehicle_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_adsb_vehicle_t* adsb_vehicle)
|
||||
static inline uint16_t mavlink_msg_adsb_vehicle_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_adsb_vehicle_t* adsb_vehicle)
|
||||
{
|
||||
return mavlink_msg_adsb_vehicle_pack_chan(system_id, component_id, chan, msg, adsb_vehicle->ICAO_address, adsb_vehicle->lat, adsb_vehicle->lon, adsb_vehicle->altitude_type, adsb_vehicle->altitude, adsb_vehicle->heading, adsb_vehicle->hor_velocity, adsb_vehicle->ver_velocity, adsb_vehicle->callsign, adsb_vehicle->emitter_type, adsb_vehicle->tslc, adsb_vehicle->flags, adsb_vehicle->squawk);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user