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(() -> {
// 检查是否需要对设备的F9P进行冷启动操作
if(device.getDeviceType() == Device.DEVICE_ROVER){
if(device.getModel() == GnssDevice.MODEL_G505){
checkAndSendF9PColdStartCommand(device);
}
else{
checkAndResetBTGnss(device);
}
}
// 通知beidou服务设备上线这里会触发参数同步
GnssStatus lastGnssStatus = dataPersistService.getDeviceState(message.getId());
try {
@ -106,15 +112,11 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
}*/
private void checkAndSendF9PColdStartCommand(Device device){
if(device.getModel() == GnssDevice.MODEL_G505 &&
device.getDeviceType() == Device.DEVICE_ROVER){
// 连续6个周期无解则发送 F9P 冷启动指令
if((device.getWarningcode()&WarningCfg.TYPE_NO_FIXED_RESULT) !=0){
startF9PColdStartTask(device);
device.clearNoResultStat();
}
}
}
void saveMsg(String deviceId, int tenantId, int msgType, String content,boolean isTx){
GnssMsg gnssMsg = new GnssMsg();
@ -166,13 +168,13 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
}
private void checkAndResetBTGnss(Device device){
if(device.getModel() == GnssDevice.MODEL_G510 &&
device.getDeviceType() == Device.DEVICE_ROVER){
// 连续6个周期无解则发送 F9P 冷启动指令
if(device.getNoFixedAndFloatResult()>0 &&device.getAbnormalD341Num()>10){
startBTResetTask(device);
device.clearNoResultStat();
}
else if((device.getWarningcode()&WarningCfg.TYPE_CONT_INVALID_RESULT) !=0){
startBTHotStartTask(device);
device.clearNoResultStat();
}
}
@ -182,7 +184,16 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
@Override
public void run() {
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);
}

View File

@ -56,7 +56,7 @@ public class D3F2StopIndicationMessageExecutor implements Executor<D3F2StopIndic
if(device == null) return null;
message.setTenantId(device.getTenantId());
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) {
message.setOtherInfo(message.getOtherInfo() + ",valid calc:" + device.getLastValidCalcDataTime());
}