Browse Source

修改 VK_BMS_STATUS 消息电流为 int32 类型

Liu Yang 1 day ago
parent
commit
21dd03bf1a

+ 2 - 2
msg_definitions/VKFly.xml

@@ -990,7 +990,7 @@
       <description> battery bms status message </description>
       <field type="uint32_t" name="time_boot_ms" units="ms">Timestamp in ms from system boot.</field>
       <field type="uint32_t" name="voltage" units="mV">BMS voltage in mV</field>
-      <field type="int16_t" name="current" units="cA">BMS current in cA, negative value means in
+      <field type="int32_t" name="current" units="cA">BMS current in cA, negative value means in
         charging</field>
       <field type="int16_t" name="temperature" units="degC">BMS temperature in degC</field>
       <field type="int8_t" name="cap_percent" units="%">BMS remaining power in percentage</field>
@@ -1355,4 +1355,4 @@
 
   </messages>
 
-</mavlink>
+</mavlink>

File diff suppressed because it is too large
+ 1 - 1
v2.0/VKFly/VKFly.h


+ 1 - 1
v2.0/VKFly/mavlink.h

@@ -6,7 +6,7 @@
 #ifndef MAVLINK_H
 #define MAVLINK_H
 
-#define MAVLINK_PRIMARY_XML_HASH 3639273076366165217
+#define MAVLINK_PRIMARY_XML_HASH 4605072722455157095
 
 #ifndef MAVLINK_STX
 #define MAVLINK_STX 253

+ 92 - 92
v2.0/VKFly/mavlink_msg_vk_bms_status.h

@@ -7,10 +7,10 @@
 typedef struct __mavlink_vk_bms_status_t {
  uint32_t time_boot_ms; /*< [ms] Timestamp in ms from system boot.*/
  uint32_t voltage; /*< [mV] BMS voltage in mV*/
+ int32_t current; /*< [cA] BMS current in cA, negative value means in
+        charging*/
  uint32_t err_code; /*<  BMS error code,
         0 means no error*/
- int16_t current; /*< [cA] BMS current in cA, negative value means in
-        charging*/
  int16_t temperature; /*< [degC] BMS temperature in degC*/
  uint16_t cell_num; /*<  BMS cell numbers*/
  uint16_t cell_volt[30]; /*< [mV] BMS cell voltage in mV*/
@@ -22,13 +22,13 @@ typedef struct __mavlink_vk_bms_status_t {
         percentage*/
 } mavlink_vk_bms_status_t;
 
-#define MAVLINK_MSG_ID_VK_BMS_STATUS_LEN 83
-#define MAVLINK_MSG_ID_VK_BMS_STATUS_MIN_LEN 83
-#define MAVLINK_MSG_ID_53003_LEN 83
-#define MAVLINK_MSG_ID_53003_MIN_LEN 83
+#define MAVLINK_MSG_ID_VK_BMS_STATUS_LEN 85
+#define MAVLINK_MSG_ID_VK_BMS_STATUS_MIN_LEN 85
+#define MAVLINK_MSG_ID_53003_LEN 85
+#define MAVLINK_MSG_ID_53003_MIN_LEN 85
 
-#define MAVLINK_MSG_ID_VK_BMS_STATUS_CRC 200
-#define MAVLINK_MSG_ID_53003_CRC 200
+#define MAVLINK_MSG_ID_VK_BMS_STATUS_CRC 155
+#define MAVLINK_MSG_ID_53003_CRC 155
 
 #define MAVLINK_MSG_VK_BMS_STATUS_FIELD_CELL_VOLT_LEN 30
 
@@ -39,15 +39,15 @@ typedef struct __mavlink_vk_bms_status_t {
     11, \
     {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_bms_status_t, time_boot_ms) }, \
          { "voltage", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_vk_bms_status_t, voltage) }, \
-         { "current", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_vk_bms_status_t, current) }, \
-         { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_vk_bms_status_t, temperature) }, \
-         { "cap_percent", NULL, MAVLINK_TYPE_INT8_T, 0, 80, offsetof(mavlink_vk_bms_status_t, cap_percent) }, \
-         { "bat_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 81, offsetof(mavlink_vk_bms_status_t, bat_id) }, \
-         { "err_code", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_vk_bms_status_t, err_code) }, \
-         { "cell_num", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_vk_bms_status_t, cell_num) }, \
-         { "cell_volt", NULL, MAVLINK_TYPE_UINT16_T, 30, 18, offsetof(mavlink_vk_bms_status_t, cell_volt) }, \
-         { "cyc_cnt", NULL, MAVLINK_TYPE_UINT16_T, 0, 78, offsetof(mavlink_vk_bms_status_t, cyc_cnt) }, \
-         { "health", NULL, MAVLINK_TYPE_UINT8_T, 0, 82, offsetof(mavlink_vk_bms_status_t, health) }, \
+         { "current", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_vk_bms_status_t, current) }, \
+         { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_vk_bms_status_t, temperature) }, \
+         { "cap_percent", NULL, MAVLINK_TYPE_INT8_T, 0, 82, offsetof(mavlink_vk_bms_status_t, cap_percent) }, \
+         { "bat_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 83, offsetof(mavlink_vk_bms_status_t, bat_id) }, \
+         { "err_code", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_vk_bms_status_t, err_code) }, \
+         { "cell_num", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_vk_bms_status_t, cell_num) }, \
+         { "cell_volt", NULL, MAVLINK_TYPE_UINT16_T, 30, 20, offsetof(mavlink_vk_bms_status_t, cell_volt) }, \
+         { "cyc_cnt", NULL, MAVLINK_TYPE_UINT16_T, 0, 80, offsetof(mavlink_vk_bms_status_t, cyc_cnt) }, \
+         { "health", NULL, MAVLINK_TYPE_UINT8_T, 0, 84, offsetof(mavlink_vk_bms_status_t, health) }, \
          } \
 }
 #else
@@ -56,15 +56,15 @@ typedef struct __mavlink_vk_bms_status_t {
     11, \
     {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_bms_status_t, time_boot_ms) }, \
          { "voltage", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_vk_bms_status_t, voltage) }, \
-         { "current", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_vk_bms_status_t, current) }, \
-         { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_vk_bms_status_t, temperature) }, \
-         { "cap_percent", NULL, MAVLINK_TYPE_INT8_T, 0, 80, offsetof(mavlink_vk_bms_status_t, cap_percent) }, \
-         { "bat_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 81, offsetof(mavlink_vk_bms_status_t, bat_id) }, \
-         { "err_code", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_vk_bms_status_t, err_code) }, \
-         { "cell_num", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_vk_bms_status_t, cell_num) }, \
-         { "cell_volt", NULL, MAVLINK_TYPE_UINT16_T, 30, 18, offsetof(mavlink_vk_bms_status_t, cell_volt) }, \
-         { "cyc_cnt", NULL, MAVLINK_TYPE_UINT16_T, 0, 78, offsetof(mavlink_vk_bms_status_t, cyc_cnt) }, \
-         { "health", NULL, MAVLINK_TYPE_UINT8_T, 0, 82, offsetof(mavlink_vk_bms_status_t, health) }, \
+         { "current", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_vk_bms_status_t, current) }, \
+         { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_vk_bms_status_t, temperature) }, \
+         { "cap_percent", NULL, MAVLINK_TYPE_INT8_T, 0, 82, offsetof(mavlink_vk_bms_status_t, cap_percent) }, \
+         { "bat_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 83, offsetof(mavlink_vk_bms_status_t, bat_id) }, \
+         { "err_code", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_vk_bms_status_t, err_code) }, \
+         { "cell_num", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_vk_bms_status_t, cell_num) }, \
+         { "cell_volt", NULL, MAVLINK_TYPE_UINT16_T, 30, 20, offsetof(mavlink_vk_bms_status_t, cell_volt) }, \
+         { "cyc_cnt", NULL, MAVLINK_TYPE_UINT16_T, 0, 80, offsetof(mavlink_vk_bms_status_t, cyc_cnt) }, \
+         { "health", NULL, MAVLINK_TYPE_UINT8_T, 0, 84, offsetof(mavlink_vk_bms_status_t, health) }, \
          } \
 }
 #endif
@@ -93,28 +93,28 @@ typedef struct __mavlink_vk_bms_status_t {
  * @return length of the message in bytes (excluding serial stream start sign)
  */
 static inline uint16_t mavlink_msg_vk_bms_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
-                               uint32_t time_boot_ms, uint32_t voltage, int16_t current, int16_t temperature, int8_t cap_percent, uint8_t bat_id, uint32_t err_code, uint16_t cell_num, const uint16_t *cell_volt, uint16_t cyc_cnt, uint8_t health)
+                               uint32_t time_boot_ms, uint32_t voltage, int32_t current, int16_t temperature, int8_t cap_percent, uint8_t bat_id, uint32_t err_code, uint16_t cell_num, const uint16_t *cell_volt, uint16_t cyc_cnt, uint8_t health)
 {
 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
     char buf[MAVLINK_MSG_ID_VK_BMS_STATUS_LEN];
     _mav_put_uint32_t(buf, 0, time_boot_ms);
     _mav_put_uint32_t(buf, 4, voltage);
-    _mav_put_uint32_t(buf, 8, err_code);
-    _mav_put_int16_t(buf, 12, current);
-    _mav_put_int16_t(buf, 14, temperature);
-    _mav_put_uint16_t(buf, 16, cell_num);
-    _mav_put_uint16_t(buf, 78, cyc_cnt);
-    _mav_put_int8_t(buf, 80, cap_percent);
-    _mav_put_uint8_t(buf, 81, bat_id);
-    _mav_put_uint8_t(buf, 82, health);
-    _mav_put_uint16_t_array(buf, 18, cell_volt, 30);
+    _mav_put_int32_t(buf, 8, current);
+    _mav_put_uint32_t(buf, 12, err_code);
+    _mav_put_int16_t(buf, 16, temperature);
+    _mav_put_uint16_t(buf, 18, cell_num);
+    _mav_put_uint16_t(buf, 80, cyc_cnt);
+    _mav_put_int8_t(buf, 82, cap_percent);
+    _mav_put_uint8_t(buf, 83, bat_id);
+    _mav_put_uint8_t(buf, 84, health);
+    _mav_put_uint16_t_array(buf, 20, cell_volt, 30);
         memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_BMS_STATUS_LEN);
 #else
     mavlink_vk_bms_status_t packet;
     packet.time_boot_ms = time_boot_ms;
     packet.voltage = voltage;
-    packet.err_code = err_code;
     packet.current = current;
+    packet.err_code = err_code;
     packet.temperature = temperature;
     packet.cell_num = cell_num;
     packet.cyc_cnt = cyc_cnt;
@@ -154,28 +154,28 @@ static inline uint16_t mavlink_msg_vk_bms_status_pack(uint8_t system_id, uint8_t
  * @return length of the message in bytes (excluding serial stream start sign)
  */
 static inline uint16_t mavlink_msg_vk_bms_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
-                               uint32_t time_boot_ms, uint32_t voltage, int16_t current, int16_t temperature, int8_t cap_percent, uint8_t bat_id, uint32_t err_code, uint16_t cell_num, const uint16_t *cell_volt, uint16_t cyc_cnt, uint8_t health)
+                               uint32_t time_boot_ms, uint32_t voltage, int32_t current, int16_t temperature, int8_t cap_percent, uint8_t bat_id, uint32_t err_code, uint16_t cell_num, const uint16_t *cell_volt, uint16_t cyc_cnt, uint8_t health)
 {
 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
     char buf[MAVLINK_MSG_ID_VK_BMS_STATUS_LEN];
     _mav_put_uint32_t(buf, 0, time_boot_ms);
     _mav_put_uint32_t(buf, 4, voltage);
-    _mav_put_uint32_t(buf, 8, err_code);
-    _mav_put_int16_t(buf, 12, current);
-    _mav_put_int16_t(buf, 14, temperature);
-    _mav_put_uint16_t(buf, 16, cell_num);
-    _mav_put_uint16_t(buf, 78, cyc_cnt);
-    _mav_put_int8_t(buf, 80, cap_percent);
-    _mav_put_uint8_t(buf, 81, bat_id);
-    _mav_put_uint8_t(buf, 82, health);
-    _mav_put_uint16_t_array(buf, 18, cell_volt, 30);
+    _mav_put_int32_t(buf, 8, current);
+    _mav_put_uint32_t(buf, 12, err_code);
+    _mav_put_int16_t(buf, 16, temperature);
+    _mav_put_uint16_t(buf, 18, cell_num);
+    _mav_put_uint16_t(buf, 80, cyc_cnt);
+    _mav_put_int8_t(buf, 82, cap_percent);
+    _mav_put_uint8_t(buf, 83, bat_id);
+    _mav_put_uint8_t(buf, 84, health);
+    _mav_put_uint16_t_array(buf, 20, cell_volt, 30);
         memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_BMS_STATUS_LEN);
 #else
     mavlink_vk_bms_status_t packet;
     packet.time_boot_ms = time_boot_ms;
     packet.voltage = voltage;
-    packet.err_code = err_code;
     packet.current = current;
+    packet.err_code = err_code;
     packet.temperature = temperature;
     packet.cell_num = cell_num;
     packet.cyc_cnt = cyc_cnt;
@@ -219,28 +219,28 @@ static inline uint16_t mavlink_msg_vk_bms_status_pack_status(uint8_t system_id,
  */
 static inline uint16_t mavlink_msg_vk_bms_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                                mavlink_message_t* msg,
-                                   uint32_t time_boot_ms,uint32_t voltage,int16_t current,int16_t temperature,int8_t cap_percent,uint8_t bat_id,uint32_t err_code,uint16_t cell_num,const uint16_t *cell_volt,uint16_t cyc_cnt,uint8_t health)
+                                   uint32_t time_boot_ms,uint32_t voltage,int32_t current,int16_t temperature,int8_t cap_percent,uint8_t bat_id,uint32_t err_code,uint16_t cell_num,const uint16_t *cell_volt,uint16_t cyc_cnt,uint8_t health)
 {
 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
     char buf[MAVLINK_MSG_ID_VK_BMS_STATUS_LEN];
     _mav_put_uint32_t(buf, 0, time_boot_ms);
     _mav_put_uint32_t(buf, 4, voltage);
-    _mav_put_uint32_t(buf, 8, err_code);
-    _mav_put_int16_t(buf, 12, current);
-    _mav_put_int16_t(buf, 14, temperature);
-    _mav_put_uint16_t(buf, 16, cell_num);
-    _mav_put_uint16_t(buf, 78, cyc_cnt);
-    _mav_put_int8_t(buf, 80, cap_percent);
-    _mav_put_uint8_t(buf, 81, bat_id);
-    _mav_put_uint8_t(buf, 82, health);
-    _mav_put_uint16_t_array(buf, 18, cell_volt, 30);
+    _mav_put_int32_t(buf, 8, current);
+    _mav_put_uint32_t(buf, 12, err_code);
+    _mav_put_int16_t(buf, 16, temperature);
+    _mav_put_uint16_t(buf, 18, cell_num);
+    _mav_put_uint16_t(buf, 80, cyc_cnt);
+    _mav_put_int8_t(buf, 82, cap_percent);
+    _mav_put_uint8_t(buf, 83, bat_id);
+    _mav_put_uint8_t(buf, 84, health);
+    _mav_put_uint16_t_array(buf, 20, cell_volt, 30);
         memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_BMS_STATUS_LEN);
 #else
     mavlink_vk_bms_status_t packet;
     packet.time_boot_ms = time_boot_ms;
     packet.voltage = voltage;
-    packet.err_code = err_code;
     packet.current = current;
+    packet.err_code = err_code;
     packet.temperature = temperature;
     packet.cell_num = cell_num;
     packet.cyc_cnt = cyc_cnt;
@@ -318,28 +318,28 @@ static inline uint16_t mavlink_msg_vk_bms_status_encode_status(uint8_t system_id
  */
 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
-static inline void mavlink_msg_vk_bms_status_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint32_t voltage, int16_t current, int16_t temperature, int8_t cap_percent, uint8_t bat_id, uint32_t err_code, uint16_t cell_num, const uint16_t *cell_volt, uint16_t cyc_cnt, uint8_t health)
+static inline void mavlink_msg_vk_bms_status_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint32_t voltage, int32_t current, int16_t temperature, int8_t cap_percent, uint8_t bat_id, uint32_t err_code, uint16_t cell_num, const uint16_t *cell_volt, uint16_t cyc_cnt, uint8_t health)
 {
 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
     char buf[MAVLINK_MSG_ID_VK_BMS_STATUS_LEN];
     _mav_put_uint32_t(buf, 0, time_boot_ms);
     _mav_put_uint32_t(buf, 4, voltage);
-    _mav_put_uint32_t(buf, 8, err_code);
-    _mav_put_int16_t(buf, 12, current);
-    _mav_put_int16_t(buf, 14, temperature);
-    _mav_put_uint16_t(buf, 16, cell_num);
-    _mav_put_uint16_t(buf, 78, cyc_cnt);
-    _mav_put_int8_t(buf, 80, cap_percent);
-    _mav_put_uint8_t(buf, 81, bat_id);
-    _mav_put_uint8_t(buf, 82, health);
-    _mav_put_uint16_t_array(buf, 18, cell_volt, 30);
+    _mav_put_int32_t(buf, 8, current);
+    _mav_put_uint32_t(buf, 12, err_code);
+    _mav_put_int16_t(buf, 16, temperature);
+    _mav_put_uint16_t(buf, 18, cell_num);
+    _mav_put_uint16_t(buf, 80, cyc_cnt);
+    _mav_put_int8_t(buf, 82, cap_percent);
+    _mav_put_uint8_t(buf, 83, bat_id);
+    _mav_put_uint8_t(buf, 84, health);
+    _mav_put_uint16_t_array(buf, 20, cell_volt, 30);
     _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_BMS_STATUS, buf, MAVLINK_MSG_ID_VK_BMS_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_BMS_STATUS_LEN, MAVLINK_MSG_ID_VK_BMS_STATUS_CRC);
 #else
     mavlink_vk_bms_status_t packet;
     packet.time_boot_ms = time_boot_ms;
     packet.voltage = voltage;
-    packet.err_code = err_code;
     packet.current = current;
+    packet.err_code = err_code;
     packet.temperature = temperature;
     packet.cell_num = cell_num;
     packet.cyc_cnt = cyc_cnt;
@@ -373,28 +373,28 @@ static inline void mavlink_msg_vk_bms_status_send_struct(mavlink_channel_t chan,
   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_bms_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint32_t time_boot_ms, uint32_t voltage, int16_t current, int16_t temperature, int8_t cap_percent, uint8_t bat_id, uint32_t err_code, uint16_t cell_num, const uint16_t *cell_volt, uint16_t cyc_cnt, uint8_t health)
+static inline void mavlink_msg_vk_bms_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint32_t time_boot_ms, uint32_t voltage, int32_t current, int16_t temperature, int8_t cap_percent, uint8_t bat_id, uint32_t err_code, uint16_t cell_num, const uint16_t *cell_volt, uint16_t cyc_cnt, uint8_t health)
 {
 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
     char *buf = (char *)msgbuf;
     _mav_put_uint32_t(buf, 0, time_boot_ms);
     _mav_put_uint32_t(buf, 4, voltage);
-    _mav_put_uint32_t(buf, 8, err_code);
-    _mav_put_int16_t(buf, 12, current);
-    _mav_put_int16_t(buf, 14, temperature);
-    _mav_put_uint16_t(buf, 16, cell_num);
-    _mav_put_uint16_t(buf, 78, cyc_cnt);
-    _mav_put_int8_t(buf, 80, cap_percent);
-    _mav_put_uint8_t(buf, 81, bat_id);
-    _mav_put_uint8_t(buf, 82, health);
-    _mav_put_uint16_t_array(buf, 18, cell_volt, 30);
+    _mav_put_int32_t(buf, 8, current);
+    _mav_put_uint32_t(buf, 12, err_code);
+    _mav_put_int16_t(buf, 16, temperature);
+    _mav_put_uint16_t(buf, 18, cell_num);
+    _mav_put_uint16_t(buf, 80, cyc_cnt);
+    _mav_put_int8_t(buf, 82, cap_percent);
+    _mav_put_uint8_t(buf, 83, bat_id);
+    _mav_put_uint8_t(buf, 84, health);
+    _mav_put_uint16_t_array(buf, 20, cell_volt, 30);
     _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_BMS_STATUS, buf, MAVLINK_MSG_ID_VK_BMS_STATUS_MIN_LEN, MAVLINK_MSG_ID_VK_BMS_STATUS_LEN, MAVLINK_MSG_ID_VK_BMS_STATUS_CRC);
 #else
     mavlink_vk_bms_status_t *packet = (mavlink_vk_bms_status_t *)msgbuf;
     packet->time_boot_ms = time_boot_ms;
     packet->voltage = voltage;
-    packet->err_code = err_code;
     packet->current = current;
+    packet->err_code = err_code;
     packet->temperature = temperature;
     packet->cell_num = cell_num;
     packet->cyc_cnt = cyc_cnt;
@@ -438,9 +438,9 @@ static inline uint32_t mavlink_msg_vk_bms_status_get_voltage(const mavlink_messa
  * @return [cA] BMS current in cA, negative value means in
         charging
  */
-static inline int16_t mavlink_msg_vk_bms_status_get_current(const mavlink_message_t* msg)
+static inline int32_t mavlink_msg_vk_bms_status_get_current(const mavlink_message_t* msg)
 {
-    return _MAV_RETURN_int16_t(msg,  12);
+    return _MAV_RETURN_int32_t(msg,  8);
 }
 
 /**
@@ -450,7 +450,7 @@ static inline int16_t mavlink_msg_vk_bms_status_get_current(const mavlink_messag
  */
 static inline int16_t mavlink_msg_vk_bms_status_get_temperature(const mavlink_message_t* msg)
 {
-    return _MAV_RETURN_int16_t(msg,  14);
+    return _MAV_RETURN_int16_t(msg,  16);
 }
 
 /**
@@ -460,7 +460,7 @@ static inline int16_t mavlink_msg_vk_bms_status_get_temperature(const mavlink_me
  */
 static inline int8_t mavlink_msg_vk_bms_status_get_cap_percent(const mavlink_message_t* msg)
 {
-    return _MAV_RETURN_int8_t(msg,  80);
+    return _MAV_RETURN_int8_t(msg,  82);
 }
 
 /**
@@ -471,7 +471,7 @@ static inline int8_t mavlink_msg_vk_bms_status_get_cap_percent(const mavlink_mes
  */
 static inline uint8_t mavlink_msg_vk_bms_status_get_bat_id(const mavlink_message_t* msg)
 {
-    return _MAV_RETURN_uint8_t(msg,  81);
+    return _MAV_RETURN_uint8_t(msg,  83);
 }
 
 /**
@@ -482,7 +482,7 @@ static inline uint8_t mavlink_msg_vk_bms_status_get_bat_id(const mavlink_message
  */
 static inline uint32_t mavlink_msg_vk_bms_status_get_err_code(const mavlink_message_t* msg)
 {
-    return _MAV_RETURN_uint32_t(msg,  8);
+    return _MAV_RETURN_uint32_t(msg,  12);
 }
 
 /**
@@ -492,7 +492,7 @@ static inline uint32_t mavlink_msg_vk_bms_status_get_err_code(const mavlink_mess
  */
 static inline uint16_t mavlink_msg_vk_bms_status_get_cell_num(const mavlink_message_t* msg)
 {
-    return _MAV_RETURN_uint16_t(msg,  16);
+    return _MAV_RETURN_uint16_t(msg,  18);
 }
 
 /**
@@ -502,7 +502,7 @@ static inline uint16_t mavlink_msg_vk_bms_status_get_cell_num(const mavlink_mess
  */
 static inline uint16_t mavlink_msg_vk_bms_status_get_cell_volt(const mavlink_message_t* msg, uint16_t *cell_volt)
 {
-    return _MAV_RETURN_uint16_t_array(msg, cell_volt, 30,  18);
+    return _MAV_RETURN_uint16_t_array(msg, cell_volt, 30,  20);
 }
 
 /**
@@ -512,7 +512,7 @@ static inline uint16_t mavlink_msg_vk_bms_status_get_cell_volt(const mavlink_mes
  */
 static inline uint16_t mavlink_msg_vk_bms_status_get_cyc_cnt(const mavlink_message_t* msg)
 {
-    return _MAV_RETURN_uint16_t(msg,  78);
+    return _MAV_RETURN_uint16_t(msg,  80);
 }
 
 /**
@@ -523,7 +523,7 @@ static inline uint16_t mavlink_msg_vk_bms_status_get_cyc_cnt(const mavlink_messa
  */
 static inline uint8_t mavlink_msg_vk_bms_status_get_health(const mavlink_message_t* msg)
 {
-    return _MAV_RETURN_uint8_t(msg,  82);
+    return _MAV_RETURN_uint8_t(msg,  84);
 }
 
 /**
@@ -537,8 +537,8 @@ static inline void mavlink_msg_vk_bms_status_decode(const mavlink_message_t* msg
 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
     vk_bms_status->time_boot_ms = mavlink_msg_vk_bms_status_get_time_boot_ms(msg);
     vk_bms_status->voltage = mavlink_msg_vk_bms_status_get_voltage(msg);
-    vk_bms_status->err_code = mavlink_msg_vk_bms_status_get_err_code(msg);
     vk_bms_status->current = mavlink_msg_vk_bms_status_get_current(msg);
+    vk_bms_status->err_code = mavlink_msg_vk_bms_status_get_err_code(msg);
     vk_bms_status->temperature = mavlink_msg_vk_bms_status_get_temperature(msg);
     vk_bms_status->cell_num = mavlink_msg_vk_bms_status_get_cell_num(msg);
     mavlink_msg_vk_bms_status_get_cell_volt(msg, vk_bms_status->cell_volt);

+ 2 - 2
v2.0/VKFly/testsuite.h

@@ -245,14 +245,14 @@ static void mavlink_test_vk_bms_status(uint8_t system_id, uint8_t component_id,
         uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
         uint16_t i;
     mavlink_vk_bms_status_t packet_in = {
-        963497464,963497672,963497880,17859,17963,18067,{ 18171, 18172, 18173, 18174, 18175, 18176, 18177, 18178, 18179, 18180, 18181, 18182, 18183, 18184, 18185, 18186, 18187, 18188, 18189, 18190, 18191, 18192, 18193, 18194, 18195, 18196, 18197, 18198, 18199, 18200 },21291,245,56,123
+        963497464,963497672,963497880,963498088,18067,18171,{ 18275, 18276, 18277, 18278, 18279, 18280, 18281, 18282, 18283, 18284, 18285, 18286, 18287, 18288, 18289, 18290, 18291, 18292, 18293, 18294, 18295, 18296, 18297, 18298, 18299, 18300, 18301, 18302, 18303, 18304 },21395,123,190,1
     };
     mavlink_vk_bms_status_t packet1, packet2;
         memset(&packet1, 0, sizeof(packet1));
         packet1.time_boot_ms = packet_in.time_boot_ms;
         packet1.voltage = packet_in.voltage;
-        packet1.err_code = packet_in.err_code;
         packet1.current = packet_in.current;
+        packet1.err_code = packet_in.err_code;
         packet1.temperature = packet_in.temperature;
         packet1.cell_num = packet_in.cell_num;
         packet1.cyc_cnt = packet_in.cyc_cnt;

+ 1 - 1
v2.0/VKFly/version.h

@@ -7,7 +7,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Wed Apr 01 2026"
+#define MAVLINK_BUILD_DATE "Thu Apr 02 2026"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
  

+ 1 - 1
v2.0/common/common.h

@@ -10,7 +10,7 @@
     #error Wrong include order: MAVLINK_COMMON.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
 #endif
 
-#define MAVLINK_COMMON_XML_HASH -2276509121531570771
+#define MAVLINK_COMMON_XML_HASH 955664750496612592
 
 #ifdef __cplusplus
 extern "C" {

+ 1 - 1
v2.0/common/mavlink.h

@@ -6,7 +6,7 @@
 #ifndef MAVLINK_H
 #define MAVLINK_H
 
-#define MAVLINK_PRIMARY_XML_HASH -2276509121531570771
+#define MAVLINK_PRIMARY_XML_HASH 955664750496612592
 
 #ifndef MAVLINK_STX
 #define MAVLINK_STX 253

+ 1 - 1
v2.0/common/version.h

@@ -7,7 +7,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Wed Apr 01 2026"
+#define MAVLINK_BUILD_DATE "Thu Apr 02 2026"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
  

+ 1 - 1
v2.0/minimal/mavlink.h

@@ -6,7 +6,7 @@
 #ifndef MAVLINK_H
 #define MAVLINK_H
 
-#define MAVLINK_PRIMARY_XML_HASH -357763083277771255
+#define MAVLINK_PRIMARY_XML_HASH 9090850028663179842
 
 #ifndef MAVLINK_STX
 #define MAVLINK_STX 253

+ 1 - 1
v2.0/minimal/minimal.h

@@ -10,7 +10,7 @@
     #error Wrong include order: MAVLINK_MINIMAL.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
 #endif
 
-#define MAVLINK_MINIMAL_XML_HASH -357763083277771255
+#define MAVLINK_MINIMAL_XML_HASH 9090850028663179842
 
 #ifdef __cplusplus
 extern "C" {

+ 1 - 1
v2.0/minimal/version.h

@@ -7,7 +7,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Wed Apr 01 2026"
+#define MAVLINK_BUILD_DATE "Thu Apr 02 2026"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22
  

+ 1 - 1
v2.0/standard/mavlink.h

@@ -6,7 +6,7 @@
 #ifndef MAVLINK_H
 #define MAVLINK_H
 
-#define MAVLINK_PRIMARY_XML_HASH 8101352429893670386
+#define MAVLINK_PRIMARY_XML_HASH -4474688932553318577
 
 #ifndef MAVLINK_STX
 #define MAVLINK_STX 253

+ 1 - 1
v2.0/standard/standard.h

@@ -10,7 +10,7 @@
     #error Wrong include order: MAVLINK_STANDARD.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
 #endif
 
-#define MAVLINK_STANDARD_XML_HASH 8101352429893670386
+#define MAVLINK_STANDARD_XML_HASH -4474688932553318577
 
 #ifdef __cplusplus
 extern "C" {

+ 1 - 1
v2.0/standard/version.h

@@ -7,7 +7,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Wed Apr 01 2026"
+#define MAVLINK_BUILD_DATE "Thu Apr 02 2026"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22
  

Some files were not shown because too many files changed in this diff