This commit is contained in:
sc committed 2025-09-30 20:06:33 +08:00
commit 81ab1623ba
2 files changed
+41 -5

No files matched your search

+2 -2
View File
@@ -270,8 +270,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass
return EasyTask.CompletedTask; ;
};
await portclient.SetupAsync(new TouchSocketConfig()
.SetMaxBufferSize(1024 * 1024 * 100)
.SetMinBufferSize(1024 * 1024 * 10)
.SetMaxBufferSize(1024 * 1024 * 10)
.SetSerialPortOption(new SerialPortOption()
{
BaudRate = BAUD,//波特率
@@ -417,6 +416,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass
{
try
{
var t= CRCcheck16.ToCRC16(command);
_responseEvent.Reset();
serialPortClients.Send(command); // 发送指令
// 等待500毫秒或直到收到响应