From c44b10e4447e84dbdfa9105edf460ef364a8f2b3 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期一, 30 十一月 2020 19:53:35 +0800 Subject: [PATCH] Merge branch 'master' into WJC --- HDL_ON/DAL/DriverLayer/Packet.cs | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/Packet.cs b/HDL_ON/DAL/DriverLayer/Packet.cs index 2eab7c6..6fce368 100644 --- a/HDL_ON/DAL/DriverLayer/Packet.cs +++ b/HDL_ON/DAL/DriverLayer/Packet.cs @@ -124,6 +124,7 @@ { if (updataObj.functionType != FunctionType.RGB) { + updataObj.trait_on_off.curValue = receiveBytes[2] > 0 ? "on" : "off"; if (updataObj.trait_on_off.curValue.ToString() == "on") { switch (updataObj.functionType) @@ -132,12 +133,10 @@ (updataObj as Fan).openLevel = receiveBytes[2]; updataObj.lastState = Language.StringByID(StringId.Level) + " : " + receiveBytes[2]; break; - case FunctionType.Relay: + case FunctionType.Dimmer: (updataObj as Light).brightness = receiveBytes[2]; updataObj.lastState = Language.StringByID(StringId.Brightness) + " : " + receiveBytes[2] + "%"; break; - //case FunctionType.Socket: - // (updataObj as SwitchSocket). } } HomePage.UpdataFunctionStates(updataObj); -- Gitblit v1.8.0