瀏覽代碼

内短路报警逻辑更新

qingfeng 2 年之前
父節點
當前提交
a1791b72bf
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      LIB/MIDDLE/CellStateEstimation/BatSafetyWarning/V1_0_1/CBMSSafetyWarning.py

+ 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