From 9a343a7240c0254450174ea674948a6df54fbc61 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 11 八月 2023 16:25:24 +0800
Subject: [PATCH] 优化全开全关控制算法

---
 HDL_ON/DAL/DriverLayer/Control.cs |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index e8a9655..a1af398 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -536,7 +536,7 @@
                         var sendBytes = Ins.ConvertSendBodyData(CommunicationTopic.ct.ControlFunctionTopic, functionControlDataJson);
                         new Control_Udp().SendLocalHdlLinkData(sendBytes, functionControlDataObj.id, resend);
                         MainPage.Log($"鏈湴閫氳 鍙戦�丠DL-Link鏁版嵁:{functionControlDataJson}");
-                            Ins.myTcpClient.SendMessage(sendBytes);
+                            //Ins.myTcpClient.SendMessage(sendBytes);
                     }
                 }
                 //杩滅▼閫氳
@@ -626,6 +626,10 @@
             {
                 foreach (var temp in functions)
                 {
+                    if((temp.trait_on_off.state.ToString() ==  "on" && open)|| temp.trait_on_off.state.ToString() == "off"&& !open)
+                    {
+                        continue;
+                    }
                     var apiControlData = temp.GetApiControlData(d);
                     actionObjs.Add(apiControlData);
                     count++;
@@ -1012,7 +1016,7 @@
 
                 if (receiveObj.Topic == CommunicationTopic.ct.HeartBeat + "_reply")
                 {
-                    Ins.myTcpClient.ClearHeartBeatLog();
+                    //Ins.myTcpClient.ClearHeartBeatLog();
                     MainPage.Log("tcp蹇冭烦鍥炲");
                     return null;
                 }

--
Gitblit v1.8.0