1、增加博通长时间无有效解发热启动指令

This commit is contained in:
weidong 2024-12-05 09:31:28 +08:00
parent 38da126854
commit 1ee8b2540f
2 changed files with 29 additions and 18 deletions

View File

@ -67,8 +67,14 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
ThreadManager.getFixedThreadPool().submit(() -> { ThreadManager.getFixedThreadPool().submit(() -> {
// 检查是否需要对设备的F9P进行冷启动操作 // 检查是否需要对设备的F9P进行冷启动操作
checkAndSendF9PColdStartCommand(device); if(device.getDeviceType() == Device.DEVICE_ROVER){
checkAndResetBTGnss(device); if(device.getModel() == GnssDevice.MODEL_G505){
checkAndSendF9PColdStartCommand(device);
}
else{
checkAndResetBTGnss(device);
}
}
// 通知beidou服务设备上线这里会触发参数同步 // 通知beidou服务设备上线这里会触发参数同步
GnssStatus lastGnssStatus = dataPersistService.getDeviceState(message.getId()); GnssStatus lastGnssStatus = dataPersistService.getDeviceState(message.getId());
try { try {
@ -106,13 +112,9 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
}*/ }*/
private void checkAndSendF9PColdStartCommand(Device device){ private void checkAndSendF9PColdStartCommand(Device device){
if(device.getModel() == GnssDevice.MODEL_G505 && if((device.getWarningcode()&WarningCfg.TYPE_NO_FIXED_RESULT) !=0){
device.getDeviceType() == Device.DEVICE_ROVER){ startF9PColdStartTask(device);
// 连续6个周期无解则发送 F9P 冷启动指令 device.clearNoResultStat();
if((device.getWarningcode()&WarningCfg.TYPE_NO_FIXED_RESULT) !=0){
startF9PColdStartTask(device);
device.clearNoResultStat();
}
} }
} }
@ -166,13 +168,13 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
} }
private void checkAndResetBTGnss(Device device){ private void checkAndResetBTGnss(Device device){
if(device.getModel() == GnssDevice.MODEL_G510 && if(device.getNoFixedAndFloatResult()>0 &&device.getAbnormalD341Num()>10){
device.getDeviceType() == Device.DEVICE_ROVER){ startBTResetTask(device);
// 连续6个周期无解则发送 F9P 冷启动指令 device.clearNoResultStat();
if(device.getNoFixedAndFloatResult()>0 &&device.getAbnormalD341Num()>10){ }
startBTResetTask(device); else if((device.getWarningcode()&WarningCfg.TYPE_CONT_INVALID_RESULT) !=0){
device.clearNoResultStat(); startBTHotStartTask(device);
} device.clearNoResultStat();
} }
} }
@ -182,7 +184,16 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
@Override @Override
public void run() { public void run() {
sendGnssCommand(device, F9PColdStartCmd); sendGnssCommand(device, F9PColdStartCmd);
logger.info("{}: 连续{}次无固定解和浮点解,发送 F9P 冷启动指令",device.getDeviceId(), device.getNoFixedAndFloatResult()); }
},1000);
}
void startBTHotStartTask(Device device){
Timer timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
sendGnssCommand(device, BTSaveCmd);
} }
},1000); },1000);
} }

View File

@ -56,7 +56,7 @@ public class D3F2StopIndicationMessageExecutor implements Executor<D3F2StopIndic
if(device == null) return null; if(device == null) return null;
message.setTenantId(device.getTenantId()); message.setTenantId(device.getTenantId());
if(device.getDeviceType() == Device.DEVICE_ROVER) { if(device.getDeviceType() == Device.DEVICE_ROVER) {
message.setOtherInfo(message.getOtherInfo() + ",no calc:" + device.getNoFixedAndFloatResult()); message.setOtherInfo(message.getOtherInfo() + ",no calc:" + device.getNoFixedAndFloatResult()+",warning:"+device.getWarningcode());
if (device.getLastValidCalcDataTime() != null) { if (device.getLastValidCalcDataTime() != null) {
message.setOtherInfo(message.getOtherInfo() + ",valid calc:" + device.getLastValidCalcDataTime()); message.setOtherInfo(message.getOtherInfo() + ",valid calc:" + device.getLastValidCalcDataTime());
} }