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/Light.cs | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/HDL_ON/Entity/Function/Light.cs b/HDL_ON/Entity/Function/Light.cs index 6d3c091..e155396 100644 --- a/HDL_ON/Entity/Function/Light.cs +++ b/HDL_ON/Entity/Function/Light.cs @@ -36,6 +36,7 @@ try { dicPropert["brightness"] = value.ToString(); + MainPage.Log($"brightness 鏁版嵁鍒锋柊{value}."); } catch { @@ -158,13 +159,13 @@ /// <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 { { "vendor_code", vendor_code }, { "Command", command }, { "Type", "device" } }; + sendJob = new JObject { { "vendor_code", vendor_code }, { "Command", command.ToString() }, { "Type", "device" } }; JObject data = null; switch (functionType) { @@ -180,9 +181,9 @@ } sendJob.Add("objects", data); } - else if (command == "read") + else if (command == CommandType_A.read) { - sendJob = new JObject { { "vendor_code", vendor_code }, { "Command", command }, { "Type", "device" } }; + sendJob = new JObject { { "vendor_code", vendor_code }, { "Command", command.ToString() }, { "Type", "device" } }; var data = new JObject {{ "sid", sid } }; sendJob.Add("objects", data); } -- Gitblit v1.8.0