✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
@@ -3,14 +3,14 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_RPM 226
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_rpm_t {
|
||||
float rpm1; /*< RPM Sensor1.*/
|
||||
float rpm2; /*< RPM Sensor2.*/
|
||||
float rpm3; /*< RPM Sensor3*/
|
||||
float rpm4; /*< RPM Sensor4*/
|
||||
float rpm5; /*< RPM Sensor5*/
|
||||
}) mavlink_rpm_t;
|
||||
} mavlink_rpm_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_RPM_LEN 20
|
||||
#define MAVLINK_MSG_ID_RPM_MIN_LEN 8
|
||||
@@ -60,7 +60,7 @@ typedef struct __mavlink_rpm_t {
|
||||
* @param rpm5 RPM Sensor5
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_rpm_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
static inline uint16_t mavlink_msg_rpm_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
float rpm1, float rpm2, float rpm3, float rpm4, float rpm5)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
@@ -100,7 +100,7 @@ static inline uint16_t mavlink_msg_rpm_pack(uint8_t system_id, uint8_t component
|
||||
* @param rpm5 RPM Sensor5
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_rpm_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
static inline uint16_t mavlink_msg_rpm_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
float rpm1,float rpm2,float rpm3,float rpm4,float rpm5)
|
||||
{
|
||||
@@ -136,7 +136,7 @@ static inline uint16_t mavlink_msg_rpm_pack_chan(uint8_t system_id, uint8_t comp
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param rpm C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_rpm_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_rpm_t* rpm)
|
||||
static inline uint16_t mavlink_msg_rpm_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_rpm_t* rpm)
|
||||
{
|
||||
return mavlink_msg_rpm_pack(system_id, component_id, msg, rpm->rpm1, rpm->rpm2, rpm->rpm3, rpm->rpm4, rpm->rpm5);
|
||||
}
|
||||
@@ -150,7 +150,7 @@ static inline uint16_t mavlink_msg_rpm_encode(uint8_t system_id, uint8_t compone
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param rpm C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_rpm_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_rpm_t* rpm)
|
||||
static inline uint16_t mavlink_msg_rpm_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_rpm_t* rpm)
|
||||
{
|
||||
return mavlink_msg_rpm_pack_chan(system_id, component_id, chan, msg, rpm->rpm1, rpm->rpm2, rpm->rpm3, rpm->rpm4, rpm->rpm5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user