|
@@ -0,0 +1,400 @@
|
|
|
+#pragma once
|
|
|
+// MESSAGE VK_PARACHUTE_STATUS PACKING
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VK_PARACHUTE_STATUS 53020
|
|
|
+
|
|
|
+
|
|
|
+typedef struct __mavlink_vk_parachute_status_t {
|
|
|
+ uint32_t timestamp; /*< [ms] timestamp from system boot*/
|
|
|
+ float backvolt; /*< parachute backup voltage*/
|
|
|
+ uint16_t err_code; /*< parachute error code */
|
|
|
+ uint8_t state; /*< parachute state*/
|
|
|
+ uint8_t auto_launch; /*< is auto launch enabled*/
|
|
|
+ uint8_t uav_cmd; /*< uav command from parachute*/
|
|
|
+} mavlink_vk_parachute_status_t;
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN 13
|
|
|
+#define MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_MIN_LEN 13
|
|
|
+#define MAVLINK_MSG_ID_53020_LEN 13
|
|
|
+#define MAVLINK_MSG_ID_53020_MIN_LEN 13
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_CRC 45
|
|
|
+#define MAVLINK_MSG_ID_53020_CRC 45
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+#if MAVLINK_COMMAND_24BIT
|
|
|
+#define MAVLINK_MESSAGE_INFO_VK_PARACHUTE_STATUS { \
|
|
|
+ 53020, \
|
|
|
+ "VK_PARACHUTE_STATUS", \
|
|
|
+ 6, \
|
|
|
+ { { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_parachute_status_t, timestamp) }, \
|
|
|
+ { "state", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_vk_parachute_status_t, state) }, \
|
|
|
+ { "auto_launch", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_vk_parachute_status_t, auto_launch) }, \
|
|
|
+ { "uav_cmd", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_vk_parachute_status_t, uav_cmd) }, \
|
|
|
+ { "err_code", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_vk_parachute_status_t, err_code) }, \
|
|
|
+ { "backvolt", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_vk_parachute_status_t, backvolt) }, \
|
|
|
+ } \
|
|
|
+}
|
|
|
+#else
|
|
|
+#define MAVLINK_MESSAGE_INFO_VK_PARACHUTE_STATUS { \
|
|
|
+ "VK_PARACHUTE_STATUS", \
|
|
|
+ 6, \
|
|
|
+ { { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_parachute_status_t, timestamp) }, \
|
|
|
+ { "state", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_vk_parachute_status_t, state) }, \
|
|
|
+ { "auto_launch", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_vk_parachute_status_t, auto_launch) }, \
|
|
|
+ { "uav_cmd", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_vk_parachute_status_t, uav_cmd) }, \
|
|
|
+ { "err_code", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_vk_parachute_status_t, err_code) }, \
|
|
|
+ { "backvolt", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_vk_parachute_status_t, backvolt) }, \
|
|
|
+ } \
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vk_parachute_status 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 timestamp [ms] timestamp from system boot
|
|
|
+ * @param state parachute state
|
|
|
+ * @param auto_launch is auto launch enabled
|
|
|
+ * @param uav_cmd uav command from parachute
|
|
|
+ * @param err_code parachute error code
|
|
|
+ * @param backvolt parachute backup voltage
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_parachute_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
|
|
+ uint32_t timestamp, uint8_t state, uint8_t auto_launch, uint8_t uav_cmd, uint16_t err_code, float backvolt)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_float(buf, 4, backvolt);
|
|
|
+ _mav_put_uint16_t(buf, 8, err_code);
|
|
|
+ _mav_put_uint8_t(buf, 10, state);
|
|
|
+ _mav_put_uint8_t(buf, 11, auto_launch);
|
|
|
+ _mav_put_uint8_t(buf, 12, uav_cmd);
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vk_parachute_status_t packet;
|
|
|
+ packet.timestamp = timestamp;
|
|
|
+ packet.backvolt = backvolt;
|
|
|
+ packet.err_code = err_code;
|
|
|
+ packet.state = state;
|
|
|
+ packet.auto_launch = auto_launch;
|
|
|
+ packet.uav_cmd = uav_cmd;
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VK_PARACHUTE_STATUS;
|
|
|
+ return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_CRC);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vk_parachute_status message
|
|
|
+ * @param system_id ID of this system
|
|
|
+ * @param component_id ID of this component (e.g. 200 for IMU)
|
|
|
+ * @param status MAVLink status structure
|
|
|
+ * @param msg The MAVLink message to compress the data into
|
|
|
+ *
|
|
|
+ * @param timestamp [ms] timestamp from system boot
|
|
|
+ * @param state parachute state
|
|
|
+ * @param auto_launch is auto launch enabled
|
|
|
+ * @param uav_cmd uav command from parachute
|
|
|
+ * @param err_code parachute error code
|
|
|
+ * @param backvolt parachute backup voltage
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_parachute_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
|
|
+ uint32_t timestamp, uint8_t state, uint8_t auto_launch, uint8_t uav_cmd, uint16_t err_code, float backvolt)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_float(buf, 4, backvolt);
|
|
|
+ _mav_put_uint16_t(buf, 8, err_code);
|
|
|
+ _mav_put_uint8_t(buf, 10, state);
|
|
|
+ _mav_put_uint8_t(buf, 11, auto_launch);
|
|
|
+ _mav_put_uint8_t(buf, 12, uav_cmd);
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vk_parachute_status_t packet;
|
|
|
+ packet.timestamp = timestamp;
|
|
|
+ packet.backvolt = backvolt;
|
|
|
+ packet.err_code = err_code;
|
|
|
+ packet.state = state;
|
|
|
+ packet.auto_launch = auto_launch;
|
|
|
+ packet.uav_cmd = uav_cmd;
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VK_PARACHUTE_STATUS;
|
|
|
+#if MAVLINK_CRC_EXTRA
|
|
|
+ return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_CRC);
|
|
|
+#else
|
|
|
+ return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vk_parachute_status 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 timestamp [ms] timestamp from system boot
|
|
|
+ * @param state parachute state
|
|
|
+ * @param auto_launch is auto launch enabled
|
|
|
+ * @param uav_cmd uav command from parachute
|
|
|
+ * @param err_code parachute error code
|
|
|
+ * @param backvolt parachute backup voltage
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_parachute_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
|
|
+ mavlink_message_t* msg,
|
|
|
+ uint32_t timestamp,uint8_t state,uint8_t auto_launch,uint8_t uav_cmd,uint16_t err_code,float backvolt)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_float(buf, 4, backvolt);
|
|
|
+ _mav_put_uint16_t(buf, 8, err_code);
|
|
|
+ _mav_put_uint8_t(buf, 10, state);
|
|
|
+ _mav_put_uint8_t(buf, 11, auto_launch);
|
|
|
+ _mav_put_uint8_t(buf, 12, uav_cmd);
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vk_parachute_status_t packet;
|
|
|
+ packet.timestamp = timestamp;
|
|
|
+ packet.backvolt = backvolt;
|
|
|
+ packet.err_code = err_code;
|
|
|
+ packet.state = state;
|
|
|
+ packet.auto_launch = auto_launch;
|
|
|
+ packet.uav_cmd = uav_cmd;
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VK_PARACHUTE_STATUS;
|
|
|
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_CRC);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vk_parachute_status 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 vk_parachute_status C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_parachute_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vk_parachute_status_t* vk_parachute_status)
|
|
|
+{
|
|
|
+ return mavlink_msg_vk_parachute_status_pack(system_id, component_id, msg, vk_parachute_status->timestamp, vk_parachute_status->state, vk_parachute_status->auto_launch, vk_parachute_status->uav_cmd, vk_parachute_status->err_code, vk_parachute_status->backvolt);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vk_parachute_status 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 vk_parachute_status C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_parachute_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vk_parachute_status_t* vk_parachute_status)
|
|
|
+{
|
|
|
+ return mavlink_msg_vk_parachute_status_pack_chan(system_id, component_id, chan, msg, vk_parachute_status->timestamp, vk_parachute_status->state, vk_parachute_status->auto_launch, vk_parachute_status->uav_cmd, vk_parachute_status->err_code, vk_parachute_status->backvolt);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vk_parachute_status struct with provided status structure
|
|
|
+ *
|
|
|
+ * @param system_id ID of this system
|
|
|
+ * @param component_id ID of this component (e.g. 200 for IMU)
|
|
|
+ * @param status MAVLink status structure
|
|
|
+ * @param msg The MAVLink message to compress the data into
|
|
|
+ * @param vk_parachute_status C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_parachute_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vk_parachute_status_t* vk_parachute_status)
|
|
|
+{
|
|
|
+ return mavlink_msg_vk_parachute_status_pack_status(system_id, component_id, _status, msg, vk_parachute_status->timestamp, vk_parachute_status->state, vk_parachute_status->auto_launch, vk_parachute_status->uav_cmd, vk_parachute_status->err_code, vk_parachute_status->backvolt);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Send a vk_parachute_status message
|
|
|
+ * @param chan MAVLink channel to send the message
|
|
|
+ *
|
|
|
+ * @param timestamp [ms] timestamp from system boot
|
|
|
+ * @param state parachute state
|
|
|
+ * @param auto_launch is auto launch enabled
|
|
|
+ * @param uav_cmd uav command from parachute
|
|
|
+ * @param err_code parachute error code
|
|
|
+ * @param backvolt parachute backup voltage
|
|
|
+ */
|
|
|
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
|
|
+
|
|
|
+static inline void mavlink_msg_vk_parachute_status_send(mavlink_channel_t chan, uint32_t timestamp, uint8_t state, uint8_t auto_launch, uint8_t uav_cmd, uint16_t err_code, float backvolt)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_float(buf, 4, backvolt);
|
|
|
+ _mav_put_uint16_t(buf, 8, err_code);
|
|
|
+ _mav_put_uint8_t(buf, 10, state);
|
|
|
+ _mav_put_uint8_t(buf, 11, auto_launch);
|
|
|
+ _mav_put_uint8_t(buf, 12, uav_cmd);
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS, buf, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_CRC);
|
|
|
+#else
|
|
|
+ mavlink_vk_parachute_status_t packet;
|
|
|
+ packet.timestamp = timestamp;
|
|
|
+ packet.backvolt = backvolt;
|
|
|
+ packet.err_code = err_code;
|
|
|
+ packet.state = state;
|
|
|
+ packet.auto_launch = auto_launch;
|
|
|
+ packet.uav_cmd = uav_cmd;
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS, (const char *)&packet, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Send a vk_parachute_status message
|
|
|
+ * @param chan MAVLink channel to send the message
|
|
|
+ * @param struct The MAVLink struct to serialize
|
|
|
+ */
|
|
|
+static inline void mavlink_msg_vk_parachute_status_send_struct(mavlink_channel_t chan, const mavlink_vk_parachute_status_t* vk_parachute_status)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ mavlink_msg_vk_parachute_status_send(chan, vk_parachute_status->timestamp, vk_parachute_status->state, vk_parachute_status->auto_launch, vk_parachute_status->uav_cmd, vk_parachute_status->err_code, vk_parachute_status->backvolt);
|
|
|
+#else
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS, (const char *)vk_parachute_status, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+#if MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
|
|
|
+/*
|
|
|
+ This variant 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_vk_parachute_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t timestamp, uint8_t state, uint8_t auto_launch, uint8_t uav_cmd, uint16_t err_code, float backvolt)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char *buf = (char *)msgbuf;
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_float(buf, 4, backvolt);
|
|
|
+ _mav_put_uint16_t(buf, 8, err_code);
|
|
|
+ _mav_put_uint8_t(buf, 10, state);
|
|
|
+ _mav_put_uint8_t(buf, 11, auto_launch);
|
|
|
+ _mav_put_uint8_t(buf, 12, uav_cmd);
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS, buf, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_CRC);
|
|
|
+#else
|
|
|
+ mavlink_vk_parachute_status_t *packet = (mavlink_vk_parachute_status_t *)msgbuf;
|
|
|
+ packet->timestamp = timestamp;
|
|
|
+ packet->backvolt = backvolt;
|
|
|
+ packet->err_code = err_code;
|
|
|
+ packet->state = state;
|
|
|
+ packet->auto_launch = auto_launch;
|
|
|
+ packet->uav_cmd = uav_cmd;
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS, (const char *)packet, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+#endif
|
|
|
+
|
|
|
+// MESSAGE VK_PARACHUTE_STATUS UNPACKING
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field timestamp from vk_parachute_status message
|
|
|
+ *
|
|
|
+ * @return [ms] timestamp from system boot
|
|
|
+ */
|
|
|
+static inline uint32_t mavlink_msg_vk_parachute_status_get_timestamp(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint32_t(msg, 0);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field state from vk_parachute_status message
|
|
|
+ *
|
|
|
+ * @return parachute state
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_vk_parachute_status_get_state(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 10);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field auto_launch from vk_parachute_status message
|
|
|
+ *
|
|
|
+ * @return is auto launch enabled
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_vk_parachute_status_get_auto_launch(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 11);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field uav_cmd from vk_parachute_status message
|
|
|
+ *
|
|
|
+ * @return uav command from parachute
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_vk_parachute_status_get_uav_cmd(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 12);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field err_code from vk_parachute_status message
|
|
|
+ *
|
|
|
+ * @return parachute error code
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_parachute_status_get_err_code(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint16_t(msg, 8);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field backvolt from vk_parachute_status message
|
|
|
+ *
|
|
|
+ * @return parachute backup voltage
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_parachute_status_get_backvolt(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 4);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Decode a vk_parachute_status message into a struct
|
|
|
+ *
|
|
|
+ * @param msg The message to decode
|
|
|
+ * @param vk_parachute_status C-struct to decode the message contents into
|
|
|
+ */
|
|
|
+static inline void mavlink_msg_vk_parachute_status_decode(const mavlink_message_t* msg, mavlink_vk_parachute_status_t* vk_parachute_status)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ vk_parachute_status->timestamp = mavlink_msg_vk_parachute_status_get_timestamp(msg);
|
|
|
+ vk_parachute_status->backvolt = mavlink_msg_vk_parachute_status_get_backvolt(msg);
|
|
|
+ vk_parachute_status->err_code = mavlink_msg_vk_parachute_status_get_err_code(msg);
|
|
|
+ vk_parachute_status->state = mavlink_msg_vk_parachute_status_get_state(msg);
|
|
|
+ vk_parachute_status->auto_launch = mavlink_msg_vk_parachute_status_get_auto_launch(msg);
|
|
|
+ vk_parachute_status->uav_cmd = mavlink_msg_vk_parachute_status_get_uav_cmd(msg);
|
|
|
+#else
|
|
|
+ uint8_t len = msg->len < MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN? msg->len : MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN;
|
|
|
+ memset(vk_parachute_status, 0, MAVLINK_MSG_ID_VK_PARACHUTE_STATUS_LEN);
|
|
|
+ memcpy(vk_parachute_status, _MAV_PAYLOAD(msg), len);
|
|
|
+#endif
|
|
|
+}
|