From e6a26ee148587327478d9a82624a820c907b6e16 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 04 十一月 2020 14:58:15 +0800
Subject: [PATCH] 20201104

---
 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