From 9137222ece9b978eb97b5598f2eee6e070bcf9d6 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期五, 28 二月 2020 15:22:16 +0800
Subject: [PATCH] 2020-02-28 更新

---
 Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs b/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs
index 3991130..601ab84 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs
@@ -279,7 +279,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;
@@ -326,7 +333,7 @@
                         }
                     }
                     break;
-                case Command. ReadAnalogValueACK:
+                case Command.ReadAnalogValueACK:
                     foreach (var room in Room.Lists) {
                         foreach (var common in room.DeviceList) {
                             if (common.SubnetID != subnetID || common.DeviceID != deviceID || common.LoopID != usefullBytes [1]) {
@@ -350,7 +357,7 @@
 
 
 
-                                int dddd = usefullBytes [0] & 0x3F;
+                            int dddd = usefullBytes [0] & 0x3F;
 
                             // 0xXX锛氬叕鍙稿唴閮ㄥ崗璁搴旂殑搴忓彿
                             // common.Type锛氬搴旂殑鏄紪杈戣蒋浠剁殑搴忓彿(娌℃湁涓�涓�瀵瑰簲锛屾槸涓轰簡灏嗙浉杩戠殑璋冩暣鍦ㄤ竴璧凤紝鏂逛究瀹㈡埛浣跨敤)

--
Gitblit v1.8.0