From dcf60777c9346ff058f06298d03173f0c53d1902 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 16 十二月 2020 20:42:15 +0800
Subject: [PATCH] 20201216-4

---
 HDL_ON/DAL/DriverLayer/Packet.cs |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/HDL_ON/DAL/DriverLayer/Packet.cs b/HDL_ON/DAL/DriverLayer/Packet.cs
index 78c1cd2..c0a5517 100644
--- a/HDL_ON/DAL/DriverLayer/Packet.cs
+++ b/HDL_ON/DAL/DriverLayer/Packet.cs
@@ -232,9 +232,7 @@
                                         rgb.brightness = receiveBytes[1];
                                         rgb.lastState = Language.StringByID(StringId.Brightness) + " : " + receiveBytes[1] + "%";
                                     }
-                                    rgb.redColor = receiveBytes[6];
-                                    rgb.greenColor = receiveBytes[7];
-                                    rgb.blueColor = receiveBytes[8];
+                                    rgb.SetRGBcolor(new byte[] { receiveBytes[6], receiveBytes[7], receiveBytes[8] });
 
                                     HomePage.UpdataFunctionStates(rgb);
                                     RoomPage.UpdataStates(rgb);
@@ -309,7 +307,7 @@
                             if (ac.GetBusId() == subnetID + "_" + deviceID + "_" + receiveBytes[0])
                             {
                                 ac.curTempType = receiveBytes[1];
-                                ac.indoorTemp = receiveBytes[2];
+                                ac.trait_IndoorTemp.curValue = receiveBytes[2];
                                 ac.trait_on_off.curValue = receiveBytes[8] == 1 ? "on" : "off";
                                 ac.curModeIndex = receiveBytes[9];
                                 ac.curFanIndex = receiveBytes[10];
@@ -563,7 +561,7 @@
                         {
                             if (ac.GetBusId() == subnetID + "_" + deviceID + "_" + receiveBytes[0])
                             {
-                                ac.indoorTemp = receiveBytes[1];
+                                ac.trait_IndoorTemp.curValue = receiveBytes[1];
                                 FunctionPage.UpdataStates(ac);
                             }
                         }
@@ -574,8 +572,8 @@
                         MainPage.Log($"name : {Name} ; mac : {mac}");
                         if (DB_ResidenceData.Instance.residenceGatewayMAC == mac)
                         {
-                            DriverLayer.Control.Ins.GatewayOnline = true;
-                            DriverLayer.Control.Ins.IsRemote = false;
+                            Control.Ins.GatewayOnline = true;
+                            Control.Ins.IsRemote = false;
                             DAL.Mqtt.MqttClient.DisConnectRemote();//鏂紑mqtt
                         }
                         break;

--
Gitblit v1.8.0