Commit c1fd94e4 authored by liyuanhong's avatar liyuanhong

M500 模拟器增加了经纬度设置为0的功能,修复bug

parent b7797ad1
{"time": {"dateTime": "2020-05-19 11:09:47", "date": "2020-05-19", "time": "11:09:47"}, "curDayTravel": {"todayTotalMilleage": 6190, "todayTotalOil": 595, "todayTotalTime": 373, "theMilleage": 83, "theOil": 8, "theTime": 5}, "travelData": {"totalMilleage": 289927, "totalOil": 27442, "totalTime": 17155}, "event": {"threeRapid": {"totalRapidlyAccelerate": 14, "totalSharpSlowdown": 13, "totalSharpTurn": 13}}} {"time": {"dateTime": "2020-05-19 11:09:47", "date": "2020-05-19", "time": "11:09:47"}, "curDayTravel": {"todayTotalMilleage": 7518, "todayTotalOil": 723, "todayTotalTime": 453, "theMilleage": 1328, "theOil": 128, "theTime": 80}, "travelData": {"totalMilleage": 291255, "totalOil": 27570, "totalTime": 17235}, "event": {"threeRapid": {"totalRapidlyAccelerate": 14, "totalSharpSlowdown": 13, "totalSharpTurn": 13}}}
\ No newline at end of file \ No newline at end of file
...@@ -506,6 +506,13 @@ class ProtocolSimulaterService(): ...@@ -506,6 +506,13 @@ class ProtocolSimulaterService():
gpsObj = GPSReport_protocol(DEV_ID=self.carId,WATER_CODE=self.sn) gpsObj = GPSReport_protocol(DEV_ID=self.carId,WATER_CODE=self.sn)
gpsObj.setLatitude(self.gpsLine[self.gpsLineIndex]["lat"]) gpsObj.setLatitude(self.gpsLine[self.gpsLineIndex]["lat"])
gpsObj.setLongitude(self.gpsLine[self.gpsLineIndex]["lng"]) gpsObj.setLongitude(self.gpsLine[self.gpsLineIndex]["lng"])
if self.lngLatIsOk == 0:
gpsObj.setLatitude(0)
gpsObj.setLongitude(0)
if self.GPSValid == 1:
gpsObj.setGpsValid(1)
elif self.GPSValid == 0:
gpsObj.setGpsValid(0)
gpsObj.setDirectionAngle(self.getDirAngle()) gpsObj.setDirectionAngle(self.getDirAngle())
timeS = int(time.time()) - 8 * 3600 timeS = int(time.time()) - 8 * 3600
timeArray = time.localtime(timeS) timeArray = time.localtime(timeS)
......
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