From 52e317b95d830f8cd1156b403ff5a34fb8f9bccb Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 31 七月 2020 17:43:42 +0800
Subject: [PATCH] 2020-7-31-2
---
HDL_ON/Entity/Function/AC.cs | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/HDL_ON/Entity/Function/AC.cs b/HDL_ON/Entity/Function/AC.cs
index 58a9824..192af3e 100644
--- a/HDL_ON/Entity/Function/AC.cs
+++ b/HDL_ON/Entity/Function/AC.cs
@@ -186,7 +186,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 +230,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 +282,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 +309,6 @@
{
try
{
-
return trait_swting.value;
}
catch (Exception ex)
@@ -412,8 +411,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