Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
new-socketemulator
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李远洪
new-socketemulator
Commits
1534c01e
Commit
1534c01e
authored
Jun 18, 2020
by
liyuanhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了M500模拟器疲劳驾驶报错的问题
parent
02214250
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
6 deletions
+6
-6
data/m300Tools/carData/M202003060518.json
data/m300Tools/carData/M202003060518.json
+1
-1
data/messageTools/carData/012201500010.json
data/messageTools/carData/012201500010.json
+1
-1
data/protocolTools/carData/M202003060520.json
data/protocolTools/carData/M202003060520.json
+1
-1
lib/protocol/report/EventReport_protocol.py
lib/protocol/report/EventReport_protocol.py
+1
-1
views/protocolTools/M_carSimulater_process.py
views/protocolTools/M_carSimulater_process.py
+2
-2
No files found.
data/m300Tools/carData/M202003060518.json
View file @
1534c01e
{
"time"
:
{
"dateTime"
:
"2020-06-16 15:57:51"
,
"date"
:
"2020-06-16"
,
"time"
:
"15:57:51"
},
"curDayTravel"
:
{
"todayTotalMilleage"
:
581
,
"todayTotalOil"
:
56
,
"todayTotalTime"
:
35
,
"theMilleage"
:
581
,
"theOil"
:
56
,
"theTime"
:
35
},
"travelData"
:
{
"totalMilleage"
:
7602
,
"totalOil"
:
657
,
"totalTime"
:
463
},
"event"
:
{
"threeRapid"
:
{
"totalRapidlyAccelerate"
:
6
,
"totalSharpSlowdown"
:
5
,
"totalSharpTurn"
:
0
}}}
{
"time"
:
{
"dateTime"
:
"2020-06-17 11:04:45"
,
"date"
:
"2020-06-17"
,
"time"
:
"11:04:45"
},
"curDayTravel"
:
{
"todayTotalMilleage"
:
30521
,
"todayTotalOil"
:
2966
,
"todayTotalTime"
:
1837
,
"theMilleage"
:
1584
,
"theOil"
:
144
,
"theTime"
:
96
},
"travelData"
:
{
"totalMilleage"
:
38123
,
"totalOil"
:
3623
,
"totalTime"
:
2300
},
"event"
:
{
"threeRapid"
:
{
"totalRapidlyAccelerate"
:
11
,
"totalSharpSlowdown"
:
10
,
"totalSharpTurn"
:
0
}}}
\ No newline at end of file
\ No newline at end of file
data/messageTools/carData/012201500010.json
View file @
1534c01e
{
"time"
:
{
"dateTime"
:
"2020-06-16 09:52:28"
,
"date"
:
"2020-06-16"
,
"time"
:
"09:52:28"
},
"curDayTravel"
:
{
"todayTotalMilleage"
:
15591
,
"todayTotalOil"
:
1431
,
"todayTotalTime"
:
944
,
"theMilleage"
:
2241
,
"theOil"
:
216
,
"theTime"
:
135
},
"travelData"
:
{
"totalMilleage"
:
92297
,
"totalOil"
:
8325
,
"totalTime"
:
5669
}}
{
"time"
:
{
"dateTime"
:
"2020-06-17 09:52:48"
,
"date"
:
"2020-06-17"
,
"time"
:
"09:52:48"
},
"curDayTravel"
:
{
"todayTotalMilleage"
:
16423
,
"todayTotalOil"
:
1588
,
"todayTotalTime"
:
989
,
"theMilleage"
:
2129
,
"theOil"
:
194
,
"theTime"
:
129
},
"travelData"
:
{
"totalMilleage"
:
108720
,
"totalOil"
:
9913
,
"totalTime"
:
6658
}}
\ No newline at end of file
\ No newline at end of file
data/protocolTools/carData/M202003060520.json
View file @
1534c01e
{
"time"
:
{
"dateTime"
:
"2020-06-16 13:13:58"
,
"date"
:
"2020-06-16"
,
"time"
:
"13:13:58"
},
"curDayTravel"
:
{
"todayTotalMilleage"
:
11869
,
"todayTotalOil"
:
1144
,
"todayTotalTime"
:
715
,
"theMilleage"
:
3403
,
"theOil"
:
328
,
"theTime"
:
205
},
"travelData"
:
{
"totalMilleage"
:
391566
,
"totalOil"
:
36681
,
"totalTime"
:
23315
},
"event"
:
{
"threeRapid"
:
{
"totalRapidlyAccelerate"
:
24
,
"totalSharpSlowdown"
:
20
,
"totalSharpTurn"
:
21
}}}
{
"time"
:
{
"dateTime"
:
"2020-06-18 09:52:18"
,
"date"
:
"2020-06-18"
,
"time"
:
"09:52:18"
},
"curDayTravel"
:
{
"todayTotalMilleage"
:
20967
,
"todayTotalOil"
:
1842
,
"todayTotalTime"
:
1275
,
"theMilleage"
:
996
,
"theOil"
:
96
,
"theTime"
:
60
},
"travelData"
:
{
"totalMilleage"
:
448537
,
"totalOil"
:
41857
,
"totalTime"
:
26768
},
"event"
:
{
"threeRapid"
:
{
"totalRapidlyAccelerate"
:
33
,
"totalSharpSlowdown"
:
23
,
"totalSharpTurn"
:
26
}}}
\ No newline at end of file
\ No newline at end of file
lib/protocol/report/EventReport_protocol.py
View file @
1534c01e
...
@@ -300,7 +300,7 @@ class EventReport_protocol(ProtocolBase):
...
@@ -300,7 +300,7 @@ class EventReport_protocol(ProtocolBase):
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
.
collisionAlarmExtraInfo
(
int
(
eventData
[
"0028"
][
"alarmType"
]),
theData
=
eventObj
.
tiredDrivingAlarm
(
int
(
eventData
[
"0028"
][
"alarmType"
]),
int
(
eventData
[
"0028"
][
"durTime"
]),)
int
(
eventData
[
"0028"
][
"durTime"
]),)
data
=
data
+
"0028"
+
self
.
int2hexStringByBytes
(
int
((
len
(
theData
)
/
2
)),
2
)
+
theData
data
=
data
+
"0028"
+
self
.
int2hexStringByBytes
(
int
((
len
(
theData
)
/
2
)),
2
)
+
theData
if
(
"0036"
in
eventData
.
keys
()):
#低档高速报警
if
(
"0036"
in
eventData
.
keys
()):
#低档高速报警
...
...
views/protocolTools/M_carSimulater_process.py
View file @
1534c01e
...
@@ -1041,7 +1041,7 @@ def sendOverSpeedAlarmEvent():
...
@@ -1041,7 +1041,7 @@ def sendOverSpeedAlarmEvent():
obj
=
EventReport_protocol
(
data
=
jdata
)
obj
=
EventReport_protocol
(
data
=
jdata
)
gpsData
=
service
.
genGPSData2
()
gpsData
=
service
.
genGPSData2
()
obj
.
setGPSPkg
(
gpsData
)
obj
.
setGPSPkg
(
gpsData
)
obj
.
setEventType
(
"00
4A
"
)
obj
.
setEventType
(
"00
27
"
)
msg
=
obj
.
generateEventMsg
()
msg
=
obj
.
generateEventMsg
()
service
.
serviceSendMsg
(
msg
,
"超速告警事件"
)
service
.
serviceSendMsg
(
msg
,
"超速告警事件"
)
service
.
setSn
(
service
.
getSn
()
+
1
)
service
.
setSn
(
service
.
getSn
()
+
1
)
...
@@ -1088,7 +1088,7 @@ def sendTiredDrivingAlarmEvent():
...
@@ -1088,7 +1088,7 @@ def sendTiredDrivingAlarmEvent():
obj
=
EventReport_protocol
(
data
=
jdata
)
obj
=
EventReport_protocol
(
data
=
jdata
)
gpsData
=
service
.
genGPSData2
()
gpsData
=
service
.
genGPSData2
()
obj
.
setGPSPkg
(
gpsData
)
obj
.
setGPSPkg
(
gpsData
)
obj
.
setEventType
(
"00
4A
"
)
obj
.
setEventType
(
"00
28
"
)
msg
=
obj
.
generateEventMsg
()
msg
=
obj
.
generateEventMsg
()
service
.
serviceSendMsg
(
msg
,
"疲劳驾驶告警事件"
)
service
.
serviceSendMsg
(
msg
,
"疲劳驾驶告警事件"
)
service
.
setSn
(
service
.
getSn
()
+
1
)
service
.
setSn
(
service
.
getSn
()
+
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment