Jelajahi Sumber

更改热失控报警main

qingfeng 3 tahun lalu
induk
melakukan
dfd06ec3ee
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      LIB/MIDDLE/CellStateEstimation/BatSafetyAlarm/main.py

+ 1 - 1
LIB/MIDDLE/CellStateEstimation/BatSafetyAlarm/main.py

@@ -80,8 +80,8 @@ def diag_cal(sn_list, df_bms_ram):
                 
             #当前热失控已超过一天变为历史故障并更改数据库
             elif (now_time-df_diag_ram_sn.iloc[-1]['start_time']).total_seconds()>24*3600:
-                df_diag_ram=df_diag_ram.drop(df_diag_ram['sn']==sn)    #删除ram中的当前故障
                 df_diag_ram_sn.iloc[-1]['end_time']=now_time
+                df_diag_ram_sn['Batpos']=1
                 with open(r'D:\Platform\platform_python\data_analyze_platform\USER\spf\01qixiang\06BatSafetyAlarm\热失控.txt','a') as file:
                         file.write(str(tuple(df_diag_res.iloc[-1]))+'\n')