From 399779926fae34663db390d329a0d33b2033a4a1 Mon Sep 17 00:00:00 2001 From: zhangxy Date: Fri, 25 Jul 2025 13:12:16 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=BF=83=E8=B7=B3=E8=8E=B7=E5=8F=96GPIO?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SocketExample/TCPWindowV2.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SocketExample/TCPWindowV2.xaml.cs b/SocketExample/TCPWindowV2.xaml.cs index 76c47b4..90f1fe3 100644 --- a/SocketExample/TCPWindowV2.xaml.cs +++ b/SocketExample/TCPWindowV2.xaml.cs @@ -476,8 +476,8 @@ namespace SocketExample Thread.Sleep(1000); - Thread GPIOthread = new Thread(new ThreadStart(delegate () { byte[] data = strToToHexByte("AA 55 00 81 81 0D"); client.Send(data); Thread.Sleep(3000); })); - GPIOthread.Start(); + Thread GPIOthread = new Thread(new ThreadStart(delegate () { while (true) { byte[] data = strToToHexByte("AA 55 00 81 81 0D"); client.Send(data); Thread.Sleep(3000); } })); + GPIOthread.Start();//心跳获取GPIO状态 return EasyTask.CompletedTask; } #endregion