From bb4bcd1b320502b36d19aacec52ed886a975249a Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 19 七月 2022 11:04:00 +0800
Subject: [PATCH] 1.5.9打包
---
HDL_ON/DAL/DriverLayer/Control.cs | 35 ++++++++++++++++++++++-------------
1 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 8045608..e008c9e 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -94,7 +94,7 @@
}
set
{
- //if (_GatewayOnline_Local != value)
+ if (_GatewayOnline_Local != value)
{
_GatewayOnline_Local = value;
if (value)
@@ -129,7 +129,7 @@
}
set
{
- //if (_GatewayOnline_Cloud != value)
+ if (_GatewayOnline_Cloud != value)
{
_GatewayOnline_Cloud = value;
if(GatewayOnline_Local)
@@ -280,7 +280,8 @@
}
if (DB_ResidenceData.Instance.GatewayType == 0)
{
- new Control_Udp().ControlBytesSend(Command.ReadGateway, 255, 255, new byte[] { (byte)new Random().Next(255), (byte)new Random().Next(255) });
+ new Control_Udp().ControlBytesSend(Command.ReadGateway, 255, 255,
+ new byte[] { (byte)new Random().Next(255), (byte)new Random().Next(255) });
}
else if (DB_ResidenceData.Instance.GatewayType == 1)
{
@@ -916,13 +917,16 @@
byte[] bodyBytes = new byte[receiveObj.Length];
Array.Copy(originalReceiveBytes, topicBytes.Length + 4, bodyBytes, 0, receiveObj.Length);
byte[] receiveBytes = Securitys.EncryptionService.AesDecryptPayload(bodyBytes, DB_ResidenceData.Instance.CurrentRegion.localSecret);
- var revString = Encoding.UTF8.GetString(receiveBytes);
- receiveObj.BodyDataString = revString;
- MainPage.Log($"灞�鍩熺綉淇℃伅: 瑙e瘑鍚庯細" + receiveObj.BodyDataString);
- //if (receiveObj.Topic.EndsWith("/thing/property/up"))
- //{
- // MsgInfoList.Add(revString + "\r\n");
- //}
+ if (receiveBytes != null)
+ {
+ var revString = Encoding.UTF8.GetString(receiveBytes);
+ receiveObj.BodyDataString = revString;
+ MainPage.Log($"灞�鍩熺綉淇℃伅: 瑙e瘑鍚庯細" + receiveObj.BodyDataString);
+ //if (receiveObj.Topic.EndsWith("/thing/property/up"))
+ //{
+ // MsgInfoList.Add(revString + "\r\n");
+ //}
+ }
}
else
{
@@ -1050,9 +1054,6 @@
}
}
-
-
-
var localFunction = allLocalFuntion.Find((obj) => obj.sid == updateTemp.sid);
if (localFunction == null)
{
@@ -1129,6 +1130,14 @@
localFunction.lastState = localFunction.trait_on_off.curValue.ToString() == "on" ? Language.StringByID(StringId.Open) : Language.StringByID(StringId.Close);
CurtainModulePage.UpdataState(localFunction);
break;
+ case SPK.CurtainDream:
+ if(localFunction.GetAttrState(FunctionAttributeKey.Percent) == "0")
+ {
+ localFunction.SetAttrState(FunctionAttributeKey.OnOff, "off");
+ }
+ localFunction.lastState = localFunction.trait_on_off.curValue.ToString() == "on" ? Language.StringByID(StringId.Open) : Language.StringByID(StringId.Close);
+ CurtainDreamPage.UpdataState(localFunction);
+ break;
case SPK.CurtainTrietex:
localFunction.lastState = Language.StringByID(StringId.Open) + localFunction.GetAttrState(FunctionAttributeKey.Percent) + "%";
MotorCurtainPage.UpdataState(localFunction);
--
Gitblit v1.8.0