This commit is contained in:
matt
2020-09-20 14:09:03 +08:00
parent b2baf4bffc
commit 991dc1353a
96 changed files with 4166 additions and 4166 deletions
+40 -40
View File
@@ -5,19 +5,19 @@
typedef struct __mavlink_change_operator_control_t {
uint8_t target_system; /*< System the GCS requests control for*/
uint16_t target_system; /*< System the GCS requests control for*/
uint8_t control_request; /*< 0: request control of this MAV, 1: Release control of this MAV*/
uint8_t version; /*< [rad] 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.*/
char passkey[25]; /*< Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"*/
} mavlink_change_operator_control_t;
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN 28
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_MIN_LEN 28
#define MAVLINK_MSG_ID_5_LEN 28
#define MAVLINK_MSG_ID_5_MIN_LEN 28
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN 29
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_MIN_LEN 29
#define MAVLINK_MSG_ID_5_LEN 29
#define MAVLINK_MSG_ID_5_MIN_LEN 29
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_CRC 217
#define MAVLINK_MSG_ID_5_CRC 217
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_CRC 162
#define MAVLINK_MSG_ID_5_CRC 162
#define MAVLINK_MSG_CHANGE_OPERATOR_CONTROL_FIELD_PASSKEY_LEN 25
@@ -26,20 +26,20 @@ typedef struct __mavlink_change_operator_control_t {
5, \
"CHANGE_OPERATOR_CONTROL", \
4, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_change_operator_control_t, target_system) }, \
{ "control_request", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_change_operator_control_t, control_request) }, \
{ "version", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_change_operator_control_t, version) }, \
{ "passkey", NULL, MAVLINK_TYPE_CHAR, 25, 3, offsetof(mavlink_change_operator_control_t, passkey) }, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_change_operator_control_t, target_system) }, \
{ "control_request", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_change_operator_control_t, control_request) }, \
{ "version", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_change_operator_control_t, version) }, \
{ "passkey", NULL, MAVLINK_TYPE_CHAR, 25, 4, offsetof(mavlink_change_operator_control_t, passkey) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL { \
"CHANGE_OPERATOR_CONTROL", \
4, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_change_operator_control_t, target_system) }, \
{ "control_request", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_change_operator_control_t, control_request) }, \
{ "version", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_change_operator_control_t, version) }, \
{ "passkey", NULL, MAVLINK_TYPE_CHAR, 25, 3, offsetof(mavlink_change_operator_control_t, passkey) }, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_change_operator_control_t, target_system) }, \
{ "control_request", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_change_operator_control_t, control_request) }, \
{ "version", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_change_operator_control_t, version) }, \
{ "passkey", NULL, MAVLINK_TYPE_CHAR, 25, 4, offsetof(mavlink_change_operator_control_t, passkey) }, \
} \
}
#endif
@@ -57,14 +57,14 @@ typedef struct __mavlink_change_operator_control_t {
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_change_operator_control_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t control_request, uint8_t version, const char *passkey)
uint16_t target_system, uint8_t control_request, uint8_t version, const char *passkey)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, version);
_mav_put_char_array(buf, 3, passkey, 25);
_mav_put_uint16_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 2, control_request);
_mav_put_uint8_t(buf, 3, version);
_mav_put_char_array(buf, 4, passkey, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN);
#else
mavlink_change_operator_control_t packet;
@@ -93,14 +93,14 @@ static inline uint16_t mavlink_msg_change_operator_control_pack(uint16_t system_
*/
static inline uint16_t mavlink_msg_change_operator_control_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t control_request,uint8_t version,const char *passkey)
uint16_t target_system,uint8_t control_request,uint8_t version,const char *passkey)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, version);
_mav_put_char_array(buf, 3, passkey, 25);
_mav_put_uint16_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 2, control_request);
_mav_put_uint8_t(buf, 3, version);
_mav_put_char_array(buf, 4, passkey, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN);
#else
mavlink_change_operator_control_t packet;
@@ -153,14 +153,14 @@ static inline uint16_t mavlink_msg_change_operator_control_encode_chan(uint16_t
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_change_operator_control_send(mavlink_channel_t chan, uint8_t target_system, uint8_t control_request, uint8_t version, const char *passkey)
static inline void mavlink_msg_change_operator_control_send(mavlink_channel_t chan, uint16_t target_system, uint8_t control_request, uint8_t version, const char *passkey)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, version);
_mav_put_char_array(buf, 3, passkey, 25);
_mav_put_uint16_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 2, control_request);
_mav_put_uint8_t(buf, 3, version);
_mav_put_char_array(buf, 4, passkey, 25);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL, buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_MIN_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_CRC);
#else
mavlink_change_operator_control_t packet;
@@ -194,14 +194,14 @@ static inline void mavlink_msg_change_operator_control_send_struct(mavlink_chann
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_change_operator_control_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t control_request, uint8_t version, const char *passkey)
static inline void mavlink_msg_change_operator_control_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t target_system, uint8_t control_request, uint8_t version, const char *passkey)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, version);
_mav_put_char_array(buf, 3, passkey, 25);
_mav_put_uint16_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 2, control_request);
_mav_put_uint8_t(buf, 3, version);
_mav_put_char_array(buf, 4, passkey, 25);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL, buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_MIN_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_CRC);
#else
mavlink_change_operator_control_t *packet = (mavlink_change_operator_control_t *)msgbuf;
@@ -224,9 +224,9 @@ static inline void mavlink_msg_change_operator_control_send_buf(mavlink_message_
*
* @return System the GCS requests control for
*/
static inline uint8_t mavlink_msg_change_operator_control_get_target_system(const mavlink_message_t* msg)
static inline uint16_t mavlink_msg_change_operator_control_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
return _MAV_RETURN_uint16_t(msg, 0);
}
/**
@@ -236,7 +236,7 @@ static inline uint8_t mavlink_msg_change_operator_control_get_target_system(cons
*/
static inline uint8_t mavlink_msg_change_operator_control_get_control_request(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
@@ -246,7 +246,7 @@ static inline uint8_t mavlink_msg_change_operator_control_get_control_request(co
*/
static inline uint8_t mavlink_msg_change_operator_control_get_version(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
return _MAV_RETURN_uint8_t(msg, 3);
}
/**
@@ -256,7 +256,7 @@ static inline uint8_t mavlink_msg_change_operator_control_get_version(const mavl
*/
static inline uint16_t mavlink_msg_change_operator_control_get_passkey(const mavlink_message_t* msg, char *passkey)
{
return _MAV_RETURN_char_array(msg, passkey, 25, 3);
return _MAV_RETURN_char_array(msg, passkey, 25, 4);
}
/**