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
cded76cf
Commit
cded76cf
authored
Apr 24, 2020
by
liyuanhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了熄火失败的bug
parent
705f5da0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
data/messageTools/carData/012201500010.json
data/messageTools/carData/012201500010.json
+1
-1
lib/protocol/report/GPSReport_protocol.py
lib/protocol/report/GPSReport_protocol.py
+0
-1
lib/socket/service/MessageSimulaterService.py
lib/socket/service/MessageSimulaterService.py
+5
-2
No files found.
data/messageTools/carData/012201500010.json
View file @
cded76cf
{
"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
lib/protocol/report/GPSReport_protocol.py
View file @
cded76cf
...
...
@@ -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车速
...
...
lib/socket/service/MessageSimulaterService.py
View file @
cded76cf
...
...
@@ -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
)
...
...
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