mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-10-20 10:50:48 +08:00
fix: dlt645校验和
This commit is contained in:
@@ -189,7 +189,7 @@ public class Dlt645_2007Send : ISendMessage
|
||||
lenSpan.WriteValue<byte>((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);//结束符
|
||||
|
Reference in New Issue
Block a user