From 3be0abe90546f2a3a45828f5e6c8adc4517ea9e0 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 14 一月 2022 13:12:38 +0800
Subject: [PATCH] Merge branch 'wxr1215'

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

diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 4a6ad64..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);
                     }
                 })
@@ -835,7 +842,7 @@
                             var revString = Encoding.UTF8.GetString(receiveBytes);
                             receiveObj.BodyDataString = revString;
                             MainPage.Log($"灞�鍩熺綉淇℃伅: 瑙e瘑鍚庯細" + receiveObj.BodyDataString);
-                            //if(receiveObj.Topic.EndsWith("/thing/property/up"))
+                            //if (receiveObj.Topic.EndsWith("/thing/property/up"))
                             //{
                             //    MsgInfoList.Add(revString + "\r\n");
                             //}
@@ -1142,6 +1149,7 @@
                             case SPK.ElectricSocket:
                             case SPK.PanelSocket:
                                 SocketPage.UpdataState(localFunction);
+                                SocketPage_InstantaneousValue.UpdataView(localFunction);
                                 break;
                             case SPK.ElectricTV:
                                 break;

--
Gitblit v1.8.0