From 30d5375178a275abd2019f2e5ce0eab1dfa51e0e Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期一, 16 三月 2020 09:50:03 +0800 Subject: [PATCH] 2020-03-16 1.Android 修改包名为com.hdl.crabtreenew. --- Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs b/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs index 0d5a06e..7613551 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs @@ -256,7 +256,8 @@ } break; case Command.SetSingleLightACK: - Console.WriteLine ("Command.SetSingleLightACK"); + //Console.WriteLine ($"Command.SetSingleLightACK: subnetID:{subnetID} deviceID:{deviceID} 鍥炶矾锛歿usefullBytes [0]}"); + //Console.WriteLine ("Command.SetSingleLightACK"); foreach (var room in Room.Lists) { var common = room.DeviceList.Find ((obj) => obj.CommonLoopID == subnetID.ToString () + "_" + deviceID.ToString () + "_" + usefullBytes [0].ToString ()); if (common != null) { @@ -279,7 +280,14 @@ hadBeUpdate = false; (common as LightDimming).CurrentBrightness = usefullBytes [2]; } else if (common.Type == DeviceType.FanModule) { + //if ((common as FanModule).Switch == usefullBytes [2]) { + // hadBeUpdate = false; + //} (common as FanModule).Switch = usefullBytes [2]; + if (usefullBytes [2] != 0) + (common as FanModule).WindSpeed = usefullBytes [2]; + + //(common as FanModule).Switch = usefullBytes [2]; } else if (common.Type == DeviceType.LightMixSwitch) { if ((common as LightMixSwitch).CurrentBrightness == usefullBytes [2]) hadBeUpdate = false; @@ -312,6 +320,7 @@ if (!string.IsNullOrEmpty (room.Name)) UserDeviceToLight.UpdateBrighingCount (updateFlag); if (hadBeUpdate) { + UserRoom.UpdataDeviceStatus (common); UserLightPage.UpdateStatus (updateFlag, usefullBytes [2]); UserDeviceToLight.UpdateStatus (updateFlag, usefullBytes [2]); @@ -350,7 +359,7 @@ - int dddd = usefullBytes [0] & 0x3F; + int dddd = usefullBytes [0] & 0x3F; // 0xXX锛氬叕鍙稿唴閮ㄥ崗璁搴旂殑搴忓彿 // common.Type锛氬搴旂殑鏄紪杈戣蒋浠剁殑搴忓彿(娌℃湁涓�涓�瀵瑰簲锛屾槸涓轰簡灏嗙浉杩戠殑璋冩暣鍦ㄤ竴璧凤紝鏂逛究瀹㈡埛浣跨敤) -- Gitblit v1.8.0