From 6a9ad7ec93218913a2ce3b898bb036f18f8f0da4 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 13 八月 2020 17:06:36 +0800
Subject: [PATCH] 20200813
---
HDL_ON/Entity/Function/AC.cs | 28 +++++++++++++++++-----------
1 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/HDL_ON/Entity/Function/AC.cs b/HDL_ON/Entity/Function/AC.cs
index 58a9824..e9038b1 100644
--- a/HDL_ON/Entity/Function/AC.cs
+++ b/HDL_ON/Entity/Function/AC.cs
@@ -45,12 +45,6 @@
}
}
- ///// <summary>
- ///// 褰撳墠绌鸿皟妯″紡
- ///// </summary>
- //[Newtonsoft.Json.JsonIgnore]
- //public string curMode = "cool";
-
/// <summary>
/// 褰撳墠妯″紡绱㈠紩
/// bus鎺у埗鍛戒护浣跨敤
@@ -178,7 +172,11 @@
}
}
}
+
Trait _trait_mode;
+ /// <summary>
+ /// 妯″紡灞炴��
+ /// </summary>
[Newtonsoft.Json.JsonIgnore]
public Trait trait_mode
{
@@ -186,7 +184,7 @@
{
if (_trait_mode == null)
{
- _trait_mode = propertList.Find((obj) => obj.attri == "mode");
+ _trait_mode = function.Find((obj) => obj.attri == "mode");
//鎵句笉鍒板睘鎬ч渶瑕佸0鏄庝竴涓紝闃叉鎶ラ敊闂��
if (_trait_mode == null)
{
@@ -230,7 +228,7 @@
{
if (_trait_fan == null)
{
- _trait_fan = propertList.Find((obj) => obj.attri == "fan");
+ _trait_fan = function.Find((obj) => obj.attri == "fan");
//鎵句笉鍒板睘鎬ч渶瑕佸0鏄庝竴涓紝闃叉鎶ラ敊闂��
if (_trait_fan == null)
{
@@ -282,7 +280,7 @@
{
if (_trait_swting == null)
{
- _trait_swting = propertList.Find((obj) => obj.attri == "swting");
+ _trait_swting = function.Find((obj) => obj.attri == "swting");
//鎵句笉鍒板睘鎬ч渶瑕佸0鏄庝竴涓紝闃叉鎶ラ敊闂��
if (_trait_swting == null)
{
@@ -309,7 +307,6 @@
{
try
{
-
return trait_swting.value;
}
catch (Exception ex)
@@ -412,8 +409,17 @@
if (command == CommandType_A.write)
{
sendJob = new JObject { { "Namespace", vendor_code }, { "Command", command.ToString() }, { "Type", "device" } };
- JObject data = new JObject {{ "sid", sid } };
+ JObject data = new JObject { { "sid", sid } };
sendJob.Add("objects", data);
+ List<ControlData> controlData = new List<ControlData>();
+ controlData.Add(new ControlData()
+ {
+ name = "on_off",
+ data_type = "Bool",
+ value = on_off
+ });
+
+
}
else if (command == CommandType_A.read)
{
--
Gitblit v1.8.0