From 9904031f5291daaf56985146bb671f25e18ebbdf Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 02 四月 2020 19:51:31 +0800
Subject: [PATCH] 最新代码

---
 ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs |   46 +++++++++++++++++++++++++++++++---------------
 1 files changed, 31 insertions(+), 15 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
index 2cb7298..3fb3691 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
@@ -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