From ea318e20d9a513bfae81a9203cef4bca0fc23c2c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 30 九月 2020 11:01:15 +0800
Subject: [PATCH] 202009301
---
HDL_ON/Entity/Function/FloorHeating.cs | 61 ++++++++----------------------
1 files changed, 17 insertions(+), 44 deletions(-)
diff --git a/HDL_ON/Entity/Function/FloorHeating.cs b/HDL_ON/Entity/Function/FloorHeating.cs
index d9cf8b3..3cf3d09 100644
--- a/HDL_ON/Entity/Function/FloorHeating.cs
+++ b/HDL_ON/Entity/Function/FloorHeating.cs
@@ -6,11 +6,11 @@
public class FloorHeating : Function
{
/*
- *鍦扮儹锛歵rait: [switch, mode, temperature, lock]
+ *鍦扮儹锛歵rait: [switch, mode, set_temperature, lock]
*灞炴�� 鎻忚堪
*switch on/off
*mode day, night,away, vacation, timer
- *temperature value(鍙)
+ *set_temperature value(鍙)
*lock boolean(Lock閿佸畾鎺у埗)
*set_ point up,down,value
*/
@@ -66,7 +66,7 @@
_trait_mode = new Trait()
{
name = "mode",
- value_key = new List<string> { "day", "night", "away", "vacation", "timer" },
+ value_key = new List<string> { "day", "night", "away", "normal", "timer" },
max = 4,
min = 0,
};
@@ -164,63 +164,36 @@
public int indoorTemp = 20;
- Trait _trait_temperature;
+ Trait _trait_temp;
/// <summary>
/// 褰撳墠娓╁害
+ /// </summary>/// <summary>
+ /// 褰撳墠绌鸿皟娓╁害
/// </summary>
[Newtonsoft.Json.JsonIgnore]
- public double curTemp
+ public Trait trait_temp
{
get
{
- try
+ if (_trait_temp == null)
{
- if (_trait_temperature == null)
- {
- _trait_temperature = function.Find((obj) => obj.name == "temperature");
- //鎵句笉鍒板睘鎬ч渶瑕佸0鏄庝竴涓紝闃叉鎶ラ敊闂��
- if (_trait_temperature == null)
- {
- _trait_temperature = new Trait()
- {
- name = "temperature",
- value_key = new List<string>(),
- max = 32,
- min = 5,
- };
- }
- _trait_temperature.value = 5;
- }
- return 5;
- }
- catch (Exception ex)
- {
- MainPage.Log($"ac get temp error : {ex.Message}");
- return 5;
- }
- }
- set
- {
- if (_trait_temperature == null)
- {
- _trait_temperature = function.Find((obj) => obj.name == "temperature");
+ _trait_temp = function.Find((obj) => obj.name == "set_temperature");
//鎵句笉鍒板睘鎬ч渶瑕佸0鏄庝竴涓紝闃叉鎶ラ敊闂��
- if (_trait_temperature == null)
+ if (_trait_temp == null)
{
- _trait_temperature = new Trait()
+ _trait_temp = new Trait()
{
- name = "temperature",
- value_key = new List<string>(),
- max = 4,
- min = 0,
+ name = "set_temperature",
+ value_key = new List<string> { },
+ max = 30,
+ min = 5,
};
}
- _trait_temperature.value = _trait_temperature.value_key[_trait_temperature.min];
+ _trait_temp.value = 16;
}
- _trait_temperature.value = value;
+ return _trait_temp;
}
}
-
/// <summary>
/// 褰撳墠妯″紡鐨刬con璺緞
/// </summary>
--
Gitblit v1.8.0