Commit 84f7486b authored by liyuanhong's avatar liyuanhong

修改了每次启动跑轨迹,报文序列号需要重置的操作

parent e7f83f82
{"time": {"dateTime": "2020-06-17 10:22:01", "date": "2020-06-17", "time": "10:22:01"}, "curDayTravel": {"todayTotalMilleage": 3498, "todayTotalOil": 318, "todayTotalTime": 159, "theMilleage": 39600, "theOil": 3600, "theTime": 1800}, "travelData": {"totalMilleage": 39600, "totalOil": 3600, "totalTime": 1800}}
\ No newline at end of file
{"time": {"dateTime": "2020-06-24 10:06:01", "date": "2020-06-24", "time": "10:06:01"}, "curDayTravel": {"todayTotalMilleage": 1320, "todayTotalOil": 120, "todayTotalTime": 60, "theMilleage": 40920, "theOil": 3720, "theTime": 1860}, "travelData": {"totalMilleage": 40920, "totalOil": 3720, "totalTime": 1860}}
\ No newline at end of file
......@@ -501,6 +501,7 @@ class AutoCarTimerService():
self.writeToFile("result.txt", info, 0)
while True:
if self.isTimerStart(year,month,day,hour,minute,second):
self.sn = 1
self.connectService()
# self.startRevService() #启动接收消息服务
self.sendLoginMsg()
......
[2020-06-17 10:45:19] 启动了模拟程序
[2020-06-17 10:46:00] 建立了连接
[2020-06-17 10:46:00] 进行了登录操作
[2020-06-17 10:46:00] 发送了版本信息
[2020-06-17 10:46:01] 当前设置了GPS轨迹:gpsLine5.txt
[2020-06-17 10:46:01] 发送了点火事件
[2020-06-17 10:46:03] 纬度:29.571413 经度:106.489936
[2020-06-17 10:46:06] 纬度:29.571413 经度:106.489936
[2020-06-17 10:46:09] 纬度:29.571413 经度:106.489936
[2020-06-17 10:46:12] 纬度:29.571413 经度:106.489936
[2020-06-17 10:46:16] 纬度:29.572476 经度:106.489228
[2020-06-17 10:46:19] 纬度:29.57247 经度:106.489278
[2020-06-17 10:46:22] 纬度:29.572478 经度:106.48928
[2020-06-17 10:46:25] 纬度:29.572493 经度:106.489308
[2020-06-17 10:46:28] 纬度:29.572491 经度:106.489336
[2020-06-17 10:46:31] 纬度:29.572516 经度:106.489401
[2020-06-17 10:46:34] 纬度:29.572516 经度:106.489463
[2020-06-24 10:06:42] 启动了模拟程序
[2020-06-24 10:07:00] 建立了连接
[2020-06-24 10:07:00] 进行了登录操作
[2020-06-24 10:07:00] 发送了版本信息
[2020-06-24 10:07:01] 当前设置了GPS轨迹:gpsLine4.txt
[2020-06-24 10:07:01] 发送了点火事件
[2020-06-24 10:07:03] 纬度:29.541383 经度:106.484708
[2020-06-24 10:07:06] 纬度:29.541383 经度:106.484708
[2020-06-24 10:07:09] 纬度:29.54261 经度:106.48525
[2020-06-24 10:07:12] 纬度:29.542851 经度:106.485416
[2020-06-24 10:07:16] 纬度:29.543066 经度:106.485576
[2020-06-24 10:07:19] 纬度:29.543145 经度:106.485718
[2020-06-24 10:07:22] 纬度:29.543361 经度:106.486151
[2020-06-24 10:07:25] 纬度:29.543641 经度:106.486681
[2020-06-24 10:07:28] 纬度:29.5442 经度:106.487396
[2020-06-24 10:07:31] 纬度:29.54584 经度:106.489105
[2020-06-24 10:07:34] 纬度:29.54596 经度:106.489171
[2020-06-24 10:07:37] 纬度:29.546175 经度:106.48921
[2020-06-24 10:07:41] 纬度:29.546413 经度:106.489215
[2020-06-24 10:07:44] 纬度:29.546638 经度:106.489138
[2020-06-24 10:07:47] 纬度:29.546963 经度:106.48901
[2020-06-24 10:07:50] 纬度:29.548548 经度:106.488645
......@@ -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=46,second=0)
autoCarObj.startService(year=0,month=0,day=0,hour=0,minute=7,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