From cf0bffdf072bae11bdb8c780d0a355818700f713 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期一, 18 五月 2020 15:42:45 +0800 Subject: [PATCH] 请合并代码,优化面板问题 --- ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 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 92b3442..9e2afc2 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs @@ -296,11 +296,11 @@ { device = Newtonsoft.Json.JsonConvert.DeserializeObject<FreshAir>(strDeviceByte); } - else { return null; } - //鑳藉皯瀛樹竴涓彉閲忓氨灏戝瓨涓�涓� - device.Type = (DeviceType)device.DeviceID; - - return device; + else if (strDeviceType == ZigBee.Device.DeviceType.PMSensor.ToString()) + { + return Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte); + } + return null; } /// <summary> @@ -373,17 +373,17 @@ } 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绌烘皵璐ㄩ噺浼犳劅鍣� + //PM2.5绌烘皵璐ㄩ噺浼犳劅鍣� IconPath = "Device/AirQualitySensorEpoint.png"; } else if (this.Type == DeviceType.FreshAirHumiditySensor) @@ -472,6 +472,8 @@ /// 娓╁害娴嬮噺鍔熻兘鐨勮澶囧锛氭俯搴︿紶鎰熷櫒銆傘�傘�� /// <para>1029:Relative Humidity Measurement,璁惧鏀寔鈥滄箍搴︽祴閲忓姛鑳解��</para> /// 婀垮害娴嬮噺鍔熻兘鐨勮澶囧锛氭箍搴︿紶鎰熷櫒銆傘�傘�� + /// <para>1066:Pm2.5 Measurement,璁惧鏀寔鈥減m2.5娴嬮噺鍔熻兘鈥�</para> + /// Pm2.5娴嬮噺鍔熻兘鐨勮澶囧锛歅m2.5浼犳劅鍣ㄣ�傘�傘�� /// </summary> public int InCluster; } -- Gitblit v1.8.0