Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightCentralizedControlManagement
This commit is contained in:
commit
81ab1623ba
2 files changed
+41
-5
No files matched your search
@@ -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毫秒或直到收到响应
|
||||
|
||||
Reference in new issue
Block a user