Browse Source

Alarm故障码由119更改为C599

qingfeng 2 years ago
parent
commit
93969d5e27

+ 3 - 3
LIB/MIDDLE/CellStateEstimation/BatSafetyAlarm/V1_0_1/CBMSSafetyAlarm.py

@@ -215,11 +215,11 @@ class SafetyAlarm:
             trw_array=np.array([trwtemp, trwcellvolt, trwpackvolt])
 
             if np.sum(trw_array)>3.5 and np.sum(trw_array>0.5)>1.5:
-                fltcode=119
+                fltcode='C599'
                 df_res.loc[0]=[self.bmstime[len(self.bmstime)-1], end_time, self.sn, fltcode, 5, '电池发生热失控', '联系用户立即远离电池,并通知技术人员介入']
                 df_ram_alarm=pd.DataFrame(columns=['sn','time','safetywarning1','safetywarning2'])
             elif safetywarning1>2.5 and np.sum(trw_array)>1.5 and np.sum(trw_array>0.5)>1.5:
-                fltcode=119
+                fltcode='C599'
                 df_res.loc[0]=[self.bmstime[len(self.bmstime)-1], end_time, self.sn, fltcode, 5, '电池发生热失控', '联系用户立即远离电池,并通知技术人员介入']
                 df_ram_alarm=pd.DataFrame(columns=['sn','time','safetywarning1','safetywarning2'])
             else:
@@ -248,7 +248,7 @@ class SafetyAlarm:
             df_ram_alarm=self.df_ram_alarm
             df_ram_bms=self.df_ram_bms
             if (safetywarning1>2.5 or safetywarning2>2.5) and (time_now-df_ram_alarm.iloc[-1]['time']).total_seconds()>120:
-                fltcode=119
+                fltcode='C599'
                 time_now=time_now.strftime('%Y-%m-%d %H:%M:%S')
                 time_now=datetime.datetime.strptime(time_now,'%Y-%m-%d %H:%M:%S')
                 df_res.loc[0]=[time_now, end_time, self.sn, fltcode, 5, '电池发生热失控', '联系用户立即远离电池,并通知技术人员介入']

+ 1 - 1
LIB/MIDDLE/CellStateEstimation/Common/V1_0_1/log.py

@@ -17,7 +17,7 @@ class Mylog:
                 Level=logging.WARNING
             else:
                 Level=logging.ERROR
-        logging.basicConfig(filename=r'D:\Platform\platform_python\data_analyze_platform\USER\spf\101log\\'+self.name, level=Level,format='%(asctime)s - %(levelname)s - %(message)s')
+        logging.basicConfig(filename=r'D:\Develop\User\Songpengfei\data_analyze_platform\WORK\101log\\'+self.name, level=Level,format='%(asctime)s - %(levelname)s - %(message)s')
 
 
     def logopt(self,*info):