From 271faaf6664166dc368639b9f2e577f63f901be5 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 23 十二月 2020 22:23:57 +0800 Subject: [PATCH] 20201223-99 --- HDL_ON/DAL/DriverLayer/Control.cs | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs index 8e434c9..a894698 100644 --- a/HDL_ON/DAL/DriverLayer/Control.cs +++ b/HDL_ON/DAL/DriverLayer/Control.cs @@ -225,8 +225,6 @@ //鏈湴鎼滅储涓嶅埌缃戝叧 if (!Ins.IsRemote) { - //杩炴帴mqtt鍓嶏紝鍏堟柇寮�--2020-12-21 - DAL.Mqtt.MqttClient.DisConnectRemote(); Ins.IsRemote = true; DAL.Mqtt.MqttClient.InitState(); } @@ -243,7 +241,11 @@ { if (Ins.IsRemote || DB_ResidenceData.Instance.GatewayType == 1) { - ControlAProtocolScene(scene); + new System.Threading.Thread(() => + { + ControlAProtocolScene(scene); + }) + { IsBackground = true }.Start(); } else { @@ -264,7 +266,7 @@ /// <returns></returns> public void SendWriteCommand(Function function, Dictionary<string, string> commandDictionary) { - function.usageCount++; + function.controlCounter++; function.refreshTime = DateTime.Now; //濡傛灉鏄帶鍒惰皟鍏夌殑寮�鏃讹紝浜害鍊间笉鑳戒负0 @@ -289,6 +291,8 @@ } } + MainPage.Log($"鍙戦�佹暟鎹�:{Newtonsoft.Json.JsonConvert.SerializeObject(commandDictionary)}"); + //杩滅▼閫氳 if (Ins.IsRemote) { @@ -298,7 +302,6 @@ var actionObjs = new List<ApiAlinkControlActionObj>(); actionObjs.Add(apiControlData); var pack = httpServer.ControlDevice(actionObjs); - //MainPage.Log($"{pack.Code}:{pack.Data}"); } //鏈湴閫氳 else @@ -403,8 +406,8 @@ { if (Ins.IsRemote) { - var pm = new HDL_ON.DAL.Server.HttpServerRequest(); - pm.ExecuteScene(scene.userSceneId); + var pm = new DAL.Server.HttpServerRequest(); + var result = pm.ExecuteScene(scene.userSceneId); } else { -- Gitblit v1.8.0