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
9f8b5c4e
Commit
9f8b5c4e
authored
4 years ago
by
liyuanhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车安优图形模拟器增加了反向功能
parent
0add8537
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
config/protocolTools/carSimulater.conf
config/protocolTools/carSimulater.conf
+2
-2
lib/socket/service/MessageSimulaterService.py
lib/socket/service/MessageSimulaterService.py
+4
-1
templates/messageTools/message/M_simulater_page.html
templates/messageTools/message/M_simulater_page.html
+6
-0
No files found.
config/protocolTools/carSimulater.conf
View file @
9f8b5c4e
[
socket
]
host
=
1
72
.
19
.
7
.
13
port
=
49008
host
=
1
14
.
116
.
205
.
211
port
=
8003
This diff is collapsed.
Click to expand it.
lib/socket/service/MessageSimulaterService.py
View file @
9f8b5c4e
...
...
@@ -559,7 +559,10 @@ class MessageSimulaterService():
with
open
(
"data/messageTools/GPSLines/"
+
fileName
,
"r"
,
encoding
=
"utf-8"
)
as
fi
:
content
=
fi
.
read
()
conJson
=
json
.
loads
(
content
)
self
.
gpsLine
=
conJson
[
"GPSLine"
]
if
(
int
(
self
.
data
[
"travelData"
][
"travelDirection"
])
==
0
):
self
.
gpsLine
=
conJson
[
"GPSLine"
]
else
:
self
.
gpsLine
=
conJson
[
"GPSLine"
][::
-
1
]
# 反转gps数组
########################################################
#启动接收消息的服务
...
...
This diff is collapsed.
Click to expand it.
templates/messageTools/message/M_simulater_page.html
View file @
9f8b5c4e
...
...
@@ -127,6 +127,10 @@
<button
id=
"clear_B"
type=
"button"
class=
"btn btn-warning"
onclick=
"clearlog()"
>
清空日志
</button>
<span
style=
"margin-left:20px;"
><label>
当前状态:
</label><input
id=
"curStatus"
value=
"断网"
disabled=
"disabled"
class=
"form-control"
style=
"font-weight: bold;width:85px;color:red;border-width: 1px; border-style: solid; border-color: darkgray; border-radius: 10px;"
></span>
<span
style=
"width:80px;padding-left:10px;"
><label
style=
"width:70px"
><input
type=
"checkbox"
id=
"ignition"
onclick=
"isLogShow(this)"
/>
隐藏日志
</label>
</span>
<span
style=
"border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:1px 10px;"
>
<label><input
name=
"travelDirection"
type=
"radio"
value=
"0"
checked=
"checked"
/>
正向
</label>
<label
style=
"margin-left:10px;"
><input
name=
"travelDirection"
type=
"radio"
value=
"1"
/>
反向
</label>
</span>
</div>
<div
style=
"display: block; width: 100%; border-width: 1px; border-style: solid; border-color: darkgray; border-radius: 10px; padding: 2px; margin-top: 5px;"
>
<h5><b>
事件发送:
</b>
...
...
@@ -445,12 +449,14 @@ function getPageData(){
var
votage
=
120
var
surplusOil
=
505
var
engineSpeed
=
3000
var
travelDirection
=
$
(
"
input[name='travelDirection']:checked
"
).
val
()
data
[
"
travelData
"
][
"
carSpeed
"
]
=
carSpeed
data
[
"
travelData
"
][
"
oilExpend
"
]
=
oilExpend
data
[
"
travelData
"
][
"
travelLoop
"
]
=
travelLoop
data
[
"
travelData
"
][
"
votage
"
]
=
votage
data
[
"
travelData
"
][
"
surplusOil
"
]
=
surplusOil
data
[
"
travelData
"
][
"
engineSpeed
"
]
=
engineSpeed
data
[
"
travelData
"
][
"
travelDirection
"
]
=
travelDirection
//控制正向还是反向行驶
return
data
;
}
//控制登录数据区域的显示与隐藏
...
...
This diff is collapsed.
Click to expand it.
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