#pragma once // MESSAGE XYK_PRESET_PARAM PACKING #define MAVLINK_MSG_ID_XYK_PRESET_PARAM 30004 MAVPACKED( typedef struct __mavlink_xyk_preset_param_t { int32_t XYK_PRESET_FIELD_HEIGHT; /*< preset local filed height 0.01m.*/ 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_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_CRC 250 #define MAVLINK_MSG_ID_30004_CRC 250 #if MAVLINK_COMMAND_24BIT #define MAVLINK_MESSAGE_INFO_XYK_PRESET_PARAM { \ 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_PRESET_FIELD_HEIGHT", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_FIELD_HEIGHT) }, \ } \ } #else #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_PRESET_FIELD_HEIGHT", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_xyk_preset_param_t, XYK_PRESET_FIELD_HEIGHT) }, \ } \ } #endif /** * @brief Pack a xyk_preset_param message * @param system_id ID of this system * @param component_id ID of this component (e.g. 200 for IMU) * @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_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) { #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); 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_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_TRANSPD = XYK_PRESET_TRANSPD; packet.XYK_GOTOLINE = XYK_GOTOLINE; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN); #endif msg->msgid = MAVLINK_MSG_ID_XYK_PRESET_PARAM; return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_XYK_PRESET_PARAM_MIN_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_CRC); } /** * @brief Pack a xyk_preset_param message on a channel * @param system_id ID of this system * @param component_id ID of this component (e.g. 200 for IMU) * @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_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) { #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); 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_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_TRANSPD = XYK_PRESET_TRANSPD; packet.XYK_GOTOLINE = XYK_GOTOLINE; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN); #endif msg->msgid = MAVLINK_MSG_ID_XYK_PRESET_PARAM; return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_XYK_PRESET_PARAM_MIN_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_CRC); } /** * @brief Encode a xyk_preset_param struct * * @param system_id ID of this system * @param component_id ID of this component (e.g. 200 for IMU) * @param msg The MAVLink message to compress the data into * @param xyk_preset_param C-struct to read the message contents from */ 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); } /** * @brief Encode a xyk_preset_param struct on a channel * * @param system_id ID of this system * @param component_id ID of this component (e.g. 200 for IMU) * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into * @param xyk_preset_param C-struct to read the message contents from */ 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); } /** * @brief Send a xyk_preset_param message * @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_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) { #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_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_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_TRANSPD = XYK_PRESET_TRANSPD; packet.XYK_GOTOLINE = XYK_GOTOLINE; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XYK_PRESET_PARAM, (const char *)&packet, MAVLINK_MSG_ID_XYK_PRESET_PARAM_MIN_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_CRC); #endif } /** * @brief Send a xyk_preset_param message * @param chan MAVLink channel to send the message * @param struct The MAVLink struct to serialize */ 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); #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 } #if MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN <= MAVLINK_MAX_PAYLOAD_LEN /* This varient of _send() can be used to save stack space by re-using memory from the receive buffer. The caller provides a mavlink_message_t which is the size of a full mavlink message. This 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) { #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_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_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_TRANSPD = XYK_PRESET_TRANSPD; packet->XYK_GOTOLINE = XYK_GOTOLINE; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XYK_PRESET_PARAM, (const char *)packet, MAVLINK_MSG_ID_XYK_PRESET_PARAM_MIN_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN, MAVLINK_MSG_ID_XYK_PRESET_PARAM_CRC); #endif } #endif #endif // MESSAGE XYK_PRESET_PARAM UNPACKING /** * @brief Get field XYK_PLANE_ID from xyk_preset_param message * * @return plane id. */ 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); } /** * @brief Get field XYK_PRESET_CRUSPD from xyk_preset_param message * * @return preset cruise speed 1kph */ 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 * * @return climb rate. 0.1m/s */ static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_UPRATE(const mavlink_message_t* msg) { return _MAV_RETURN_uint8_t(msg, 8); } /** * @brief Get field XYK_PRESET_RADIUS from xyk_preset_param message * * @return preset radius. 2m */ static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_RADIUS(const mavlink_message_t* msg) { return _MAV_RETURN_uint8_t(msg, 9); } /** * @brief Get field XYK_PRESET_TRANSPD from xyk_preset_param message * * @return speed transformed from gyro to fixed wing 1kph */ 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); } /** * @brief Get field XYK_GOTOLINE from xyk_preset_param message * * @return the way go to airline see XYK_GOTOLINE */ static inline uint8_t mavlink_msg_xyk_preset_param_get_XYK_GOTOLINE(const mavlink_message_t* msg) { return _MAV_RETURN_uint8_t(msg, 11); } /** * @brief Get field XYK_PRESET_FIELD_HEIGHT from xyk_preset_param message * * @return preset local filed height 0.01m. */ static inline int32_t mavlink_msg_xyk_preset_param_get_XYK_PRESET_FIELD_HEIGHT(const mavlink_message_t* msg) { return _MAV_RETURN_int32_t(msg, 0); } /** * @brief Decode a xyk_preset_param message into a struct * * @param msg The message to decode * @param xyk_preset_param C-struct to decode the message contents into */ static inline void mavlink_msg_xyk_preset_param_decode(const mavlink_message_t* msg, mavlink_xyk_preset_param_t* xyk_preset_param) { #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_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_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 uint8_t len = msg->len < MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN? msg->len : MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN; memset(xyk_preset_param, 0, MAVLINK_MSG_ID_XYK_PRESET_PARAM_LEN); memcpy(xyk_preset_param, _MAV_PAYLOAD(msg), len); #endif }