From 627093aca723d4bfb971b97c828e8b3a22dbda78 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 17 七月 2020 17:26:19 +0800
Subject: [PATCH] 2020-07-17-1
---
ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
index cda2d6e..da81728 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
@@ -199,12 +199,12 @@
{
return null;
}
- var gateWay = ZbGateway.GateWayList.Find(obj => (obj != null) && (obj.getGatewayBaseInfo != null) && (obj.getGatewayBaseInfo.gwID == CurrentGateWayId));
+ var gateWay = ZbGateway.GateWayList.Find(obj => (obj != null) && (obj.GwId == CurrentGateWayId));
if (gateWay == null)
{
gateWay = new ZbGateway { IsVirtual = true, };
- gateWay.getGatewayBaseInfo.gwID = CurrentGateWayId;
- gateWay.getGatewayBaseInfo.HomeId = Shared.Common.Config.Instance.HomeId;
+ gateWay.GwId = CurrentGateWayId;
+ gateWay.HomeId = Shared.Common.Config.Instance.HomeId;
ZbGateway.GateWayList.Add(gateWay);
}
@@ -300,6 +300,14 @@
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte);
}
+ else if (strDeviceType == ZigBee.Device.DeviceType.ColorTemperatureLight.ToString())
+ {
+ return Newtonsoft.Json.JsonConvert.DeserializeObject<ColorTemperatureLight>(strDeviceByte);
+ }
+ else if (strDeviceType == ZigBee.Device.DeviceType.Buzzer.ToString())
+ {
+ return Newtonsoft.Json.JsonConvert.DeserializeObject<Buzzer>(strDeviceByte);
+ }
else { return null; }
//鑳藉皯瀛樹竴涓彉閲忓氨灏戝瓨涓�涓�
device.Type = (DeviceType)device.DeviceID;
@@ -369,6 +377,11 @@
{
//璋冨厜鍣�
IconPath = "Device/Light.png";
+ }
+ else if (this.Type == DeviceType.ColorTemperatureLight)
+ {
+ //鑹叉俯鐏�
+ IconPath = "Device/ColorLightTemperature.png";
}
else if (this.Type == DeviceType.OnOffOutput)
{
--
Gitblit v1.8.0