✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_POWER_STATUS 125
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_power_status_t {
|
||||
uint16_t Vcc; /*< [mV] 5V rail voltage.*/
|
||||
uint16_t Vservo; /*< [mV] Servo rail voltage.*/
|
||||
uint16_t flags; /*< Bitmap of power supply status flags.*/
|
||||
}) mavlink_power_status_t;
|
||||
} mavlink_power_status_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_POWER_STATUS_LEN 6
|
||||
#define MAVLINK_MSG_ID_POWER_STATUS_MIN_LEN 6
|
||||
@@ -52,7 +52,7 @@ typedef struct __mavlink_power_status_t {
|
||||
* @param flags Bitmap of power supply status flags.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_power_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
static inline uint16_t mavlink_msg_power_status_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint16_t Vcc, uint16_t Vservo, uint16_t flags)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
@@ -86,7 +86,7 @@ static inline uint16_t mavlink_msg_power_status_pack(uint8_t system_id, uint8_t
|
||||
* @param flags Bitmap of power supply status flags.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_power_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
static inline uint16_t mavlink_msg_power_status_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint16_t Vcc,uint16_t Vservo,uint16_t flags)
|
||||
{
|
||||
@@ -118,7 +118,7 @@ static inline uint16_t mavlink_msg_power_status_pack_chan(uint8_t system_id, uin
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param power_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_power_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_power_status_t* power_status)
|
||||
static inline uint16_t mavlink_msg_power_status_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_power_status_t* power_status)
|
||||
{
|
||||
return mavlink_msg_power_status_pack(system_id, component_id, msg, power_status->Vcc, power_status->Vservo, power_status->flags);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ static inline uint16_t mavlink_msg_power_status_encode(uint8_t system_id, uint8_
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param power_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_power_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_power_status_t* power_status)
|
||||
static inline uint16_t mavlink_msg_power_status_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_power_status_t* power_status)
|
||||
{
|
||||
return mavlink_msg_power_status_pack_chan(system_id, component_id, chan, msg, power_status->Vcc, power_status->Vservo, power_status->flags);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user