Commit 9e2a86e2 authored by liyuanhong's avatar liyuanhong

网关连接失败不会导致崩溃

parent 594665b3
......@@ -521,7 +521,6 @@ class AutoCarTimerService():
timeArray = time.localtime(timeS)
datetime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
err = traceback.format_exc()
print(err)
self.writeToFile("data/log1.txt", "[" + datetime + "]", type=1)
self.writeToFile("data/log1.txt", err, type=1)
else:
......
[2020-08-05 18:21:40] 启动了模拟程序
[2020-08-05 18:23:34] 启动了模拟程序
[2020-08-05 18:24:00] 建立了连接
[2020-08-05 18:24:00] 进行了登录操作
[2020-08-05 18:24:00] 发送了版本信息
[2020-08-05 18:24:01] 当前设置了GPS轨迹:gpsLine2.txt
[2020-08-05 18:24:01] 发送了点火事件
......@@ -29,7 +29,7 @@ def startSimulaterService():
如果想要每天的9点自动执行一次轨迹行驶,则设置:year=0,month=0,day=0,hour=9,minute=0,second=0
如果想要每天的9点30自动执行一次轨迹行驶,则设置:year=0,month=0,day=0,hour=9,minute=30,second=0
'''
autoCarObj.startService(year=0,month=0,day=0,hour=0,minute=21,second=0)
autoCarObj.startService(year=0,month=0,day=0,hour=0,minute=24,second=0)
if __name__ == "__main__":
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment