1、增加冷启动自动发送
This commit is contained in:
parent
7eb47b3202
commit
0155d29daa
@ -4,10 +4,7 @@ import com.imdroid.common.util.DataTypeUtil;
|
|||||||
import com.imdroid.common.util.HexUtil;
|
import com.imdroid.common.util.HexUtil;
|
||||||
import com.imdroid.common.util.ThreadManager;
|
import com.imdroid.common.util.ThreadManager;
|
||||||
import com.imdroid.secapi.client.BeidouClient;
|
import com.imdroid.secapi.client.BeidouClient;
|
||||||
import com.imdroid.secapi.dto.GnssDevice;
|
import com.imdroid.secapi.dto.*;
|
||||||
import com.imdroid.secapi.dto.GnssMsg;
|
|
||||||
import com.imdroid.secapi.dto.GnssMsgMapper;
|
|
||||||
import com.imdroid.secapi.dto.GnssStatus;
|
|
||||||
import com.imdroid.sideslope.message.D3F0SelfCheckMessage;
|
import com.imdroid.sideslope.message.D3F0SelfCheckMessage;
|
||||||
import com.imdroid.sideslope.sal.Device;
|
import com.imdroid.sideslope.sal.Device;
|
||||||
import com.imdroid.sideslope.sal.DeviceService;
|
import com.imdroid.sideslope.sal.DeviceService;
|
||||||
@ -104,8 +101,8 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
|
|||||||
if(device.getModel() == GnssDevice.MODEL_G505 &&
|
if(device.getModel() == GnssDevice.MODEL_G505 &&
|
||||||
device.getDeviceType() == Device.DEVICE_ROVER){
|
device.getDeviceType() == Device.DEVICE_ROVER){
|
||||||
// 连续6个周期无解,则发送 F9P 冷启动指令
|
// 连续6个周期无解,则发送 F9P 冷启动指令
|
||||||
if(device.getNoFixedAndFloatResult() >= 6){
|
if((device.getWarningcode()&WarningCfg.TYPE_NO_FIXED_RESULT) !=0){
|
||||||
//sendF9PColdStartCommand(device);
|
sendF9PColdStartCommand(device);
|
||||||
logger.info("{}: 连续{}次无固定解和浮点解,发送 F9P 冷启动指令",device.getDeviceId(), device.getNoFixedAndFloatResult());
|
logger.info("{}: 连续{}次无固定解和浮点解,发送 F9P 冷启动指令",device.getDeviceId(), device.getNoFixedAndFloatResult());
|
||||||
device.clearNoResultStat();
|
device.clearNoResultStat();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,6 +74,7 @@ public class Device {
|
|||||||
int fixedNum = 0;
|
int fixedNum = 0;
|
||||||
int floatNum = 0;
|
int floatNum = 0;
|
||||||
LocalDateTime lastValidCalcDataTime; //最近一次有效解
|
LocalDateTime lastValidCalcDataTime; //最近一次有效解
|
||||||
|
int warningcode = 0;
|
||||||
|
|
||||||
public void updateRx(int head, int bytes,int count){
|
public void updateRx(int head, int bytes,int count){
|
||||||
lastRxHead = head;
|
lastRxHead = head;
|
||||||
@ -144,6 +145,7 @@ public class Device {
|
|||||||
|
|
||||||
public void clearNoResultStat(){
|
public void clearNoResultStat(){
|
||||||
noFixedAndFloatResult = 0;
|
noFixedAndFloatResult = 0;
|
||||||
|
warningcode = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -108,6 +108,7 @@ public class WarningServiceImpl implements WarningService {
|
|||||||
// 根据告警码确定告警级别
|
// 根据告警码确定告警级别
|
||||||
status.setWarning(getWarningLevel(status.getWarningcode()));
|
status.setWarning(getWarningLevel(status.getWarningcode()));
|
||||||
gnssStatusMapper.updateById(status);
|
gnssStatusMapper.updateById(status);
|
||||||
|
device.setWarningcode(status.getWarningcode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/***
|
/***
|
||||||
@ -237,6 +238,10 @@ public class WarningServiceImpl implements WarningService {
|
|||||||
if(status != null) {
|
if(status != null) {
|
||||||
boolean isUpdated = false;
|
boolean isUpdated = false;
|
||||||
// 清除b562告警
|
// 清除b562告警
|
||||||
|
if((status.getWarningcode() & WarningCfg.TYPE_CONT_INVALID_RESULT) !=0 ) {
|
||||||
|
status.setWarningcode(status.getWarningcode() & ~WarningCfg.TYPE_CONT_INVALID_RESULT);
|
||||||
|
isUpdated = true;
|
||||||
|
}
|
||||||
if((status.getWarningcode() & WarningCfg.TYPE_NO_FIXED_RESULT) !=0 ) {
|
if((status.getWarningcode() & WarningCfg.TYPE_NO_FIXED_RESULT) !=0 ) {
|
||||||
status.setWarningcode(status.getWarningcode() & ~WarningCfg.TYPE_NO_FIXED_RESULT);
|
status.setWarningcode(status.getWarningcode() & ~WarningCfg.TYPE_NO_FIXED_RESULT);
|
||||||
isUpdated = true;
|
isUpdated = true;
|
||||||
@ -253,6 +258,7 @@ public class WarningServiceImpl implements WarningService {
|
|||||||
if(isUpdated) {
|
if(isUpdated) {
|
||||||
status.setWarning(getWarningLevel(status.getWarningcode()));
|
status.setWarning(getWarningLevel(status.getWarningcode()));
|
||||||
gnssStatusMapper.updateById(status);
|
gnssStatusMapper.updateById(status);
|
||||||
|
device.setWarningcode(status.getWarningcode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user