From eb424d24e39bab4a245725f35deab3f234ea0f13 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 13 十二月 2019 10:48:50 +0800
Subject: [PATCH] 2019.12.13
---
ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 37 ++++++++++++++++++++++++++++---------
1 files changed, 28 insertions(+), 9 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 d3feb0d..cdd3872
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
@@ -19,13 +19,15 @@
/// <param name="flage">If set to <c>true</c> flage.</param>
public static void DebugPrintLog(string msg, bool flage = true)
{
+#if DEBUG
if (flage == true)
{
- //if (msg.Contains("DeviceStatusReport") == false)
- //{
- System.Console.WriteLine(msg);
- //}
+ if (msg.Contains("DeviceStatusReport") == false)
+ {
+ System.Console.WriteLine(msg + " " + System.DateTime.Now.ToLongTimeString() + " " + System.DateTime.Now.Millisecond);
+ }
}
+#endif
}
/// <summary>
@@ -163,6 +165,10 @@
else if (strDeviceType == ZigBee.Device.DeviceType.DoorLock.ToString())
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLock>(strDeviceByte);
+ }
+ else if (strDeviceType == ZigBee.Device.DeviceType.TemperatureSensor.ToString())
+ {
+ return Newtonsoft.Json.JsonConvert.DeserializeObject<TemperatureSensor>(strDeviceByte);
}
return null;
}
@@ -208,12 +214,12 @@
else if (this.Type == DeviceType.ColorDimmableLight)
{
//褰╃伅
- IconPath = "Device/ColorDimmableLight.png";
+ IconPath = "Device/ColorLight.png";
}
else if (this.Type == DeviceType.DimmableLight)
{
//璋冨厜鍣�
- IconPath = "Device/ColorDimmableLight.png";
+ IconPath = "Device/Light.png";
}
else if (this.Type == DeviceType.OnOffOutput)
{
@@ -224,6 +230,19 @@
{
//绌鸿皟
IconPath = "Device/AirConditionerEpoint.png";
+ }
+ else if (this.Type == DeviceType.TemperatureSensor)
+ {
+ if (((TemperatureSensor)this).SensorDiv == 1)
+ {
+ //娓╁害浼犳劅鍣�
+ IconPath = "Device/SensorTemperature.png";
+ }
+ else if (((TemperatureSensor)this).SensorDiv == 2)
+ {
+ //婀垮害浼犳劅鍣�
+ IconPath = "Device/SensorHumidity.png";
+ }
}
else if (this.Type != DeviceType.UnKown)
{
@@ -276,9 +295,9 @@
/// </summary>
public DeviceType Type = DeviceType.UnKown;
/// <summary>
- /// 璁惧鐨勫姛鑳界被鍨�(姝ょ被鍨嬬洰鍓嶅彧閽堝缁х數鍣ㄥ洖璺湁鏁�,榛樿涓虹伅鍏�)
+ /// 璁惧鐨勫姛鑳界被鍨�(姝ょ被鍨嬬洰鍓嶅彧閽堝缁х數鍣ㄥ洖璺湁鏁�,榛樿鏈寚瀹�)
/// </summary>
- public DeviceFunctionType DfunctionType = DeviceFunctionType.A鐏厜;
+ public DeviceFunctionType DfunctionType = DeviceFunctionType.A鏈畾涔�;
/// <summary>
/// MAC鍦板潃
/// </summary>
@@ -984,7 +1003,7 @@
/// <summary>
/// 璁惧鎵�鍦ㄧ綉鍏崇殑缃戝叧id
/// </summary>
- public int GwId;
+ public string GwId;
/// <summary>
/// 璁惧鍚�
/// </summary>
--
Gitblit v1.8.0