增加优质提醒,报文上报bug更改
parent
472280779e
commit
97e8e434aa
|
@ -32,6 +32,7 @@ public class NettyClientHandler extends ChannelInboundHandlerAdapter {
|
|||
*/
|
||||
@Override
|
||||
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
|
||||
|
||||
log.info("接收消息:" + msg);
|
||||
NettyClientLogQueue.add("<p>接收到服务端发来的消息"+msg+"</p>");
|
||||
switch (msg.toString()){
|
||||
|
|
|
@ -265,13 +265,13 @@ public class VehicleData {
|
|||
//第一位VIN
|
||||
sb.append(vin);
|
||||
//第二位经度 longitude latitude
|
||||
sb.append(getValue(longitude ,10));
|
||||
sb.append(getValue(longitude ,11));
|
||||
//第三位维度 longitude latitude
|
||||
sb.append(getValue(latitude ,10));
|
||||
//车速
|
||||
sb.append(getValue(speed,6));
|
||||
//总里程
|
||||
sb.append(getValue(mileage,10));
|
||||
sb.append(getValue(mileage,11));
|
||||
// 总电压
|
||||
sb.append(getValue(voltage,6));
|
||||
//总电流
|
||||
|
@ -285,11 +285,13 @@ public class VehicleData {
|
|||
// 制动踏板行程值
|
||||
sb.append(getValue(brakePedal,2));
|
||||
// 燃料消耗率
|
||||
sb.append(getValue(fuelConsumptionRate,6));
|
||||
sb.append(getValue(fuelConsumptionRate,5));
|
||||
//电机控制器温度
|
||||
sb.append(getValue(motorControllerTemperature,6));
|
||||
//电机转速
|
||||
sb.append(getValue(motorSpeed,5));
|
||||
//点击转矩
|
||||
sb.append(getValue(motorTorque,4));
|
||||
//电机温度
|
||||
sb.append(getValue(motorTemperature,6));
|
||||
//电机电压
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
<label for="mileage">里程</label>
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" min="0" max="999999" reserved="3" class="form-control" name="mileage" id="mileage" placeholder="里程">
|
||||
<input type="text" min="0" max="9999999" reserved="3" class="form-control" name="mileage" id="mileage" placeholder="里程">
|
||||
<div class="input-group-addon">KM</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -650,7 +650,19 @@
|
|||
}
|
||||
function startNettySendMsg(){
|
||||
if ($("#gear").val() == "P"){
|
||||
$.modal.msgError("你个憨批,驻车挡跑个锤子!!");
|
||||
$.modal.msgError("请不要选择驻车挡!");
|
||||
return;
|
||||
}
|
||||
if ($("#gear").val() == "N"){
|
||||
$.modal.msgError("请不要选择空挡!");
|
||||
return;
|
||||
}
|
||||
if ($("#drivingRoute").val() == "-"){
|
||||
$.modal.msgError("请选择路线!");
|
||||
return;
|
||||
}
|
||||
if (nettyMsgTime != null){
|
||||
$.modal.msgWarning("数据上报已经开始,请勿重复点击!");
|
||||
return;
|
||||
}
|
||||
nettyMsgTime = setInterval("sendNettySendMsg()", 1000);
|
||||
|
@ -691,6 +703,10 @@
|
|||
* 开始模拟数据
|
||||
*/
|
||||
function startImitateData(){
|
||||
if (vehicleImitateData != null){
|
||||
$.modal.msgWarning("数据模拟已经开始,请勿重复点击!");
|
||||
return;
|
||||
}
|
||||
vehicleImitateData = setInterval("imitateData()", 1000);
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue