feat: 更好兼容matlab

uin64->uint32
payload64->payload
This commit is contained in:
matt
2020-09-20 10:12:24 +08:00
parent 1465895353
commit e79d1f21fb
289 changed files with 6428 additions and 15915 deletions
+6 -6
View File
@@ -3,7 +3,7 @@
#define MAVLINK_MSG_ID_MANUAL_CONTROL 69
MAVPACKED(
typedef struct __mavlink_manual_control_t {
int16_t x; /*< X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle.*/
int16_t y; /*< Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle.*/
@@ -11,7 +11,7 @@ typedef struct __mavlink_manual_control_t {
int16_t r; /*< R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle.*/
uint16_t buttons; /*< A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1.*/
uint8_t target; /*< The system to be controlled.*/
}) mavlink_manual_control_t;
} mavlink_manual_control_t;
#define MAVLINK_MSG_ID_MANUAL_CONTROL_LEN 11
#define MAVLINK_MSG_ID_MANUAL_CONTROL_MIN_LEN 11
@@ -64,7 +64,7 @@ typedef struct __mavlink_manual_control_t {
* @param buttons A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_manual_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
static inline uint16_t mavlink_msg_manual_control_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target, int16_t x, int16_t y, int16_t z, int16_t r, uint16_t buttons)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
@@ -107,7 +107,7 @@ static inline uint16_t mavlink_msg_manual_control_pack(uint8_t system_id, uint8_
* @param buttons A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_manual_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
static inline uint16_t mavlink_msg_manual_control_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target,int16_t x,int16_t y,int16_t z,int16_t r,uint16_t buttons)
{
@@ -145,7 +145,7 @@ static inline uint16_t mavlink_msg_manual_control_pack_chan(uint8_t system_id, u
* @param msg The MAVLink message to compress the data into
* @param manual_control C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_manual_control_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_manual_control_t* manual_control)
static inline uint16_t mavlink_msg_manual_control_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_manual_control_t* manual_control)
{
return mavlink_msg_manual_control_pack(system_id, component_id, msg, manual_control->target, manual_control->x, manual_control->y, manual_control->z, manual_control->r, manual_control->buttons);
}
@@ -159,7 +159,7 @@ static inline uint16_t mavlink_msg_manual_control_encode(uint8_t system_id, uint
* @param msg The MAVLink message to compress the data into
* @param manual_control C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_manual_control_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_manual_control_t* manual_control)
static inline uint16_t mavlink_msg_manual_control_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_manual_control_t* manual_control)
{
return mavlink_msg_manual_control_pack_chan(system_id, component_id, chan, msg, manual_control->target, manual_control->x, manual_control->y, manual_control->z, manual_control->r, manual_control->buttons);
}