Commit 3d253303 authored by liyuanhong's avatar liyuanhong

修改了获取gps轨迹点数据越界问题

parent d3c9a7c6
......@@ -134,6 +134,7 @@ class AutoCarService():
print(info)
self.writeToFile("result.txt", info + "\n", 1)
elif self.gpsLineIndex == len(self.gpsLine):
self.gpsLineIndex = self.gpsLineIndex - 1
# self.fireOff()
self.stopTravelService()
info = self.getCurTime() + " gps轨迹跑完,自动停止行驶!"
......
This diff is collapsed.
......@@ -10,8 +10,8 @@ def startSimulaterService():
autoCarObj.setCarId("M202003060520") #设置车机号
autoCarObj.setSendDur(1) # 设置发送消息的间隔时间
autoCarObj.setTimeout(30) # 设置socket超时时间
autoCarObj.setChangeGPSLineTime(1 * 2 * 60) # 设置跑完一条轨迹后,进入下一条轨迹的时间(请设置至少大于4分钟的时间)
autoCarObj.setServiceTime(1 * 5 * 60) # 设置整个服务的持续时间
autoCarObj.setChangeGPSLineTime(1 * 3 * 60) # 设置跑完一条轨迹后,进入下一条轨迹的时间(请设置至少大于4分钟的时间)
autoCarObj.setServiceTime(1 * 6 * 60) # 设置整个服务的持续时间
autoCarObj.setOilExpend(10) # 设置1L 油跑多少公里
autoCarObj.setSpeed(80) #设置车速,每小时多少公里
......
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