From 06696e6f225733a60b03eea4a7c6374053d92c1d Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 14 四月 2020 14:15:35 +0800
Subject: [PATCH] 20200414
---
HDL_ON/Entity/Function/AC.cs | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/HDL_ON/Entity/Function/AC.cs b/HDL_ON/Entity/Function/AC.cs
index 01bf037..c9e5daa 100644
--- a/HDL_ON/Entity/Function/AC.cs
+++ b/HDL_ON/Entity/Function/AC.cs
@@ -171,9 +171,9 @@
{
try
{
-#if DEBUG
- return new List<string> { "cool", "heat", "dry", "fan", "auto"};
-#endif
+//#if DEBUG
+// return new List<string> { "cool", "heat", "dry", "fan", "auto"};
+//#endif
string b = "";
dicPropert.TryGetValue("mode", out b);
if (b == "")
@@ -217,9 +217,9 @@
{
try
{
-#if DEBUG
- return new List<string> { "high", "medium", "low", "auto" };
-#endif
+//#if DEBUG
+// return new List<string> { "high", "medium", "low", "auto" };
+//#endif
string b = "";
dicPropert.TryGetValue("fan", out b);
if (b == "")
@@ -359,19 +359,18 @@
/// <summary>
/// 鎷兼帴銆佽幏鍙朅鍗忚鎿嶄綔鏁版嵁
/// </summary>
- public override JObject GetSendJObject(string command)
+ public override JObject GetSendJObject(CommandType_A command)
{
var sendJob = new JObject();
- if (command == "write")
+ if (command == CommandType_A.write)
{
-
- sendJob = new JObject { { "Namespace", vendor_code }, { "Command", command }, { "Type", "device" } };
+ sendJob = new JObject { { "Namespace", vendor_code }, { "Command", command.ToString() }, { "Type", "device" } };
JObject data = new JObject { { "openLevel", dicPropert["openLevel"] }, { "sid", sid } };
sendJob.Add("objects", data);
}
- else if (command == "read")
+ else if (command == CommandType_A.read)
{
- sendJob = new JObject { { "Namespace", vendor_code }, { "Command", command }, { "Type", "device" } };
+ sendJob = new JObject { { "Namespace", vendor_code }, { "Command", command.ToString() }, { "Type", "device" } };
var data = new JObject { { "sid", sid } };
sendJob.Add("objects", data);
}
@@ -379,5 +378,6 @@
}
+
}
}
--
Gitblit v1.8.0