Commit 3c3c3047 authored by liyuanhong's avatar liyuanhong

优化了新车机地理位置消息界面

parent cfee6b52
...@@ -84,70 +84,122 @@ class SaloonCarOBD_data(MessageBase): ...@@ -84,70 +84,122 @@ class SaloonCarOBD_data(MessageBase):
return data return data
def generateSaloonCarOBDData_GUI(self,data): def generateSaloonCarOBDData_GUI(self,data):
dataHex = "" dataHex = ""
if ("60C0" in data.keys()):
#发动机转速 , 0 - 8000 rpm #发动机转速 , 0 - 8000 rpm
engineSpeed = "60C0" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["engineSpeed"]),2) engineSpeed = "60C0" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["60C0"]),2)
dataHex = dataHex + engineSpeed
if ("60D0" in data.keys()):
#车速 , 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["60D0"]))
dataHex = dataHex + carSpeed
if ("62f0" in data.keys()):
#剩余油量 ,剩余油量,单位 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"]),2) surplusOil = "62f0" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["62f0"]),2)
dataHex = dataHex + surplusOil
if ("6050" in data.keys()):
#冷却液温度 ,-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["6050"]))
dataHex = dataHex + coolingLiquidTemperature
if ("60F0" in data.keys()):
#进气口温度 ,-40.0℃ 到 +210℃,上传值减去 40 #进气口温度 ,-40.0℃ 到 +210℃,上传值减去 40
airInletTemperature = "60F0" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["airInletTemperature"])) airInletTemperature = "60F0" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["60F0"]))
dataHex = dataHex + airInletTemperature
if ("60B0" in data.keys()):
#进气(岐管绝对)压力 , 0 - 250kpa #进气(岐管绝对)压力 , 0 - 250kpa
intakeManifoldPressure = "60B0" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["intakeManifoldPressure"])) intakeManifoldPressure = "60B0" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["60B0"]))
dataHex = dataHex + intakeManifoldPressure
if ("6330" in data.keys()):
#大气压力 , 0 - 125kpa #大气压力 , 0 - 125kpa
atmosphericPressure = "6330" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["atmosphericPressure"])) atmosphericPressure = "6330" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["6330"]))
dataHex = dataHex + atmosphericPressure
if ("6460" in data.keys()):
#环境温度 , -40.0℃ 到 +210℃,上传值减去 40 #环境温度 , -40.0℃ 到 +210℃,上传值减去 40
envTemperature = "6460" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["envTemperature"])) envTemperature = "6460" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["6460"]))
dataHex = dataHex + envTemperature
if ("6490" in data.keys()):
#加速踏板位置 , 0% - 100% #加速踏板位置 , 0% - 100%
acceleratorLocation = "6490" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["acceleratorLocation"])) acceleratorLocation = "6490" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["6490"]))
dataHex = dataHex + acceleratorLocation
if ("60A0" in data.keys()):
#燃油压力 , 0 - 500kpa #燃油压力 , 0 - 500kpa
oilPressure = "60A0" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["oilPressure"]),2) oilPressure = "60A0" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["60A0"]),2)
dataHex = dataHex + oilPressure
if ("6014" in data.keys()):
#故障码状态 , 发动机故障码状态 #故障码状态 , 发动机故障码状态
troubleCodeStatus = "6014" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["troubleCodeStatus"])) troubleCodeStatus = "6014" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["6014"]))
dataHex = dataHex + troubleCodeStatus
if ("6010" in data.keys()):
#故障码个数 #故障码个数
troubleCodeNum = "6010" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["troubleCodeNum"])) troubleCodeNum = "6010" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["6010"]))
dataHex = dataHex + troubleCodeNum
if ("6100" in data.keys()):
#空气流量 , 0.1 实际值为上传值/10 0.1g/s #空气流量 , 0.1 实际值为上传值/10 0.1g/s
airFlow = "6100" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["airFlow"]),2) airFlow = "6100" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["6100"]),2)
dataHex = dataHex + airFlow
if ("6110" in data.keys()):
#绝对气门位置 #绝对气门位置
valveLocation = "6110" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["valveLocation"]),2) valveLocation = "6110" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["6110"]),2)
dataHex = dataHex + valveLocation
if ("61F0" in data.keys()):
#自发动机启动运行时间 sec #自发动机启动运行时间 sec
engineRunTime = "61F0" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["engineRunTime"]),2) engineRunTime = "61F0" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["61F0"]),2)
dataHex = dataHex + engineRunTime
if ("6210" in data.keys()):
#故障行驶里程 , Km #故障行驶里程 , Km
troubleMileage = "6210" + self.int2hexStringByBytes(4) + self.int2hexStringByBytes(int(data["troubleMileage"]),4) troubleMileage = "6210" + self.int2hexStringByBytes(4) + self.int2hexStringByBytes(int(data["6210"]),4)
dataHex = dataHex + troubleMileage
if ("6040" in data.keys()):
#计算负荷值 #计算负荷值
calculateLoadValue = "6040" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["calculateLoadValue"])) calculateLoadValue = "6040" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["6040"]))
dataHex = dataHex + calculateLoadValue
if ("6070" in data.keys()):
#长期燃油修正(气缸列 1 和 3) #长期燃油修正(气缸列 1 和 3)
fuelTrim = "6070" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["fuelTrim"]),2) fuelTrim = "6070" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["6070"]),2)
dataHex = dataHex + fuelTrim
if ("60E0" in data.keys()):
#第一缸点火正时提前角 ,显示值为上传值-64 #第一缸点火正时提前角 ,显示值为上传值-64
fireAngle = "60E0" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["fireAngle"]),2) fireAngle = "60E0" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["60E0"]),2)
dataHex = dataHex + fireAngle
if ("6701" in data.keys()):
#前刹车片磨损 , 0 正常/否则,显示对应数据,单位:级 #前刹车片磨损 , 0 正常/否则,显示对应数据,单位:级
frontBrakeBlockAbrasion = "6701" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["frontBrakeBlockAbrasion"])) frontBrakeBlockAbrasion = "6701" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["6701"]))
dataHex = dataHex + frontBrakeBlockAbrasion
if ("6702" in data.keys()):
#后刹车片磨损 , 0 正常/否则,显示对应数据,单位:级 #后刹车片磨损 , 0 正常/否则,显示对应数据,单位:级
backBrakeBlockAbrasion = "6702" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["backBrakeBlockAbrasion"])) backBrakeBlockAbrasion = "6702" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["6702"]))
dataHex = dataHex + backBrakeBlockAbrasion
if ("6703" in data.keys()):
#制动液液位 , 0:不正 1:正常 其他:无法使用 #制动液液位 , 0:不正 1:正常 其他:无法使用
brakeFluidLocation = "6703" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["brakeFluidLocation"])) brakeFluidLocation = "6703" + self.int2hexStringByBytes(1) + self.int2hexStringByBytes(int(data["6703"]))
dataHex = dataHex + brakeFluidLocation
if ("6704" in data.keys()):
#机油液位 , 显示值为上传值/1000 单位 毫米 #机油液位 , 显示值为上传值/1000 单位 毫米
engineOilLocation = "6704" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["engineOilLocation"]),2) engineOilLocation = "6704" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["6704"]),2)
dataHex = dataHex + engineOilLocation
if ("6705" in data.keys()):
#胎压报警 0:当前无警告 1:存在胎压失压 其他:不可用 #胎压报警 0:当前无警告 1:存在胎压失压 其他:不可用
tirePressureAlarm = "6705" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["tirePressureAlarm"]),2) tirePressureAlarm = "6705" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["6705"]),2)
dataHex = dataHex + tirePressureAlarm
if ("6706" in data.keys()):
#冷却液液位 , 显示值为上传值-48 #冷却液液位 , 显示值为上传值-48
coolingLiquidLocation = "6706" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["coolingLiquidLocation"]),2) coolingLiquidLocation = "6706" + self.int2hexStringByBytes(2) + self.int2hexStringByBytes(int(data["6706"]),2)
dataHex = dataHex + coolingLiquidLocation
if ("6707" in data.keys()):
#续航里程 0.1 km ; 显示值为上传值/10 #续航里程 0.1 km ; 显示值为上传值/10
enduranceMileage = "6707" + self.int2hexStringByBytes(4) + self.int2hexStringByBytes(int(data["enduranceMileage"]),4) enduranceMileage = "6707" + self.int2hexStringByBytes(4) + self.int2hexStringByBytes(int(data["6707"]),4)
dataHex = dataHex + enduranceMileage
if ("6708" in data.keys()):
#仪表里程 #仪表里程
dashboardMileage = "6708" + self.int2hexStringByBytes(4) + self.int2hexStringByBytes(int(data["dashboardMileage"]),4) dashboardMileage = "6708" + self.int2hexStringByBytes(4) + self.int2hexStringByBytes(int(data["6708"]),4)
dataHex = dataHex + dashboardMileage
if ("6709" in data.keys()):
#车辆总运行时间 #车辆总运行时间
runTotalTime = "6709" + self.int2hexStringByBytes(4) + self.int2hexStringByBytes(int(data["runTotalTime"]),4) runTotalTime = "6709" + self.int2hexStringByBytes(4) + self.int2hexStringByBytes(int(data["6709"]),4)
dataHex = dataHex + runTotalTime
if ("670a" in data.keys()):
#总耗油量 #总耗油量
totalOilExpend = "670a" + self.int2hexStringByBytes(4) + self.int2hexStringByBytes(int(data["totalOilExpend"]),4) totalOilExpend = "670a" + self.int2hexStringByBytes(4) + self.int2hexStringByBytes(int(data["670a"]),4)
dataHex = dataHex + engineSpeed + carSpeed + surplusOil + coolingLiquidTemperature + airInletTemperature dataHex = dataHex + totalOilExpend
dataHex = dataHex + intakeManifoldPressure + atmosphericPressure + envTemperature + acceleratorLocation + oilPressure
dataHex = dataHex + troubleCodeStatus + troubleCodeNum + airFlow + valveLocation + engineRunTime
dataHex = dataHex + troubleMileage + calculateLoadValue + fuelTrim + fireAngle + frontBrakeBlockAbrasion
dataHex = dataHex + backBrakeBlockAbrasion + brakeFluidLocation + engineOilLocation + tirePressureAlarm + coolingLiquidLocation
dataHex = dataHex + enduranceMileage + dashboardMileage + runTotalTime + totalOilExpend
return dataHex return dataHex
def generateSaloonCarOBDData_random(self): def generateSaloonCarOBDData_random(self):
data = "" data = ""
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<li role="presentation"><a id="terminalVersionInfoUpload_msg" {% if arg.path[2]=="terminalVersionInfoUpload_msg_page" %} class="link-tab" {% endif %} onclick="messageManTab(this)">终端版本信息主动上报</b></a></li> <li role="presentation"><a id="terminalVersionInfoUpload_msg" {% if arg.path[2]=="terminalVersionInfoUpload_msg_page" %} class="link-tab" {% endif %} onclick="messageManTab(this)">终端版本信息主动上报</b></a></li>
<li role="presentation"><a id="dataUpstreamTransport_msg" {% if arg.path[2]=="dataUpstreamTransport_msg_page" or arg.path[2]=="dataUpstreamTransport_msg_f2_page" or arg.path[2]=="dataUpstreamTransport_msg_f3_page" or arg.path[2]=="dataUpstreamTransport_msg_f4_page" %} class="link-tab" {% endif %} onclick="messageManTab(this)">数据上行透传</b></a></li> <li role="presentation"><a id="dataUpstreamTransport_msg" {% if arg.path[2]=="dataUpstreamTransport_msg_page" or arg.path[2]=="dataUpstreamTransport_msg_f2_page" or arg.path[2]=="dataUpstreamTransport_msg_f3_page" or arg.path[2]=="dataUpstreamTransport_msg_f4_page" %} class="link-tab" {% endif %} onclick="messageManTab(this)">数据上行透传</b></a></li>
<li role="presentation"><a id="location_msg" {% if arg.path[2]=="location_msg_page" %} class="link-tab" {% endif %} onclick="messageManTab(this)">位置信息汇报</b></a></li> <li role="presentation"><a id="location_msg" {% if arg.path[2]=="location_msg_page" %} class="link-tab" {% endif %} onclick="messageManTab(this)">位置信息汇报</b></a></li>
<li role="presentation"><a id="style_index2" {% if arg.path[2]=="2" %} class="link-tab" {% endif %} onclick="messageManTab(this)">其他报文</b></a></li> <!-- <li role="presentation"><a id="style_index2" {% if arg.path[2]=="2" %} class="link-tab" {% endif %} onclick="messageManTab(this)">其他报文</b></a></li>-->
</ul> </ul>
{% endblock %} {% endblock %}
{% block content_1 %} {% block content_1 %}
......
...@@ -593,40 +593,71 @@ ...@@ -593,40 +593,71 @@
</div> </div>
<div id="div_ext_EB" style="display:none;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"> <div id="div_ext_EB" style="display:none;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;">
<label>轿车 OBD 数据流:</label><br> <label>轿车 OBD 数据流:</label><br>
<div style="width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;background:skyblue;">
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="engineSpeed_checkbutton" onclick="OBDIndoSelect(this)"/>发动机转速</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="carSpeed_checkbutton" onclick="OBDIndoSelect(this)"/>车速</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="surplusOil_checkbutton" onclick="OBDIndoSelect(this)"/>剩余油量</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="coolingLiquidTemperature_checkbutton" onclick="OBDIndoSelect(this)"/>冷却液温度</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="airInletTemperature_checkbutton" onclick="OBDIndoSelect(this)"/>进气口温度</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="intakeManifoldPressure_checkbutton" onclick="OBDIndoSelect(this)"/>进气(岐管绝对)压力</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="atmosphericPressure_checkbutton" onclick="OBDIndoSelect(this)"/>大气压力</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="envTemperature_checkbutton" onclick="OBDIndoSelect(this)"/>环境温度</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="acceleratorLocation_checkbutton" onclick="OBDIndoSelect(this)"/>加速踏板位置</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="oilPressure_checkbutton" onclick="OBDIndoSelect(this)"/>燃油压力</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="troubleCodeStatus_checkbutton" onclick="OBDIndoSelect(this)"/>故障码状态</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="troubleCodeNum_checkbutton" onclick="OBDIndoSelect(this)"/>故障码个数</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="airFlow_checkbutton" onclick="OBDIndoSelect(this)"/>空气流量</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="valveLocation_checkbutton" onclick="OBDIndoSelect(this)"/>绝对气门位置</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="engineRunTime_checkbutton" onclick="OBDIndoSelect(this)"/>自发动机启动运行时间</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="troubleMileage_checkbutton" onclick="OBDIndoSelect(this)"/>故障行驶里程</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="calculateLoadValue_checkbutton" onclick="OBDIndoSelect(this)"/>计算负荷值</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="fuelTrim_checkbutton" onclick="OBDIndoSelect(this)"/>长期燃油修正(气缸列1和3)</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="fireAngle_checkbutton" onclick="OBDIndoSelect(this)"/>第一缸点火正时提前角</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="frontBrakeBlockAbrasion_checkbutton" onclick="OBDIndoSelect(this)"/>前刹车片磨损</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="backBrakeBlockAbrasion_checkbutton" onclick="OBDIndoSelect(this)"/>后刹车片磨损</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="brakeFluidLocation_checkbutton" onclick="OBDIndoSelect(this)"/>制动液液位</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="engineOilLocation_checkbutton" onclick="OBDIndoSelect(this)"/>机油液位</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="tirePressureAlarm_checkbutton" onclick="OBDIndoSelect(this)"/>胎压报警</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="coolingLiquidLocation_checkbutton" onclick="OBDIndoSelect(this)"/>冷却液液位</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="enduranceMileage_checkbutton" onclick="OBDIndoSelect(this)"/>续航里程</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="dashboardMileage_checkbutton" onclick="OBDIndoSelect(this)"/>仪表里程</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="runTotalTime_checkbutton" onclick="OBDIndoSelect(this)"/>车辆总运行时间</label> </span>
<span style="margin-right:15px;"><label><input type="checkbox" checked=checked id="totalOilExpend_checkbutton" onclick="OBDIndoSelect(this)"/>总耗油量</label> </span>
</div>
<ul class="protocol_content" style="padding:0px;"> <ul class="protocol_content" style="padding:0px;">
<li><label>发动机转速:</label><input id="engineSpeed" type="text" class="form-control" value="3000"></li> <li id="engineSpeed_li"><label>发动机转速:</label><input id="engineSpeed" type="text" class="form-control" value="3000"></li>
<li><label>车速:</label><input id="carSpeed" type="text" class="form-control" value="60"></li> <li id="carSpeed_li"><label>车速:</label><input id="carSpeed" type="text" class="form-control" value="60"></li>
<li><label>剩余油量:</label><input id="surplusOil" type="text" class="form-control" value="801"></li> <li id="surplusOil_li"><label>剩余油量:</label><input id="surplusOil" type="text" class="form-control" value="801"></li>
<li><label>冷却液温度:</label><input id="coolingLiquidTemperature" type="text" class="form-control" value="76"></li> <li id="coolingLiquidTemperature_li"><label>冷却液温度:</label><input id="coolingLiquidTemperature" type="text" class="form-control" value="76"></li>
<li><label>进气口温度:</label><input id="airInletTemperature" type="text" class="form-control" value="88"></li> <li id="airInletTemperature_li"><label>进气口温度:</label><input id="airInletTemperature" type="text" class="form-control" value="88"></li>
<li><label style="word-break:break-all;font-size:10px;">进气(岐管绝对)压力:</label><input id="intakeManifoldPressure" type="text" class="form-control" value="20"></li> <li id="intakeManifoldPressure_li"><label style="word-break:break-all;font-size:10px;">进气(岐管绝对)压力:</label><input id="intakeManifoldPressure" type="text" class="form-control" value="20"></li>
<li><label>大气压力:</label><input id="atmosphericPressure" type="text" class="form-control" value="28"></li> <li id="atmosphericPressure_li"><label>大气压力:</label><input id="atmosphericPressure" type="text" class="form-control" value="28"></li>
<li><label>环境温度:</label><input id="envTemperature" type="text" class="form-control" value="65"></li> <li id="envTemperature_li"><label>环境温度:</label><input id="envTemperature" type="text" class="form-control" value="65"></li>
<li><label style="word-break:break-all;font-size:10px;">加速踏板位置:</label><input id="acceleratorLocation" type="text" class="form-control" value="32"></li> <li id="acceleratorLocation_li"><label style="word-break:break-all;font-size:10px;">加速踏板位置:</label><input id="acceleratorLocation" type="text" class="form-control" value="32"></li>
<li><label>燃油压力:</label><input id="oilPressure" type="text" class="form-control" value="276"></li> <li id="oilPressure_li"><label>燃油压力:</label><input id="oilPressure" type="text" class="form-control" value="276"></li>
<li><label>故障码状态:</label><input id="troubleCodeStatus" type="text" class="form-control" value="0"></li> <li id="troubleCodeStatus_li"><label>故障码状态:</label><input id="troubleCodeStatus" type="text" class="form-control" value="0"></li>
<li><label>故障码个数:</label><input id="troubleCodeNum" type="text" class="form-control" value="2"></li> <li id="troubleCodeNum_li"><label>故障码个数:</label><input id="troubleCodeNum" type="text" class="form-control" value="2"></li>
<li><label>空气流量:</label><input id="airFlow" type="text" class="form-control" value="505"></li> <li id="airFlow_li"><label>空气流量:</label><input id="airFlow" type="text" class="form-control" value="505"></li>
<li><label style="word-break:break-all;font-size:10px;">绝对气门位置:</label><input id="valveLocation" type="text" class="form-control" value="51"></li> <li id="valveLocation_li"><label style="word-break:break-all;font-size:10px;">绝对气门位置:</label><input id="valveLocation" type="text" class="form-control" value="51"></li>
<li><label style="word-break:break-all;font-size:10px;">自发动机启动运行时间:</label><input id="engineRunTime" type="text" class="form-control" value="3700"></li> <li id="engineRunTime_li"><label style="word-break:break-all;font-size:10px;">自发动机启动运行时间:</label><input id="engineRunTime" type="text" class="form-control" value="3700"></li>
<li><label style="word-break:break-all;font-size:10px;">故障行驶里程:</label><input id="troubleMileage" type="text" class="form-control" value="4508"></li> <li id="troubleMileage_li"><label style="word-break:break-all;font-size:10px;">故障行驶里程:</label><input id="troubleMileage" type="text" class="form-control" value="4508"></li>
<li><label>计算负荷值:</label><input id="calculateLoadValue" type="text" class="form-control" value="44"></li> <li id="calculateLoadValue_li"><label>计算负荷值:</label><input id="calculateLoadValue" type="text" class="form-control" value="44"></li>
<li><label style="word-break:break-all;font-size:10px;">长期燃油修正(气缸列1和3):</label><input id="fuelTrim" type="text" class="form-control" value="89"></li> <li id="fuelTrim_li"><label style="word-break:break-all;font-size:10px;">长期燃油修正(气缸列1和3):</label><input id="fuelTrim" type="text" class="form-control" value="89"></li>
<li><label style="word-break:break-all;font-size:10px;">第一缸点火正时提前角</label><input id="fireAngle" type="text" class="form-control" value="154"></li> <li id="fireAngle_li"><label style="word-break:break-all;font-size:10px;">第一缸点火正时提前角</label><input id="fireAngle" type="text" class="form-control" value="154"></li>
<li><label style="word-break:break-all;font-size:10px;">前刹车片磨损 , 0 正常/否则,显示对应数据:</label><input id="frontBrakeBlockAbrasion" type="text" class="form-control" value="0"></li> <li id="frontBrakeBlockAbrasion_li"><label style="word-break:break-all;font-size:10px;">前刹车片磨损 , 0 正常/否则,显示对应数据:</label><input id="frontBrakeBlockAbrasion" type="text" class="form-control" value="0"></li>
<li><label style="word-break:break-all;font-size:10px;">后刹车片磨损 , 0 正常/否则,显示对应数据:</label><input id="backBrakeBlockAbrasion" type="text" class="form-control" value="0"></li> <li id="backBrakeBlockAbrasion_li"><label style="word-break:break-all;font-size:10px;">后刹车片磨损 , 0 正常/否则,显示对应数据:</label><input id="backBrakeBlockAbrasion" type="text" class="form-control" value="0"></li>
<li><label>制动液液位:</label><select id="brakeFluidLocation" class="form-control"> <li id="brakeFluidLocation_li"><label>制动液液位:</label><select id="brakeFluidLocation" class="form-control">
<option value="0">不正常</option> <option value="0">不正常</option>
<option value="1" selected="selected">正常</option></select></li> <option value="1" selected="selected">正常</option></select></li>
<li><label>机油液位:</label><input id="engineOilLocation" type="text" class="form-control" value="505"></li> <li id="engineOilLocation_li"><label>机油液位:</label><input id="engineOilLocation" type="text" class="form-control" value="505"></li>
<li><label>胎压报警:</label><select id="tirePressureAlarm" class="form-control"> <li id="tirePressureAlarm_li"><label>胎压报警:</label><select id="tirePressureAlarm" class="form-control">
<option value="0">当前无警告</option> <option value="0">当前无警告</option>
<option value="1" selected="selected">存在胎压失压 </option></select></li> <option value="1" selected="selected">存在胎压失压 </option></select></li>
<li><label>冷却液液位:</label><input id="coolingLiquidLocation" type="text" class="form-control" value="505"></li> <li id="coolingLiquidLocation_li"><label>冷却液液位:</label><input id="coolingLiquidLocation" type="text" class="form-control" value="505"></li>
<li><label>续航里程:</label><input id="enduranceMileage" type="text" class="form-control" value="505"></li> <li id="enduranceMileage_li"><label>续航里程:</label><input id="enduranceMileage" type="text" class="form-control" value="505"></li>
<li><label>仪表里程:</label><input id="dashboardMileage" type="text" class="form-control" value="3500"></li> <li id="dashboardMileage_li"><label>仪表里程:</label><input id="dashboardMileage" type="text" class="form-control" value="3500"></li>
<li><label style="word-break:break-all;font-size:10px;">车辆总运行时间:</label><input id="runTotalTime" type="text" class="form-control" value="7200000"></li> <li id="runTotalTime_li"><label style="word-break:break-all;font-size:10px;">车辆总运行时间:</label><input id="runTotalTime" type="text" class="form-control" value="7200000"></li>
<li><label>总耗油量:</label><input id="totalOilExpend" type="text" class="form-control" value="3700000"></li> <li id="totalOilExpend_li"><label>总耗油量:</label><input id="totalOilExpend" type="text" class="form-control" value="3700000"></li>
</ul> </ul>
</div> </div>
<div id="div_ext_FA" style="display:none;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;padding-left:10px;padding-right:10px;"> <div id="div_ext_FA" style="display:none;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;padding-left:10px;padding-right:10px;">
...@@ -1190,35 +1221,93 @@ function getExtra_EB(){ ...@@ -1190,35 +1221,93 @@ function getExtra_EB(){
var runTotalTime = $("#runTotalTime").val(); var runTotalTime = $("#runTotalTime").val();
var totalOilExpend = $("#totalOilExpend").val(); var totalOilExpend = $("#totalOilExpend").val();
data["engineSpeed"] = engineSpeed; if($("#engineSpeed_checkbutton").is(':checked')){
data["carSpeed"] = carSpeed; data["60C0"] = engineSpeed;
data["surplusOil"] = surplusOil; }
data["coolingLiquidTemperature"] = coolingLiquidTemperature; if($("#carSpeed_checkbutton").is(':checked')){
data["airInletTemperature"] = airInletTemperature; data["60D0"] = carSpeed;
data["intakeManifoldPressure"] = intakeManifoldPressure; }
data["atmosphericPressure"] = atmosphericPressure; if($("#surplusOil_checkbutton").is(':checked')){
data["envTemperature"] = envTemperature; data["62f0"] = surplusOil;
data["acceleratorLocation"] = acceleratorLocation; }
data["oilPressure"] = oilPressure; if($("#coolingLiquidTemperature_checkbutton").is(':checked')){
data["troubleCodeStatus"] = troubleCodeStatus; data["6050"] = coolingLiquidTemperature;
data["troubleCodeNum"] = troubleCodeNum; }
data["airFlow"] = airFlow; if($("#airInletTemperature_checkbutton").is(':checked')){
data["valveLocation"] = valveLocation; data["60F0"] = airInletTemperature;
data["engineRunTime"] = engineRunTime; }
data["troubleMileage"] = troubleMileage; if($("#intakeManifoldPressure_checkbutton").is(':checked')){
data["calculateLoadValue"] = calculateLoadValue; data["60B0"] = intakeManifoldPressure;
data["fuelTrim"] = fuelTrim; }
data["fireAngle"] = fireAngle; if($("#atmosphericPressure_checkbutton").is(':checked')){
data["frontBrakeBlockAbrasion"] = frontBrakeBlockAbrasion; data["6330"] = atmosphericPressure;
data["backBrakeBlockAbrasion"] = backBrakeBlockAbrasion; }
data["brakeFluidLocation"] = brakeFluidLocation; if($("#envTemperature_checkbutton").is(':checked')){
data["engineOilLocation"] = engineOilLocation; data["6460"] = envTemperature;
data["tirePressureAlarm"] = tirePressureAlarm; }
data["coolingLiquidLocation"] = coolingLiquidLocation; if($("#acceleratorLocation_checkbutton").is(':checked')){
data["enduranceMileage"] = enduranceMileage; data["6490"] = acceleratorLocation;
data["dashboardMileage"] = dashboardMileage; }
data["runTotalTime"] = runTotalTime; if($("#oilPressure_checkbutton").is(':checked')){
data["totalOilExpend"] = totalOilExpend; data["60A0"] = oilPressure;
}
if($("#troubleCodeStatus_checkbutton").is(':checked')){
data["6014"] = troubleCodeStatus;
}
if($("#troubleCodeNum_checkbutton").is(':checked')){
data["6010"] = troubleCodeNum;
}
if($("#airFlow_checkbutton").is(':checked')){
data["6100"] = airFlow;
}
if($("#valveLocation_checkbutton").is(':checked')){
data["6110"] = valveLocation;
}
if($("#engineRunTime_checkbutton").is(':checked')){
data["61F0"] = engineRunTime;
}
if($("#troubleMileage_checkbutton").is(':checked')){
data["6210"] = troubleMileage;
}
if($("#calculateLoadValue_checkbutton").is(':checked')){
data["6040"] = calculateLoadValue;
}
if($("#fuelTrim_checkbutton").is(':checked')){
data["6070"] = fuelTrim;
}
if($("#fireAngle_checkbutton").is(':checked')){
data["60E0"] = fireAngle;
}
if($("#frontBrakeBlockAbrasion_checkbutton").is(':checked')){
data["6701"] = frontBrakeBlockAbrasion;
}
if($("#backBrakeBlockAbrasion_checkbutton").is(':checked')){
data["6702"] = backBrakeBlockAbrasion;
}
if($("#brakeFluidLocation_checkbutton").is(':checked')){
data["6703"] = brakeFluidLocation;
}
if($("#engineOilLocation_checkbutton").is(':checked')){
data["6704"] = engineOilLocation;
}
if($("#tirePressureAlarm_checkbutton").is(':checked')){
data["6705"] = tirePressureAlarm;
}
if($("#coolingLiquidLocation_checkbutton").is(':checked')){
data["6706"] = coolingLiquidLocation;
}
if($("#enduranceMileage_checkbutton").is(':checked')){
data["6707"] = enduranceMileage;
}
if($("#dashboardMileage_checkbutton").is(':checked')){
data["6708"] = dashboardMileage;
}
if($("#runTotalTime_checkbutton").is(':checked')){
data["6709"] = runTotalTime;
}
if($("#totalOilExpend_checkbutton").is(':checked')){
data["670a"] = totalOilExpend;
}
return data; return data;
} }
...@@ -1538,5 +1627,130 @@ function alarmEventSelect(e){ ...@@ -1538,5 +1627,130 @@ function alarmEventSelect(e){
} }
} }
} }
//OBD项的选择与取消选择
function OBDIndoSelect(e){
if($(e).is(':checked')){
if($(e).attr("id") == "engineSpeed_checkbutton"){
$("#engineSpeed_li").css("display","inline")
}else if($(e).attr("id") == "carSpeedc_checkbutton"){
$("#carSpeed_li").css("display","inline")
}else if($(e).attr("id") == "surplusOil_checkbutton"){
$("#surplusOil_li").css("display","inline")
}else if($(e).attr("id") == "coolingLiquidTemperature_checkbutton"){
$("#coolingLiquidTemperature_li").css("display","inline")
}else if($(e).attr("id") == "airInletTemperature_checkbutton"){
$("#airInletTemperature_li").css("display","inline")
}else if($(e).attr("id") == "intakeManifoldPressure_checkbutton"){
$("#intakeManifoldPressure_li").css("display","inline")
}else if($(e).attr("id") == "atmosphericPressure_checkbutton"){
$("#atmosphericPressure_li").css("display","inline")
}else if($(e).attr("id") == "envTemperature_checkbutton"){
$("#envTemperature_li").css("display","inline")
}else if($(e).attr("id") == "acceleratorLocation_checkbutton"){
$("#acceleratorLocation_li").css("display","inline")
}else if($(e).attr("id") == "oilPressure_checkbutton"){
$("#oilPressure_li").css("display","inline")
}else if($(e).attr("id") == "troubleCodeStatus_checkbutton"){
$("#troubleCodeStatus_li").css("display","inline")
}else if($(e).attr("id") == "troubleCodeNum_checkbutton"){
$("#troubleCodeNum_li").css("display","inline")
}else if($(e).attr("id") == "airFlow_checkbutton"){
$("#airFlow_li").css("display","inline")
}else if($(e).attr("id") == "valveLocation_checkbutton"){
$("#valveLocation_li").css("display","inline")
}else if($(e).attr("id") == "engineRunTime_checkbutton"){
$("#engineRunTime_li").css("display","inline")
}else if($(e).attr("id") == "troubleMileage_checkbutton"){
$("#troubleMileage_li").css("display","inline")
}else if($(e).attr("id") == "calculateLoadValue_checkbutton"){
$("#calculateLoadValue_li").css("display","inline")
}else if($(e).attr("id") == "fuelTrim_checkbutton"){
$("#fuelTrim_li").css("display","inline")
}else if($(e).attr("id") == "fireAngle_checkbutton"){
$("#fireAngle_li").css("display","inline")
}else if($(e).attr("id") == "frontBrakeBlockAbrasion_checkbutton"){
$("#frontBrakeBlockAbrasion_li").css("display","inline")
}else if($(e).attr("id") == "backBrakeBlockAbrasion_checkbutton"){
$("#backBrakeBlockAbrasion_li").css("display","inline")
}else if($(e).attr("id") == "brakeFluidLocation_checkbutton"){
$("#brakeFluidLocation_li").css("display","inline")
}else if($(e).attr("id") == "engineOilLocation_checkbutton"){
$("#engineOilLocation_li").css("display","inline")
}else if($(e).attr("id") == "tirePressureAlarm_checkbutton"){
$("#tirePressureAlarm_li").css("display","inline")
}else if($(e).attr("id") == "coolingLiquidLocation_checkbutton"){
$("#coolingLiquidLocation_li").css("display","inline")
}else if($(e).attr("id") == "enduranceMileage_checkbutton"){
$("#enduranceMileage_li").css("display","inline")
}else if($(e).attr("id") == "dashboardMileage_checkbutton"){
$("#dashboardMileage_li").css("display","inline")
}else if($(e).attr("id") == "runTotalTime_checkbutton"){
$("#runTotalTime_li").css("display","inline")
}else if($(e).attr("id") == "totalOilExpend_checkbutton"){
$("#totalOilExpend_li").css("display","inline")
}
}else{
if($(e).attr("id") == "engineSpeed_checkbutton"){
$("#engineSpeed_li").css("display","none")
}else if($(e).attr("id") == "carSpeedc_checkbutton"){
$("#carSpeed_li").css("display","none")
}else if($(e).attr("id") == "surplusOil_checkbutton"){
$("#surplusOil_li").css("display","none")
}else if($(e).attr("id") == "coolingLiquidTemperature_checkbutton"){
$("#coolingLiquidTemperature_li").css("display","none")
}else if($(e).attr("id") == "airInletTemperature_checkbutton"){
$("#airInletTemperature_li").css("display","none")
}else if($(e).attr("id") == "intakeManifoldPressure_checkbutton"){
$("#intakeManifoldPressure_li").css("display","none")
}else if($(e).attr("id") == "atmosphericPressure_checkbutton"){
$("#atmosphericPressure_li").css("display","none")
}else if($(e).attr("id") == "envTemperature_checkbutton"){
$("#envTemperature_li").css("display","none")
}else if($(e).attr("id") == "acceleratorLocation_checkbutton"){
$("#acceleratorLocation_li").css("display","none")
}else if($(e).attr("id") == "oilPressure_checkbutton"){
$("#oilPressure_li").css("display","none")
}else if($(e).attr("id") == "troubleCodeStatus_checkbutton"){
$("#troubleCodeStatus_li").css("display","none")
}else if($(e).attr("id") == "troubleCodeNum_checkbutton"){
$("#troubleCodeNum_li").css("display","none")
}else if($(e).attr("id") == "airFlow_checkbutton"){
$("#airFlow_li").css("display","none")
}else if($(e).attr("id") == "valveLocation_checkbutton"){
$("#valveLocation_li").css("display","none")
}else if($(e).attr("id") == "engineRunTime_checkbutton"){
$("#engineRunTime_li").css("display","none")
}else if($(e).attr("id") == "troubleMileage_checkbutton"){
$("#troubleMileage_li").css("display","none")
}else if($(e).attr("id") == "calculateLoadValue_checkbutton"){
$("#calculateLoadValue_li").css("display","none")
}else if($(e).attr("id") == "fuelTrim_checkbutton"){
$("#fuelTrim_li").css("display","none")
}else if($(e).attr("id") == "fireAngle_checkbutton"){
$("#fireAngle_li").css("display","none")
}else if($(e).attr("id") == "frontBrakeBlockAbrasion_checkbutton"){
$("#frontBrakeBlockAbrasion_li").css("display","none")
}else if($(e).attr("id") == "backBrakeBlockAbrasion_checkbutton"){
$("#backBrakeBlockAbrasion_li").css("display","none")
}else if($(e).attr("id") == "brakeFluidLocation_checkbutton"){
$("#brakeFluidLocation_li").css("display","none")
}else if($(e).attr("id") == "engineOilLocation_checkbutton"){
$("#engineOilLocation_li").css("display","none")
}else if($(e).attr("id") == "tirePressureAlarm_checkbutton"){
$("#tirePressureAlarm_li").css("display","none")
}else if($(e).attr("id") == "coolingLiquidLocation_checkbutton"){
$("#coolingLiquidLocation_li").css("display","none")
}else if($(e).attr("id") == "enduranceMileage_checkbutton"){
$("#enduranceMileage_li").css("display","none")
}else if($(e).attr("id") == "dashboardMileage_checkbutton"){
$("#dashboardMileage_li").css("display","none")
}else if($(e).attr("id") == "runTotalTime_checkbutton"){
$("#runTotalTime_li").css("display","none")
}else if($(e).attr("id") == "totalOilExpend_checkbutton"){
$("#totalOilExpend_li").css("display","none")
}
}
}
</script> </script>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -47,7 +47,13 @@ ...@@ -47,7 +47,13 @@
<div style="width:100%;padding-bottom:10px;border-bottom: 1px solid #eee;"> <div style="width:100%;padding-bottom:10px;border-bottom: 1px solid #eee;">
<h4>点击登录按钮发送报文:</h4> <h4>点击登录按钮发送报文:</h4>
<div style="display: block; width: 100%; border-width: 1px; border-style: solid; border-color: darkgray; border-radius: 10px; padding: 2px; margin-top: 5px;"> <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></h5> <h5><b>登录报文数据:</b>
<span style="border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:1px 10px;">
<label><input name="login" type="radio" value="0" checked="checked" onclick="isShowLoginArea(this)"/>隐藏</label>
<label style="margin-left:10px;"><input name="login" type="radio" value="1" onclick="isShowLoginArea(this)"/>显示</label>
</span>
</h5>
<div id="login_area" style="display:none;">
<ul class="protocol_content" style="padding:0px;"> <ul class="protocol_content" style="padding:0px;">
<li style="width:320px;"><label>CPU-ID:</label><input style="width:220px;" id="cpuId" type="text" class="form-control" value="CPU-ID001122334455667788"></li> <li style="width:320px;"><label>CPU-ID:</label><input style="width:220px;" id="cpuId" type="text" class="form-control" value="CPU-ID001122334455667788"></li>
<li><label style="word-break:break-all;font-size:12px;">SIM卡IMSI号:</label><input id="imsi" type="text" class="form-control" value="IMSI13145678902"></li> <li><label style="word-break:break-all;font-size:12px;">SIM卡IMSI号:</label><input id="imsi" type="text" class="form-control" value="IMSI13145678902"></li>
...@@ -62,6 +68,7 @@ ...@@ -62,6 +68,7 @@
</ul> </ul>
</div> </div>
</div> </div>
</div>
<div style="display: block; width: 100%; border-width: 1px; border-style: solid; border-color: darkgray; border-radius: 10px; padding: 2px; margin-top: 5px;"> <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>GPS行驶轨迹设置:</b></h5> <h5><b>GPS行驶轨迹设置:</b></h5>
<div class="input-group" style="width:380px;padding-bottom:10px;margin-left:10px;display:inline;"> <div class="input-group" style="width:380px;padding-bottom:10px;margin-left:10px;display:inline;">
...@@ -279,6 +286,16 @@ function sendjson(data,url){ ...@@ -279,6 +286,16 @@ function sendjson(data,url){
} }
}); });
} }
//控制登录数据区域的显示与隐藏
function isShowLoginArea(e){
var value = $(e).val()
if(value == "0"){
$("#login_area").css("display","none")
}else{
$("#login_area").css("display","block")
}
}
///////////////////////////////// websocket 代码开始 ///////////////////////////////// ///////////////////////////////// websocket 代码开始 /////////////////////////////////
client = "0" client = "0"
ws = null; ws = null;
......
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