From 5eeafe3af80bfd88306bd8ad9e76c8f4b51ca35f Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期四, 17 十二月 2020 14:16:20 +0800
Subject: [PATCH] 增加本地发送的重发机制
---
HDL_ON/Entity/Function/Function.cs | 58 ++++++++++++++++++----------------------------------------
1 files changed, 18 insertions(+), 40 deletions(-)
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 0fb021f..3a4a28e 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -149,37 +149,6 @@
/// </summary>
public int delay = 0;
/// <summary>
- /// 寤舵椂鏄剧ず鐨勬枃鏈�
- /// </summary>
- [Newtonsoft.Json.JsonIgnore]
- public string delayText
- {
- get
- {
- string text = "";
- switch (delay)
- {
- case 0:
- text = Language.StringByID(StringId.NoDelay);
- break;
- case 30:
- text = "30s";
- break;
- case 60:
- text = "1min";
- break;
- case 120:
- text = "2min";
- break;
- case 300:
- text = "5min";
- break;
- }
- return text;
- }
- }
-
- /// <summary>
/// 鏈�鍚庢帶鍒剁殑涓�娆$姸鎬�
/// </summary>
[Newtonsoft.Json.JsonIgnore]
@@ -222,7 +191,8 @@
/// <summary>
/// 浣跨敤棰戠巼
/// </summary>
- public double usageFrequency {
+ public double usageFrequency
+ {
get
{
return usageCount / 7;
@@ -305,7 +275,7 @@
Common.FileUtlis.Files.WriteFileByBytes(savePath, ssd);
}
}
-
+
/// <summary>
/// 杞崲鎴愬満鏅姛鑳藉璞�
@@ -316,7 +286,15 @@
var sFunc = new SceneFunction();
foreach (var attr in attributes)
{
- sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = attr.curValue.ToString() });
+ if (attr.key == FunctionAttributeKey.SetTemp)
+ {
+ var vv = Convert.ToDouble(attr.value);
+ sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() });
+ }
+ else
+ {
+ sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = attr.curValue.ToString() });
+ }
sFunc.sid = this.sid;
}
return sFunc;
@@ -455,11 +433,11 @@
/// <summary>
/// 鏈�澶у��
/// </summary>
- public int max=100;
+ public int max = 100;
/// <summary>
/// 鏈�灏忓��
/// </summary>
- public int min=0;
+ public int min = 0;
/// <summary>
/// 鏁版嵁绫诲瀷
/// </summary>
@@ -647,15 +625,15 @@
/// <summary>
/// 瀹剁數銆佹彃搴�
/// </summary>
- public const string ElectricSocket = "electric.socket ";
+ public const string ElectricSocket = "electrical.socket";
/// <summary>
/// 瀹剁數銆佺數瑙�
/// </summary>
- public const string ElectricTV = "electric.tv";
+ public const string ElectricTV = "electrical.tv";
/// <summary>
/// 瀹剁數銆侀鎵�
/// </summary>
- public const string ElectricFan = "electric.fan";
+ public const string ElectricFan = "electrical.fan";
}
-}
+}
\ No newline at end of file
--
Gitblit v1.8.0