| | |
| | | return; |
| | | } |
| | | deviceUI.CommonDevice.DeviceStatusReport = common.DeviceStatusReport; |
| | | var curTemp = (attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default; |
| | | switch (attriButeList[0].AttributeId) |
| | | foreach(var attList in attriButeList) |
| | | { |
| | | 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; |
| | |
| | | case 28: |
| | | //此属性描述恒温设备正处于哪种模式 |
| | | //Off = 0 Auto = 1 Cool = 3 Heat = 4 FanOnly = 7 Dry = 8 |
| | | ac.currentSystemMode = attriButeList[0].AttriButeData; |
| | | ac.currentSystemMode = attList.AttriButeData; |
| | | ac.LastDateTime = DateTime.Now; |
| | | if (ac.currentSystemMode == 0) |
| | | { |
| | |
| | | |
| | | case 4097: |
| | | //过虑网清洗标志:42 |
| | | ac.CleanStatu = attriButeList[0].AttriButeData == 42; |
| | | ac.CleanStatu = attList.AttriButeData == 42; |
| | | cleanStatu.Visible = ac.CleanStatu; |
| | | break; |
| | | |
| | | case 4099: |
| | | var value = Convert.ToString(attriButeList[0].AttriButeData, 2).PadLeft(16, '0'); |
| | | 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; |
| | | } |
| | | break; |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (common.DeviceStatusReport.CluterID == 514) |
| | | { |
| | | var attriButeList = common.DeviceStatusReport.AttriBute; |
| | | if (attriButeList == null || attriButeList.Count == 0) |
| | | { |
| | | return; |
| | | } |
| | | ac.DeviceStatusReport = common.DeviceStatusReport; |
| | | switch (attriButeList[0].AttributeId) |
| | | foreach(var attList in attriButeList) |
| | | { |
| | | switch (attList.AttributeId) |
| | | { |
| | | case 0: |
| | | //风扇当前的工作模式 1=Low 2=Medium 3=High |
| | | ac.currentFanMode = attriButeList[0].AttriButeData; |
| | | ac.currentFanMode = attList.AttriButeData; |
| | | ac.LastDateTime = DateTime.Now; |
| | | fanModeBtn.IsSelected = true; |
| | | fanModeBtn.SelectedImagePath = ACControlBase.GetFanModeSelectedImagePathByFanModeId(ac.currentFanMode); |
| | |
| | | break; |
| | | case 4096: |
| | | //风扇当前的扫风模式 |
| | | ac.currentFanSwingMode = attriButeList[0].AttriButeData; |
| | | ac.currentFanSwingMode = attList.AttriButeData; |
| | | ac.LastDateTime = DateTime.Now; |
| | | FanSwingModeBtn.IsSelected = true; |
| | | FanSwingModeBtn.SelectedImagePath = ACControlBase.GetFanSwingModeSelectedImagePathByFanSwingModeId(ac.currentFanSwingMode); |
| | | FanSwingModeBtn.UnSelectedImagePath = ACControlBase.GetFanSwingModeUnSelectedImagePathByFanSwingModeId(ac.currentFanSwingMode); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | //***新改 * **设备状态上报中,当CluterID = 3,证明设备在线,直接标记 |
| | |
| | | |
| | | currentModeBtn = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(599), |
| | | Y = Application.GetRealHeight(565), |
| | | Height = Application.GetRealHeight(80), |
| | | Width = Application.GetRealWidth(200), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | |
| | | reduceTemperatureBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(268), |
| | | Y = Application.GetRealHeight(680), |
| | | Y = Application.GetRealHeight(650), |
| | | Width = Application.GetMinRealAverage(80), |
| | | Height = Application.GetMinRealAverage(80), |
| | | UnSelectedImagePath = "AC/Reduce.png" |
| | |
| | | |
| | | addTemperatureBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(628), |
| | | Y = Application.GetRealHeight(680), |
| | | X = Application.GetRealWidth(620), |
| | | Y = Application.GetRealHeight(650), |
| | | Width = Application.GetMinRealAverage(80), |
| | | Height = Application.GetMinRealAverage(80), |
| | | UnSelectedImagePath = "AC/Add.png" |