From da3634e011bbda29cf4e1c168997b780fe795b20 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期三, 13 五月 2020 09:05:23 +0800 Subject: [PATCH] 优化新风模块和新风面板的测试功能,请合并代码 --- ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 24 +++++++++++++++++++++--- 1 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs old mode 100755 new mode 100644 index f73ef01..f78d627 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs @@ -182,6 +182,10 @@ { return Newtonsoft.Json.JsonConvert.DeserializeObject<FreshAir>(strDeviceByte); } + else if (strDeviceType == ZigBee.Device.DeviceType.PMSensor.ToString()) + { + return Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte); + } return null; } @@ -238,11 +242,20 @@ //缁х數鍣� IconPath = "Device/RelayEpoint.png"; } - else if (this.Type == DeviceType.Thermostat || this.Type == DeviceType.FreshAir) + else if (this.Type == DeviceType.Thermostat) { - //绌鸿皟 - //鏂伴鍜岀┖璋冨浘鏍囩浉鍚� + //绌鸿皟 IconPath = "Device/AirConditionerEpoint.png"; + } + else if (this.Type == DeviceType.FreshAir) + { + //鏂伴 + IconPath = "Device/FreshAirEpoint.png"; + } + else if (this.Type == DeviceType.PMSensor) + { + //PM2.5绌烘皵璐ㄩ噺浼犳劅鍣� + IconPath = "Device/AirQualitySensorEpoint.png"; } else if (this.Type == DeviceType.FreshAirHumiditySensor) { @@ -401,6 +414,11 @@ /// </summary> public int IsOnline; /// <summary> + /// 1锛氳矾鐢辫澶� + /// <para>2锛氱粓绔澶囷紝鐢垫睜璁惧</para> + /// </summary> + public int ZigbeeType; + /// <summary> /// 褰撳墠杩愯绋嬪簭鐗堟湰淇℃伅銆� 鏈�澶�64瀛楄妭 /// </summary> public int ImgVersion; -- Gitblit v1.8.0