Commit b9f23da8 authored by liyuanhong's avatar liyuanhong

修改了数据丢失的问题

parent a3533c2f
......@@ -14,10 +14,9 @@ run.py:启动项目图形操作界面主程序,访问:127.0.0.1:5000 即
requirements.txt:设置项目需要的依赖库
### (二)、安装部署
1、机器上安装了python3 和 pip包管理工具
2、进入项目根目录,编辑requirements.txt, 删除第一行wxPython==4.0.7.post2
3、使用 :pip install -r requirement.txt 安装依赖库
4、python3 run.py 运行项目
5、访问 host:5000 即可进入模拟器页面
2、使用 :pip install -r requirement.txt 安装依赖库
3、python3 run.py 运行项目
4、访问 host:5000 即可进入模拟器页面
### (三)、文档目录
[1、lib使用库说明](doc/lib_details.md)
......
......@@ -223,33 +223,35 @@ class Location_msg(MessageBase):
if ("EA" in extraInfo.keys()):
#基础数据项列表
baseDataList = self.getBaseDataList_GUI(extraInfo["EA"])
extra_EA = "EA" + self.int2hexStringByBytes(int(len(baseDataList) / 2))
extra_EA = "EA" + self.int2hexStringByBytes(int(len(baseDataList) / 2)) + baseDataList
data = data + extra_EA
if ("EB" in extraInfo.keys()):
#轿车 OBD 数据流
saloonCarOBD_data = SaloonCarOBD_data().generateSaloonCarOBDData_GUI(extraInfo["EB"])
extra_EB = "EB" + self.int2hexStringByBytes(int(len(saloonCarOBD_data) / 2))
extra_EB = "EB" + self.int2hexStringByBytes(int(len(saloonCarOBD_data) / 2)) + saloonCarOBD_data
data = data + extra_EB
print(data)
if ("EC" in extraInfo.keys()):
#货车 OBD 数据流
truckCarOBD_data = TruckCarOBD_data().generateTruckCarOBD_data()
extra_EC = "EC" + self.int2hexStringByBytes(int(len(truckCarOBD_data) / 2))
extra_EC = "EC" + self.int2hexStringByBytes(int(len(truckCarOBD_data) / 2)) + truckCarOBD_data
data = data + extra_EC
if ("ED" in extraInfo.keys()):
#新能源 OBD 数据流
newEnergyCar_data = NewEnergyCar_data().generateNewEnergyCar_data()
extra_ED = "ED" + self.int2hexStringByBytes(int(len(newEnergyCar_data) / 2))
extra_ED = "ED" + self.int2hexStringByBytes(int(len(newEnergyCar_data) / 2)) + newEnergyCar_data
data = data + extra_ED
if ("EE" in extraInfo.keys()):
#外设数据项列表
circum_data = Circum_data().generateCircum_data()
extra_EE = "EE" + self.int2hexStringByBytes(int(len(circum_data) / 2))
extra_EE = "EE" + self.int2hexStringByBytes(int(len(circum_data) / 2)) + circum_data
data = data + extra_EE
if ("FA" in extraInfo.keys()):
#报警事件 ID 数据项列表
alarmEvent_data = AlarmEvent_data().generateAlarmEvent_data_GUI(extraInfo["FA"])
extra_FA = "FA" + self.int2hexStringByBytes(int(len(alarmEvent_data) / 2))
extra_FA = "FA" + self.int2hexStringByBytes(int(len(alarmEvent_data) / 2)) + alarmEvent_data
data = data + extra_FA
print(data)
return data
# 获取位置附加信息,数据随机产生
......@@ -483,11 +485,11 @@ class Location_msg(MessageBase):
dataHex = dataHex + dataId_0007
if ("0010" in data.keys()):
speedupInOneSeconds = self.getSpeedupInOneSeconds_GUI(data["0010"])
dataId_0010 = "0010" + self.int2hexStringByBytes(int(len(speedupInOneSeconds) / 2))
dataId_0010 = "0010" + self.int2hexStringByBytes(int(len(speedupInOneSeconds) / 2)) + speedupInOneSeconds
dataHex = dataHex + dataId_0010
if ("0011" in data.keys()):
securityStatusData = CarSafeStatusInfo().generateSecurityStatusData_GUI(data["0011"])
dataId_0011 = "0011" + self.int2hexStringByBytes(int(len(securityStatusData) / 2))
dataId_0011 = "0011" + self.int2hexStringByBytes(int(len(securityStatusData) / 2)) + securityStatusData
dataHex = dataHex + dataId_0011
if ("0012" in data.keys()):
dataId_0012 = "0012" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["0012"]["dataId_0012"]),2)
......
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