wxr
2020-04-14 06696e6f225733a60b03eea4a7c6374053d92c1d
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>
        /// 拼接、获取A协议操作数据
        /// </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);
            }