From 163a66530ee2288a12dac3cd9fb588982568f072 Mon Sep 17 00:00:00 2001 From: "2248356998 qq.com" <2248356998@qq.com> Date: Thu, 28 Aug 2025 17:04:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20dlt645=E6=A0=A1=E9=AA=8C=E5=92=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dlt645/Core/Dlt645_2007Send.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Plugin/ThingsGateway.Foundation.Dlt645/Dlt645/Core/Dlt645_2007Send.cs b/src/Plugin/ThingsGateway.Foundation.Dlt645/Dlt645/Core/Dlt645_2007Send.cs index 733414890..02cf533a4 100644 --- a/src/Plugin/ThingsGateway.Foundation.Dlt645/Dlt645/Core/Dlt645_2007Send.cs +++ b/src/Plugin/ThingsGateway.Foundation.Dlt645/Dlt645/Core/Dlt645_2007Send.cs @@ -189,7 +189,7 @@ public class Dlt645_2007Send : ISendMessage lenSpan.WriteValue((byte)(length - 1));//数据域长度 int num = 0; - for (int index = 0; index < byteBlock.WrittenCount; ++index) + for (int index = 0; index < byteBlock.WrittenCount - SendHeadCodeIndex; ++index) num += span[index]; WriterExtension.WriteValue(ref byteBlock, (byte)num);//校验码,总加和 WriterExtension.WriteValue(ref byteBlock, (byte)0x16);//结束符