|
@@ -18,11 +18,21 @@ typedef struct __mavlink_qingxie_bms_t {
|
|
|
uint16_t falt_status; /*< */
|
|
|
uint8_t self_check; /*< */
|
|
|
uint8_t Id; /*< */
|
|
|
+ uint16_t gass_mass; /*< [dg] */
|
|
|
+ uint16_t gass_percent; /*< [%] */
|
|
|
+ uint16_t runtime_remain; /*< */
|
|
|
+ uint8_t fan_percent; /*< */
|
|
|
+ uint8_t fan_rpm; /*< */
|
|
|
+ uint8_t sys_run_state; /*< */
|
|
|
+ uint8_t sys_fault_state; /*< */
|
|
|
+ uint16_t sys_fault_code; /*< */
|
|
|
+ uint16_t lipo_current; /*< [dA] */
|
|
|
+ uint16_t total_runtime; /*< [dh] */
|
|
|
} mavlink_qingxie_bms_t;
|
|
|
|
|
|
-#define MAVLINK_MSG_ID_QINGXIE_BMS_LEN 24
|
|
|
+#define MAVLINK_MSG_ID_QINGXIE_BMS_LEN 40
|
|
|
#define MAVLINK_MSG_ID_QINGXIE_BMS_MIN_LEN 24
|
|
|
-#define MAVLINK_MSG_ID_53300_LEN 24
|
|
|
+#define MAVLINK_MSG_ID_53300_LEN 40
|
|
|
#define MAVLINK_MSG_ID_53300_MIN_LEN 24
|
|
|
|
|
|
#define MAVLINK_MSG_ID_QINGXIE_BMS_CRC 114
|
|
@@ -34,7 +44,7 @@ typedef struct __mavlink_qingxie_bms_t {
|
|
|
#define MAVLINK_MESSAGE_INFO_QINGXIE_BMS { \
|
|
|
53300, \
|
|
|
"QINGXIE_BMS", \
|
|
|
- 13, \
|
|
|
+ 23, \
|
|
|
{ { "bat_voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_qingxie_bms_t, bat_voltage) }, \
|
|
|
{ "servo_current", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_qingxie_bms_t, servo_current) }, \
|
|
|
{ "stack_voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_qingxie_bms_t, stack_voltage) }, \
|
|
@@ -48,12 +58,22 @@ typedef struct __mavlink_qingxie_bms_t {
|
|
|
{ "falt_status", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_qingxie_bms_t, falt_status) }, \
|
|
|
{ "self_check", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_qingxie_bms_t, self_check) }, \
|
|
|
{ "Id", NULL, MAVLINK_TYPE_UINT8_T, 0, 23, offsetof(mavlink_qingxie_bms_t, Id) }, \
|
|
|
+ { "gass_mass", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_qingxie_bms_t, gass_mass) }, \
|
|
|
+ { "gass_percent", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_qingxie_bms_t, gass_percent) }, \
|
|
|
+ { "runtime_remain", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_qingxie_bms_t, runtime_remain) }, \
|
|
|
+ { "fan_percent", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_qingxie_bms_t, fan_percent) }, \
|
|
|
+ { "fan_rpm", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_qingxie_bms_t, fan_rpm) }, \
|
|
|
+ { "sys_run_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_qingxie_bms_t, sys_run_state) }, \
|
|
|
+ { "sys_fault_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_qingxie_bms_t, sys_fault_state) }, \
|
|
|
+ { "sys_fault_code", NULL, MAVLINK_TYPE_UINT16_T, 0, 34, offsetof(mavlink_qingxie_bms_t, sys_fault_code) }, \
|
|
|
+ { "lipo_current", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_qingxie_bms_t, lipo_current) }, \
|
|
|
+ { "total_runtime", NULL, MAVLINK_TYPE_UINT16_T, 0, 38, offsetof(mavlink_qingxie_bms_t, total_runtime) }, \
|
|
|
} \
|
|
|
}
|
|
|
#else
|
|
|
#define MAVLINK_MESSAGE_INFO_QINGXIE_BMS { \
|
|
|
"QINGXIE_BMS", \
|
|
|
- 13, \
|
|
|
+ 23, \
|
|
|
{ { "bat_voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_qingxie_bms_t, bat_voltage) }, \
|
|
|
{ "servo_current", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_qingxie_bms_t, servo_current) }, \
|
|
|
{ "stack_voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_qingxie_bms_t, stack_voltage) }, \
|
|
@@ -67,6 +87,16 @@ typedef struct __mavlink_qingxie_bms_t {
|
|
|
{ "falt_status", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_qingxie_bms_t, falt_status) }, \
|
|
|
{ "self_check", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_qingxie_bms_t, self_check) }, \
|
|
|
{ "Id", NULL, MAVLINK_TYPE_UINT8_T, 0, 23, offsetof(mavlink_qingxie_bms_t, Id) }, \
|
|
|
+ { "gass_mass", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_qingxie_bms_t, gass_mass) }, \
|
|
|
+ { "gass_percent", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_qingxie_bms_t, gass_percent) }, \
|
|
|
+ { "runtime_remain", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_qingxie_bms_t, runtime_remain) }, \
|
|
|
+ { "fan_percent", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_qingxie_bms_t, fan_percent) }, \
|
|
|
+ { "fan_rpm", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_qingxie_bms_t, fan_rpm) }, \
|
|
|
+ { "sys_run_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_qingxie_bms_t, sys_run_state) }, \
|
|
|
+ { "sys_fault_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_qingxie_bms_t, sys_fault_state) }, \
|
|
|
+ { "sys_fault_code", NULL, MAVLINK_TYPE_UINT16_T, 0, 34, offsetof(mavlink_qingxie_bms_t, sys_fault_code) }, \
|
|
|
+ { "lipo_current", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_qingxie_bms_t, lipo_current) }, \
|
|
|
+ { "total_runtime", NULL, MAVLINK_TYPE_UINT16_T, 0, 38, offsetof(mavlink_qingxie_bms_t, total_runtime) }, \
|
|
|
} \
|
|
|
}
|
|
|
#endif
|
|
@@ -90,10 +120,20 @@ typedef struct __mavlink_qingxie_bms_t {
|
|
|
* @param falt_status
|
|
|
* @param self_check
|
|
|
* @param Id
|
|
|
+ * @param gass_mass [dg]
|
|
|
+ * @param gass_percent [%]
|
|
|
+ * @param runtime_remain
|
|
|
+ * @param fan_percent
|
|
|
+ * @param fan_rpm
|
|
|
+ * @param sys_run_state
|
|
|
+ * @param sys_fault_state
|
|
|
+ * @param sys_fault_code
|
|
|
+ * @param lipo_current [dA]
|
|
|
+ * @param total_runtime [dh]
|
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_qingxie_bms_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
|
|
- uint16_t bat_voltage, uint16_t servo_current, uint16_t stack_voltage, uint16_t servo_voltage, uint16_t bat_refuel_current, uint16_t gas_tank_pressure, uint16_t pipe_pressure, uint16_t pcb_temp, uint16_t stack_temp, uint16_t work_status, uint16_t falt_status, uint8_t self_check, uint8_t Id)
|
|
|
+ uint16_t bat_voltage, uint16_t servo_current, uint16_t stack_voltage, uint16_t servo_voltage, uint16_t bat_refuel_current, uint16_t gas_tank_pressure, uint16_t pipe_pressure, uint16_t pcb_temp, uint16_t stack_temp, uint16_t work_status, uint16_t falt_status, uint8_t self_check, uint8_t Id, uint16_t gass_mass, uint16_t gass_percent, uint16_t runtime_remain, uint8_t fan_percent, uint8_t fan_rpm, uint8_t sys_run_state, uint8_t sys_fault_state, uint16_t sys_fault_code, uint16_t lipo_current, uint16_t total_runtime)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char buf[MAVLINK_MSG_ID_QINGXIE_BMS_LEN];
|
|
@@ -110,6 +150,16 @@ static inline uint16_t mavlink_msg_qingxie_bms_pack(uint8_t system_id, uint8_t c
|
|
|
_mav_put_uint16_t(buf, 20, falt_status);
|
|
|
_mav_put_uint8_t(buf, 22, self_check);
|
|
|
_mav_put_uint8_t(buf, 23, Id);
|
|
|
+ _mav_put_uint16_t(buf, 24, gass_mass);
|
|
|
+ _mav_put_uint16_t(buf, 26, gass_percent);
|
|
|
+ _mav_put_uint16_t(buf, 28, runtime_remain);
|
|
|
+ _mav_put_uint8_t(buf, 30, fan_percent);
|
|
|
+ _mav_put_uint8_t(buf, 31, fan_rpm);
|
|
|
+ _mav_put_uint8_t(buf, 32, sys_run_state);
|
|
|
+ _mav_put_uint8_t(buf, 33, sys_fault_state);
|
|
|
+ _mav_put_uint16_t(buf, 34, sys_fault_code);
|
|
|
+ _mav_put_uint16_t(buf, 36, lipo_current);
|
|
|
+ _mav_put_uint16_t(buf, 38, total_runtime);
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_QINGXIE_BMS_LEN);
|
|
|
#else
|
|
@@ -127,6 +177,16 @@ static inline uint16_t mavlink_msg_qingxie_bms_pack(uint8_t system_id, uint8_t c
|
|
|
packet.falt_status = falt_status;
|
|
|
packet.self_check = self_check;
|
|
|
packet.Id = Id;
|
|
|
+ packet.gass_mass = gass_mass;
|
|
|
+ packet.gass_percent = gass_percent;
|
|
|
+ packet.runtime_remain = runtime_remain;
|
|
|
+ packet.fan_percent = fan_percent;
|
|
|
+ packet.fan_rpm = fan_rpm;
|
|
|
+ packet.sys_run_state = sys_run_state;
|
|
|
+ packet.sys_fault_state = sys_fault_state;
|
|
|
+ packet.sys_fault_code = sys_fault_code;
|
|
|
+ packet.lipo_current = lipo_current;
|
|
|
+ packet.total_runtime = total_runtime;
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_QINGXIE_BMS_LEN);
|
|
|
#endif
|
|
@@ -155,10 +215,20 @@ static inline uint16_t mavlink_msg_qingxie_bms_pack(uint8_t system_id, uint8_t c
|
|
|
* @param falt_status
|
|
|
* @param self_check
|
|
|
* @param Id
|
|
|
+ * @param gass_mass [dg]
|
|
|
+ * @param gass_percent [%]
|
|
|
+ * @param runtime_remain
|
|
|
+ * @param fan_percent
|
|
|
+ * @param fan_rpm
|
|
|
+ * @param sys_run_state
|
|
|
+ * @param sys_fault_state
|
|
|
+ * @param sys_fault_code
|
|
|
+ * @param lipo_current [dA]
|
|
|
+ * @param total_runtime [dh]
|
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_qingxie_bms_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
|
|
- uint16_t bat_voltage, uint16_t servo_current, uint16_t stack_voltage, uint16_t servo_voltage, uint16_t bat_refuel_current, uint16_t gas_tank_pressure, uint16_t pipe_pressure, uint16_t pcb_temp, uint16_t stack_temp, uint16_t work_status, uint16_t falt_status, uint8_t self_check, uint8_t Id)
|
|
|
+ uint16_t bat_voltage, uint16_t servo_current, uint16_t stack_voltage, uint16_t servo_voltage, uint16_t bat_refuel_current, uint16_t gas_tank_pressure, uint16_t pipe_pressure, uint16_t pcb_temp, uint16_t stack_temp, uint16_t work_status, uint16_t falt_status, uint8_t self_check, uint8_t Id, uint16_t gass_mass, uint16_t gass_percent, uint16_t runtime_remain, uint8_t fan_percent, uint8_t fan_rpm, uint8_t sys_run_state, uint8_t sys_fault_state, uint16_t sys_fault_code, uint16_t lipo_current, uint16_t total_runtime)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char buf[MAVLINK_MSG_ID_QINGXIE_BMS_LEN];
|
|
@@ -175,6 +245,16 @@ static inline uint16_t mavlink_msg_qingxie_bms_pack_status(uint8_t system_id, ui
|
|
|
_mav_put_uint16_t(buf, 20, falt_status);
|
|
|
_mav_put_uint8_t(buf, 22, self_check);
|
|
|
_mav_put_uint8_t(buf, 23, Id);
|
|
|
+ _mav_put_uint16_t(buf, 24, gass_mass);
|
|
|
+ _mav_put_uint16_t(buf, 26, gass_percent);
|
|
|
+ _mav_put_uint16_t(buf, 28, runtime_remain);
|
|
|
+ _mav_put_uint8_t(buf, 30, fan_percent);
|
|
|
+ _mav_put_uint8_t(buf, 31, fan_rpm);
|
|
|
+ _mav_put_uint8_t(buf, 32, sys_run_state);
|
|
|
+ _mav_put_uint8_t(buf, 33, sys_fault_state);
|
|
|
+ _mav_put_uint16_t(buf, 34, sys_fault_code);
|
|
|
+ _mav_put_uint16_t(buf, 36, lipo_current);
|
|
|
+ _mav_put_uint16_t(buf, 38, total_runtime);
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_QINGXIE_BMS_LEN);
|
|
|
#else
|
|
@@ -192,6 +272,16 @@ static inline uint16_t mavlink_msg_qingxie_bms_pack_status(uint8_t system_id, ui
|
|
|
packet.falt_status = falt_status;
|
|
|
packet.self_check = self_check;
|
|
|
packet.Id = Id;
|
|
|
+ packet.gass_mass = gass_mass;
|
|
|
+ packet.gass_percent = gass_percent;
|
|
|
+ packet.runtime_remain = runtime_remain;
|
|
|
+ packet.fan_percent = fan_percent;
|
|
|
+ packet.fan_rpm = fan_rpm;
|
|
|
+ packet.sys_run_state = sys_run_state;
|
|
|
+ packet.sys_fault_state = sys_fault_state;
|
|
|
+ packet.sys_fault_code = sys_fault_code;
|
|
|
+ packet.lipo_current = lipo_current;
|
|
|
+ packet.total_runtime = total_runtime;
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_QINGXIE_BMS_LEN);
|
|
|
#endif
|
|
@@ -223,11 +313,21 @@ static inline uint16_t mavlink_msg_qingxie_bms_pack_status(uint8_t system_id, ui
|
|
|
* @param falt_status
|
|
|
* @param self_check
|
|
|
* @param Id
|
|
|
+ * @param gass_mass [dg]
|
|
|
+ * @param gass_percent [%]
|
|
|
+ * @param runtime_remain
|
|
|
+ * @param fan_percent
|
|
|
+ * @param fan_rpm
|
|
|
+ * @param sys_run_state
|
|
|
+ * @param sys_fault_state
|
|
|
+ * @param sys_fault_code
|
|
|
+ * @param lipo_current [dA]
|
|
|
+ * @param total_runtime [dh]
|
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_qingxie_bms_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
|
|
mavlink_message_t* msg,
|
|
|
- uint16_t bat_voltage,uint16_t servo_current,uint16_t stack_voltage,uint16_t servo_voltage,uint16_t bat_refuel_current,uint16_t gas_tank_pressure,uint16_t pipe_pressure,uint16_t pcb_temp,uint16_t stack_temp,uint16_t work_status,uint16_t falt_status,uint8_t self_check,uint8_t Id)
|
|
|
+ uint16_t bat_voltage,uint16_t servo_current,uint16_t stack_voltage,uint16_t servo_voltage,uint16_t bat_refuel_current,uint16_t gas_tank_pressure,uint16_t pipe_pressure,uint16_t pcb_temp,uint16_t stack_temp,uint16_t work_status,uint16_t falt_status,uint8_t self_check,uint8_t Id,uint16_t gass_mass,uint16_t gass_percent,uint16_t runtime_remain,uint8_t fan_percent,uint8_t fan_rpm,uint8_t sys_run_state,uint8_t sys_fault_state,uint16_t sys_fault_code,uint16_t lipo_current,uint16_t total_runtime)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char buf[MAVLINK_MSG_ID_QINGXIE_BMS_LEN];
|
|
@@ -244,6 +344,16 @@ static inline uint16_t mavlink_msg_qingxie_bms_pack_chan(uint8_t system_id, uint
|
|
|
_mav_put_uint16_t(buf, 20, falt_status);
|
|
|
_mav_put_uint8_t(buf, 22, self_check);
|
|
|
_mav_put_uint8_t(buf, 23, Id);
|
|
|
+ _mav_put_uint16_t(buf, 24, gass_mass);
|
|
|
+ _mav_put_uint16_t(buf, 26, gass_percent);
|
|
|
+ _mav_put_uint16_t(buf, 28, runtime_remain);
|
|
|
+ _mav_put_uint8_t(buf, 30, fan_percent);
|
|
|
+ _mav_put_uint8_t(buf, 31, fan_rpm);
|
|
|
+ _mav_put_uint8_t(buf, 32, sys_run_state);
|
|
|
+ _mav_put_uint8_t(buf, 33, sys_fault_state);
|
|
|
+ _mav_put_uint16_t(buf, 34, sys_fault_code);
|
|
|
+ _mav_put_uint16_t(buf, 36, lipo_current);
|
|
|
+ _mav_put_uint16_t(buf, 38, total_runtime);
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_QINGXIE_BMS_LEN);
|
|
|
#else
|
|
@@ -261,6 +371,16 @@ static inline uint16_t mavlink_msg_qingxie_bms_pack_chan(uint8_t system_id, uint
|
|
|
packet.falt_status = falt_status;
|
|
|
packet.self_check = self_check;
|
|
|
packet.Id = Id;
|
|
|
+ packet.gass_mass = gass_mass;
|
|
|
+ packet.gass_percent = gass_percent;
|
|
|
+ packet.runtime_remain = runtime_remain;
|
|
|
+ packet.fan_percent = fan_percent;
|
|
|
+ packet.fan_rpm = fan_rpm;
|
|
|
+ packet.sys_run_state = sys_run_state;
|
|
|
+ packet.sys_fault_state = sys_fault_state;
|
|
|
+ packet.sys_fault_code = sys_fault_code;
|
|
|
+ packet.lipo_current = lipo_current;
|
|
|
+ packet.total_runtime = total_runtime;
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_QINGXIE_BMS_LEN);
|
|
|
#endif
|
|
@@ -279,7 +399,7 @@ static inline uint16_t mavlink_msg_qingxie_bms_pack_chan(uint8_t system_id, uint
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_qingxie_bms_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_qingxie_bms_t* qingxie_bms)
|
|
|
{
|
|
|
- return mavlink_msg_qingxie_bms_pack(system_id, component_id, msg, qingxie_bms->bat_voltage, qingxie_bms->servo_current, qingxie_bms->stack_voltage, qingxie_bms->servo_voltage, qingxie_bms->bat_refuel_current, qingxie_bms->gas_tank_pressure, qingxie_bms->pipe_pressure, qingxie_bms->pcb_temp, qingxie_bms->stack_temp, qingxie_bms->work_status, qingxie_bms->falt_status, qingxie_bms->self_check, qingxie_bms->Id);
|
|
|
+ return mavlink_msg_qingxie_bms_pack(system_id, component_id, msg, qingxie_bms->bat_voltage, qingxie_bms->servo_current, qingxie_bms->stack_voltage, qingxie_bms->servo_voltage, qingxie_bms->bat_refuel_current, qingxie_bms->gas_tank_pressure, qingxie_bms->pipe_pressure, qingxie_bms->pcb_temp, qingxie_bms->stack_temp, qingxie_bms->work_status, qingxie_bms->falt_status, qingxie_bms->self_check, qingxie_bms->Id, qingxie_bms->gass_mass, qingxie_bms->gass_percent, qingxie_bms->runtime_remain, qingxie_bms->fan_percent, qingxie_bms->fan_rpm, qingxie_bms->sys_run_state, qingxie_bms->sys_fault_state, qingxie_bms->sys_fault_code, qingxie_bms->lipo_current, qingxie_bms->total_runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -293,7 +413,7 @@ static inline uint16_t mavlink_msg_qingxie_bms_encode(uint8_t system_id, uint8_t
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_qingxie_bms_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_qingxie_bms_t* qingxie_bms)
|
|
|
{
|
|
|
- return mavlink_msg_qingxie_bms_pack_chan(system_id, component_id, chan, msg, qingxie_bms->bat_voltage, qingxie_bms->servo_current, qingxie_bms->stack_voltage, qingxie_bms->servo_voltage, qingxie_bms->bat_refuel_current, qingxie_bms->gas_tank_pressure, qingxie_bms->pipe_pressure, qingxie_bms->pcb_temp, qingxie_bms->stack_temp, qingxie_bms->work_status, qingxie_bms->falt_status, qingxie_bms->self_check, qingxie_bms->Id);
|
|
|
+ return mavlink_msg_qingxie_bms_pack_chan(system_id, component_id, chan, msg, qingxie_bms->bat_voltage, qingxie_bms->servo_current, qingxie_bms->stack_voltage, qingxie_bms->servo_voltage, qingxie_bms->bat_refuel_current, qingxie_bms->gas_tank_pressure, qingxie_bms->pipe_pressure, qingxie_bms->pcb_temp, qingxie_bms->stack_temp, qingxie_bms->work_status, qingxie_bms->falt_status, qingxie_bms->self_check, qingxie_bms->Id, qingxie_bms->gass_mass, qingxie_bms->gass_percent, qingxie_bms->runtime_remain, qingxie_bms->fan_percent, qingxie_bms->fan_rpm, qingxie_bms->sys_run_state, qingxie_bms->sys_fault_state, qingxie_bms->sys_fault_code, qingxie_bms->lipo_current, qingxie_bms->total_runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -307,7 +427,7 @@ static inline uint16_t mavlink_msg_qingxie_bms_encode_chan(uint8_t system_id, ui
|
|
|
*/
|
|
|
static inline uint16_t mavlink_msg_qingxie_bms_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_qingxie_bms_t* qingxie_bms)
|
|
|
{
|
|
|
- return mavlink_msg_qingxie_bms_pack_status(system_id, component_id, _status, msg, qingxie_bms->bat_voltage, qingxie_bms->servo_current, qingxie_bms->stack_voltage, qingxie_bms->servo_voltage, qingxie_bms->bat_refuel_current, qingxie_bms->gas_tank_pressure, qingxie_bms->pipe_pressure, qingxie_bms->pcb_temp, qingxie_bms->stack_temp, qingxie_bms->work_status, qingxie_bms->falt_status, qingxie_bms->self_check, qingxie_bms->Id);
|
|
|
+ return mavlink_msg_qingxie_bms_pack_status(system_id, component_id, _status, msg, qingxie_bms->bat_voltage, qingxie_bms->servo_current, qingxie_bms->stack_voltage, qingxie_bms->servo_voltage, qingxie_bms->bat_refuel_current, qingxie_bms->gas_tank_pressure, qingxie_bms->pipe_pressure, qingxie_bms->pcb_temp, qingxie_bms->stack_temp, qingxie_bms->work_status, qingxie_bms->falt_status, qingxie_bms->self_check, qingxie_bms->Id, qingxie_bms->gass_mass, qingxie_bms->gass_percent, qingxie_bms->runtime_remain, qingxie_bms->fan_percent, qingxie_bms->fan_rpm, qingxie_bms->sys_run_state, qingxie_bms->sys_fault_state, qingxie_bms->sys_fault_code, qingxie_bms->lipo_current, qingxie_bms->total_runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -327,10 +447,20 @@ static inline uint16_t mavlink_msg_qingxie_bms_encode_status(uint8_t system_id,
|
|
|
* @param falt_status
|
|
|
* @param self_check
|
|
|
* @param Id
|
|
|
+ * @param gass_mass [dg]
|
|
|
+ * @param gass_percent [%]
|
|
|
+ * @param runtime_remain
|
|
|
+ * @param fan_percent
|
|
|
+ * @param fan_rpm
|
|
|
+ * @param sys_run_state
|
|
|
+ * @param sys_fault_state
|
|
|
+ * @param sys_fault_code
|
|
|
+ * @param lipo_current [dA]
|
|
|
+ * @param total_runtime [dh]
|
|
|
*/
|
|
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
|
|
|
|
|
-static inline void mavlink_msg_qingxie_bms_send(mavlink_channel_t chan, uint16_t bat_voltage, uint16_t servo_current, uint16_t stack_voltage, uint16_t servo_voltage, uint16_t bat_refuel_current, uint16_t gas_tank_pressure, uint16_t pipe_pressure, uint16_t pcb_temp, uint16_t stack_temp, uint16_t work_status, uint16_t falt_status, uint8_t self_check, uint8_t Id)
|
|
|
+static inline void mavlink_msg_qingxie_bms_send(mavlink_channel_t chan, uint16_t bat_voltage, uint16_t servo_current, uint16_t stack_voltage, uint16_t servo_voltage, uint16_t bat_refuel_current, uint16_t gas_tank_pressure, uint16_t pipe_pressure, uint16_t pcb_temp, uint16_t stack_temp, uint16_t work_status, uint16_t falt_status, uint8_t self_check, uint8_t Id, uint16_t gass_mass, uint16_t gass_percent, uint16_t runtime_remain, uint8_t fan_percent, uint8_t fan_rpm, uint8_t sys_run_state, uint8_t sys_fault_state, uint16_t sys_fault_code, uint16_t lipo_current, uint16_t total_runtime)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char buf[MAVLINK_MSG_ID_QINGXIE_BMS_LEN];
|
|
@@ -347,6 +477,16 @@ static inline void mavlink_msg_qingxie_bms_send(mavlink_channel_t chan, uint16_t
|
|
|
_mav_put_uint16_t(buf, 20, falt_status);
|
|
|
_mav_put_uint8_t(buf, 22, self_check);
|
|
|
_mav_put_uint8_t(buf, 23, Id);
|
|
|
+ _mav_put_uint16_t(buf, 24, gass_mass);
|
|
|
+ _mav_put_uint16_t(buf, 26, gass_percent);
|
|
|
+ _mav_put_uint16_t(buf, 28, runtime_remain);
|
|
|
+ _mav_put_uint8_t(buf, 30, fan_percent);
|
|
|
+ _mav_put_uint8_t(buf, 31, fan_rpm);
|
|
|
+ _mav_put_uint8_t(buf, 32, sys_run_state);
|
|
|
+ _mav_put_uint8_t(buf, 33, sys_fault_state);
|
|
|
+ _mav_put_uint16_t(buf, 34, sys_fault_code);
|
|
|
+ _mav_put_uint16_t(buf, 36, lipo_current);
|
|
|
+ _mav_put_uint16_t(buf, 38, total_runtime);
|
|
|
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_QINGXIE_BMS, buf, MAVLINK_MSG_ID_QINGXIE_BMS_MIN_LEN, MAVLINK_MSG_ID_QINGXIE_BMS_LEN, MAVLINK_MSG_ID_QINGXIE_BMS_CRC);
|
|
|
#else
|
|
@@ -364,6 +504,16 @@ static inline void mavlink_msg_qingxie_bms_send(mavlink_channel_t chan, uint16_t
|
|
|
packet.falt_status = falt_status;
|
|
|
packet.self_check = self_check;
|
|
|
packet.Id = Id;
|
|
|
+ packet.gass_mass = gass_mass;
|
|
|
+ packet.gass_percent = gass_percent;
|
|
|
+ packet.runtime_remain = runtime_remain;
|
|
|
+ packet.fan_percent = fan_percent;
|
|
|
+ packet.fan_rpm = fan_rpm;
|
|
|
+ packet.sys_run_state = sys_run_state;
|
|
|
+ packet.sys_fault_state = sys_fault_state;
|
|
|
+ packet.sys_fault_code = sys_fault_code;
|
|
|
+ packet.lipo_current = lipo_current;
|
|
|
+ packet.total_runtime = total_runtime;
|
|
|
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_QINGXIE_BMS, (const char *)&packet, MAVLINK_MSG_ID_QINGXIE_BMS_MIN_LEN, MAVLINK_MSG_ID_QINGXIE_BMS_LEN, MAVLINK_MSG_ID_QINGXIE_BMS_CRC);
|
|
|
#endif
|
|
@@ -377,7 +527,7 @@ static inline void mavlink_msg_qingxie_bms_send(mavlink_channel_t chan, uint16_t
|
|
|
static inline void mavlink_msg_qingxie_bms_send_struct(mavlink_channel_t chan, const mavlink_qingxie_bms_t* qingxie_bms)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
- mavlink_msg_qingxie_bms_send(chan, qingxie_bms->bat_voltage, qingxie_bms->servo_current, qingxie_bms->stack_voltage, qingxie_bms->servo_voltage, qingxie_bms->bat_refuel_current, qingxie_bms->gas_tank_pressure, qingxie_bms->pipe_pressure, qingxie_bms->pcb_temp, qingxie_bms->stack_temp, qingxie_bms->work_status, qingxie_bms->falt_status, qingxie_bms->self_check, qingxie_bms->Id);
|
|
|
+ mavlink_msg_qingxie_bms_send(chan, qingxie_bms->bat_voltage, qingxie_bms->servo_current, qingxie_bms->stack_voltage, qingxie_bms->servo_voltage, qingxie_bms->bat_refuel_current, qingxie_bms->gas_tank_pressure, qingxie_bms->pipe_pressure, qingxie_bms->pcb_temp, qingxie_bms->stack_temp, qingxie_bms->work_status, qingxie_bms->falt_status, qingxie_bms->self_check, qingxie_bms->Id, qingxie_bms->gass_mass, qingxie_bms->gass_percent, qingxie_bms->runtime_remain, qingxie_bms->fan_percent, qingxie_bms->fan_rpm, qingxie_bms->sys_run_state, qingxie_bms->sys_fault_state, qingxie_bms->sys_fault_code, qingxie_bms->lipo_current, qingxie_bms->total_runtime);
|
|
|
#else
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_QINGXIE_BMS, (const char *)qingxie_bms, MAVLINK_MSG_ID_QINGXIE_BMS_MIN_LEN, MAVLINK_MSG_ID_QINGXIE_BMS_LEN, MAVLINK_MSG_ID_QINGXIE_BMS_CRC);
|
|
|
#endif
|
|
@@ -391,7 +541,7 @@ static inline void mavlink_msg_qingxie_bms_send_struct(mavlink_channel_t chan, c
|
|
|
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_qingxie_bms_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t bat_voltage, uint16_t servo_current, uint16_t stack_voltage, uint16_t servo_voltage, uint16_t bat_refuel_current, uint16_t gas_tank_pressure, uint16_t pipe_pressure, uint16_t pcb_temp, uint16_t stack_temp, uint16_t work_status, uint16_t falt_status, uint8_t self_check, uint8_t Id)
|
|
|
+static inline void mavlink_msg_qingxie_bms_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t bat_voltage, uint16_t servo_current, uint16_t stack_voltage, uint16_t servo_voltage, uint16_t bat_refuel_current, uint16_t gas_tank_pressure, uint16_t pipe_pressure, uint16_t pcb_temp, uint16_t stack_temp, uint16_t work_status, uint16_t falt_status, uint8_t self_check, uint8_t Id, uint16_t gass_mass, uint16_t gass_percent, uint16_t runtime_remain, uint8_t fan_percent, uint8_t fan_rpm, uint8_t sys_run_state, uint8_t sys_fault_state, uint16_t sys_fault_code, uint16_t lipo_current, uint16_t total_runtime)
|
|
|
{
|
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
char *buf = (char *)msgbuf;
|
|
@@ -408,6 +558,16 @@ static inline void mavlink_msg_qingxie_bms_send_buf(mavlink_message_t *msgbuf, m
|
|
|
_mav_put_uint16_t(buf, 20, falt_status);
|
|
|
_mav_put_uint8_t(buf, 22, self_check);
|
|
|
_mav_put_uint8_t(buf, 23, Id);
|
|
|
+ _mav_put_uint16_t(buf, 24, gass_mass);
|
|
|
+ _mav_put_uint16_t(buf, 26, gass_percent);
|
|
|
+ _mav_put_uint16_t(buf, 28, runtime_remain);
|
|
|
+ _mav_put_uint8_t(buf, 30, fan_percent);
|
|
|
+ _mav_put_uint8_t(buf, 31, fan_rpm);
|
|
|
+ _mav_put_uint8_t(buf, 32, sys_run_state);
|
|
|
+ _mav_put_uint8_t(buf, 33, sys_fault_state);
|
|
|
+ _mav_put_uint16_t(buf, 34, sys_fault_code);
|
|
|
+ _mav_put_uint16_t(buf, 36, lipo_current);
|
|
|
+ _mav_put_uint16_t(buf, 38, total_runtime);
|
|
|
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_QINGXIE_BMS, buf, MAVLINK_MSG_ID_QINGXIE_BMS_MIN_LEN, MAVLINK_MSG_ID_QINGXIE_BMS_LEN, MAVLINK_MSG_ID_QINGXIE_BMS_CRC);
|
|
|
#else
|
|
@@ -425,6 +585,16 @@ static inline void mavlink_msg_qingxie_bms_send_buf(mavlink_message_t *msgbuf, m
|
|
|
packet->falt_status = falt_status;
|
|
|
packet->self_check = self_check;
|
|
|
packet->Id = Id;
|
|
|
+ packet->gass_mass = gass_mass;
|
|
|
+ packet->gass_percent = gass_percent;
|
|
|
+ packet->runtime_remain = runtime_remain;
|
|
|
+ packet->fan_percent = fan_percent;
|
|
|
+ packet->fan_rpm = fan_rpm;
|
|
|
+ packet->sys_run_state = sys_run_state;
|
|
|
+ packet->sys_fault_state = sys_fault_state;
|
|
|
+ packet->sys_fault_code = sys_fault_code;
|
|
|
+ packet->lipo_current = lipo_current;
|
|
|
+ packet->total_runtime = total_runtime;
|
|
|
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_QINGXIE_BMS, (const char *)packet, MAVLINK_MSG_ID_QINGXIE_BMS_MIN_LEN, MAVLINK_MSG_ID_QINGXIE_BMS_LEN, MAVLINK_MSG_ID_QINGXIE_BMS_CRC);
|
|
|
#endif
|
|
@@ -566,6 +736,106 @@ static inline uint8_t mavlink_msg_qingxie_bms_get_Id(const mavlink_message_t* ms
|
|
|
return _MAV_RETURN_uint8_t(msg, 23);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * @brief Get field gass_mass from qingxie_bms message
|
|
|
+ *
|
|
|
+ * @return [dg]
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_qingxie_bms_get_gass_mass(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint16_t(msg, 24);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field gass_percent from qingxie_bms message
|
|
|
+ *
|
|
|
+ * @return [%]
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_qingxie_bms_get_gass_percent(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint16_t(msg, 26);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field runtime_remain from qingxie_bms message
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_qingxie_bms_get_runtime_remain(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint16_t(msg, 28);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field fan_percent from qingxie_bms message
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_qingxie_bms_get_fan_percent(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 30);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field fan_rpm from qingxie_bms message
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_qingxie_bms_get_fan_rpm(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 31);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field sys_run_state from qingxie_bms message
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_qingxie_bms_get_sys_run_state(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 32);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field sys_fault_state from qingxie_bms message
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_qingxie_bms_get_sys_fault_state(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 33);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field sys_fault_code from qingxie_bms message
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_qingxie_bms_get_sys_fault_code(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint16_t(msg, 34);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field lipo_current from qingxie_bms message
|
|
|
+ *
|
|
|
+ * @return [dA]
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_qingxie_bms_get_lipo_current(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint16_t(msg, 36);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field total_runtime from qingxie_bms message
|
|
|
+ *
|
|
|
+ * @return [dh]
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_qingxie_bms_get_total_runtime(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint16_t(msg, 38);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* @brief Decode a qingxie_bms message into a struct
|
|
|
*
|
|
@@ -588,6 +858,16 @@ static inline void mavlink_msg_qingxie_bms_decode(const mavlink_message_t* msg,
|
|
|
qingxie_bms->falt_status = mavlink_msg_qingxie_bms_get_falt_status(msg);
|
|
|
qingxie_bms->self_check = mavlink_msg_qingxie_bms_get_self_check(msg);
|
|
|
qingxie_bms->Id = mavlink_msg_qingxie_bms_get_Id(msg);
|
|
|
+ qingxie_bms->gass_mass = mavlink_msg_qingxie_bms_get_gass_mass(msg);
|
|
|
+ qingxie_bms->gass_percent = mavlink_msg_qingxie_bms_get_gass_percent(msg);
|
|
|
+ qingxie_bms->runtime_remain = mavlink_msg_qingxie_bms_get_runtime_remain(msg);
|
|
|
+ qingxie_bms->fan_percent = mavlink_msg_qingxie_bms_get_fan_percent(msg);
|
|
|
+ qingxie_bms->fan_rpm = mavlink_msg_qingxie_bms_get_fan_rpm(msg);
|
|
|
+ qingxie_bms->sys_run_state = mavlink_msg_qingxie_bms_get_sys_run_state(msg);
|
|
|
+ qingxie_bms->sys_fault_state = mavlink_msg_qingxie_bms_get_sys_fault_state(msg);
|
|
|
+ qingxie_bms->sys_fault_code = mavlink_msg_qingxie_bms_get_sys_fault_code(msg);
|
|
|
+ qingxie_bms->lipo_current = mavlink_msg_qingxie_bms_get_lipo_current(msg);
|
|
|
+ qingxie_bms->total_runtime = mavlink_msg_qingxie_bms_get_total_runtime(msg);
|
|
|
#else
|
|
|
uint8_t len = msg->len < MAVLINK_MSG_ID_QINGXIE_BMS_LEN? msg->len : MAVLINK_MSG_ID_QINGXIE_BMS_LEN;
|
|
|
memset(qingxie_bms, 0, MAVLINK_MSG_ID_QINGXIE_BMS_LEN);
|