|
|
@@ -3,7 +3,7 @@
|
|
|
|
|
|
#define MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS 53008
|
|
|
|
|
|
-
|
|
|
+MAVPACKED(
|
|
|
typedef struct __mavlink_vk_digi_esc_status_t {
|
|
|
uint32_t timestamp; /*< [ms] Timestamp from system boot.*/
|
|
|
int32_t rpm[4]; /*< [rpm] Reported motor RPM from each ESC (negative for
|
|
|
@@ -14,11 +14,14 @@ typedef struct __mavlink_vk_digi_esc_status_t {
|
|
|
int16_t temperature[4]; /*< [degC] Temperature measured from each ESC.*/
|
|
|
uint8_t index; /*< Index of the first ESC in this message.
|
|
|
minValue = 0, maxValue = 60, increment = 4.*/
|
|
|
-} mavlink_vk_digi_esc_status_t;
|
|
|
+ int16_t motor_temp[4]; /*< [degC] Motro temperature from each ESC.*/
|
|
|
+ int16_t cap_temp[4]; /*< [degC] Capacity temperature from each ESC.*/
|
|
|
+ uint32_t status2[4]; /*< Status2 data from each ESC.*/
|
|
|
+}) mavlink_vk_digi_esc_status_t;
|
|
|
|
|
|
-#define MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN 77
|
|
|
+#define MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN 109
|
|
|
#define MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_MIN_LEN 77
|
|
|
-#define MAVLINK_MSG_ID_53008_LEN 77
|
|
|
+#define MAVLINK_MSG_ID_53008_LEN 109
|
|
|
#define MAVLINK_MSG_ID_53008_MIN_LEN 77
|
|
|
|
|
|
#define MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_CRC 110
|
|
|
@@ -29,12 +32,15 @@ typedef struct __mavlink_vk_digi_esc_status_t {
|
|
|
#define MAVLINK_MSG_VK_DIGI_ESC_STATUS_FIELD_CURRENT_LEN 4
|
|
|
#define MAVLINK_MSG_VK_DIGI_ESC_STATUS_FIELD_STATUS_LEN 4
|
|
|
#define MAVLINK_MSG_VK_DIGI_ESC_STATUS_FIELD_TEMPERATURE_LEN 4
|
|
|
+#define MAVLINK_MSG_VK_DIGI_ESC_STATUS_FIELD_MOTOR_TEMP_LEN 4
|
|
|
+#define MAVLINK_MSG_VK_DIGI_ESC_STATUS_FIELD_CAP_TEMP_LEN 4
|
|
|
+#define MAVLINK_MSG_VK_DIGI_ESC_STATUS_FIELD_STATUS2_LEN 4
|
|
|
|
|
|
#if MAVLINK_COMMAND_24BIT
|
|
|
#define MAVLINK_MESSAGE_INFO_VK_DIGI_ESC_STATUS { \
|
|
|
53008, \
|
|
|
"VK_DIGI_ESC_STATUS", \
|
|
|
- 7, \
|
|
|
+ 10, \
|
|
|
{ { "index", NULL, MAVLINK_TYPE_UINT8_T, 0, 76, offsetof(mavlink_vk_digi_esc_status_t, index) }, \
|
|
|
{ "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_digi_esc_status_t, timestamp) }, \
|
|
|
{ "rpm", NULL, MAVLINK_TYPE_INT32_T, 4, 4, offsetof(mavlink_vk_digi_esc_status_t, rpm) }, \
|
|
|
@@ -42,12 +48,15 @@ typedef struct __mavlink_vk_digi_esc_status_t {
|
|
|
{ "current", NULL, MAVLINK_TYPE_FLOAT, 4, 36, offsetof(mavlink_vk_digi_esc_status_t, current) }, \
|
|
|
{ "temperature", NULL, MAVLINK_TYPE_INT16_T, 4, 68, offsetof(mavlink_vk_digi_esc_status_t, temperature) }, \
|
|
|
{ "status", NULL, MAVLINK_TYPE_UINT32_T, 4, 52, offsetof(mavlink_vk_digi_esc_status_t, status) }, \
|
|
|
+ { "motor_temp", NULL, MAVLINK_TYPE_INT16_T, 4, 77, offsetof(mavlink_vk_digi_esc_status_t, motor_temp) }, \
|
|
|
+ { "cap_temp", NULL, MAVLINK_TYPE_INT16_T, 4, 85, offsetof(mavlink_vk_digi_esc_status_t, cap_temp) }, \
|
|
|
+ { "status2", NULL, MAVLINK_TYPE_UINT32_T, 4, 93, offsetof(mavlink_vk_digi_esc_status_t, status2) }, \
|
|
|
} \
|
|
|
}
|
|
|
#else
|
|
|
#define MAVLINK_MESSAGE_INFO_VK_DIGI_ESC_STATUS { \
|
|
|
"VK_DIGI_ESC_STATUS", \
|
|
|
- 7, \
|
|
|
+ 10, \
|
|
|
{ { "index", NULL, MAVLINK_TYPE_UINT8_T, 0, 76, offsetof(mavlink_vk_digi_esc_status_t, index) }, \
|
|
|
{ "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_digi_esc_status_t, timestamp) }, \
|
|
|
{ "rpm", NULL, MAVLINK_TYPE_INT32_T, 4, 4, offsetof(mavlink_vk_digi_esc_status_t, rpm) }, \
|
|
|
@@ -55,6 +64,9 @@ typedef struct __mavlink_vk_digi_esc_status_t {
|
|
|
{ "current", NULL, MAVLINK_TYPE_FLOAT, 4, 36, offsetof(mavlink_vk_digi_esc_status_t, current) }, \
|
|
|
{ "temperature", NULL, MAVLINK_TYPE_INT16_T, 4, 68, offsetof(mavlink_vk_digi_esc_status_t, temperature) }, \
|
|
|
{ "status", NULL, MAVLINK_TYPE_UINT32_T, 4, 52, offsetof(mavlink_vk_digi_esc_status_t, status) }, \
|
|
|
+ { "motor_temp", NULL, MAVLINK_TYPE_INT16_T, 4, 77, offsetof(mavlink_vk_digi_esc_status_t, motor_temp) }, \
|
|
|
+ { "cap_temp", NULL, MAVLINK_TYPE_INT16_T, 4, 85, offsetof(mavlink_vk_digi_esc_status_t, cap_temp) }, \
|
|
|
+ { "status2", NULL, MAVLINK_TYPE_UINT32_T, 4, 93, offsetof(mavlink_vk_digi_esc_status_t, status2) }, \
|
|
|
} \
|
|
|
}
|
|
|
#endif
|
|
|
@@ -74,10 +86,13 @@ typedef struct __mavlink_vk_digi_esc_status_t {
|
|
|
* @param current [A] Current measured from each ESC.
|
|
|
* @param temperature [degC] Temperature measured from each ESC.
|
|
|
* @param status Status data from each ESC.
|
|
|
+ * @param motor_temp [degC] Motro temperature from each ESC.
|
|
|
+ * @param cap_temp [degC] Capacity temperature from each ESC.
|
|
|
+ * @param status2 Status2 data from each ESC.
|
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_vk_digi_esc_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
|
|
- uint8_t index, uint32_t timestamp, const int32_t *rpm, const float *voltage, const float *current, const int16_t *temperature, const uint32_t *status)
|
|
|
+ uint8_t index, uint32_t timestamp, const int32_t *rpm, const float *voltage, const float *current, const int16_t *temperature, const uint32_t *status, const int16_t *motor_temp, const int16_t *cap_temp, const uint32_t *status2)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char buf[MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN];
|
|
|
@@ -88,6 +103,9 @@ static inline uint16_t mavlink_msg_vk_digi_esc_status_pack(uint8_t system_id, ui
|
|
|
_mav_put_float_array(buf, 36, current, 4);
|
|
|
_mav_put_uint32_t_array(buf, 52, status, 4);
|
|
|
_mav_put_int16_t_array(buf, 68, temperature, 4);
|
|
|
+ _mav_put_int16_t_array(buf, 77, motor_temp, 4);
|
|
|
+ _mav_put_int16_t_array(buf, 85, cap_temp, 4);
|
|
|
+ _mav_put_uint32_t_array(buf, 93, status2, 4);
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN);
|
|
|
#else
|
|
|
mavlink_vk_digi_esc_status_t packet;
|
|
|
@@ -98,6 +116,9 @@ static inline uint16_t mavlink_msg_vk_digi_esc_status_pack(uint8_t system_id, ui
|
|
|
mav_array_memcpy(packet.current, current, sizeof(float)*4);
|
|
|
mav_array_memcpy(packet.status, status, sizeof(uint32_t)*4);
|
|
|
mav_array_memcpy(packet.temperature, temperature, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet.motor_temp, motor_temp, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet.cap_temp, cap_temp, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet.status2, status2, sizeof(uint32_t)*4);
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN);
|
|
|
#endif
|
|
|
|
|
|
@@ -121,10 +142,13 @@ static inline uint16_t mavlink_msg_vk_digi_esc_status_pack(uint8_t system_id, ui
|
|
|
* @param current [A] Current measured from each ESC.
|
|
|
* @param temperature [degC] Temperature measured from each ESC.
|
|
|
* @param status Status data from each ESC.
|
|
|
+ * @param motor_temp [degC] Motro temperature from each ESC.
|
|
|
+ * @param cap_temp [degC] Capacity temperature from each ESC.
|
|
|
+ * @param status2 Status2 data from each ESC.
|
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_vk_digi_esc_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
|
|
- uint8_t index, uint32_t timestamp, const int32_t *rpm, const float *voltage, const float *current, const int16_t *temperature, const uint32_t *status)
|
|
|
+ uint8_t index, uint32_t timestamp, const int32_t *rpm, const float *voltage, const float *current, const int16_t *temperature, const uint32_t *status, const int16_t *motor_temp, const int16_t *cap_temp, const uint32_t *status2)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char buf[MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN];
|
|
|
@@ -135,6 +159,9 @@ static inline uint16_t mavlink_msg_vk_digi_esc_status_pack_status(uint8_t system
|
|
|
_mav_put_float_array(buf, 36, current, 4);
|
|
|
_mav_put_uint32_t_array(buf, 52, status, 4);
|
|
|
_mav_put_int16_t_array(buf, 68, temperature, 4);
|
|
|
+ _mav_put_int16_t_array(buf, 77, motor_temp, 4);
|
|
|
+ _mav_put_int16_t_array(buf, 85, cap_temp, 4);
|
|
|
+ _mav_put_uint32_t_array(buf, 93, status2, 4);
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN);
|
|
|
#else
|
|
|
mavlink_vk_digi_esc_status_t packet;
|
|
|
@@ -145,6 +172,9 @@ static inline uint16_t mavlink_msg_vk_digi_esc_status_pack_status(uint8_t system
|
|
|
mav_array_memcpy(packet.current, current, sizeof(float)*4);
|
|
|
mav_array_memcpy(packet.status, status, sizeof(uint32_t)*4);
|
|
|
mav_array_memcpy(packet.temperature, temperature, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet.motor_temp, motor_temp, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet.cap_temp, cap_temp, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet.status2, status2, sizeof(uint32_t)*4);
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN);
|
|
|
#endif
|
|
|
|
|
|
@@ -171,11 +201,14 @@ static inline uint16_t mavlink_msg_vk_digi_esc_status_pack_status(uint8_t system
|
|
|
* @param current [A] Current measured from each ESC.
|
|
|
* @param temperature [degC] Temperature measured from each ESC.
|
|
|
* @param status Status data from each ESC.
|
|
|
+ * @param motor_temp [degC] Motro temperature from each ESC.
|
|
|
+ * @param cap_temp [degC] Capacity temperature from each ESC.
|
|
|
+ * @param status2 Status2 data from each ESC.
|
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_vk_digi_esc_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
|
|
mavlink_message_t* msg,
|
|
|
- uint8_t index,uint32_t timestamp,const int32_t *rpm,const float *voltage,const float *current,const int16_t *temperature,const uint32_t *status)
|
|
|
+ uint8_t index,uint32_t timestamp,const int32_t *rpm,const float *voltage,const float *current,const int16_t *temperature,const uint32_t *status,const int16_t *motor_temp,const int16_t *cap_temp,const uint32_t *status2)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char buf[MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN];
|
|
|
@@ -186,6 +219,9 @@ static inline uint16_t mavlink_msg_vk_digi_esc_status_pack_chan(uint8_t system_i
|
|
|
_mav_put_float_array(buf, 36, current, 4);
|
|
|
_mav_put_uint32_t_array(buf, 52, status, 4);
|
|
|
_mav_put_int16_t_array(buf, 68, temperature, 4);
|
|
|
+ _mav_put_int16_t_array(buf, 77, motor_temp, 4);
|
|
|
+ _mav_put_int16_t_array(buf, 85, cap_temp, 4);
|
|
|
+ _mav_put_uint32_t_array(buf, 93, status2, 4);
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN);
|
|
|
#else
|
|
|
mavlink_vk_digi_esc_status_t packet;
|
|
|
@@ -196,6 +232,9 @@ static inline uint16_t mavlink_msg_vk_digi_esc_status_pack_chan(uint8_t system_i
|
|
|
mav_array_memcpy(packet.current, current, sizeof(float)*4);
|
|
|
mav_array_memcpy(packet.status, status, sizeof(uint32_t)*4);
|
|
|
mav_array_memcpy(packet.temperature, temperature, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet.motor_temp, motor_temp, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet.cap_temp, cap_temp, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet.status2, status2, sizeof(uint32_t)*4);
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN);
|
|
|
#endif
|
|
|
|
|
|
@@ -213,7 +252,7 @@ static inline uint16_t mavlink_msg_vk_digi_esc_status_pack_chan(uint8_t system_i
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_vk_digi_esc_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vk_digi_esc_status_t* vk_digi_esc_status)
|
|
|
{
|
|
|
- return mavlink_msg_vk_digi_esc_status_pack(system_id, component_id, msg, vk_digi_esc_status->index, vk_digi_esc_status->timestamp, vk_digi_esc_status->rpm, vk_digi_esc_status->voltage, vk_digi_esc_status->current, vk_digi_esc_status->temperature, vk_digi_esc_status->status);
|
|
|
+ return mavlink_msg_vk_digi_esc_status_pack(system_id, component_id, msg, vk_digi_esc_status->index, vk_digi_esc_status->timestamp, vk_digi_esc_status->rpm, vk_digi_esc_status->voltage, vk_digi_esc_status->current, vk_digi_esc_status->temperature, vk_digi_esc_status->status, vk_digi_esc_status->motor_temp, vk_digi_esc_status->cap_temp, vk_digi_esc_status->status2);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -227,7 +266,7 @@ static inline uint16_t mavlink_msg_vk_digi_esc_status_encode(uint8_t system_id,
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_vk_digi_esc_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vk_digi_esc_status_t* vk_digi_esc_status)
|
|
|
{
|
|
|
- return mavlink_msg_vk_digi_esc_status_pack_chan(system_id, component_id, chan, msg, vk_digi_esc_status->index, vk_digi_esc_status->timestamp, vk_digi_esc_status->rpm, vk_digi_esc_status->voltage, vk_digi_esc_status->current, vk_digi_esc_status->temperature, vk_digi_esc_status->status);
|
|
|
+ return mavlink_msg_vk_digi_esc_status_pack_chan(system_id, component_id, chan, msg, vk_digi_esc_status->index, vk_digi_esc_status->timestamp, vk_digi_esc_status->rpm, vk_digi_esc_status->voltage, vk_digi_esc_status->current, vk_digi_esc_status->temperature, vk_digi_esc_status->status, vk_digi_esc_status->motor_temp, vk_digi_esc_status->cap_temp, vk_digi_esc_status->status2);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -241,7 +280,7 @@ static inline uint16_t mavlink_msg_vk_digi_esc_status_encode_chan(uint8_t system
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_vk_digi_esc_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vk_digi_esc_status_t* vk_digi_esc_status)
|
|
|
{
|
|
|
- return mavlink_msg_vk_digi_esc_status_pack_status(system_id, component_id, _status, msg, vk_digi_esc_status->index, vk_digi_esc_status->timestamp, vk_digi_esc_status->rpm, vk_digi_esc_status->voltage, vk_digi_esc_status->current, vk_digi_esc_status->temperature, vk_digi_esc_status->status);
|
|
|
+ return mavlink_msg_vk_digi_esc_status_pack_status(system_id, component_id, _status, msg, vk_digi_esc_status->index, vk_digi_esc_status->timestamp, vk_digi_esc_status->rpm, vk_digi_esc_status->voltage, vk_digi_esc_status->current, vk_digi_esc_status->temperature, vk_digi_esc_status->status, vk_digi_esc_status->motor_temp, vk_digi_esc_status->cap_temp, vk_digi_esc_status->status2);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -257,10 +296,13 @@ static inline uint16_t mavlink_msg_vk_digi_esc_status_encode_status(uint8_t syst
|
|
|
* @param current [A] Current measured from each ESC.
|
|
|
* @param temperature [degC] Temperature measured from each ESC.
|
|
|
* @param status Status data from each ESC.
|
|
|
+ * @param motor_temp [degC] Motro temperature from each ESC.
|
|
|
+ * @param cap_temp [degC] Capacity temperature from each ESC.
|
|
|
+ * @param status2 Status2 data from each ESC.
|
|
|
*/
|
|
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
|
|
|
|
|
-static inline void mavlink_msg_vk_digi_esc_status_send(mavlink_channel_t chan, uint8_t index, uint32_t timestamp, const int32_t *rpm, const float *voltage, const float *current, const int16_t *temperature, const uint32_t *status)
|
|
|
+static inline void mavlink_msg_vk_digi_esc_status_send(mavlink_channel_t chan, uint8_t index, uint32_t timestamp, const int32_t *rpm, const float *voltage, const float *current, const int16_t *temperature, const uint32_t *status, const int16_t *motor_temp, const int16_t *cap_temp, const uint32_t *status2)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char buf[MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN];
|
|
|
@@ -271,6 +313,9 @@ static inline void mavlink_msg_vk_digi_esc_status_send(mavlink_channel_t chan, u
|
|
|
_mav_put_float_array(buf, 36, current, 4);
|
|
|
_mav_put_uint32_t_array(buf, 52, status, 4);
|
|
|
_mav_put_int16_t_array(buf, 68, temperature, 4);
|
|
|
+ _mav_put_int16_t_array(buf, 77, motor_temp, 4);
|
|
|
+ _mav_put_int16_t_array(buf, 85, cap_temp, 4);
|
|
|
+ _mav_put_uint32_t_array(buf, 93, status2, 4);
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS, buf, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_CRC);
|
|
|
#else
|
|
|
mavlink_vk_digi_esc_status_t packet;
|
|
|
@@ -281,6 +326,9 @@ static inline void mavlink_msg_vk_digi_esc_status_send(mavlink_channel_t chan, u
|
|
|
mav_array_memcpy(packet.current, current, sizeof(float)*4);
|
|
|
mav_array_memcpy(packet.status, status, sizeof(uint32_t)*4);
|
|
|
mav_array_memcpy(packet.temperature, temperature, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet.motor_temp, motor_temp, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet.cap_temp, cap_temp, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet.status2, status2, sizeof(uint32_t)*4);
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS, (const char *)&packet, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_CRC);
|
|
|
#endif
|
|
|
}
|
|
|
@@ -293,7 +341,7 @@ static inline void mavlink_msg_vk_digi_esc_status_send(mavlink_channel_t chan, u
|
|
|
static inline void mavlink_msg_vk_digi_esc_status_send_struct(mavlink_channel_t chan, const mavlink_vk_digi_esc_status_t* vk_digi_esc_status)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
- mavlink_msg_vk_digi_esc_status_send(chan, vk_digi_esc_status->index, vk_digi_esc_status->timestamp, vk_digi_esc_status->rpm, vk_digi_esc_status->voltage, vk_digi_esc_status->current, vk_digi_esc_status->temperature, vk_digi_esc_status->status);
|
|
|
+ mavlink_msg_vk_digi_esc_status_send(chan, vk_digi_esc_status->index, vk_digi_esc_status->timestamp, vk_digi_esc_status->rpm, vk_digi_esc_status->voltage, vk_digi_esc_status->current, vk_digi_esc_status->temperature, vk_digi_esc_status->status, vk_digi_esc_status->motor_temp, vk_digi_esc_status->cap_temp, vk_digi_esc_status->status2);
|
|
|
#else
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS, (const char *)vk_digi_esc_status, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_CRC);
|
|
|
#endif
|
|
|
@@ -307,7 +355,7 @@ static inline void mavlink_msg_vk_digi_esc_status_send_struct(mavlink_channel_t
|
|
|
is usually the receive buffer for the channel, and allows a reply to an
|
|
|
incoming message with minimum stack space usage.
|
|
|
*/
|
|
|
-static inline void mavlink_msg_vk_digi_esc_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t index, uint32_t timestamp, const int32_t *rpm, const float *voltage, const float *current, const int16_t *temperature, const uint32_t *status)
|
|
|
+static inline void mavlink_msg_vk_digi_esc_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t index, uint32_t timestamp, const int32_t *rpm, const float *voltage, const float *current, const int16_t *temperature, const uint32_t *status, const int16_t *motor_temp, const int16_t *cap_temp, const uint32_t *status2)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char *buf = (char *)msgbuf;
|
|
|
@@ -318,6 +366,9 @@ static inline void mavlink_msg_vk_digi_esc_status_send_buf(mavlink_message_t *ms
|
|
|
_mav_put_float_array(buf, 36, current, 4);
|
|
|
_mav_put_uint32_t_array(buf, 52, status, 4);
|
|
|
_mav_put_int16_t_array(buf, 68, temperature, 4);
|
|
|
+ _mav_put_int16_t_array(buf, 77, motor_temp, 4);
|
|
|
+ _mav_put_int16_t_array(buf, 85, cap_temp, 4);
|
|
|
+ _mav_put_uint32_t_array(buf, 93, status2, 4);
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS, buf, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_CRC);
|
|
|
#else
|
|
|
mavlink_vk_digi_esc_status_t *packet = (mavlink_vk_digi_esc_status_t *)msgbuf;
|
|
|
@@ -328,6 +379,9 @@ static inline void mavlink_msg_vk_digi_esc_status_send_buf(mavlink_message_t *ms
|
|
|
mav_array_memcpy(packet->current, current, sizeof(float)*4);
|
|
|
mav_array_memcpy(packet->status, status, sizeof(uint32_t)*4);
|
|
|
mav_array_memcpy(packet->temperature, temperature, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet->motor_temp, motor_temp, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet->cap_temp, cap_temp, sizeof(int16_t)*4);
|
|
|
+ mav_array_memcpy(packet->status2, status2, sizeof(uint32_t)*4);
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS, (const char *)packet, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_CRC);
|
|
|
#endif
|
|
|
}
|
|
|
@@ -410,6 +464,36 @@ static inline uint16_t mavlink_msg_vk_digi_esc_status_get_status(const mavlink_m
|
|
|
return _MAV_RETURN_uint32_t_array(msg, status, 4, 52);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * @brief Get field motor_temp from vk_digi_esc_status message
|
|
|
+ *
|
|
|
+ * @return [degC] Motro temperature from each ESC.
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_digi_esc_status_get_motor_temp(const mavlink_message_t* msg, int16_t *motor_temp)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int16_t_array(msg, motor_temp, 4, 77);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field cap_temp from vk_digi_esc_status message
|
|
|
+ *
|
|
|
+ * @return [degC] Capacity temperature from each ESC.
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_digi_esc_status_get_cap_temp(const mavlink_message_t* msg, int16_t *cap_temp)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int16_t_array(msg, cap_temp, 4, 85);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field status2 from vk_digi_esc_status message
|
|
|
+ *
|
|
|
+ * @return Status2 data from each ESC.
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_digi_esc_status_get_status2(const mavlink_message_t* msg, uint32_t *status2)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint32_t_array(msg, status2, 4, 93);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* @brief Decode a vk_digi_esc_status message into a struct
|
|
|
*
|
|
|
@@ -426,6 +510,9 @@ static inline void mavlink_msg_vk_digi_esc_status_decode(const mavlink_message_t
|
|
|
mavlink_msg_vk_digi_esc_status_get_status(msg, vk_digi_esc_status->status);
|
|
|
mavlink_msg_vk_digi_esc_status_get_temperature(msg, vk_digi_esc_status->temperature);
|
|
|
vk_digi_esc_status->index = mavlink_msg_vk_digi_esc_status_get_index(msg);
|
|
|
+ mavlink_msg_vk_digi_esc_status_get_motor_temp(msg, vk_digi_esc_status->motor_temp);
|
|
|
+ mavlink_msg_vk_digi_esc_status_get_cap_temp(msg, vk_digi_esc_status->cap_temp);
|
|
|
+ mavlink_msg_vk_digi_esc_status_get_status2(msg, vk_digi_esc_status->status2);
|
|
|
#else
|
|
|
uint8_t len = msg->len < MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN? msg->len : MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN;
|
|
|
memset(vk_digi_esc_status, 0, MAVLINK_MSG_ID_VK_DIGI_ESC_STATUS_LEN);
|