From e28d283bd27db2c40ff435c517db54e2010e8ae6 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期二, 24 十二月 2019 14:31:56 +0800 Subject: [PATCH] 2019.12.24 --- ZigbeeApp/Shared/Phone/Device/DeviceLogic/ReadDeviceAttributeLogic.cs | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/DeviceLogic/ReadDeviceAttributeLogic.cs b/ZigbeeApp/Shared/Phone/Device/DeviceLogic/ReadDeviceAttributeLogic.cs index 97bfe44..e283fca 100644 --- a/ZigbeeApp/Shared/Phone/Device/DeviceLogic/ReadDeviceAttributeLogic.cs +++ b/ZigbeeApp/Shared/Phone/Device/DeviceLogic/ReadDeviceAttributeLogic.cs @@ -35,8 +35,13 @@ /// <param name="device">璁惧</param> public void SendACStatuComand(CommonDevice device) { - SendThermostatStatuComand(device); - SendFanStatuComand(device); + new System.Threading.Thread(() => + { + SendFanStatuComand(device); + System.Threading.Thread.Sleep(300); + SendThermostatStatuComand(device); + }) + { IsBackground = true }.Start(); } /// <summary> @@ -82,7 +87,6 @@ { { "AttriButeId", (int)AttriButeId.CleanStatu} } - }; var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } }; jObject.Add("Data", data); @@ -115,7 +119,7 @@ }; var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } }; jObject.Add("Data", data); - device.Gateway?.Send(("GetDeviceStatus"), jObject.ToString()); + device.Gateway?.Send("GetDeviceStatus", jObject.ToString()); } #endregion @@ -165,8 +169,13 @@ /// <param name="device"></param> public void SendDimmableLightStatuComand(CommonDevice device) { - SendSwitchStatuComand(device); - SendLevelStatuComand(device); + new System.Threading.Thread(() => + { + SendSwitchStatuComand(device); + System.Threading.Thread.Sleep(300); + SendLevelStatuComand(device); + }) + { IsBackground = true }.Start(); } /// <summary> @@ -218,7 +227,6 @@ jObject.Add("Data", data); device.Gateway?.Send(("GetDeviceStatus"), jObject.ToString()); } - #endregion } -- Gitblit v1.8.0