update XYK

This commit is contained in:
Matt
2019-03-09 18:16:52 +08:00
parent 59e3f15312
commit a2c2cf99f2
17 changed files with 814 additions and 578 deletions
+62 -62
View File
@@ -5,12 +5,12 @@
MAVPACKED(
typedef struct __mavlink_xyk_cmd_rc_channels_t {
int16_t chan_elevtor; /*< RC chan_elevtor,0.1%,-1000~1000*/
int16_t chan_elevator; /*< RC chan_elevator,0.1%,-1000~1000*/
int16_t chan_rudder; /*< RC chan_rudder,0.1%,-1000~1000*/
int16_t chan_ailron; /*< RC chan_ailron,0.1%,-1000~1000*/
int16_t chan_aileron; /*< RC chan_aileron,0.1%,-1000~1000*/
int16_t chan_throttle; /*< RC chan_throttle,0.1%,0~2000*/
uint8_t target_system; /*< PLANE ID*/
uint8_t taret_component; /*< Component ID*/
uint8_t target_component; /*< Component ID*/
uint8_t command_word; /*< command_word*/
uint8_t chan_onoff; /*< RC control word of on-off state ,bit0~bit3 corresponding to switch4~switch1,*/
uint8_t chan_keyword; /*< RC control word of keyword state ,bit0~bit3 corresponding to key4~key1*/
@@ -24,8 +24,8 @@ typedef struct __mavlink_xyk_cmd_rc_channels_t {
#define MAVLINK_MSG_ID_30021_LEN 16
#define MAVLINK_MSG_ID_30021_MIN_LEN 16
#define MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_CRC 165
#define MAVLINK_MSG_ID_30021_CRC 165
#define MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_CRC 197
#define MAVLINK_MSG_ID_30021_CRC 197
@@ -35,11 +35,11 @@ typedef struct __mavlink_xyk_cmd_rc_channels_t {
"XYK_CMD_RC_CHANNELS", \
12, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_xyk_cmd_rc_channels_t, target_system) }, \
{ "taret_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_xyk_cmd_rc_channels_t, taret_component) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_xyk_cmd_rc_channels_t, target_component) }, \
{ "command_word", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_xyk_cmd_rc_channels_t, command_word) }, \
{ "chan_elevtor", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_elevtor) }, \
{ "chan_elevator", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_elevator) }, \
{ "chan_rudder", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_rudder) }, \
{ "chan_ailron", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_ailron) }, \
{ "chan_aileron", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_aileron) }, \
{ "chan_throttle", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_throttle) }, \
{ "chan_onoff", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_onoff) }, \
{ "chan_keyword", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_keyword) }, \
@@ -53,11 +53,11 @@ typedef struct __mavlink_xyk_cmd_rc_channels_t {
"XYK_CMD_RC_CHANNELS", \
12, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_xyk_cmd_rc_channels_t, target_system) }, \
{ "taret_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_xyk_cmd_rc_channels_t, taret_component) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_xyk_cmd_rc_channels_t, target_component) }, \
{ "command_word", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_xyk_cmd_rc_channels_t, command_word) }, \
{ "chan_elevtor", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_elevtor) }, \
{ "chan_elevator", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_elevator) }, \
{ "chan_rudder", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_rudder) }, \
{ "chan_ailron", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_ailron) }, \
{ "chan_aileron", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_aileron) }, \
{ "chan_throttle", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_throttle) }, \
{ "chan_onoff", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_onoff) }, \
{ "chan_keyword", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_xyk_cmd_rc_channels_t, chan_keyword) }, \
@@ -75,11 +75,11 @@ typedef struct __mavlink_xyk_cmd_rc_channels_t {
* @param msg The MAVLink message to compress the data into
*
* @param target_system PLANE ID
* @param taret_component Component ID
* @param target_component Component ID
* @param command_word command_word
* @param chan_elevtor RC chan_elevtor,0.1%,-1000~1000
* @param chan_elevator RC chan_elevator,0.1%,-1000~1000
* @param chan_rudder RC chan_rudder,0.1%,-1000~1000
* @param chan_ailron RC chan_ailron,0.1%,-1000~1000
* @param chan_aileron RC chan_aileron,0.1%,-1000~1000
* @param chan_throttle RC chan_throttle,0.1%,0~2000
* @param chan_onoff RC control word of on-off state ,bit0~bit3 corresponding to switch4~switch1,
* @param chan_keyword RC control word of keyword state ,bit0~bit3 corresponding to key4~key1
@@ -89,16 +89,16 @@ typedef struct __mavlink_xyk_cmd_rc_channels_t {
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_xyk_cmd_rc_channels_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t taret_component, uint8_t command_word, int16_t chan_elevtor, int16_t chan_rudder, int16_t chan_ailron, int16_t chan_throttle, uint8_t chan_onoff, uint8_t chan_keyword, uint8_t chan_reserved, uint8_t chan_reserved1, uint8_t chan_reserved2)
uint8_t target_system, uint8_t target_component, uint8_t command_word, int16_t chan_elevator, int16_t chan_rudder, int16_t chan_aileron, int16_t chan_throttle, uint8_t chan_onoff, uint8_t chan_keyword, uint8_t chan_reserved, uint8_t chan_reserved1, uint8_t chan_reserved2)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_LEN];
_mav_put_int16_t(buf, 0, chan_elevtor);
_mav_put_int16_t(buf, 0, chan_elevator);
_mav_put_int16_t(buf, 2, chan_rudder);
_mav_put_int16_t(buf, 4, chan_ailron);
_mav_put_int16_t(buf, 4, chan_aileron);
_mav_put_int16_t(buf, 6, chan_throttle);
_mav_put_uint8_t(buf, 8, target_system);
_mav_put_uint8_t(buf, 9, taret_component);
_mav_put_uint8_t(buf, 9, target_component);
_mav_put_uint8_t(buf, 10, command_word);
_mav_put_uint8_t(buf, 11, chan_onoff);
_mav_put_uint8_t(buf, 12, chan_keyword);
@@ -109,12 +109,12 @@ static inline uint16_t mavlink_msg_xyk_cmd_rc_channels_pack(uint8_t system_id, u
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_LEN);
#else
mavlink_xyk_cmd_rc_channels_t packet;
packet.chan_elevtor = chan_elevtor;
packet.chan_elevator = chan_elevator;
packet.chan_rudder = chan_rudder;
packet.chan_ailron = chan_ailron;
packet.chan_aileron = chan_aileron;
packet.chan_throttle = chan_throttle;
packet.target_system = target_system;
packet.taret_component = taret_component;
packet.target_component = target_component;
packet.command_word = command_word;
packet.chan_onoff = chan_onoff;
packet.chan_keyword = chan_keyword;
@@ -136,11 +136,11 @@ static inline uint16_t mavlink_msg_xyk_cmd_rc_channels_pack(uint8_t system_id, u
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param target_system PLANE ID
* @param taret_component Component ID
* @param target_component Component ID
* @param command_word command_word
* @param chan_elevtor RC chan_elevtor,0.1%,-1000~1000
* @param chan_elevator RC chan_elevator,0.1%,-1000~1000
* @param chan_rudder RC chan_rudder,0.1%,-1000~1000
* @param chan_ailron RC chan_ailron,0.1%,-1000~1000
* @param chan_aileron RC chan_aileron,0.1%,-1000~1000
* @param chan_throttle RC chan_throttle,0.1%,0~2000
* @param chan_onoff RC control word of on-off state ,bit0~bit3 corresponding to switch4~switch1,
* @param chan_keyword RC control word of keyword state ,bit0~bit3 corresponding to key4~key1
@@ -151,16 +151,16 @@ static inline uint16_t mavlink_msg_xyk_cmd_rc_channels_pack(uint8_t system_id, u
*/
static inline uint16_t mavlink_msg_xyk_cmd_rc_channels_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t taret_component,uint8_t command_word,int16_t chan_elevtor,int16_t chan_rudder,int16_t chan_ailron,int16_t chan_throttle,uint8_t chan_onoff,uint8_t chan_keyword,uint8_t chan_reserved,uint8_t chan_reserved1,uint8_t chan_reserved2)
uint8_t target_system,uint8_t target_component,uint8_t command_word,int16_t chan_elevator,int16_t chan_rudder,int16_t chan_aileron,int16_t chan_throttle,uint8_t chan_onoff,uint8_t chan_keyword,uint8_t chan_reserved,uint8_t chan_reserved1,uint8_t chan_reserved2)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_LEN];
_mav_put_int16_t(buf, 0, chan_elevtor);
_mav_put_int16_t(buf, 0, chan_elevator);
_mav_put_int16_t(buf, 2, chan_rudder);
_mav_put_int16_t(buf, 4, chan_ailron);
_mav_put_int16_t(buf, 4, chan_aileron);
_mav_put_int16_t(buf, 6, chan_throttle);
_mav_put_uint8_t(buf, 8, target_system);
_mav_put_uint8_t(buf, 9, taret_component);
_mav_put_uint8_t(buf, 9, target_component);
_mav_put_uint8_t(buf, 10, command_word);
_mav_put_uint8_t(buf, 11, chan_onoff);
_mav_put_uint8_t(buf, 12, chan_keyword);
@@ -171,12 +171,12 @@ static inline uint16_t mavlink_msg_xyk_cmd_rc_channels_pack_chan(uint8_t system_
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_LEN);
#else
mavlink_xyk_cmd_rc_channels_t packet;
packet.chan_elevtor = chan_elevtor;
packet.chan_elevator = chan_elevator;
packet.chan_rudder = chan_rudder;
packet.chan_ailron = chan_ailron;
packet.chan_aileron = chan_aileron;
packet.chan_throttle = chan_throttle;
packet.target_system = target_system;
packet.taret_component = taret_component;
packet.target_component = target_component;
packet.command_word = command_word;
packet.chan_onoff = chan_onoff;
packet.chan_keyword = chan_keyword;
@@ -201,7 +201,7 @@ static inline uint16_t mavlink_msg_xyk_cmd_rc_channels_pack_chan(uint8_t system_
*/
static inline uint16_t mavlink_msg_xyk_cmd_rc_channels_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_xyk_cmd_rc_channels_t* xyk_cmd_rc_channels)
{
return mavlink_msg_xyk_cmd_rc_channels_pack(system_id, component_id, msg, xyk_cmd_rc_channels->target_system, xyk_cmd_rc_channels->taret_component, xyk_cmd_rc_channels->command_word, xyk_cmd_rc_channels->chan_elevtor, xyk_cmd_rc_channels->chan_rudder, xyk_cmd_rc_channels->chan_ailron, xyk_cmd_rc_channels->chan_throttle, xyk_cmd_rc_channels->chan_onoff, xyk_cmd_rc_channels->chan_keyword, xyk_cmd_rc_channels->chan_reserved, xyk_cmd_rc_channels->chan_reserved1, xyk_cmd_rc_channels->chan_reserved2);
return mavlink_msg_xyk_cmd_rc_channels_pack(system_id, component_id, msg, xyk_cmd_rc_channels->target_system, xyk_cmd_rc_channels->target_component, xyk_cmd_rc_channels->command_word, xyk_cmd_rc_channels->chan_elevator, xyk_cmd_rc_channels->chan_rudder, xyk_cmd_rc_channels->chan_aileron, xyk_cmd_rc_channels->chan_throttle, xyk_cmd_rc_channels->chan_onoff, xyk_cmd_rc_channels->chan_keyword, xyk_cmd_rc_channels->chan_reserved, xyk_cmd_rc_channels->chan_reserved1, xyk_cmd_rc_channels->chan_reserved2);
}
/**
@@ -215,7 +215,7 @@ static inline uint16_t mavlink_msg_xyk_cmd_rc_channels_encode(uint8_t system_id,
*/
static inline uint16_t mavlink_msg_xyk_cmd_rc_channels_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_xyk_cmd_rc_channels_t* xyk_cmd_rc_channels)
{
return mavlink_msg_xyk_cmd_rc_channels_pack_chan(system_id, component_id, chan, msg, xyk_cmd_rc_channels->target_system, xyk_cmd_rc_channels->taret_component, xyk_cmd_rc_channels->command_word, xyk_cmd_rc_channels->chan_elevtor, xyk_cmd_rc_channels->chan_rudder, xyk_cmd_rc_channels->chan_ailron, xyk_cmd_rc_channels->chan_throttle, xyk_cmd_rc_channels->chan_onoff, xyk_cmd_rc_channels->chan_keyword, xyk_cmd_rc_channels->chan_reserved, xyk_cmd_rc_channels->chan_reserved1, xyk_cmd_rc_channels->chan_reserved2);
return mavlink_msg_xyk_cmd_rc_channels_pack_chan(system_id, component_id, chan, msg, xyk_cmd_rc_channels->target_system, xyk_cmd_rc_channels->target_component, xyk_cmd_rc_channels->command_word, xyk_cmd_rc_channels->chan_elevator, xyk_cmd_rc_channels->chan_rudder, xyk_cmd_rc_channels->chan_aileron, xyk_cmd_rc_channels->chan_throttle, xyk_cmd_rc_channels->chan_onoff, xyk_cmd_rc_channels->chan_keyword, xyk_cmd_rc_channels->chan_reserved, xyk_cmd_rc_channels->chan_reserved1, xyk_cmd_rc_channels->chan_reserved2);
}
/**
@@ -223,11 +223,11 @@ static inline uint16_t mavlink_msg_xyk_cmd_rc_channels_encode_chan(uint8_t syste
* @param chan MAVLink channel to send the message
*
* @param target_system PLANE ID
* @param taret_component Component ID
* @param target_component Component ID
* @param command_word command_word
* @param chan_elevtor RC chan_elevtor,0.1%,-1000~1000
* @param chan_elevator RC chan_elevator,0.1%,-1000~1000
* @param chan_rudder RC chan_rudder,0.1%,-1000~1000
* @param chan_ailron RC chan_ailron,0.1%,-1000~1000
* @param chan_aileron RC chan_aileron,0.1%,-1000~1000
* @param chan_throttle RC chan_throttle,0.1%,0~2000
* @param chan_onoff RC control word of on-off state ,bit0~bit3 corresponding to switch4~switch1,
* @param chan_keyword RC control word of keyword state ,bit0~bit3 corresponding to key4~key1
@@ -237,16 +237,16 @@ static inline uint16_t mavlink_msg_xyk_cmd_rc_channels_encode_chan(uint8_t syste
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_xyk_cmd_rc_channels_send(mavlink_channel_t chan, uint8_t target_system, uint8_t taret_component, uint8_t command_word, int16_t chan_elevtor, int16_t chan_rudder, int16_t chan_ailron, int16_t chan_throttle, uint8_t chan_onoff, uint8_t chan_keyword, uint8_t chan_reserved, uint8_t chan_reserved1, uint8_t chan_reserved2)
static inline void mavlink_msg_xyk_cmd_rc_channels_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t command_word, int16_t chan_elevator, int16_t chan_rudder, int16_t chan_aileron, int16_t chan_throttle, uint8_t chan_onoff, uint8_t chan_keyword, uint8_t chan_reserved, uint8_t chan_reserved1, uint8_t chan_reserved2)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_LEN];
_mav_put_int16_t(buf, 0, chan_elevtor);
_mav_put_int16_t(buf, 0, chan_elevator);
_mav_put_int16_t(buf, 2, chan_rudder);
_mav_put_int16_t(buf, 4, chan_ailron);
_mav_put_int16_t(buf, 4, chan_aileron);
_mav_put_int16_t(buf, 6, chan_throttle);
_mav_put_uint8_t(buf, 8, target_system);
_mav_put_uint8_t(buf, 9, taret_component);
_mav_put_uint8_t(buf, 9, target_component);
_mav_put_uint8_t(buf, 10, command_word);
_mav_put_uint8_t(buf, 11, chan_onoff);
_mav_put_uint8_t(buf, 12, chan_keyword);
@@ -257,12 +257,12 @@ static inline void mavlink_msg_xyk_cmd_rc_channels_send(mavlink_channel_t chan,
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS, buf, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_MIN_LEN, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_LEN, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_CRC);
#else
mavlink_xyk_cmd_rc_channels_t packet;
packet.chan_elevtor = chan_elevtor;
packet.chan_elevator = chan_elevator;
packet.chan_rudder = chan_rudder;
packet.chan_ailron = chan_ailron;
packet.chan_aileron = chan_aileron;
packet.chan_throttle = chan_throttle;
packet.target_system = target_system;
packet.taret_component = taret_component;
packet.target_component = target_component;
packet.command_word = command_word;
packet.chan_onoff = chan_onoff;
packet.chan_keyword = chan_keyword;
@@ -282,7 +282,7 @@ static inline void mavlink_msg_xyk_cmd_rc_channels_send(mavlink_channel_t chan,
static inline void mavlink_msg_xyk_cmd_rc_channels_send_struct(mavlink_channel_t chan, const mavlink_xyk_cmd_rc_channels_t* xyk_cmd_rc_channels)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_xyk_cmd_rc_channels_send(chan, xyk_cmd_rc_channels->target_system, xyk_cmd_rc_channels->taret_component, xyk_cmd_rc_channels->command_word, xyk_cmd_rc_channels->chan_elevtor, xyk_cmd_rc_channels->chan_rudder, xyk_cmd_rc_channels->chan_ailron, xyk_cmd_rc_channels->chan_throttle, xyk_cmd_rc_channels->chan_onoff, xyk_cmd_rc_channels->chan_keyword, xyk_cmd_rc_channels->chan_reserved, xyk_cmd_rc_channels->chan_reserved1, xyk_cmd_rc_channels->chan_reserved2);
mavlink_msg_xyk_cmd_rc_channels_send(chan, xyk_cmd_rc_channels->target_system, xyk_cmd_rc_channels->target_component, xyk_cmd_rc_channels->command_word, xyk_cmd_rc_channels->chan_elevator, xyk_cmd_rc_channels->chan_rudder, xyk_cmd_rc_channels->chan_aileron, xyk_cmd_rc_channels->chan_throttle, xyk_cmd_rc_channels->chan_onoff, xyk_cmd_rc_channels->chan_keyword, xyk_cmd_rc_channels->chan_reserved, xyk_cmd_rc_channels->chan_reserved1, xyk_cmd_rc_channels->chan_reserved2);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS, (const char *)xyk_cmd_rc_channels, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_MIN_LEN, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_LEN, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_CRC);
#endif
@@ -296,16 +296,16 @@ static inline void mavlink_msg_xyk_cmd_rc_channels_send_struct(mavlink_channel_t
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_xyk_cmd_rc_channels_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t taret_component, uint8_t command_word, int16_t chan_elevtor, int16_t chan_rudder, int16_t chan_ailron, int16_t chan_throttle, uint8_t chan_onoff, uint8_t chan_keyword, uint8_t chan_reserved, uint8_t chan_reserved1, uint8_t chan_reserved2)
static inline void mavlink_msg_xyk_cmd_rc_channels_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t command_word, int16_t chan_elevator, int16_t chan_rudder, int16_t chan_aileron, int16_t chan_throttle, uint8_t chan_onoff, uint8_t chan_keyword, uint8_t chan_reserved, uint8_t chan_reserved1, uint8_t chan_reserved2)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_int16_t(buf, 0, chan_elevtor);
_mav_put_int16_t(buf, 0, chan_elevator);
_mav_put_int16_t(buf, 2, chan_rudder);
_mav_put_int16_t(buf, 4, chan_ailron);
_mav_put_int16_t(buf, 4, chan_aileron);
_mav_put_int16_t(buf, 6, chan_throttle);
_mav_put_uint8_t(buf, 8, target_system);
_mav_put_uint8_t(buf, 9, taret_component);
_mav_put_uint8_t(buf, 9, target_component);
_mav_put_uint8_t(buf, 10, command_word);
_mav_put_uint8_t(buf, 11, chan_onoff);
_mav_put_uint8_t(buf, 12, chan_keyword);
@@ -316,12 +316,12 @@ static inline void mavlink_msg_xyk_cmd_rc_channels_send_buf(mavlink_message_t *m
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS, buf, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_MIN_LEN, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_LEN, MAVLINK_MSG_ID_XYK_CMD_RC_CHANNELS_CRC);
#else
mavlink_xyk_cmd_rc_channels_t *packet = (mavlink_xyk_cmd_rc_channels_t *)msgbuf;
packet->chan_elevtor = chan_elevtor;
packet->chan_elevator = chan_elevator;
packet->chan_rudder = chan_rudder;
packet->chan_ailron = chan_ailron;
packet->chan_aileron = chan_aileron;
packet->chan_throttle = chan_throttle;
packet->target_system = target_system;
packet->taret_component = taret_component;
packet->target_component = target_component;
packet->command_word = command_word;
packet->chan_onoff = chan_onoff;
packet->chan_keyword = chan_keyword;
@@ -350,11 +350,11 @@ static inline uint8_t mavlink_msg_xyk_cmd_rc_channels_get_target_system(const ma
}
/**
* @brief Get field taret_component from xyk_cmd_rc_channels message
* @brief Get field target_component from xyk_cmd_rc_channels message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_xyk_cmd_rc_channels_get_taret_component(const mavlink_message_t* msg)
static inline uint8_t mavlink_msg_xyk_cmd_rc_channels_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 9);
}
@@ -370,11 +370,11 @@ static inline uint8_t mavlink_msg_xyk_cmd_rc_channels_get_command_word(const mav
}
/**
* @brief Get field chan_elevtor from xyk_cmd_rc_channels message
* @brief Get field chan_elevator from xyk_cmd_rc_channels message
*
* @return RC chan_elevtor,0.1%,-1000~1000
* @return RC chan_elevator,0.1%,-1000~1000
*/
static inline int16_t mavlink_msg_xyk_cmd_rc_channels_get_chan_elevtor(const mavlink_message_t* msg)
static inline int16_t mavlink_msg_xyk_cmd_rc_channels_get_chan_elevator(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 0);
}
@@ -390,11 +390,11 @@ static inline int16_t mavlink_msg_xyk_cmd_rc_channels_get_chan_rudder(const mavl
}
/**
* @brief Get field chan_ailron from xyk_cmd_rc_channels message
* @brief Get field chan_aileron from xyk_cmd_rc_channels message
*
* @return RC chan_ailron,0.1%,-1000~1000
* @return RC chan_aileron,0.1%,-1000~1000
*/
static inline int16_t mavlink_msg_xyk_cmd_rc_channels_get_chan_ailron(const mavlink_message_t* msg)
static inline int16_t mavlink_msg_xyk_cmd_rc_channels_get_chan_aileron(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 4);
}
@@ -468,12 +468,12 @@ static inline uint8_t mavlink_msg_xyk_cmd_rc_channels_get_chan_reserved2(const m
static inline void mavlink_msg_xyk_cmd_rc_channels_decode(const mavlink_message_t* msg, mavlink_xyk_cmd_rc_channels_t* xyk_cmd_rc_channels)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
xyk_cmd_rc_channels->chan_elevtor = mavlink_msg_xyk_cmd_rc_channels_get_chan_elevtor(msg);
xyk_cmd_rc_channels->chan_elevator = mavlink_msg_xyk_cmd_rc_channels_get_chan_elevator(msg);
xyk_cmd_rc_channels->chan_rudder = mavlink_msg_xyk_cmd_rc_channels_get_chan_rudder(msg);
xyk_cmd_rc_channels->chan_ailron = mavlink_msg_xyk_cmd_rc_channels_get_chan_ailron(msg);
xyk_cmd_rc_channels->chan_aileron = mavlink_msg_xyk_cmd_rc_channels_get_chan_aileron(msg);
xyk_cmd_rc_channels->chan_throttle = mavlink_msg_xyk_cmd_rc_channels_get_chan_throttle(msg);
xyk_cmd_rc_channels->target_system = mavlink_msg_xyk_cmd_rc_channels_get_target_system(msg);
xyk_cmd_rc_channels->taret_component = mavlink_msg_xyk_cmd_rc_channels_get_taret_component(msg);
xyk_cmd_rc_channels->target_component = mavlink_msg_xyk_cmd_rc_channels_get_target_component(msg);
xyk_cmd_rc_channels->command_word = mavlink_msg_xyk_cmd_rc_channels_get_command_word(msg);
xyk_cmd_rc_channels->chan_onoff = mavlink_msg_xyk_cmd_rc_channels_get_chan_onoff(msg);
xyk_cmd_rc_channels->chan_keyword = mavlink_msg_xyk_cmd_rc_channels_get_chan_keyword(msg);