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
4cdf08f0
Commit
4cdf08f0
authored
Oct 10, 2020
by
liyuanhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复车安优模拟器轨迹跑完,反向行驶,导致数组越界问题
parent
ec393d29
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lib/socket/service/MessageSimulaterService.py
lib/socket/service/MessageSimulaterService.py
+4
-2
No files found.
lib/socket/service/MessageSimulaterService.py
View file @
4cdf08f0
...
...
@@ -340,8 +340,10 @@ class MessageSimulaterService():
obdMsg
=
obdObj
.
generateMsg_GUI
(
self
.
OBDdata
)
if
self
.
fixCurPosition
==
0
:
if
self
.
travelDirection
==
0
:
if
self
.
gpsLineIndex
<
len
(
self
.
gpsLine
):
self
.
gpsLineIndex
=
self
.
gpsLineIndex
+
1
# 正向行驶
else
:
if
self
.
gpsLineIndex
>
0
:
self
.
gpsLineIndex
=
self
.
gpsLineIndex
-
1
# 反向行驶
elif
self
.
gpsLineIndex
==
len
(
self
.
gpsLine
)
or
self
.
gpsLineIndex
==
-
1
:
#如果反向行驶和反向行驶刚好跑完
if
int
(
self
.
data
[
"travelData"
][
"travelLoop"
])
==
0
:
#没有设置循环行驶
...
...
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