wxr
2020-04-14 06696e6f225733a60b03eea4a7c6374053d92c1d
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>
        /// 拼接、获取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 { { "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 @@
        }
    }
}