✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_PLAY_TUNE 258
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_play_tune_t {
|
||||
uint8_t target_system; /*< System ID*/
|
||||
uint8_t target_component; /*< Component ID*/
|
||||
char tune[30]; /*< tune in board specific format*/
|
||||
char tune2[200]; /*< tune extension (appended to tune)*/
|
||||
}) mavlink_play_tune_t;
|
||||
} mavlink_play_tune_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_PLAY_TUNE_LEN 232
|
||||
#define MAVLINK_MSG_ID_PLAY_TUNE_MIN_LEN 32
|
||||
@@ -57,7 +57,7 @@ typedef struct __mavlink_play_tune_t {
|
||||
* @param tune2 tune extension (appended to tune)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_play_tune_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
static inline uint16_t mavlink_msg_play_tune_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, const char *tune, const char *tune2)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
@@ -92,7 +92,7 @@ static inline uint16_t mavlink_msg_play_tune_pack(uint8_t system_id, uint8_t com
|
||||
* @param tune2 tune extension (appended to tune)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_play_tune_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
static inline uint16_t mavlink_msg_play_tune_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t target_system,uint8_t target_component,const char *tune,const char *tune2)
|
||||
{
|
||||
@@ -124,7 +124,7 @@ static inline uint16_t mavlink_msg_play_tune_pack_chan(uint8_t system_id, uint8_
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param play_tune C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_play_tune_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_play_tune_t* play_tune)
|
||||
static inline uint16_t mavlink_msg_play_tune_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_play_tune_t* play_tune)
|
||||
{
|
||||
return mavlink_msg_play_tune_pack(system_id, component_id, msg, play_tune->target_system, play_tune->target_component, play_tune->tune, play_tune->tune2);
|
||||
}
|
||||
@@ -138,7 +138,7 @@ static inline uint16_t mavlink_msg_play_tune_encode(uint8_t system_id, uint8_t c
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param play_tune C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_play_tune_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_play_tune_t* play_tune)
|
||||
static inline uint16_t mavlink_msg_play_tune_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_play_tune_t* play_tune)
|
||||
{
|
||||
return mavlink_msg_play_tune_pack_chan(system_id, component_id, chan, msg, play_tune->target_system, play_tune->target_component, play_tune->tune, play_tune->tune2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user