qingfeng 3 роки тому
батько
коміт
3eb7b844e0
1 змінених файлів з 1 додано та 25 видалено
  1. 1 25
      LIB/MIDDLE/CellStateEstimation/BatSafetyWarning/main.py

+ 1 - 25
LIB/MIDDLE/CellStateEstimation/BatSafetyWarning/main.py

@@ -16,18 +16,8 @@ def saftywarning_cal():
     global df_warning_ram2
     global df_warning_ram3
     global df_lfp_ram
-    global now_time
     
-    start=time.time()
-    # now_time=datetime.datetime.now()
-    # start_time=now_time-datetime.timedelta(hours=12)
-    # start_time1=now_time-datetime.timedelta(days=7)
-    # start_time2=now_time-datetime.timedelta(days=90)
-    # start_time=start_time.strftime('%Y-%m-%d %H:%M:%S')
-    # start_time1=start_time1.strftime('%Y-%m-%d %H:%M:%S')
-    # end_time=now_time.strftime('%Y-%m-%d %H:%M:%S')
-
-    now_time=now_time+datetime.timedelta(hours=12)
+    now_time=datetime.datetime.now()
     start_time=now_time-datetime.timedelta(hours=12)
     start_time1=now_time-datetime.timedelta(days=7)
     start_time2=now_time-datetime.timedelta(days=90)
@@ -155,17 +145,6 @@ def saftywarning_cal():
         else:
             pass
 
-        
-        print(df_warning_ram)
-        print(df_warning_ram1)
-        print(df_warning_ram2)
-        print(df_warning_ram3)
-        print(df_lfp_ram)
-
-        end=time.time()
-        print(end-start)
-        # print(df_soh)
-
 #...............................................主函数起定时作用.......................................................................................................................
 if __name__ == "__main__":
     
@@ -195,9 +174,6 @@ if __name__ == "__main__":
     df_warning_ram3=pd.DataFrame(columns=['sn','standingtime','standingtime1'])
     df_lfp_ram=pd.DataFrame()
 
-    now_time='2021-10-16 00:00:00'
-    now_time=datetime.datetime.strptime(now_time,'%Y-%m-%d %H:%M:%S')
-
     #定时任务.......................................................................................................................................................................
     scheduler = BlockingScheduler()
     scheduler.add_job(saftywarning_cal, 'interval', seconds=5)