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
aec863d3
Commit
aec863d3
authored
Apr 02, 2020
by
liyuanhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新硬件图形界面OBD上报失败bug修复
parent
b9f23da8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
3 deletions
+1
-3
lib/protocol/message/Location_msg.py
lib/protocol/message/Location_msg.py
+0
-2
lib/protocol/message/data/SaloonCarOBD_data.py
lib/protocol/message/data/SaloonCarOBD_data.py
+1
-1
No files found.
lib/protocol/message/Location_msg.py
View file @
aec863d3
...
@@ -230,7 +230,6 @@ class Location_msg(MessageBase):
...
@@ -230,7 +230,6 @@ class Location_msg(MessageBase):
saloonCarOBD_data
=
SaloonCarOBD_data
()
.
generateSaloonCarOBDData_GUI
(
extraInfo
[
"EB"
])
saloonCarOBD_data
=
SaloonCarOBD_data
()
.
generateSaloonCarOBDData_GUI
(
extraInfo
[
"EB"
])
extra_EB
=
"EB"
+
self
.
int2hexStringByBytes
(
int
(
len
(
saloonCarOBD_data
)
/
2
))
+
saloonCarOBD_data
extra_EB
=
"EB"
+
self
.
int2hexStringByBytes
(
int
(
len
(
saloonCarOBD_data
)
/
2
))
+
saloonCarOBD_data
data
=
data
+
extra_EB
data
=
data
+
extra_EB
print
(
data
)
if
(
"EC"
in
extraInfo
.
keys
()):
if
(
"EC"
in
extraInfo
.
keys
()):
#货车 OBD 数据流
#货车 OBD 数据流
truckCarOBD_data
=
TruckCarOBD_data
()
.
generateTruckCarOBD_data
()
truckCarOBD_data
=
TruckCarOBD_data
()
.
generateTruckCarOBD_data
()
...
@@ -251,7 +250,6 @@ class Location_msg(MessageBase):
...
@@ -251,7 +250,6 @@ class Location_msg(MessageBase):
alarmEvent_data
=
AlarmEvent_data
()
.
generateAlarmEvent_data_GUI
(
extraInfo
[
"FA"
])
alarmEvent_data
=
AlarmEvent_data
()
.
generateAlarmEvent_data_GUI
(
extraInfo
[
"FA"
])
extra_FA
=
"FA"
+
self
.
int2hexStringByBytes
(
int
(
len
(
alarmEvent_data
)
/
2
))
+
alarmEvent_data
extra_FA
=
"FA"
+
self
.
int2hexStringByBytes
(
int
(
len
(
alarmEvent_data
)
/
2
))
+
alarmEvent_data
data
=
data
+
extra_FA
data
=
data
+
extra_FA
print
(
data
)
return
data
return
data
# 获取位置附加信息,数据随机产生
# 获取位置附加信息,数据随机产生
...
...
lib/protocol/message/data/SaloonCarOBD_data.py
View file @
aec863d3
...
@@ -83,7 +83,7 @@ class SaloonCarOBD_data(MessageBase):
...
@@ -83,7 +83,7 @@ class SaloonCarOBD_data(MessageBase):
#车速 , 0 - 240 Km/h
#车速 , 0 - 240 Km/h
carSpeed
=
"60D0"
+
self
.
int2hexStringByBytes
(
1
)
+
self
.
int2hexStringByBytes
(
int
(
data
[
"carSpeed"
]))
carSpeed
=
"60D0"
+
self
.
int2hexStringByBytes
(
1
)
+
self
.
int2hexStringByBytes
(
int
(
data
[
"carSpeed"
]))
#剩余油量 ,剩余油量,单位 L 或%Bit15=0 百分比%,OBD 都为百分比Bit15=1 单位 L,显示值为上传值/10
#剩余油量 ,剩余油量,单位 L 或%Bit15=0 百分比%,OBD 都为百分比Bit15=1 单位 L,显示值为上传值/10
surplusOil
=
"62f0"
+
self
.
int2hexStringByBytes
(
2
)
+
self
.
int2hexStringByBytes
(
int
(
data
[
"surplusOil"
]))
surplusOil
=
"62f0"
+
self
.
int2hexStringByBytes
(
2
)
+
self
.
int2hexStringByBytes
(
int
(
data
[
"surplusOil"
])
,
2
)
#冷却液温度 ,-40.0℃ 到 +210℃,上传值减去 40
#冷却液温度 ,-40.0℃ 到 +210℃,上传值减去 40
coolingLiquidTemperature
=
"6050"
+
self
.
int2hexStringByBytes
(
1
)
+
self
.
int2hexStringByBytes
(
int
(
data
[
"coolingLiquidTemperature"
]))
coolingLiquidTemperature
=
"6050"
+
self
.
int2hexStringByBytes
(
1
)
+
self
.
int2hexStringByBytes
(
int
(
data
[
"coolingLiquidTemperature"
]))
#进气口温度 ,-40.0℃ 到 +210℃,上传值减去 40
#进气口温度 ,-40.0℃ 到 +210℃,上传值减去 40
...
...
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