From 34b65350abbb8b740b9c3bc0b43254cbbe23fcb5 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期二, 19 五月 2020 09:31:44 +0800 Subject: [PATCH] 合并代码,更改面板目标信息 --- ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 28 ++++++++++++++++++++-------- 1 files changed, 20 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 a572e70..9e2afc2 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs @@ -108,7 +108,12 @@ /// 0锛氳澶囦笉鍦ㄧ嚎 /// <para>1锛氳澶囧湪绾�</para> /// </summary> - public int IsOnline; + public int IsOnline; + /// <summary> + /// 1锛氳矾鐢辫澶� + /// <para>2锛氱粓绔澶囷紝鐢垫睜璁惧</para> + /// </summary> + public int ZigbeeType; /// <summary> /// 褰撳墠杩愯绋嬪簭鐗堟湰淇℃伅銆� 鏈�澶�64瀛楄妭 /// </summary> @@ -291,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> @@ -368,13 +373,18 @@ } 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) { @@ -462,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