Commit cded76cf authored by liyuanhong's avatar liyuanhong

修改了熄火失败的bug

parent 705f5da0
{"time": {"dateTime": "2020-04-24 11:28:51", "date": "2020-04-24", "time": "11:28:51"}, "curDayTravel": {"todayTotalMilleage": 1755, "todayTotalOil": 314, "todayTotalTime": 157, "theMilleage": 1738, "theOil": 158, "theTime": 79}, "travelData": {"totalMilleage": 1755, "totalOil": 314, "totalTime": 157}}
\ No newline at end of file
{"time": {"dateTime": "2020-04-24 11:28:51", "date": "2020-04-24", "time": "11:28:51"}, "curDayTravel": {"todayTotalMilleage": 3675, "todayTotalOil": 434, "todayTotalTime": 277, "theMilleage": 640, "theOil": 40, "theTime": 40}, "travelData": {"totalMilleage": 3675, "totalOil": 434, "totalTime": 277}}
\ No newline at end of file
......@@ -138,7 +138,6 @@ class GPSReport_protocol(ProtocolBase):
Vdop = self.getVdop(self.Vdop)
#状态字节
statusBit = self.getStatusBit(self.statusBit)
print(statusBit)
#电压
valtage = self.getValtage(self.valtage)
#OBD车速
......
......@@ -345,6 +345,9 @@ class MessageSimulaterService():
#车机熄火
########################################################
def fireOff(self):
gpsLineIndex = self.gpsLineIndex
if gpsLineIndex >= len(self.gpsLine):
gpsLineIndex = gpsLineIndex - 1
fireOffParams = {"msgID": "0200", "phoneNum": "13146201119", "msgWaterCode": "1", "encryptionType": "0", "subPkg": "0",
"pkgCounts": "0", "baseInfo": {"alarmFlag": 0, "status": 262402, "latitude": 29.569133, "longtitude": 106.586571,
"elevation": "521", "speed": "0", "directionAngle": "59",
......@@ -355,8 +358,8 @@ class MessageSimulaterService():
fireOffParams["phoneNum"] = self.data["phoneNum"]
fireOffParams["msgWaterCode"] = self.sn
fireOffParams["baseInfo"]["infoTime"] = curTime
fireOffParams["baseInfo"]["latitude"] = self.gpsLine[self.gpsLineIndex]["lat"]
fireOffParams["baseInfo"]["longtitude"] = self.gpsLine[self.gpsLineIndex]["lng"]
fireOffParams["baseInfo"]["latitude"] = self.gpsLine[gpsLineIndex]["lat"]
fireOffParams["baseInfo"]["longtitude"] = self.gpsLine[gpsLineIndex]["lng"]
msgObj = Location_msg()
msg = msgObj.generateMsg_GUI(fireOffParams)
self.sendMsg(msg)
......
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