gxc
2020-01-10 b9cb076fe6127160c96c35bf9c8cebcffe1d5ccd
ZigbeeApp/Shared/Phone/UserView/UserPage.cs
old mode 100755 new mode 100644
@@ -147,46 +147,38 @@
                                var ac = (AC)myDevice;
                                ac.DeviceStatusReport = common.DeviceStatusReport;
                                var attriButeList = ac.DeviceStatusReport.AttriBute;
                                foreach (var attList in attriButeList)
                                {
                                foreach (var attList in attriButeList)
                                {
                                    //此属性表明室内当前的温度 * 100,实际温度为“LocalTemperature / 100”,单位:℃
                                    var curTemp = (attList.AttriButeData / 100 < ACControlBase.Temperature_High && attList.AttriButeData / 100 > ACControlBase.Temperature_Low) ? attList.AttriButeData / 100 : ACControlBase.Temperature_Default;
                                    switch (attList.AttributeId)
                                    {
                                        case 0:
                                            ac.currentLocalTemperature = curTemp;
                                            ac.LastDateTime = DateTime.Now;
                                            break;
                                        case 17:
                                            ac.currentCoolingSetpoint = curTemp;
                                            ac.LastDateTime = DateTime.Now;
                                            break;
                                        case 18:
                                            ac.currentHeatingSetpoint = curTemp;
                                            ac.LastDateTime = DateTime.Now;
                                            break;
                                        case 4096:
                                            ac.currentAutoSetpoint = curTemp;
                                            ac.LastDateTime = DateTime.Now;
                                            break;
                                        case 28:
                                            ac.currentSystemMode = attList.AttriButeData;
                                            ac.LastDateTime = DateTime.Now;
                                            break;
                                        case 4099:
                                            var value = Convert.ToString(attList.AttriButeData, 2).PadLeft(16, '0');
                                            var modeStr = value.Substring(value.Length - 5, 5);
                                            for (int j = 0; j < modeStr.Length; j++)
                                            {
                                                ac.listSupportMode[j] = Convert.ToInt32(modeStr[j]) == 49 ? 1 : 0;
                                            }
                                    switch (attList.AttributeId)
                                    {
                                        case 0:
                                            ac.currentLocalTemperature = curTemp;
                                            ac.LastDateTime = DateTime.Now;
                                            break;
                                        case 17:
                                            ac.currentCoolingSetpoint = curTemp;
                                            ac.LastDateTime = DateTime.Now;
                                            break;
                                        case 18:
                                            ac.currentHeatingSetpoint = curTemp;
                                            ac.LastDateTime = DateTime.Now;
                                            break;
                                        case 4096:
                                            ac.currentAutoSetpoint = curTemp;
                                            ac.LastDateTime = DateTime.Now;
                                            break;
                                        case 28:
                                            ac.currentSystemMode = attList.AttriButeData;
                                            ac.LastDateTime = DateTime.Now;
                                            break;
                                        case 4097:
                                            ac.CleanStatu = attList.AttriButeData == 42;
                                            break;
                                    }
                                }
                            }
                            }
                            if (common.DeviceStatusReport.CluterID == 514)
                            {
@@ -196,7 +188,7 @@
                                foreach (var attList in attriButeList)
                                {
                                    switch (attList.AttributeId)
                                    {
                                    {
                                        case 0:
                                            ac.currentFanMode = attList.AttriButeData;
                                            ac.LastDateTime = DateTime.Now;
@@ -208,7 +200,7 @@
                                    }
                                }
                            }
                            //当CluterID=3,就证明该设备在线,直接标记
                            if (common.DeviceStatusReport.CluterID == 3)
                            {
@@ -247,7 +239,7 @@
                                myDevice.IsOnline = 1;
                                myDevice.LastDateTime = DateTime.Now;
                            }
                            break;
                            break;
                        case DeviceType.TemperatureSensor:
                            //温度
@@ -303,7 +295,7 @@
                                    }
                                }
                            }
                            break;
                            break;
                    }
                }
                catch (Exception ex)
@@ -322,8 +314,8 @@
            {
                try
                {
                    switch (myDevice.Type)
                    {
                    switch (myDevice.Type)
                    {
                        case DeviceType.IASZone:
                            var iAS = (IASZone)myDevice;
                            iAS.iASInfo = (common as IASZone).iASInfo;