From 23532fa8ad34c89b6d24b01eaef6475fd0aad898 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 15 四月 2020 18:08:24 +0800
Subject: [PATCH] ???????

---
 ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs |   48 ++++++++++++++++++++++++++++++++----------------
 1 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
index 2cb7298..4de23e1 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
@@ -61,7 +61,7 @@
         public string RoomId = "";
 
         /// <summary>
-        /// 褰撳墠鎴块棿ID
+        /// 褰撳墠閫変腑鐨勫満鏅疘D
         /// </summary>
         public string curSelectSceneID = "";
 
@@ -746,10 +746,14 @@
                                     if (command == "0002")
                                     {
                                         var tempD = new ResponseData();
-                                        tempD.command = Convert.ToInt32(data[10].ToString() + data[11].ToString() + data[12].ToString() + data[13].ToString(), 16);
+                                        tempD.command = data[12].ToString() + data[13].ToString() + data[10].ToString() + data[11].ToString();
                                         tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16);
-                                        result = new ResponseAllData { responseData = tempD };
-                                        System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0400_{ topic}");
+                                        if (tempD.command == "0400")
+                                        {
+                                            result = new ResponseAllData { responseData = tempD };
+                                            System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0400_{ topic}");
+                                        }
+
                                     }
                                 }
                             }
@@ -920,10 +924,13 @@
                                     if (command == "0002")
                                     {
                                         var tempD = new ResponseData();
-                                        tempD.command = Convert.ToInt32(data[10].ToString() + data[11].ToString() + data[12].ToString() + data[13].ToString(), 16);
+                                        tempD.command = data[12].ToString() + data[13].ToString() + data[10].ToString() + data[11].ToString();
                                         tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16);
-                                        result = new ResponseAllData { responseData = tempD };
-                                        System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0401_{ topic}");
+                                        if (tempD.command == "0401")
+                                        {
+                                            result = new ResponseAllData { responseData = tempD };
+                                            DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0401_{ topic}");
+                                        }
                                     }
                                 }
                             }
@@ -1295,10 +1302,13 @@
                                     if (command == "0002")
                                     {
                                         var tempD = new ResponseData();
-                                        tempD.command = Convert.ToInt32(data[10].ToString() + data[11].ToString() + data[12].ToString() + data[13].ToString(), 16);
+                                        tempD.command = data[12].ToString() + data[13].ToString() + data[10].ToString() + data[11].ToString();
                                         tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16);
-                                        result = new ResponseAllData { responseData = tempD };
-                                        System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0402_{ topic}");
+                                        if (tempD.command == "0402")
+                                        {
+                                            result = new ResponseAllData { responseData = tempD };
+                                            DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0402_{ topic}");
+                                        }
                                     }
                                 }
                             }
@@ -1446,10 +1456,13 @@
                                     if (command == "0002")
                                     {
                                         var tempD = new ResponseData();
-                                        tempD.command = Convert.ToInt32(data[10].ToString() + data[11].ToString() + data[12].ToString() + data[13].ToString(), 16);
+                                        tempD.command = data[12].ToString() + data[13].ToString() + data[10].ToString() + data[11].ToString();
                                         tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16);
-                                        result = new ResponseAllData { responseData = tempD };
-                                        System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0403_{ topic}");
+                                        if (tempD.command == "0403")
+                                        {
+                                            result = new ResponseAllData { responseData = tempD };
+                                            System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0403_{ topic}");
+                                        }
                                     }
                                 }
                             }
@@ -1605,10 +1618,13 @@
                                     if (command == "0002")
                                     {
                                         var tempD = new ResponseData();
-                                        tempD.command = Convert.ToInt32(data[10].ToString() + data[11].ToString() + data[12].ToString() + data[13].ToString(), 16);
+                                        tempD.command = data[12].ToString() + data[13].ToString() + data[10].ToString() + data[11].ToString();
                                         tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16);
-                                        result = new ResponseAllData { responseData = tempD };
-                                        System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0500_{ topic}");
+                                        if (tempD.command == "0500")
+                                        {
+                                            result = new ResponseAllData { responseData = tempD };
+                                            DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0500_{ topic}");
+                                        }
                                     }
                                 }
                             }

--
Gitblit v1.8.0