1、连续无固定解,发F9P冷启动改发初始化

This commit is contained in:
weidong 2025-05-29 20:28:58 +08:00
parent c9337e0777
commit 83528f0cc4

View File

@ -32,6 +32,7 @@ import java.util.TimerTask;
public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessage, Void> { public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessage, Void> {
private final Logger logger = LoggerFactory.getLogger(this.getClass()); private final Logger logger = LoggerFactory.getLogger(this.getClass());
final String F9PInitCmd = "f9";
final String F9PColdStartCmd = "b56206040400000002001068"; final String F9PColdStartCmd = "b56206040400000002001068";
final String BTCloseMneaCmd = "424be8e1020a00040000ffff"; final String BTCloseMneaCmd = "424be8e1020a00040000ffff";
final String BTOpenGGACmd = "424b852c0208000400000001"; final String BTOpenGGACmd = "424b852c0208000400000001";
@ -172,9 +173,18 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
String sendCmd = Integer.toHexString(msgType) + HexUtil.Short2HexString(len)+ String sendCmd = Integer.toHexString(msgType) + HexUtil.Short2HexString(len)+
HexUtil.Int2HexString(Integer.parseInt(device.getDeviceId()))+gnssCmd; HexUtil.Int2HexString(Integer.parseInt(device.getDeviceId()))+gnssCmd;
rtcmClient.config(device.getDeviceId(), sendCmd); rtcmClient.config(device.getDeviceId(), sendCmd);
saveMsg(device.getDeviceId(), device.getTenantId(),0xD310, sendCmd, true); saveMsg(device.getDeviceId(), device.getTenantId(),msgType, sendCmd, true);
} }
//example: d31300050080F2B3f9
void sendDebugCommand(Device device, String cmd){
int msgType = 0xD313;
short len = (short) (cmd.length()/2+4);
String sendCmd = Integer.toHexString(msgType) + HexUtil.Short2HexString(len)+
HexUtil.Int2HexString(Integer.parseInt(device.getDeviceId()))+cmd;
rtcmClient.config(device.getDeviceId(), sendCmd);
saveMsg(device.getDeviceId(), device.getTenantId(),msgType, sendCmd, true);
}
void sendD3F1Ack(Device device){ void sendD3F1Ack(Device device){
int flag = 0xD3F1; int flag = 0xD3F1;
short len = (short) (4); short len = (short) (4);
@ -201,7 +211,8 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
timer.schedule(new TimerTask() { timer.schedule(new TimerTask() {
@Override @Override
public void run() { public void run() {
sendGnssCommand(device, F9PColdStartCmd); //sendGnssCommand(device, F9PColdStartCmd);
sendDebugCommand(device, F9PInitCmd);
} }
},1000); },1000);
} }