From e13a9980ce617db1394a76944186c5d5bd595d5d Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 02 六月 2021 14:37:12 +0800
Subject: [PATCH] 5月需求bug修复
---
HDL_ON/DAL/DriverLayer/Control.cs | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index df2a183..f66b0e0 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -561,7 +561,7 @@
string sendDataString = topicString + lengthString + bodyDataString;
byte[] sendDataBytes = Encoding.ASCII.GetBytes(sendDataString);
- //MainPage.Log($"杞崲HDL-Link鏁版嵁\r\n{sendDataString}\r\n");
+ MainPage.Log($"杞崲HDL-Link鏁版嵁\r\n{sendDataString}\r\n");
return sendDataBytes;
}
@@ -602,8 +602,7 @@
}
}
- MainPage.Log($"灞�鍩熺綉淇℃伅: {receiveObj.Topic}");
- MainPage.Log($"鍐呭: {res[1]}");
+ MainPage.Log($"灞�鍩熺綉淇℃伅: {receiveObj.Topic} : 鍐呭: {res[1]}");
//楠岃瘉鏈夋晥鏁版嵁闀垮害
@@ -623,7 +622,7 @@
}
var device = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceModule>(bodyJObj.objects.ToString());
- if (device.device_mac == DB_ResidenceData.Instance.residenceGatewayMAC)
+ if (device.device_mac.ToUpper() == DB_ResidenceData.Instance.HomeGateway.mac.ToUpper())
{
MainPage.Log("鏈湴鎼滅储缃戝叧鎴愬姛");
Ins.IsSearchLocalGatewaySuccessful = true;
@@ -636,7 +635,7 @@
{
Ins.GatewayId = device.device_mac;
}
- reportIp = "239.0.168.188";// device.ip_address;
+ reportIp = "239.0.168.188";// device.ip_address;//涓绘挱鍦板潃涔熻兘鎺у埗璁惧
}
}
else if (receiveObj.Topic == CommunicationTopic.ct.ReadStatus + "_reply" ||
@@ -704,6 +703,9 @@
Function localObj = null;
switch (localFunction.spk)
{
+ case SPK.ElectricEnergy:
+ EnergyMainPage.UpdataStatus(localFunction);
+ break;
case SPK.LightSwitch:
RelayPage.UpdataState(localFunction);
break;
@@ -810,6 +812,14 @@
case SPK.SensorTVOC:
case SPK.SensorTemperature:
case SPK.SensorHumidity:
+ if(localFunction.spk == SPK.SensorTemperature)
+ {
+ HomePage.LoadEvent_RefreshEnvirIndoorTemp();
+ }
+ else if (localFunction.spk == SPK.SensorHumidity)
+ {
+ HomePage.LoadEvent_RefreshEnvirIndoorHumi();
+ }
EnvironmentalPage.LoadEvent_UpdataStatus(localFunction);
break;
case SPK.ElectricSocket:
--
Gitblit v1.8.0