From 775bf2d08b8a7a9f22d445b77106ce67d0c75fc0 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期五, 29 一月 2021 11:22:29 +0800
Subject: [PATCH] 2021-01-29 1.增加萤石云功能相关库和资源文件,目前有冲突还无法编译

---
 HDL_ON/Entity/FunctionList.cs |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index 2a6d2bd..a6b3d33 100755
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -110,6 +110,10 @@
         /// 鐜浼犳劅鍣ㄥ垪琛�
         /// </summary>
         public List<Sensor> sensorsEnvironmentalScience = new List<Sensor>();
+        /// <summary>
+        /// 瀹夐槻璁惧鍒楄〃
+        /// </summary>
+        public List<Sensor> sensorsArm = new List<Sensor>();
 
         public List<Scene> scenes = new List<Scene>();
         /// <summary>
@@ -201,7 +205,7 @@
                             deviceFunctionList.Add(tv);
                             break;
                         case SPK.ElectricFan:
-                            var  fan = Newtonsoft.Json.JsonConvert.DeserializeObject<Fan>(functionDataString);
+                            var fan = Newtonsoft.Json.JsonConvert.DeserializeObject<Fan>(functionDataString);
                             List.fans.Add(fan);
                             deviceFunctionList.Add(fan);
                             break;
@@ -219,6 +223,13 @@
                             var tuyaWeepRobot = Newtonsoft.Json.JsonConvert.DeserializeObject<WeepRobot>(functionDataString);
                             List.weepRobots.Add(tuyaWeepRobot);
                             deviceFunctionList.Add(tuyaWeepRobot);
+                            break;
+                        case SPK.SensorSmoke:
+                        case SPK.SensorWater:
+                        case SPK.SensorGas:
+                            var ser = Newtonsoft.Json.JsonConvert.DeserializeObject<Sensor>(functionDataString);
+                            List.sensorsArm.Add(ser);
+                            deviceFunctionList.Add(ser);
                             break;
                     }
                 }
@@ -246,6 +257,7 @@
                 deviceFunctionList.AddRange(floorHeatings);
                 deviceFunctionList.AddRange(electricals);
                 deviceFunctionList.AddRange(sensorsEnvironmentalScience);
+                deviceFunctionList.AddRange(sensorsArm);
                 deviceFunctionList.AddRange(UI.Music.A31MusicModel.A31MusicModelList);
             }
             try
@@ -384,7 +396,7 @@
                     }
                     break;
                 case FunctionCategory.Sensor:
-                    switch(f.spk)
+                    switch (f.spk)
                     {
                         case SPK.SensorTVOC:
                         case SPK.SensorCO2:
@@ -393,6 +405,17 @@
                         case SPK.SensorTemperature:
                             List.sensorsEnvironmentalScience.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<Sensor>(obj.ToString()));
                             break;
+                        case SPK.SensorWater:
+                        case SPK.SensorSmoke:
+                        case SPK.SensorGas:
+                        case SPK.SensorDryContact:
+                        case SPK.SensorShanLan:
+                        case SPK.SensorDuiShe:
+                        case SPK.SensorPir:
+                        case SPK.SensorDoorWindow:
+                        case SPK.SensoruUtrasonic:
+                            List.sensorsArm.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<Sensor>(obj.ToString()));
+                            break;
                     }
                     break;
             }

--
Gitblit v1.8.0