From 5c4fff393dcd65b0804dfd4d5e5c38a0cdab2528 Mon Sep 17 00:00:00 2001 From: weidong Date: Wed, 13 Nov 2024 15:07:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E6=BF=80=E6=B4=BB=E6=97=B6=E9=97=B4=E7=9A=84=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sideslope/message/D3F0SelfCheckMessage.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/message/D3F0SelfCheckMessage.java b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/message/D3F0SelfCheckMessage.java index bfb51351..2cb5fff4 100644 --- a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/message/D3F0SelfCheckMessage.java +++ b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/message/D3F0SelfCheckMessage.java @@ -57,6 +57,17 @@ public class D3F0SelfCheckMessage extends BaseMessage { " blVer:"+src.readUnsignedByte() + " reboot:"+src.readUnsignedShort(); } + if(src.readableBytes()>=8){ + long lastActiveDate = src.readUnsignedInt(); + long lastActiveTime = src.readUnsignedInt(); + short year = (short) ((lastActiveDate>>16)&0xFF); + short month = (short) ((lastActiveDate>>8)&0xFF); + short day = (short) (lastActiveDate&0xFF); + byte hour = (byte) (lastActiveTime/3600); + byte munite = (byte) (lastActiveTime/60 - hour*60); + auxInfo = auxInfo + " last active time:"+ + year+"-"+month+"-"+day+" "+hour+":"+munite; + } // read 会移动 bytebuf 的指针,所以保存原始码流需要将此指针挑拨回开始处 src.readerIndex(0);