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
+136 -136
View File
@@ -6,23 +6,23 @@
MAVPACKED(
typedef struct __mavlink_xyk_preset_param_t {
int32_t XYK_PRESET_FIELD_HEIGHT; /*< preset local filed height 0.01m.*/
uint16_t XYK_PRESET_RADIUS; /*< preset radius. 1m*/
uint8_t XYK_PLANE_ID; /*< plane id.*/
uint8_t XYK_PRESET_CRUSPD; /*< preset cruise speed 1kph*/
uint8_t XYK_PRESET_STALSPD; /*< stall speed. 1kph*/
uint8_t XYK_PRESET_DOWNRATE; /*< descent rate 0.1m/s*/
uint8_t XYK_PRESET_UPRATE; /*< climb rate. 0.1m/s*/
uint8_t XYK_PRESET_RADIUS; /*< preset radius. 2m*/
uint8_t XYK_PRESET_TRANSPD; /*< speed transformed from gyro to fixed wing 1kph */
uint8_t XYK_PRESET_CRUSPD; /*< preset cruise speed 1m/s*/
uint8_t XYK_PRESET_STALLSPD; /*< stall speed. 1m/s*/
uint8_t XYK_PRESET_SINKRATE; /*< descent rate 0.1m/s*/
uint8_t XYK_PRESET_CLIMBRATE; /*< climb rate. 0.1m/s*/
uint8_t XYK_PRESET_TRANSPD; /*< speed transformed from gyro to fixed wing 1m/s */
uint8_t XYK_GOTOLINE; /*< the way go to airline see XYK_GOTOLINE*/
}) mavlink_xyk_preset_param_t;
#define MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN 12
#define MAVLINK_MSG_ID_XYK_PRESET_PARAM_MIN_LEN 12
#define MAVLINK_MSG_ID_30004_LEN 12
#define MAVLINK_MSG_ID_30004_MIN_LEN 12
#define MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN 13
#define MAVLINK_MSG_ID_XYK_PRESET_PARAM_MIN_LEN 13
#define MAVLINK_MSG_ID_30004_LEN 13
#define MAVLINK_MSG_ID_30004_MIN_LEN 13
#define MAVLINK_MSG_ID_XYK_PRESET_PARAM_CRC 250
#define MAVLINK_MSG_ID_30004_CRC 250
#define MAVLINK_MSG_ID_XYK_PRESET_PARAM_CRC 69
#define MAVLINK_MSG_ID_30004_CRC 69
@@ -31,14 +31,14 @@ typedef struct __mavlink_xyk_preset_param_t {
30004, \
"XYK_PRESET_PARAM", \
9, \
{ { "XYK_PLANE_ID", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_xyk_preset_param_t, XYK_PLANE_ID) }, \
{ "XYK_PRESET_CRUSPD", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_CRUSPD) }, \
{ "XYK_PRESET_STALSPD", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_STALSPD) }, \
{ "XYK_PRESET_DOWNRATE", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_DOWNRATE) }, \
{ "XYK_PRESET_UPRATE", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_UPRATE) }, \
{ "XYK_PRESET_RADIUS", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_RADIUS) }, \
{ "XYK_PRESET_TRANSPD", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_TRANSPD) }, \
{ "XYK_GOTOLINE", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_xyk_preset_param_t, XYK_GOTOLINE) }, \
{ { "XYK_PLANE_ID", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_xyk_preset_param_t, XYK_PLANE_ID) }, \
{ "XYK_PRESET_CRUSPD", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_CRUSPD) }, \
{ "XYK_PRESET_STALLSPD", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_STALLSPD) }, \
{ "XYK_PRESET_SINKRATE", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_SINKRATE) }, \
{ "XYK_PRESET_CLIMBRATE", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_CLIMBRATE) }, \
{ "XYK_PRESET_RADIUS", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_RADIUS) }, \
{ "XYK_PRESET_TRANSPD", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_TRANSPD) }, \
{ "XYK_GOTOLINE", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_xyk_preset_param_t, XYK_GOTOLINE) }, \
{ "XYK_PRESET_FIELD_HEIGHT", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_FIELD_HEIGHT) }, \
} \
}
@@ -46,14 +46,14 @@ typedef struct __mavlink_xyk_preset_param_t {
#define MAVLINK_MESSAGE_INFO_XYK_PRESET_PARAM { \
"XYK_PRESET_PARAM", \
9, \
{ { "XYK_PLANE_ID", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_xyk_preset_param_t, XYK_PLANE_ID) }, \
{ "XYK_PRESET_CRUSPD", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_CRUSPD) }, \
{ "XYK_PRESET_STALSPD", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_STALSPD) }, \
{ "XYK_PRESET_DOWNRATE", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_DOWNRATE) }, \
{ "XYK_PRESET_UPRATE", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_UPRATE) }, \
{ "XYK_PRESET_RADIUS", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_RADIUS) }, \
{ "XYK_PRESET_TRANSPD", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_TRANSPD) }, \
{ "XYK_GOTOLINE", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_xyk_preset_param_t, XYK_GOTOLINE) }, \
{ { "XYK_PLANE_ID", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_xyk_preset_param_t, XYK_PLANE_ID) }, \
{ "XYK_PRESET_CRUSPD", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_CRUSPD) }, \
{ "XYK_PRESET_STALLSPD", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_STALLSPD) }, \
{ "XYK_PRESET_SINKRATE", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_SINKRATE) }, \
{ "XYK_PRESET_CLIMBRATE", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_CLIMBRATE) }, \
{ "XYK_PRESET_RADIUS", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_RADIUS) }, \
{ "XYK_PRESET_TRANSPD", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_TRANSPD) }, \
{ "XYK_GOTOLINE", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_xyk_preset_param_t, XYK_GOTOLINE) }, \
{ "XYK_PRESET_FIELD_HEIGHT", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_FIELD_HEIGHT) }, \
} \
}
@@ -66,41 +66,41 @@ typedef struct __mavlink_xyk_preset_param_t {
* @param msg The MAVLink message to compress the data into
*
* @param XYK_PLANE_ID plane id.
* @param XYK_PRESET_CRUSPD preset cruise speed 1kph
* @param XYK_PRESET_STALSPD stall speed. 1kph
* @param XYK_PRESET_DOWNRATE descent rate 0.1m/s
* @param XYK_PRESET_UPRATE climb rate. 0.1m/s
* @param XYK_PRESET_RADIUS preset radius. 2m
* @param XYK_PRESET_TRANSPD speed transformed from gyro to fixed wing 1kph
* @param XYK_PRESET_CRUSPD preset cruise speed 1m/s
* @param XYK_PRESET_STALLSPD stall speed. 1m/s
* @param XYK_PRESET_SINKRATE descent rate 0.1m/s
* @param XYK_PRESET_CLIMBRATE climb rate. 0.1m/s
* @param XYK_PRESET_RADIUS preset radius. 1m
* @param XYK_PRESET_TRANSPD speed transformed from gyro to fixed wing 1m/s
* @param XYK_GOTOLINE the way go to airline see XYK_GOTOLINE
* @param XYK_PRESET_FIELD_HEIGHT preset local filed height 0.01m.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_xyk_preset_param_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t XYK_PLANE_ID, uint8_t XYK_PRESET_CRUSPD, uint8_t XYK_PRESET_STALSPD, uint8_t XYK_PRESET_DOWNRATE, uint8_t XYK_PRESET_UPRATE, uint8_t XYK_PRESET_RADIUS, uint8_t XYK_PRESET_TRANSPD, uint8_t XYK_GOTOLINE, int32_t XYK_PRESET_FIELD_HEIGHT)
uint8_t XYK_PLANE_ID, uint8_t XYK_PRESET_CRUSPD, uint8_t XYK_PRESET_STALLSPD, uint8_t XYK_PRESET_SINKRATE, uint8_t XYK_PRESET_CLIMBRATE, uint16_t XYK_PRESET_RADIUS, uint8_t XYK_PRESET_TRANSPD, uint8_t XYK_GOTOLINE, int32_t XYK_PRESET_FIELD_HEIGHT)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN];
_mav_put_int32_t(buf, 0, XYK_PRESET_FIELD_HEIGHT);
_mav_put_uint8_t(buf, 4, XYK_PLANE_ID);
_mav_put_uint8_t(buf, 5, XYK_PRESET_CRUSPD);
_mav_put_uint8_t(buf, 6, XYK_PRESET_STALSPD);
_mav_put_uint8_t(buf, 7, XYK_PRESET_DOWNRATE);
_mav_put_uint8_t(buf, 8, XYK_PRESET_UPRATE);
_mav_put_uint8_t(buf, 9, XYK_PRESET_RADIUS);
_mav_put_uint8_t(buf, 10, XYK_PRESET_TRANSPD);
_mav_put_uint8_t(buf, 11, XYK_GOTOLINE);
_mav_put_uint16_t(buf, 4, XYK_PRESET_RADIUS);
_mav_put_uint8_t(buf, 6, XYK_PLANE_ID);
_mav_put_uint8_t(buf, 7, XYK_PRESET_CRUSPD);
_mav_put_uint8_t(buf, 8, XYK_PRESET_STALLSPD);
_mav_put_uint8_t(buf, 9, XYK_PRESET_SINKRATE);
_mav_put_uint8_t(buf, 10, XYK_PRESET_CLIMBRATE);
_mav_put_uint8_t(buf, 11, XYK_PRESET_TRANSPD);
_mav_put_uint8_t(buf, 12, XYK_GOTOLINE);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN);
#else
mavlink_xyk_preset_param_t packet;
packet.XYK_PRESET_FIELD_HEIGHT = XYK_PRESET_FIELD_HEIGHT;
packet.XYK_PRESET_RADIUS = XYK_PRESET_RADIUS;
packet.XYK_PLANE_ID = XYK_PLANE_ID;
packet.XYK_PRESET_CRUSPD = XYK_PRESET_CRUSPD;
packet.XYK_PRESET_STALSPD = XYK_PRESET_STALSPD;
packet.XYK_PRESET_DOWNRATE = XYK_PRESET_DOWNRATE;
packet.XYK_PRESET_UPRATE = XYK_PRESET_UPRATE;
packet.XYK_PRESET_RADIUS = XYK_PRESET_RADIUS;
packet.XYK_PRESET_STALLSPD = XYK_PRESET_STALLSPD;
packet.XYK_PRESET_SINKRATE = XYK_PRESET_SINKRATE;
packet.XYK_PRESET_CLIMBRATE = XYK_PRESET_CLIMBRATE;
packet.XYK_PRESET_TRANSPD = XYK_PRESET_TRANSPD;
packet.XYK_GOTOLINE = XYK_GOTOLINE;
@@ -118,42 +118,42 @@ static inline uint16_t mavlink_msg_xyk_preset_param_pack(uint8_t system_id, uint
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param XYK_PLANE_ID plane id.
* @param XYK_PRESET_CRUSPD preset cruise speed 1kph
* @param XYK_PRESET_STALSPD stall speed. 1kph
* @param XYK_PRESET_DOWNRATE descent rate 0.1m/s
* @param XYK_PRESET_UPRATE climb rate. 0.1m/s
* @param XYK_PRESET_RADIUS preset radius. 2m
* @param XYK_PRESET_TRANSPD speed transformed from gyro to fixed wing 1kph
* @param XYK_PRESET_CRUSPD preset cruise speed 1m/s
* @param XYK_PRESET_STALLSPD stall speed. 1m/s
* @param XYK_PRESET_SINKRATE descent rate 0.1m/s
* @param XYK_PRESET_CLIMBRATE climb rate. 0.1m/s
* @param XYK_PRESET_RADIUS preset radius. 1m
* @param XYK_PRESET_TRANSPD speed transformed from gyro to fixed wing 1m/s
* @param XYK_GOTOLINE the way go to airline see XYK_GOTOLINE
* @param XYK_PRESET_FIELD_HEIGHT preset local filed height 0.01m.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_xyk_preset_param_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t XYK_PLANE_ID,uint8_t XYK_PRESET_CRUSPD,uint8_t XYK_PRESET_STALSPD,uint8_t XYK_PRESET_DOWNRATE,uint8_t XYK_PRESET_UPRATE,uint8_t XYK_PRESET_RADIUS,uint8_t XYK_PRESET_TRANSPD,uint8_t XYK_GOTOLINE,int32_t XYK_PRESET_FIELD_HEIGHT)
uint8_t XYK_PLANE_ID,uint8_t XYK_PRESET_CRUSPD,uint8_t XYK_PRESET_STALLSPD,uint8_t XYK_PRESET_SINKRATE,uint8_t XYK_PRESET_CLIMBRATE,uint16_t XYK_PRESET_RADIUS,uint8_t XYK_PRESET_TRANSPD,uint8_t XYK_GOTOLINE,int32_t XYK_PRESET_FIELD_HEIGHT)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN];
_mav_put_int32_t(buf, 0, XYK_PRESET_FIELD_HEIGHT);
_mav_put_uint8_t(buf, 4, XYK_PLANE_ID);
_mav_put_uint8_t(buf, 5, XYK_PRESET_CRUSPD);
_mav_put_uint8_t(buf, 6, XYK_PRESET_STALSPD);
_mav_put_uint8_t(buf, 7, XYK_PRESET_DOWNRATE);
_mav_put_uint8_t(buf, 8, XYK_PRESET_UPRATE);
_mav_put_uint8_t(buf, 9, XYK_PRESET_RADIUS);
_mav_put_uint8_t(buf, 10, XYK_PRESET_TRANSPD);
_mav_put_uint8_t(buf, 11, XYK_GOTOLINE);
_mav_put_uint16_t(buf, 4, XYK_PRESET_RADIUS);
_mav_put_uint8_t(buf, 6, XYK_PLANE_ID);
_mav_put_uint8_t(buf, 7, XYK_PRESET_CRUSPD);
_mav_put_uint8_t(buf, 8, XYK_PRESET_STALLSPD);
_mav_put_uint8_t(buf, 9, XYK_PRESET_SINKRATE);
_mav_put_uint8_t(buf, 10, XYK_PRESET_CLIMBRATE);
_mav_put_uint8_t(buf, 11, XYK_PRESET_TRANSPD);
_mav_put_uint8_t(buf, 12, XYK_GOTOLINE);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN);
#else
mavlink_xyk_preset_param_t packet;
packet.XYK_PRESET_FIELD_HEIGHT = XYK_PRESET_FIELD_HEIGHT;
packet.XYK_PRESET_RADIUS = XYK_PRESET_RADIUS;
packet.XYK_PLANE_ID = XYK_PLANE_ID;
packet.XYK_PRESET_CRUSPD = XYK_PRESET_CRUSPD;
packet.XYK_PRESET_STALSPD = XYK_PRESET_STALSPD;
packet.XYK_PRESET_DOWNRATE = XYK_PRESET_DOWNRATE;
packet.XYK_PRESET_UPRATE = XYK_PRESET_UPRATE;
packet.XYK_PRESET_RADIUS = XYK_PRESET_RADIUS;
packet.XYK_PRESET_STALLSPD = XYK_PRESET_STALLSPD;
packet.XYK_PRESET_SINKRATE = XYK_PRESET_SINKRATE;
packet.XYK_PRESET_CLIMBRATE = XYK_PRESET_CLIMBRATE;
packet.XYK_PRESET_TRANSPD = XYK_PRESET_TRANSPD;
packet.XYK_GOTOLINE = XYK_GOTOLINE;
@@ -174,7 +174,7 @@ static inline uint16_t mavlink_msg_xyk_preset_param_pack_chan(uint8_t system_id,
*/
static inline uint16_t mavlink_msg_xyk_preset_param_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_xyk_preset_param_t* xyk_preset_param)
{
return mavlink_msg_xyk_preset_param_pack(system_id, component_id, msg, xyk_preset_param->XYK_PLANE_ID, xyk_preset_param->XYK_PRESET_CRUSPD, xyk_preset_param->XYK_PRESET_STALSPD, xyk_preset_param->XYK_PRESET_DOWNRATE, xyk_preset_param->XYK_PRESET_UPRATE, xyk_preset_param->XYK_PRESET_RADIUS, xyk_preset_param->XYK_PRESET_TRANSPD, xyk_preset_param->XYK_GOTOLINE, xyk_preset_param->XYK_PRESET_FIELD_HEIGHT);
return mavlink_msg_xyk_preset_param_pack(system_id, component_id, msg, xyk_preset_param->XYK_PLANE_ID, xyk_preset_param->XYK_PRESET_CRUSPD, xyk_preset_param->XYK_PRESET_STALLSPD, xyk_preset_param->XYK_PRESET_SINKRATE, xyk_preset_param->XYK_PRESET_CLIMBRATE, xyk_preset_param->XYK_PRESET_RADIUS, xyk_preset_param->XYK_PRESET_TRANSPD, xyk_preset_param->XYK_GOTOLINE, xyk_preset_param->XYK_PRESET_FIELD_HEIGHT);
}
/**
@@ -188,7 +188,7 @@ static inline uint16_t mavlink_msg_xyk_preset_param_encode(uint8_t system_id, ui
*/
static inline uint16_t mavlink_msg_xyk_preset_param_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_xyk_preset_param_t* xyk_preset_param)
{
return mavlink_msg_xyk_preset_param_pack_chan(system_id, component_id, chan, msg, xyk_preset_param->XYK_PLANE_ID, xyk_preset_param->XYK_PRESET_CRUSPD, xyk_preset_param->XYK_PRESET_STALSPD, xyk_preset_param->XYK_PRESET_DOWNRATE, xyk_preset_param->XYK_PRESET_UPRATE, xyk_preset_param->XYK_PRESET_RADIUS, xyk_preset_param->XYK_PRESET_TRANSPD, xyk_preset_param->XYK_GOTOLINE, xyk_preset_param->XYK_PRESET_FIELD_HEIGHT);
return mavlink_msg_xyk_preset_param_pack_chan(system_id, component_id, chan, msg, xyk_preset_param->XYK_PLANE_ID, xyk_preset_param->XYK_PRESET_CRUSPD, xyk_preset_param->XYK_PRESET_STALLSPD, xyk_preset_param->XYK_PRESET_SINKRATE, xyk_preset_param->XYK_PRESET_CLIMBRATE, xyk_preset_param->XYK_PRESET_RADIUS, xyk_preset_param->XYK_PRESET_TRANSPD, xyk_preset_param->XYK_GOTOLINE, xyk_preset_param->XYK_PRESET_FIELD_HEIGHT);
}
/**
@@ -196,41 +196,41 @@ static inline uint16_t mavlink_msg_xyk_preset_param_encode_chan(uint8_t system_i
* @param chan MAVLink channel to send the message
*
* @param XYK_PLANE_ID plane id.
* @param XYK_PRESET_CRUSPD preset cruise speed 1kph
* @param XYK_PRESET_STALSPD stall speed. 1kph
* @param XYK_PRESET_DOWNRATE descent rate 0.1m/s
* @param XYK_PRESET_UPRATE climb rate. 0.1m/s
* @param XYK_PRESET_RADIUS preset radius. 2m
* @param XYK_PRESET_TRANSPD speed transformed from gyro to fixed wing 1kph
* @param XYK_PRESET_CRUSPD preset cruise speed 1m/s
* @param XYK_PRESET_STALLSPD stall speed. 1m/s
* @param XYK_PRESET_SINKRATE descent rate 0.1m/s
* @param XYK_PRESET_CLIMBRATE climb rate. 0.1m/s
* @param XYK_PRESET_RADIUS preset radius. 1m
* @param XYK_PRESET_TRANSPD speed transformed from gyro to fixed wing 1m/s
* @param XYK_GOTOLINE the way go to airline see XYK_GOTOLINE
* @param XYK_PRESET_FIELD_HEIGHT preset local filed height 0.01m.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_xyk_preset_param_send(mavlink_channel_t chan, uint8_t XYK_PLANE_ID, uint8_t XYK_PRESET_CRUSPD, uint8_t XYK_PRESET_STALSPD, uint8_t XYK_PRESET_DOWNRATE, uint8_t XYK_PRESET_UPRATE, uint8_t XYK_PRESET_RADIUS, uint8_t XYK_PRESET_TRANSPD, uint8_t XYK_GOTOLINE, int32_t XYK_PRESET_FIELD_HEIGHT)
static inline void mavlink_msg_xyk_preset_param_send(mavlink_channel_t chan, uint8_t XYK_PLANE_ID, uint8_t XYK_PRESET_CRUSPD, uint8_t XYK_PRESET_STALLSPD, uint8_t XYK_PRESET_SINKRATE, uint8_t XYK_PRESET_CLIMBRATE, uint16_t XYK_PRESET_RADIUS, uint8_t XYK_PRESET_TRANSPD, uint8_t XYK_GOTOLINE, int32_t XYK_PRESET_FIELD_HEIGHT)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN];
_mav_put_int32_t(buf, 0, XYK_PRESET_FIELD_HEIGHT);
_mav_put_uint8_t(buf, 4, XYK_PLANE_ID);
_mav_put_uint8_t(buf, 5, XYK_PRESET_CRUSPD);
_mav_put_uint8_t(buf, 6, XYK_PRESET_STALSPD);
_mav_put_uint8_t(buf, 7, XYK_PRESET_DOWNRATE);
_mav_put_uint8_t(buf, 8, XYK_PRESET_UPRATE);
_mav_put_uint8_t(buf, 9, XYK_PRESET_RADIUS);
_mav_put_uint8_t(buf, 10, XYK_PRESET_TRANSPD);
_mav_put_uint8_t(buf, 11, XYK_GOTOLINE);
_mav_put_uint16_t(buf, 4, XYK_PRESET_RADIUS);
_mav_put_uint8_t(buf, 6, XYK_PLANE_ID);
_mav_put_uint8_t(buf, 7, XYK_PRESET_CRUSPD);
_mav_put_uint8_t(buf, 8, XYK_PRESET_STALLSPD);
_mav_put_uint8_t(buf, 9, XYK_PRESET_SINKRATE);
_mav_put_uint8_t(buf, 10, XYK_PRESET_CLIMBRATE);
_mav_put_uint8_t(buf, 11, XYK_PRESET_TRANSPD);
_mav_put_uint8_t(buf, 12, XYK_GOTOLINE);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XYK_PRESET_PARAM, buf, MAVLINK_MSG_ID_XYK_PRESET_PARAM_MIN_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_CRC);
#else
mavlink_xyk_preset_param_t packet;
packet.XYK_PRESET_FIELD_HEIGHT = XYK_PRESET_FIELD_HEIGHT;
packet.XYK_PRESET_RADIUS = XYK_PRESET_RADIUS;
packet.XYK_PLANE_ID = XYK_PLANE_ID;
packet.XYK_PRESET_CRUSPD = XYK_PRESET_CRUSPD;
packet.XYK_PRESET_STALSPD = XYK_PRESET_STALSPD;
packet.XYK_PRESET_DOWNRATE = XYK_PRESET_DOWNRATE;
packet.XYK_PRESET_UPRATE = XYK_PRESET_UPRATE;
packet.XYK_PRESET_RADIUS = XYK_PRESET_RADIUS;
packet.XYK_PRESET_STALLSPD = XYK_PRESET_STALLSPD;
packet.XYK_PRESET_SINKRATE = XYK_PRESET_SINKRATE;
packet.XYK_PRESET_CLIMBRATE = XYK_PRESET_CLIMBRATE;
packet.XYK_PRESET_TRANSPD = XYK_PRESET_TRANSPD;
packet.XYK_GOTOLINE = XYK_GOTOLINE;
@@ -246,7 +246,7 @@ static inline void mavlink_msg_xyk_preset_param_send(mavlink_channel_t chan, uin
static inline void mavlink_msg_xyk_preset_param_send_struct(mavlink_channel_t chan, const mavlink_xyk_preset_param_t* xyk_preset_param)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_xyk_preset_param_send(chan, xyk_preset_param->XYK_PLANE_ID, xyk_preset_param->XYK_PRESET_CRUSPD, xyk_preset_param->XYK_PRESET_STALSPD, xyk_preset_param->XYK_PRESET_DOWNRATE, xyk_preset_param->XYK_PRESET_UPRATE, xyk_preset_param->XYK_PRESET_RADIUS, xyk_preset_param->XYK_PRESET_TRANSPD, xyk_preset_param->XYK_GOTOLINE, xyk_preset_param->XYK_PRESET_FIELD_HEIGHT);
mavlink_msg_xyk_preset_param_send(chan, xyk_preset_param->XYK_PLANE_ID, xyk_preset_param->XYK_PRESET_CRUSPD, xyk_preset_param->XYK_PRESET_STALLSPD, xyk_preset_param->XYK_PRESET_SINKRATE, xyk_preset_param->XYK_PRESET_CLIMBRATE, xyk_preset_param->XYK_PRESET_RADIUS, xyk_preset_param->XYK_PRESET_TRANSPD, xyk_preset_param->XYK_GOTOLINE, xyk_preset_param->XYK_PRESET_FIELD_HEIGHT);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XYK_PRESET_PARAM, (const char *)xyk_preset_param, MAVLINK_MSG_ID_XYK_PRESET_PARAM_MIN_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_CRC);
#endif
@@ -260,30 +260,30 @@ static inline void mavlink_msg_xyk_preset_param_send_struct(mavlink_channel_t ch
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_preset_param_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t XYK_PLANE_ID, uint8_t XYK_PRESET_CRUSPD, uint8_t XYK_PRESET_STALSPD, uint8_t XYK_PRESET_DOWNRATE, uint8_t XYK_PRESET_UPRATE, uint8_t XYK_PRESET_RADIUS, uint8_t XYK_PRESET_TRANSPD, uint8_t XYK_GOTOLINE, int32_t XYK_PRESET_FIELD_HEIGHT)
static inline void mavlink_msg_xyk_preset_param_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t XYK_PLANE_ID, uint8_t XYK_PRESET_CRUSPD, uint8_t XYK_PRESET_STALLSPD, uint8_t XYK_PRESET_SINKRATE, uint8_t XYK_PRESET_CLIMBRATE, uint16_t XYK_PRESET_RADIUS, uint8_t XYK_PRESET_TRANSPD, uint8_t XYK_GOTOLINE, int32_t XYK_PRESET_FIELD_HEIGHT)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_int32_t(buf, 0, XYK_PRESET_FIELD_HEIGHT);
_mav_put_uint8_t(buf, 4, XYK_PLANE_ID);
_mav_put_uint8_t(buf, 5, XYK_PRESET_CRUSPD);
_mav_put_uint8_t(buf, 6, XYK_PRESET_STALSPD);
_mav_put_uint8_t(buf, 7, XYK_PRESET_DOWNRATE);
_mav_put_uint8_t(buf, 8, XYK_PRESET_UPRATE);
_mav_put_uint8_t(buf, 9, XYK_PRESET_RADIUS);
_mav_put_uint8_t(buf, 10, XYK_PRESET_TRANSPD);
_mav_put_uint8_t(buf, 11, XYK_GOTOLINE);
_mav_put_uint16_t(buf, 4, XYK_PRESET_RADIUS);
_mav_put_uint8_t(buf, 6, XYK_PLANE_ID);
_mav_put_uint8_t(buf, 7, XYK_PRESET_CRUSPD);
_mav_put_uint8_t(buf, 8, XYK_PRESET_STALLSPD);
_mav_put_uint8_t(buf, 9, XYK_PRESET_SINKRATE);
_mav_put_uint8_t(buf, 10, XYK_PRESET_CLIMBRATE);
_mav_put_uint8_t(buf, 11, XYK_PRESET_TRANSPD);
_mav_put_uint8_t(buf, 12, XYK_GOTOLINE);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XYK_PRESET_PARAM, buf, MAVLINK_MSG_ID_XYK_PRESET_PARAM_MIN_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_CRC);
#else
mavlink_xyk_preset_param_t *packet = (mavlink_xyk_preset_param_t *)msgbuf;
packet->XYK_PRESET_FIELD_HEIGHT = XYK_PRESET_FIELD_HEIGHT;
packet->XYK_PRESET_RADIUS = XYK_PRESET_RADIUS;
packet->XYK_PLANE_ID = XYK_PLANE_ID;
packet->XYK_PRESET_CRUSPD = XYK_PRESET_CRUSPD;
packet->XYK_PRESET_STALSPD = XYK_PRESET_STALSPD;
packet->XYK_PRESET_DOWNRATE = XYK_PRESET_DOWNRATE;
packet->XYK_PRESET_UPRATE = XYK_PRESET_UPRATE;
packet->XYK_PRESET_RADIUS = XYK_PRESET_RADIUS;
packet->XYK_PRESET_STALLSPD = XYK_PRESET_STALLSPD;
packet->XYK_PRESET_SINKRATE = XYK_PRESET_SINKRATE;
packet->XYK_PRESET_CLIMBRATE = XYK_PRESET_CLIMBRATE;
packet->XYK_PRESET_TRANSPD = XYK_PRESET_TRANSPD;
packet->XYK_GOTOLINE = XYK_GOTOLINE;
@@ -304,67 +304,67 @@ static inline void mavlink_msg_xyk_preset_param_send_buf(mavlink_message_t *msgb
*/
static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_PLANE_ID(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
return _MAV_RETURN_uint8_t(msg, 6);
}
/**
* @brief Get field XYK_PRESET_CRUSPD from xyk_preset_param message
*
* @return preset cruise speed 1kph
* @return preset cruise speed 1m/s
*/
static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_CRUSPD(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
/**
* @brief Get field XYK_PRESET_STALSPD from xyk_preset_param message
*
* @return stall speed. 1kph
*/
static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_STALSPD(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 6);
}
/**
* @brief Get field XYK_PRESET_DOWNRATE from xyk_preset_param message
*
* @return descent rate 0.1m/s
*/
static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_DOWNRATE(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 7);
}
/**
* @brief Get field XYK_PRESET_UPRATE from xyk_preset_param message
* @brief Get field XYK_PRESET_STALLSPD from xyk_preset_param message
*
* @return climb rate. 0.1m/s
* @return stall speed. 1m/s
*/
static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_UPRATE(const mavlink_message_t* msg)
static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_STALLSPD(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
}
/**
* @brief Get field XYK_PRESET_RADIUS from xyk_preset_param message
* @brief Get field XYK_PRESET_SINKRATE from xyk_preset_param message
*
* @return preset radius. 2m
* @return descent rate 0.1m/s
*/
static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_RADIUS(const mavlink_message_t* msg)
static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_SINKRATE(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 9);
}
/**
* @brief Get field XYK_PRESET_CLIMBRATE from xyk_preset_param message
*
* @return climb rate. 0.1m/s
*/
static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_CLIMBRATE(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 10);
}
/**
* @brief Get field XYK_PRESET_RADIUS from xyk_preset_param message
*
* @return preset radius. 1m
*/
static inline uint16_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_RADIUS(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 4);
}
/**
* @brief Get field XYK_PRESET_TRANSPD from xyk_preset_param message
*
* @return speed transformed from gyro to fixed wing 1kph
* @return speed transformed from gyro to fixed wing 1m/s
*/
static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_TRANSPD(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 10);
return _MAV_RETURN_uint8_t(msg, 11);
}
/**
@@ -374,7 +374,7 @@ static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_TRANSPD(const
*/
static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_GOTOLINE(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 11);
return _MAV_RETURN_uint8_t(msg, 12);
}
/**
@@ -397,12 +397,12 @@ static inline void mavlink_msg_xyk_preset_param_decode(const mavlink_message_t*
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
xyk_preset_param->XYK_PRESET_FIELD_HEIGHT = mavlink_msg_xyk_preset_param_get_XYK_PRESET_FIELD_HEIGHT(msg);
xyk_preset_param->XYK_PRESET_RADIUS = mavlink_msg_xyk_preset_param_get_XYK_PRESET_RADIUS(msg);
xyk_preset_param->XYK_PLANE_ID = mavlink_msg_xyk_preset_param_get_XYK_PLANE_ID(msg);
xyk_preset_param->XYK_PRESET_CRUSPD = mavlink_msg_xyk_preset_param_get_XYK_PRESET_CRUSPD(msg);
xyk_preset_param->XYK_PRESET_STALSPD = mavlink_msg_xyk_preset_param_get_XYK_PRESET_STALSPD(msg);
xyk_preset_param->XYK_PRESET_DOWNRATE = mavlink_msg_xyk_preset_param_get_XYK_PRESET_DOWNRATE(msg);
xyk_preset_param->XYK_PRESET_UPRATE = mavlink_msg_xyk_preset_param_get_XYK_PRESET_UPRATE(msg);
xyk_preset_param->XYK_PRESET_RADIUS = mavlink_msg_xyk_preset_param_get_XYK_PRESET_RADIUS(msg);
xyk_preset_param->XYK_PRESET_STALLSPD = mavlink_msg_xyk_preset_param_get_XYK_PRESET_STALLSPD(msg);
xyk_preset_param->XYK_PRESET_SINKRATE = mavlink_msg_xyk_preset_param_get_XYK_PRESET_SINKRATE(msg);
xyk_preset_param->XYK_PRESET_CLIMBRATE = mavlink_msg_xyk_preset_param_get_XYK_PRESET_CLIMBRATE(msg);
xyk_preset_param->XYK_PRESET_TRANSPD = mavlink_msg_xyk_preset_param_get_XYK_PRESET_TRANSPD(msg);
xyk_preset_param->XYK_GOTOLINE = mavlink_msg_xyk_preset_param_get_XYK_GOTOLINE(msg);
#else