From da5999ee08de8f6267a4ed491b79b36649c52186 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 27 十二月 2021 11:52:22 +0800
Subject: [PATCH] 备份

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

diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 28ef74e..1430b9b 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -503,11 +503,18 @@
             {
                 new System.Threading.Thread(() =>
                 {
-                    foreach (var temp in functions)
+                    foreach (var function in functions)
                     {
                         Dictionary<string, string> d1 = new Dictionary<string, string>();
                         d1.Add(FunctionAttributeKey.OnOff, open ? "on" : "off");
-                        SendWriteCommand(temp, d1);
+                         if (function.spk == SPK.PanelSocket)
+                        {
+                            if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null)
+                            {
+                                d1.Add("on_off_usb", function.trait_on_off.curValue.ToString());
+                            }
+                        }
+                        SendWriteCommand(function, d1);
                         System.Threading.Thread.Sleep(100);
                     }
                 })

--
Gitblit v1.8.0