Commit aec863d3 authored by liyuanhong's avatar liyuanhong

新硬件图形界面OBD上报失败bug修复

parent b9f23da8
...@@ -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
# 获取位置附加信息,数据随机产生 # 获取位置附加信息,数据随机产生
......
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment