|
@@ -10,18 +10,19 @@ typedef struct __mavlink_vkfmu_status_t {
|
|
uint32_t dist_to_tar; /*< [cm] distance to target position in cm*/
|
|
uint32_t dist_to_tar; /*< [cm] distance to target position in cm*/
|
|
uint16_t ups_volt; /*< ups voltage in 0.1V*/
|
|
uint16_t ups_volt; /*< ups voltage in 0.1V*/
|
|
uint16_t adc_volt; /*< adc voltage in 0.1V*/
|
|
uint16_t adc_volt; /*< adc voltage in 0.1V*/
|
|
|
|
+ uint16_t servo_state; /*< bitmap for servo state*/
|
|
uint8_t rtl_reason; /*< return to launch reason.*/
|
|
uint8_t rtl_reason; /*< return to launch reason.*/
|
|
uint8_t loiter_reason; /*< Loiter reason */
|
|
uint8_t loiter_reason; /*< Loiter reason */
|
|
uint8_t s_flag3; /*< fmu sflag3*/
|
|
uint8_t s_flag3; /*< fmu sflag3*/
|
|
} mavlink_vkfmu_status_t;
|
|
} mavlink_vkfmu_status_t;
|
|
|
|
|
|
-#define MAVLINK_MSG_ID_VKFMU_STATUS_LEN 19
|
|
|
|
-#define MAVLINK_MSG_ID_VKFMU_STATUS_MIN_LEN 19
|
|
|
|
-#define MAVLINK_MSG_ID_53001_LEN 19
|
|
|
|
-#define MAVLINK_MSG_ID_53001_MIN_LEN 19
|
|
|
|
|
|
+#define MAVLINK_MSG_ID_VKFMU_STATUS_LEN 21
|
|
|
|
+#define MAVLINK_MSG_ID_VKFMU_STATUS_MIN_LEN 21
|
|
|
|
+#define MAVLINK_MSG_ID_53001_LEN 21
|
|
|
|
+#define MAVLINK_MSG_ID_53001_MIN_LEN 21
|
|
|
|
|
|
-#define MAVLINK_MSG_ID_VKFMU_STATUS_CRC 149
|
|
|
|
-#define MAVLINK_MSG_ID_53001_CRC 149
|
|
|
|
|
|
+#define MAVLINK_MSG_ID_VKFMU_STATUS_CRC 251
|
|
|
|
+#define MAVLINK_MSG_ID_53001_CRC 251
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -29,29 +30,31 @@ typedef struct __mavlink_vkfmu_status_t {
|
|
#define MAVLINK_MESSAGE_INFO_VKFMU_STATUS { \
|
|
#define MAVLINK_MESSAGE_INFO_VKFMU_STATUS { \
|
|
53001, \
|
|
53001, \
|
|
"VKFMU_STATUS", \
|
|
"VKFMU_STATUS", \
|
|
- 8, \
|
|
|
|
|
|
+ 9, \
|
|
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vkfmu_status_t, time_boot_ms) }, \
|
|
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vkfmu_status_t, time_boot_ms) }, \
|
|
- { "rtl_reason", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_vkfmu_status_t, rtl_reason) }, \
|
|
|
|
- { "loiter_reason", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_vkfmu_status_t, loiter_reason) }, \
|
|
|
|
- { "s_flag3", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_vkfmu_status_t, s_flag3) }, \
|
|
|
|
|
|
+ { "rtl_reason", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_vkfmu_status_t, rtl_reason) }, \
|
|
|
|
+ { "loiter_reason", NULL, MAVLINK_TYPE_UINT8_T, 0, 19, offsetof(mavlink_vkfmu_status_t, loiter_reason) }, \
|
|
|
|
+ { "s_flag3", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_vkfmu_status_t, s_flag3) }, \
|
|
{ "ups_volt", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_vkfmu_status_t, ups_volt) }, \
|
|
{ "ups_volt", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_vkfmu_status_t, ups_volt) }, \
|
|
{ "adc_volt", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_vkfmu_status_t, adc_volt) }, \
|
|
{ "adc_volt", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_vkfmu_status_t, adc_volt) }, \
|
|
{ "flight_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_vkfmu_status_t, flight_time) }, \
|
|
{ "flight_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_vkfmu_status_t, flight_time) }, \
|
|
{ "dist_to_tar", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_vkfmu_status_t, dist_to_tar) }, \
|
|
{ "dist_to_tar", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_vkfmu_status_t, dist_to_tar) }, \
|
|
|
|
+ { "servo_state", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_vkfmu_status_t, servo_state) }, \
|
|
} \
|
|
} \
|
|
}
|
|
}
|
|
#else
|
|
#else
|
|
#define MAVLINK_MESSAGE_INFO_VKFMU_STATUS { \
|
|
#define MAVLINK_MESSAGE_INFO_VKFMU_STATUS { \
|
|
"VKFMU_STATUS", \
|
|
"VKFMU_STATUS", \
|
|
- 8, \
|
|
|
|
|
|
+ 9, \
|
|
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vkfmu_status_t, time_boot_ms) }, \
|
|
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vkfmu_status_t, time_boot_ms) }, \
|
|
- { "rtl_reason", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_vkfmu_status_t, rtl_reason) }, \
|
|
|
|
- { "loiter_reason", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_vkfmu_status_t, loiter_reason) }, \
|
|
|
|
- { "s_flag3", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_vkfmu_status_t, s_flag3) }, \
|
|
|
|
|
|
+ { "rtl_reason", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_vkfmu_status_t, rtl_reason) }, \
|
|
|
|
+ { "loiter_reason", NULL, MAVLINK_TYPE_UINT8_T, 0, 19, offsetof(mavlink_vkfmu_status_t, loiter_reason) }, \
|
|
|
|
+ { "s_flag3", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_vkfmu_status_t, s_flag3) }, \
|
|
{ "ups_volt", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_vkfmu_status_t, ups_volt) }, \
|
|
{ "ups_volt", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_vkfmu_status_t, ups_volt) }, \
|
|
{ "adc_volt", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_vkfmu_status_t, adc_volt) }, \
|
|
{ "adc_volt", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_vkfmu_status_t, adc_volt) }, \
|
|
{ "flight_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_vkfmu_status_t, flight_time) }, \
|
|
{ "flight_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_vkfmu_status_t, flight_time) }, \
|
|
{ "dist_to_tar", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_vkfmu_status_t, dist_to_tar) }, \
|
|
{ "dist_to_tar", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_vkfmu_status_t, dist_to_tar) }, \
|
|
|
|
+ { "servo_state", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_vkfmu_status_t, servo_state) }, \
|
|
} \
|
|
} \
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
@@ -70,10 +73,11 @@ typedef struct __mavlink_vkfmu_status_t {
|
|
* @param adc_volt adc voltage in 0.1V
|
|
* @param adc_volt adc voltage in 0.1V
|
|
* @param flight_time [s] flight time in seconds
|
|
* @param flight_time [s] flight time in seconds
|
|
* @param dist_to_tar [cm] distance to target position in cm
|
|
* @param dist_to_tar [cm] distance to target position in cm
|
|
|
|
+ * @param servo_state bitmap for servo state
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
*/
|
|
*/
|
|
static inline uint16_t mavlink_msg_vkfmu_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
|
static inline uint16_t mavlink_msg_vkfmu_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
|
- uint32_t time_boot_ms, uint8_t rtl_reason, uint8_t loiter_reason, uint8_t s_flag3, uint16_t ups_volt, uint16_t adc_volt, uint32_t flight_time, uint32_t dist_to_tar)
|
|
|
|
|
|
+ uint32_t time_boot_ms, uint8_t rtl_reason, uint8_t loiter_reason, uint8_t s_flag3, uint16_t ups_volt, uint16_t adc_volt, uint32_t flight_time, uint32_t dist_to_tar, uint16_t servo_state)
|
|
{
|
|
{
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
char buf[MAVLINK_MSG_ID_VKFMU_STATUS_LEN];
|
|
char buf[MAVLINK_MSG_ID_VKFMU_STATUS_LEN];
|
|
@@ -82,9 +86,10 @@ static inline uint16_t mavlink_msg_vkfmu_status_pack(uint8_t system_id, uint8_t
|
|
_mav_put_uint32_t(buf, 8, dist_to_tar);
|
|
_mav_put_uint32_t(buf, 8, dist_to_tar);
|
|
_mav_put_uint16_t(buf, 12, ups_volt);
|
|
_mav_put_uint16_t(buf, 12, ups_volt);
|
|
_mav_put_uint16_t(buf, 14, adc_volt);
|
|
_mav_put_uint16_t(buf, 14, adc_volt);
|
|
- _mav_put_uint8_t(buf, 16, rtl_reason);
|
|
|
|
- _mav_put_uint8_t(buf, 17, loiter_reason);
|
|
|
|
- _mav_put_uint8_t(buf, 18, s_flag3);
|
|
|
|
|
|
+ _mav_put_uint16_t(buf, 16, servo_state);
|
|
|
|
+ _mav_put_uint8_t(buf, 18, rtl_reason);
|
|
|
|
+ _mav_put_uint8_t(buf, 19, loiter_reason);
|
|
|
|
+ _mav_put_uint8_t(buf, 20, s_flag3);
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VKFMU_STATUS_LEN);
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VKFMU_STATUS_LEN);
|
|
#else
|
|
#else
|
|
@@ -94,6 +99,7 @@ static inline uint16_t mavlink_msg_vkfmu_status_pack(uint8_t system_id, uint8_t
|
|
packet.dist_to_tar = dist_to_tar;
|
|
packet.dist_to_tar = dist_to_tar;
|
|
packet.ups_volt = ups_volt;
|
|
packet.ups_volt = ups_volt;
|
|
packet.adc_volt = adc_volt;
|
|
packet.adc_volt = adc_volt;
|
|
|
|
+ packet.servo_state = servo_state;
|
|
packet.rtl_reason = rtl_reason;
|
|
packet.rtl_reason = rtl_reason;
|
|
packet.loiter_reason = loiter_reason;
|
|
packet.loiter_reason = loiter_reason;
|
|
packet.s_flag3 = s_flag3;
|
|
packet.s_flag3 = s_flag3;
|
|
@@ -120,10 +126,11 @@ static inline uint16_t mavlink_msg_vkfmu_status_pack(uint8_t system_id, uint8_t
|
|
* @param adc_volt adc voltage in 0.1V
|
|
* @param adc_volt adc voltage in 0.1V
|
|
* @param flight_time [s] flight time in seconds
|
|
* @param flight_time [s] flight time in seconds
|
|
* @param dist_to_tar [cm] distance to target position in cm
|
|
* @param dist_to_tar [cm] distance to target position in cm
|
|
|
|
+ * @param servo_state bitmap for servo state
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
*/
|
|
*/
|
|
static inline uint16_t mavlink_msg_vkfmu_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
|
static inline uint16_t mavlink_msg_vkfmu_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
|
- uint32_t time_boot_ms, uint8_t rtl_reason, uint8_t loiter_reason, uint8_t s_flag3, uint16_t ups_volt, uint16_t adc_volt, uint32_t flight_time, uint32_t dist_to_tar)
|
|
|
|
|
|
+ uint32_t time_boot_ms, uint8_t rtl_reason, uint8_t loiter_reason, uint8_t s_flag3, uint16_t ups_volt, uint16_t adc_volt, uint32_t flight_time, uint32_t dist_to_tar, uint16_t servo_state)
|
|
{
|
|
{
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
char buf[MAVLINK_MSG_ID_VKFMU_STATUS_LEN];
|
|
char buf[MAVLINK_MSG_ID_VKFMU_STATUS_LEN];
|
|
@@ -132,9 +139,10 @@ static inline uint16_t mavlink_msg_vkfmu_status_pack_status(uint8_t system_id, u
|
|
_mav_put_uint32_t(buf, 8, dist_to_tar);
|
|
_mav_put_uint32_t(buf, 8, dist_to_tar);
|
|
_mav_put_uint16_t(buf, 12, ups_volt);
|
|
_mav_put_uint16_t(buf, 12, ups_volt);
|
|
_mav_put_uint16_t(buf, 14, adc_volt);
|
|
_mav_put_uint16_t(buf, 14, adc_volt);
|
|
- _mav_put_uint8_t(buf, 16, rtl_reason);
|
|
|
|
- _mav_put_uint8_t(buf, 17, loiter_reason);
|
|
|
|
- _mav_put_uint8_t(buf, 18, s_flag3);
|
|
|
|
|
|
+ _mav_put_uint16_t(buf, 16, servo_state);
|
|
|
|
+ _mav_put_uint8_t(buf, 18, rtl_reason);
|
|
|
|
+ _mav_put_uint8_t(buf, 19, loiter_reason);
|
|
|
|
+ _mav_put_uint8_t(buf, 20, s_flag3);
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VKFMU_STATUS_LEN);
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VKFMU_STATUS_LEN);
|
|
#else
|
|
#else
|
|
@@ -144,6 +152,7 @@ static inline uint16_t mavlink_msg_vkfmu_status_pack_status(uint8_t system_id, u
|
|
packet.dist_to_tar = dist_to_tar;
|
|
packet.dist_to_tar = dist_to_tar;
|
|
packet.ups_volt = ups_volt;
|
|
packet.ups_volt = ups_volt;
|
|
packet.adc_volt = adc_volt;
|
|
packet.adc_volt = adc_volt;
|
|
|
|
+ packet.servo_state = servo_state;
|
|
packet.rtl_reason = rtl_reason;
|
|
packet.rtl_reason = rtl_reason;
|
|
packet.loiter_reason = loiter_reason;
|
|
packet.loiter_reason = loiter_reason;
|
|
packet.s_flag3 = s_flag3;
|
|
packet.s_flag3 = s_flag3;
|
|
@@ -173,11 +182,12 @@ static inline uint16_t mavlink_msg_vkfmu_status_pack_status(uint8_t system_id, u
|
|
* @param adc_volt adc voltage in 0.1V
|
|
* @param adc_volt adc voltage in 0.1V
|
|
* @param flight_time [s] flight time in seconds
|
|
* @param flight_time [s] flight time in seconds
|
|
* @param dist_to_tar [cm] distance to target position in cm
|
|
* @param dist_to_tar [cm] distance to target position in cm
|
|
|
|
+ * @param servo_state bitmap for servo state
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
*/
|
|
*/
|
|
static inline uint16_t mavlink_msg_vkfmu_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
|
static inline uint16_t mavlink_msg_vkfmu_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
|
mavlink_message_t* msg,
|
|
mavlink_message_t* msg,
|
|
- uint32_t time_boot_ms,uint8_t rtl_reason,uint8_t loiter_reason,uint8_t s_flag3,uint16_t ups_volt,uint16_t adc_volt,uint32_t flight_time,uint32_t dist_to_tar)
|
|
|
|
|
|
+ uint32_t time_boot_ms,uint8_t rtl_reason,uint8_t loiter_reason,uint8_t s_flag3,uint16_t ups_volt,uint16_t adc_volt,uint32_t flight_time,uint32_t dist_to_tar,uint16_t servo_state)
|
|
{
|
|
{
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
char buf[MAVLINK_MSG_ID_VKFMU_STATUS_LEN];
|
|
char buf[MAVLINK_MSG_ID_VKFMU_STATUS_LEN];
|
|
@@ -186,9 +196,10 @@ static inline uint16_t mavlink_msg_vkfmu_status_pack_chan(uint8_t system_id, uin
|
|
_mav_put_uint32_t(buf, 8, dist_to_tar);
|
|
_mav_put_uint32_t(buf, 8, dist_to_tar);
|
|
_mav_put_uint16_t(buf, 12, ups_volt);
|
|
_mav_put_uint16_t(buf, 12, ups_volt);
|
|
_mav_put_uint16_t(buf, 14, adc_volt);
|
|
_mav_put_uint16_t(buf, 14, adc_volt);
|
|
- _mav_put_uint8_t(buf, 16, rtl_reason);
|
|
|
|
- _mav_put_uint8_t(buf, 17, loiter_reason);
|
|
|
|
- _mav_put_uint8_t(buf, 18, s_flag3);
|
|
|
|
|
|
+ _mav_put_uint16_t(buf, 16, servo_state);
|
|
|
|
+ _mav_put_uint8_t(buf, 18, rtl_reason);
|
|
|
|
+ _mav_put_uint8_t(buf, 19, loiter_reason);
|
|
|
|
+ _mav_put_uint8_t(buf, 20, s_flag3);
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VKFMU_STATUS_LEN);
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VKFMU_STATUS_LEN);
|
|
#else
|
|
#else
|
|
@@ -198,6 +209,7 @@ static inline uint16_t mavlink_msg_vkfmu_status_pack_chan(uint8_t system_id, uin
|
|
packet.dist_to_tar = dist_to_tar;
|
|
packet.dist_to_tar = dist_to_tar;
|
|
packet.ups_volt = ups_volt;
|
|
packet.ups_volt = ups_volt;
|
|
packet.adc_volt = adc_volt;
|
|
packet.adc_volt = adc_volt;
|
|
|
|
+ packet.servo_state = servo_state;
|
|
packet.rtl_reason = rtl_reason;
|
|
packet.rtl_reason = rtl_reason;
|
|
packet.loiter_reason = loiter_reason;
|
|
packet.loiter_reason = loiter_reason;
|
|
packet.s_flag3 = s_flag3;
|
|
packet.s_flag3 = s_flag3;
|
|
@@ -219,7 +231,7 @@ static inline uint16_t mavlink_msg_vkfmu_status_pack_chan(uint8_t system_id, uin
|
|
*/
|
|
*/
|
|
static inline uint16_t mavlink_msg_vkfmu_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vkfmu_status_t* vkfmu_status)
|
|
static inline uint16_t mavlink_msg_vkfmu_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vkfmu_status_t* vkfmu_status)
|
|
{
|
|
{
|
|
- return mavlink_msg_vkfmu_status_pack(system_id, component_id, msg, vkfmu_status->time_boot_ms, vkfmu_status->rtl_reason, vkfmu_status->loiter_reason, vkfmu_status->s_flag3, vkfmu_status->ups_volt, vkfmu_status->adc_volt, vkfmu_status->flight_time, vkfmu_status->dist_to_tar);
|
|
|
|
|
|
+ return mavlink_msg_vkfmu_status_pack(system_id, component_id, msg, vkfmu_status->time_boot_ms, vkfmu_status->rtl_reason, vkfmu_status->loiter_reason, vkfmu_status->s_flag3, vkfmu_status->ups_volt, vkfmu_status->adc_volt, vkfmu_status->flight_time, vkfmu_status->dist_to_tar, vkfmu_status->servo_state);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -233,7 +245,7 @@ static inline uint16_t mavlink_msg_vkfmu_status_encode(uint8_t system_id, uint8_
|
|
*/
|
|
*/
|
|
static inline uint16_t mavlink_msg_vkfmu_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vkfmu_status_t* vkfmu_status)
|
|
static inline uint16_t mavlink_msg_vkfmu_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vkfmu_status_t* vkfmu_status)
|
|
{
|
|
{
|
|
- return mavlink_msg_vkfmu_status_pack_chan(system_id, component_id, chan, msg, vkfmu_status->time_boot_ms, vkfmu_status->rtl_reason, vkfmu_status->loiter_reason, vkfmu_status->s_flag3, vkfmu_status->ups_volt, vkfmu_status->adc_volt, vkfmu_status->flight_time, vkfmu_status->dist_to_tar);
|
|
|
|
|
|
+ return mavlink_msg_vkfmu_status_pack_chan(system_id, component_id, chan, msg, vkfmu_status->time_boot_ms, vkfmu_status->rtl_reason, vkfmu_status->loiter_reason, vkfmu_status->s_flag3, vkfmu_status->ups_volt, vkfmu_status->adc_volt, vkfmu_status->flight_time, vkfmu_status->dist_to_tar, vkfmu_status->servo_state);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -247,7 +259,7 @@ static inline uint16_t mavlink_msg_vkfmu_status_encode_chan(uint8_t system_id, u
|
|
*/
|
|
*/
|
|
static inline uint16_t mavlink_msg_vkfmu_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vkfmu_status_t* vkfmu_status)
|
|
static inline uint16_t mavlink_msg_vkfmu_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vkfmu_status_t* vkfmu_status)
|
|
{
|
|
{
|
|
- return mavlink_msg_vkfmu_status_pack_status(system_id, component_id, _status, msg, vkfmu_status->time_boot_ms, vkfmu_status->rtl_reason, vkfmu_status->loiter_reason, vkfmu_status->s_flag3, vkfmu_status->ups_volt, vkfmu_status->adc_volt, vkfmu_status->flight_time, vkfmu_status->dist_to_tar);
|
|
|
|
|
|
+ return mavlink_msg_vkfmu_status_pack_status(system_id, component_id, _status, msg, vkfmu_status->time_boot_ms, vkfmu_status->rtl_reason, vkfmu_status->loiter_reason, vkfmu_status->s_flag3, vkfmu_status->ups_volt, vkfmu_status->adc_volt, vkfmu_status->flight_time, vkfmu_status->dist_to_tar, vkfmu_status->servo_state);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -262,10 +274,11 @@ static inline uint16_t mavlink_msg_vkfmu_status_encode_status(uint8_t system_id,
|
|
* @param adc_volt adc voltage in 0.1V
|
|
* @param adc_volt adc voltage in 0.1V
|
|
* @param flight_time [s] flight time in seconds
|
|
* @param flight_time [s] flight time in seconds
|
|
* @param dist_to_tar [cm] distance to target position in cm
|
|
* @param dist_to_tar [cm] distance to target position in cm
|
|
|
|
+ * @param servo_state bitmap for servo state
|
|
*/
|
|
*/
|
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
|
|
|
|
|
-static inline void mavlink_msg_vkfmu_status_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t rtl_reason, uint8_t loiter_reason, uint8_t s_flag3, uint16_t ups_volt, uint16_t adc_volt, uint32_t flight_time, uint32_t dist_to_tar)
|
|
|
|
|
|
+static inline void mavlink_msg_vkfmu_status_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t rtl_reason, uint8_t loiter_reason, uint8_t s_flag3, uint16_t ups_volt, uint16_t adc_volt, uint32_t flight_time, uint32_t dist_to_tar, uint16_t servo_state)
|
|
{
|
|
{
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
char buf[MAVLINK_MSG_ID_VKFMU_STATUS_LEN];
|
|
char buf[MAVLINK_MSG_ID_VKFMU_STATUS_LEN];
|
|
@@ -274,9 +287,10 @@ static inline void mavlink_msg_vkfmu_status_send(mavlink_channel_t chan, uint32_
|
|
_mav_put_uint32_t(buf, 8, dist_to_tar);
|
|
_mav_put_uint32_t(buf, 8, dist_to_tar);
|
|
_mav_put_uint16_t(buf, 12, ups_volt);
|
|
_mav_put_uint16_t(buf, 12, ups_volt);
|
|
_mav_put_uint16_t(buf, 14, adc_volt);
|
|
_mav_put_uint16_t(buf, 14, adc_volt);
|
|
- _mav_put_uint8_t(buf, 16, rtl_reason);
|
|
|
|
- _mav_put_uint8_t(buf, 17, loiter_reason);
|
|
|
|
- _mav_put_uint8_t(buf, 18, s_flag3);
|
|
|
|
|
|
+ _mav_put_uint16_t(buf, 16, servo_state);
|
|
|
|
+ _mav_put_uint8_t(buf, 18, rtl_reason);
|
|
|
|
+ _mav_put_uint8_t(buf, 19, loiter_reason);
|
|
|
|
+ _mav_put_uint8_t(buf, 20, s_flag3);
|
|
|
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VKFMU_STATUS, buf, MAVLINK_MSG_ID_VKFMU_STATUS_MIN_LEN, MAVLINK_MSG_ID_VKFMU_STATUS_LEN, MAVLINK_MSG_ID_VKFMU_STATUS_CRC);
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VKFMU_STATUS, buf, MAVLINK_MSG_ID_VKFMU_STATUS_MIN_LEN, MAVLINK_MSG_ID_VKFMU_STATUS_LEN, MAVLINK_MSG_ID_VKFMU_STATUS_CRC);
|
|
#else
|
|
#else
|
|
@@ -286,6 +300,7 @@ static inline void mavlink_msg_vkfmu_status_send(mavlink_channel_t chan, uint32_
|
|
packet.dist_to_tar = dist_to_tar;
|
|
packet.dist_to_tar = dist_to_tar;
|
|
packet.ups_volt = ups_volt;
|
|
packet.ups_volt = ups_volt;
|
|
packet.adc_volt = adc_volt;
|
|
packet.adc_volt = adc_volt;
|
|
|
|
+ packet.servo_state = servo_state;
|
|
packet.rtl_reason = rtl_reason;
|
|
packet.rtl_reason = rtl_reason;
|
|
packet.loiter_reason = loiter_reason;
|
|
packet.loiter_reason = loiter_reason;
|
|
packet.s_flag3 = s_flag3;
|
|
packet.s_flag3 = s_flag3;
|
|
@@ -302,7 +317,7 @@ static inline void mavlink_msg_vkfmu_status_send(mavlink_channel_t chan, uint32_
|
|
static inline void mavlink_msg_vkfmu_status_send_struct(mavlink_channel_t chan, const mavlink_vkfmu_status_t* vkfmu_status)
|
|
static inline void mavlink_msg_vkfmu_status_send_struct(mavlink_channel_t chan, const mavlink_vkfmu_status_t* vkfmu_status)
|
|
{
|
|
{
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
- mavlink_msg_vkfmu_status_send(chan, vkfmu_status->time_boot_ms, vkfmu_status->rtl_reason, vkfmu_status->loiter_reason, vkfmu_status->s_flag3, vkfmu_status->ups_volt, vkfmu_status->adc_volt, vkfmu_status->flight_time, vkfmu_status->dist_to_tar);
|
|
|
|
|
|
+ mavlink_msg_vkfmu_status_send(chan, vkfmu_status->time_boot_ms, vkfmu_status->rtl_reason, vkfmu_status->loiter_reason, vkfmu_status->s_flag3, vkfmu_status->ups_volt, vkfmu_status->adc_volt, vkfmu_status->flight_time, vkfmu_status->dist_to_tar, vkfmu_status->servo_state);
|
|
#else
|
|
#else
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VKFMU_STATUS, (const char *)vkfmu_status, MAVLINK_MSG_ID_VKFMU_STATUS_MIN_LEN, MAVLINK_MSG_ID_VKFMU_STATUS_LEN, MAVLINK_MSG_ID_VKFMU_STATUS_CRC);
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VKFMU_STATUS, (const char *)vkfmu_status, MAVLINK_MSG_ID_VKFMU_STATUS_MIN_LEN, MAVLINK_MSG_ID_VKFMU_STATUS_LEN, MAVLINK_MSG_ID_VKFMU_STATUS_CRC);
|
|
#endif
|
|
#endif
|
|
@@ -316,7 +331,7 @@ static inline void mavlink_msg_vkfmu_status_send_struct(mavlink_channel_t chan,
|
|
is usually the receive buffer for the channel, and allows a reply to an
|
|
is usually the receive buffer for the channel, and allows a reply to an
|
|
incoming message with minimum stack space usage.
|
|
incoming message with minimum stack space usage.
|
|
*/
|
|
*/
|
|
-static inline void mavlink_msg_vkfmu_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t rtl_reason, uint8_t loiter_reason, uint8_t s_flag3, uint16_t ups_volt, uint16_t adc_volt, uint32_t flight_time, uint32_t dist_to_tar)
|
|
|
|
|
|
+static inline void mavlink_msg_vkfmu_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t rtl_reason, uint8_t loiter_reason, uint8_t s_flag3, uint16_t ups_volt, uint16_t adc_volt, uint32_t flight_time, uint32_t dist_to_tar, uint16_t servo_state)
|
|
{
|
|
{
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
char *buf = (char *)msgbuf;
|
|
char *buf = (char *)msgbuf;
|
|
@@ -325,9 +340,10 @@ static inline void mavlink_msg_vkfmu_status_send_buf(mavlink_message_t *msgbuf,
|
|
_mav_put_uint32_t(buf, 8, dist_to_tar);
|
|
_mav_put_uint32_t(buf, 8, dist_to_tar);
|
|
_mav_put_uint16_t(buf, 12, ups_volt);
|
|
_mav_put_uint16_t(buf, 12, ups_volt);
|
|
_mav_put_uint16_t(buf, 14, adc_volt);
|
|
_mav_put_uint16_t(buf, 14, adc_volt);
|
|
- _mav_put_uint8_t(buf, 16, rtl_reason);
|
|
|
|
- _mav_put_uint8_t(buf, 17, loiter_reason);
|
|
|
|
- _mav_put_uint8_t(buf, 18, s_flag3);
|
|
|
|
|
|
+ _mav_put_uint16_t(buf, 16, servo_state);
|
|
|
|
+ _mav_put_uint8_t(buf, 18, rtl_reason);
|
|
|
|
+ _mav_put_uint8_t(buf, 19, loiter_reason);
|
|
|
|
+ _mav_put_uint8_t(buf, 20, s_flag3);
|
|
|
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VKFMU_STATUS, buf, MAVLINK_MSG_ID_VKFMU_STATUS_MIN_LEN, MAVLINK_MSG_ID_VKFMU_STATUS_LEN, MAVLINK_MSG_ID_VKFMU_STATUS_CRC);
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VKFMU_STATUS, buf, MAVLINK_MSG_ID_VKFMU_STATUS_MIN_LEN, MAVLINK_MSG_ID_VKFMU_STATUS_LEN, MAVLINK_MSG_ID_VKFMU_STATUS_CRC);
|
|
#else
|
|
#else
|
|
@@ -337,6 +353,7 @@ static inline void mavlink_msg_vkfmu_status_send_buf(mavlink_message_t *msgbuf,
|
|
packet->dist_to_tar = dist_to_tar;
|
|
packet->dist_to_tar = dist_to_tar;
|
|
packet->ups_volt = ups_volt;
|
|
packet->ups_volt = ups_volt;
|
|
packet->adc_volt = adc_volt;
|
|
packet->adc_volt = adc_volt;
|
|
|
|
+ packet->servo_state = servo_state;
|
|
packet->rtl_reason = rtl_reason;
|
|
packet->rtl_reason = rtl_reason;
|
|
packet->loiter_reason = loiter_reason;
|
|
packet->loiter_reason = loiter_reason;
|
|
packet->s_flag3 = s_flag3;
|
|
packet->s_flag3 = s_flag3;
|
|
@@ -368,7 +385,7 @@ static inline uint32_t mavlink_msg_vkfmu_status_get_time_boot_ms(const mavlink_m
|
|
*/
|
|
*/
|
|
static inline uint8_t mavlink_msg_vkfmu_status_get_rtl_reason(const mavlink_message_t* msg)
|
|
static inline uint8_t mavlink_msg_vkfmu_status_get_rtl_reason(const mavlink_message_t* msg)
|
|
{
|
|
{
|
|
- return _MAV_RETURN_uint8_t(msg, 16);
|
|
|
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 18);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -378,7 +395,7 @@ static inline uint8_t mavlink_msg_vkfmu_status_get_rtl_reason(const mavlink_mess
|
|
*/
|
|
*/
|
|
static inline uint8_t mavlink_msg_vkfmu_status_get_loiter_reason(const mavlink_message_t* msg)
|
|
static inline uint8_t mavlink_msg_vkfmu_status_get_loiter_reason(const mavlink_message_t* msg)
|
|
{
|
|
{
|
|
- return _MAV_RETURN_uint8_t(msg, 17);
|
|
|
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 19);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -388,7 +405,7 @@ static inline uint8_t mavlink_msg_vkfmu_status_get_loiter_reason(const mavlink_m
|
|
*/
|
|
*/
|
|
static inline uint8_t mavlink_msg_vkfmu_status_get_s_flag3(const mavlink_message_t* msg)
|
|
static inline uint8_t mavlink_msg_vkfmu_status_get_s_flag3(const mavlink_message_t* msg)
|
|
{
|
|
{
|
|
- return _MAV_RETURN_uint8_t(msg, 18);
|
|
|
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 20);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -431,6 +448,16 @@ static inline uint32_t mavlink_msg_vkfmu_status_get_dist_to_tar(const mavlink_me
|
|
return _MAV_RETURN_uint32_t(msg, 8);
|
|
return _MAV_RETURN_uint32_t(msg, 8);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * @brief Get field servo_state from vkfmu_status message
|
|
|
|
+ *
|
|
|
|
+ * @return bitmap for servo state
|
|
|
|
+ */
|
|
|
|
+static inline uint16_t mavlink_msg_vkfmu_status_get_servo_state(const mavlink_message_t* msg)
|
|
|
|
+{
|
|
|
|
+ return _MAV_RETURN_uint16_t(msg, 16);
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @brief Decode a vkfmu_status message into a struct
|
|
* @brief Decode a vkfmu_status message into a struct
|
|
*
|
|
*
|
|
@@ -445,6 +472,7 @@ static inline void mavlink_msg_vkfmu_status_decode(const mavlink_message_t* msg,
|
|
vkfmu_status->dist_to_tar = mavlink_msg_vkfmu_status_get_dist_to_tar(msg);
|
|
vkfmu_status->dist_to_tar = mavlink_msg_vkfmu_status_get_dist_to_tar(msg);
|
|
vkfmu_status->ups_volt = mavlink_msg_vkfmu_status_get_ups_volt(msg);
|
|
vkfmu_status->ups_volt = mavlink_msg_vkfmu_status_get_ups_volt(msg);
|
|
vkfmu_status->adc_volt = mavlink_msg_vkfmu_status_get_adc_volt(msg);
|
|
vkfmu_status->adc_volt = mavlink_msg_vkfmu_status_get_adc_volt(msg);
|
|
|
|
+ vkfmu_status->servo_state = mavlink_msg_vkfmu_status_get_servo_state(msg);
|
|
vkfmu_status->rtl_reason = mavlink_msg_vkfmu_status_get_rtl_reason(msg);
|
|
vkfmu_status->rtl_reason = mavlink_msg_vkfmu_status_get_rtl_reason(msg);
|
|
vkfmu_status->loiter_reason = mavlink_msg_vkfmu_status_get_loiter_reason(msg);
|
|
vkfmu_status->loiter_reason = mavlink_msg_vkfmu_status_get_loiter_reason(msg);
|
|
vkfmu_status->s_flag3 = mavlink_msg_vkfmu_status_get_s_flag3(msg);
|
|
vkfmu_status->s_flag3 = mavlink_msg_vkfmu_status_get_s_flag3(msg);
|