|
|
@@ -465,5 +465,20 @@ static inline u8 shark_battery_get_rs485_state(SUB_BMS_INFO *info)
|
|
|
return info->connected ? 3 : 2;
|
|
|
}
|
|
|
|
|
|
+static inline shark_bool shark_battery_is_discharge(SUB_BMS_INFO *info)
|
|
|
+{
|
|
|
+ return (info->packet_common.bms_status & ST_DISCHRG_CUR) != 0;
|
|
|
+}
|
|
|
+
|
|
|
+static inline shark_bool shark_battery_is_discharge1(void)
|
|
|
+{
|
|
|
+ return shark_battery_is_discharge(&sub_bms_info_1);
|
|
|
+}
|
|
|
+
|
|
|
+static inline shark_bool shark_battery_is_discharge2(void)
|
|
|
+{
|
|
|
+ return shark_battery_is_discharge(&sub_bms_info_2);
|
|
|
+}
|
|
|
+
|
|
|
#endif
|
|
|
|