wxr
2020-09-09 c3e1b733fc45bd9f0b88bfb560cfa87a270b079b
HDL_ON/DriverLayer/CommonPage.cs
@@ -12,8 +12,6 @@
{
    public static class CommonPage
    {
        public static bool IsRemote;
        public static Action RefreshAir;
        public static string FindGatewayChilrenIPAddress = new NetWiFi().BroadcastIpAddress.ToString();
        private static string ip = "0.0.0.0";
@@ -182,13 +180,13 @@
                    case Command.ReadLightAllLoopBrightnessACK:
                        for (int i = 0; i < receiveBytes[0]; i++)
                        {
                            var light = DB_ResidenceData.functionList.lights.Find((obj) => obj.bus_Data.SubnetID == subnetID && obj.bus_Data.DeviceID == deviceID && obj.bus_Data.LoopID == i);
                            var light = DB_ResidenceData.functionList.lights.Find((obj) => obj.bus_Data.SubnetID == subnetID && obj.bus_Data.DeviceID == deviceID && obj.bus_Data.LoopID == (i+1));
                            if (light != null)
                            {
                                if (light.functionType != FunctionType.RGB)
                                {
                                    light.trait_on_off.value = receiveBytes[2] == 0 ? "off" : "on";
                                    if (light.trait_on_off.value == "on")
                                    light.trait_on_off.value = receiveBytes[light.bus_Data.LoopID] == 0 ? "off" : "on";
                                    if (light.trait_on_off.value.ToString() == "on")
                                    {
                                        light.brightness = receiveBytes[2];
                                        light.lastState = Language.StringByID(StringId.Brightness) + " : " + receiveBytes[2] + "%";
@@ -280,8 +278,8 @@
                                    {
                                        curtain.trait_on_off.value = "off";
                                    }
                                    curtain.openLevel = receiveBytes[1];
                                    curtain.lastState = Language.StringByID(StringId.Open) + curtain.openLevel + "%";
                                    curtain.percent = receiveBytes[1];
                                    curtain.lastState = Language.StringByID(StringId.Open) + curtain.percent + "%";
                                }
                                else
                                {