From 569e91c63636345391f741df049c9374a141a434 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期一, 26 八月 2024 08:57:33 +0800
Subject: [PATCH] 添加路由新建配置,重新导出种子数据

---
 WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/DeviceBase/DeviceCommand.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/DeviceBase/DeviceCommand.cs b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/DeviceBase/DeviceCommand.cs
index 2b7c4b7..5cb4938 100644
--- a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/DeviceBase/DeviceCommand.cs
+++ b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/DeviceBase/DeviceCommand.cs
@@ -55,7 +55,7 @@
                     case TypeCode.Byte:
                     case TypeCode.SByte:
                     case TypeCode.Char:
-                        readCount += 1;
+                        readCount += sizeof(byte);
                         break;
                     case TypeCode.Int16:
                     case TypeCode.UInt16:
@@ -224,7 +224,7 @@
                             bytes.Add(Convert.ToByte(dataLength));
                             bytes.Add(Convert.ToByte(obj.ToString().Length));
                             bytes.AddRange(bytesString);
-                            for (int i = 0; i < dataLength - obj.ToString().Length; i++)
+                            for (int i = 0; i < dataLength - obj.ToString().Length - 2; i++)
                             {
                                 bytes.Add(0);
                             }

--
Gitblit v1.9.3