✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_HIGH_LATENCY 234
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_high_latency_t {
|
||||
uint32_t custom_mode; /*< A bitfield for use for autopilot-specific flags.*/
|
||||
int32_t latitude; /*< [degE7] Latitude*/
|
||||
@@ -29,7 +29,7 @@ typedef struct __mavlink_high_latency_t {
|
||||
int8_t temperature_air; /*< [degC] Air temperature (degrees C) from airspeed sensor*/
|
||||
uint8_t failsafe; /*< failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)*/
|
||||
uint8_t wp_num; /*< current waypoint number*/
|
||||
}) mavlink_high_latency_t;
|
||||
} mavlink_high_latency_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_HIGH_LATENCY_LEN 40
|
||||
#define MAVLINK_MSG_ID_HIGH_LATENCY_MIN_LEN 40
|
||||
@@ -136,7 +136,7 @@ typedef struct __mavlink_high_latency_t {
|
||||
* @param wp_distance [m] distance to target
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_high_latency_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
static inline uint16_t mavlink_msg_high_latency_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t base_mode, uint32_t custom_mode, uint8_t landed_state, int16_t roll, int16_t pitch, uint16_t heading, int8_t throttle, int16_t heading_sp, int32_t latitude, int32_t longitude, int16_t altitude_amsl, int16_t altitude_sp, uint8_t airspeed, uint8_t airspeed_sp, uint8_t groundspeed, int8_t climb_rate, uint8_t gps_nsat, uint8_t gps_fix_type, uint8_t battery_remaining, int8_t temperature, int8_t temperature_air, uint8_t failsafe, uint8_t wp_num, uint16_t wp_distance)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
@@ -233,7 +233,7 @@ static inline uint16_t mavlink_msg_high_latency_pack(uint8_t system_id, uint8_t
|
||||
* @param wp_distance [m] distance to target
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_high_latency_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
static inline uint16_t mavlink_msg_high_latency_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t base_mode,uint32_t custom_mode,uint8_t landed_state,int16_t roll,int16_t pitch,uint16_t heading,int8_t throttle,int16_t heading_sp,int32_t latitude,int32_t longitude,int16_t altitude_amsl,int16_t altitude_sp,uint8_t airspeed,uint8_t airspeed_sp,uint8_t groundspeed,int8_t climb_rate,uint8_t gps_nsat,uint8_t gps_fix_type,uint8_t battery_remaining,int8_t temperature,int8_t temperature_air,uint8_t failsafe,uint8_t wp_num,uint16_t wp_distance)
|
||||
{
|
||||
@@ -307,7 +307,7 @@ static inline uint16_t mavlink_msg_high_latency_pack_chan(uint8_t system_id, uin
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param high_latency C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_high_latency_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_high_latency_t* high_latency)
|
||||
static inline uint16_t mavlink_msg_high_latency_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_high_latency_t* high_latency)
|
||||
{
|
||||
return mavlink_msg_high_latency_pack(system_id, component_id, msg, high_latency->base_mode, high_latency->custom_mode, high_latency->landed_state, high_latency->roll, high_latency->pitch, high_latency->heading, high_latency->throttle, high_latency->heading_sp, high_latency->latitude, high_latency->longitude, high_latency->altitude_amsl, high_latency->altitude_sp, high_latency->airspeed, high_latency->airspeed_sp, high_latency->groundspeed, high_latency->climb_rate, high_latency->gps_nsat, high_latency->gps_fix_type, high_latency->battery_remaining, high_latency->temperature, high_latency->temperature_air, high_latency->failsafe, high_latency->wp_num, high_latency->wp_distance);
|
||||
}
|
||||
@@ -321,7 +321,7 @@ static inline uint16_t mavlink_msg_high_latency_encode(uint8_t system_id, uint8_
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param high_latency C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_high_latency_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_high_latency_t* high_latency)
|
||||
static inline uint16_t mavlink_msg_high_latency_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_high_latency_t* high_latency)
|
||||
{
|
||||
return mavlink_msg_high_latency_pack_chan(system_id, component_id, chan, msg, high_latency->base_mode, high_latency->custom_mode, high_latency->landed_state, high_latency->roll, high_latency->pitch, high_latency->heading, high_latency->throttle, high_latency->heading_sp, high_latency->latitude, high_latency->longitude, high_latency->altitude_amsl, high_latency->altitude_sp, high_latency->airspeed, high_latency->airspeed_sp, high_latency->groundspeed, high_latency->climb_rate, high_latency->gps_nsat, high_latency->gps_fix_type, high_latency->battery_remaining, high_latency->temperature, high_latency->temperature_air, high_latency->failsafe, high_latency->wp_num, high_latency->wp_distance);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user