From dad267be98c9f1eb379d25e53493c47b337b2db7 Mon Sep 17 00:00:00 2001 From: linwl <304115325@qq.com> Date: Thu, 21 Jan 2021 21:41:44 +0800 Subject: [PATCH] =?UTF-8?q?ALL=E6=94=B9=E4=B8=BAall?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DipperAstPosAsyncTaskServiceImpl.java | 11 ++++++++++- .../impl/DipperAstTimeAsyncTaskServiceImpl.java | 9 +++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java b/src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java index 5417f94..2685cc2 100644 --- a/src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java +++ b/src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java @@ -217,6 +217,16 @@ public class DipperAstPosAsyncTaskServiceImpl implements IDipperAstPosAsyncTaskS astPosCmd += "70170000"; astPosCmd += "A0860100"; + log.info(astPosCmd); + String checkSum = HexConvert.makeChecksum(astPosCmd).toUpperCase(); + StringBuffer astCheckSumBuf = new StringBuffer(); + astCheckSumBuf.append(checkSum); + while (astCheckSumBuf.length()<4) { + astCheckSumBuf.insert(0,"0"); + } + checkSum = astCheckSumBuf.toString(); + log.info(checkSum); + byte[] astPosCmdBytes = HexConvert.hexStringToBytes(astPosCmd); StringBuffer astPosCmdBuf = new StringBuffer(); for(int i=0; i