|
@@ -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, '电池发生热失控', '联系用户立即远离电池,并通知技术人员介入']
|