Commit bd947340 authored by liyuanhong's avatar liyuanhong

M500模拟器修改了疲劳驾驶和超速报警错误的问题

parent 4cf9b118
{"time": {"dateTime": "2020-06-18 09:52:18", "date": "2020-06-18", "time": "09:52:18"}, "curDayTravel": {"todayTotalMilleage": 25532, "todayTotalOil": 2282, "todayTotalTime": 1550, "theMilleage": 1162, "theOil": 112, "theTime": 70}, "travelData": {"totalMilleage": 453102, "totalOil": 42297, "totalTime": 27043}, "event": {"threeRapid": {"totalRapidlyAccelerate": 33, "totalSharpSlowdown": 23, "totalSharpTurn": 26}}} {"time": {"dateTime": "2020-06-19 13:56:33", "date": "2020-06-19", "time": "13:56:33"}, "curDayTravel": {"todayTotalMilleage": 747, "todayTotalOil": 72, "todayTotalTime": 45, "theMilleage": 83, "theOil": 8, "theTime": 5}, "travelData": {"totalMilleage": 453849, "totalOil": 42369, "totalTime": 27088}, "event": {"threeRapid": {"totalRapidlyAccelerate": 33, "totalSharpSlowdown": 23, "totalSharpTurn": 26}}}
\ No newline at end of file \ No newline at end of file
...@@ -296,12 +296,12 @@ class EventReport_protocol(ProtocolBase): ...@@ -296,12 +296,12 @@ class EventReport_protocol(ProtocolBase):
if ("0027" in eventData.keys()): #超速告警 if ("0027" in eventData.keys()): #超速告警
eventObj = EventClass() eventObj = EventClass()
theData = eventObj.overSpeedAlarm(int(eventData["0027"]["alarmType"]), theData = eventObj.overSpeedAlarm(int(eventData["0027"]["alarmType"]),
int(eventData["0027"]["durTime"])) int(eventData["0027"]["durationTime"]))
data = data + "0027" + self.int2hexStringByBytes(int((len(theData) / 2)), 2) + theData data = data + "0027" + self.int2hexStringByBytes(int((len(theData) / 2)), 2) + theData
if ("0028" in eventData.keys()): #疲劳驾驶告警 if ("0028" in eventData.keys()): #疲劳驾驶告警
eventObj = EventClass() eventObj = EventClass()
theData = eventObj.tiredDrivingAlarm(int(eventData["0028"]["alarmType"]), theData = eventObj.tiredDrivingAlarm(int(eventData["0028"]["alarmType"]),
int(eventData["0028"]["durTime"]),) int(eventData["0028"]["durationTime"]),)
data = data + "0028" + self.int2hexStringByBytes(int((len(theData) / 2)), 2) + theData data = data + "0028" + self.int2hexStringByBytes(int((len(theData) / 2)), 2) + theData
if ("0032" in eventData.keys()): #怠速时间过长报警 if ("0032" in eventData.keys()): #怠速时间过长报警
eventObj = EventClass() eventObj = EventClass()
......
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