Преглед изворни кода

内短路报警逻辑更新

qingfeng пре 2 година
родитељ
комит
a1791b72bf

+ 2 - 3
LIB/MIDDLE/CellStateEstimation/BatSafetyWarning/V1_0_1/CBMSSafetyWarning.py

@@ -116,11 +116,10 @@ class SafetyWarning:
         #充电电压判断--------------------------------------------
         if not df_short1.empty:
             for i in range(3):
-                deltvolt_init=eval(df_short1.loc[0,'short_current'])
-                deltvolt_rst=np.array(deltvolt_init[i])
+                deltvolt_rst=np.array([0]*self.param.CellVoltNums)
                 for j in range(len(df_short1)):
                     try:
-                        deltvolt=eval(df_short1.loc[j+1,'short_current'])
+                        deltvolt=eval(df_short1.loc[j,'short_current'])
                         deltvolt_rst=deltvolt_rst+np.array(deltvolt[i]) #所有结果累加
                     except:
                         continue