From bd68f0a389e4e47b108749afea26a4eb5418e31b Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 09 六月 2022 11:07:04 +0800
Subject: [PATCH] 平台迁移功能,手动升级功能

---
 Crabtree/SmartHome/HDL/Operation/Target.cs |   51 ++++++++++++++++++++++++++-------------------------
 1 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/Crabtree/SmartHome/HDL/Operation/Target.cs b/Crabtree/SmartHome/HDL/Operation/Target.cs
old mode 100755
new mode 100644
index c6fa462..4e57178
--- a/Crabtree/SmartHome/HDL/Operation/Target.cs
+++ b/Crabtree/SmartHome/HDL/Operation/Target.cs
@@ -5,12 +5,12 @@
 namespace Shared
 {
     /// <summary>
-    /// 控制目标数据
+    /// 锟斤拷锟斤拷目锟斤拷锟斤拷锟斤拷
     /// </summary>
     public class Target
     {
         /// <summary>
-        /// 发送的目标
+        /// 锟斤拷锟酵碉拷目锟斤拷
         /// </summary>
         public System.Net.IPEndPoint IPEndPoint;
 
@@ -23,27 +23,28 @@
         }
 
         /// <summary>
-        /// 附加数据
+        /// 锟斤拷锟斤拷锟斤拷锟斤拷
         /// </summary>
         public byte[] AddData;
 
         /// <summary>
-        /// 目标子网号
+        /// 目锟斤拷锟斤拷锟斤拷锟斤拷
         /// </summary>
         public byte SubnetID;
 
         /// <summary>
-        /// 目标设备号
+        /// 目锟斤拷锟借备锟斤拷
         /// </summary>
         public byte DeviceID;
 
         /// <summary>
-        /// 发送数据缓冲区
+        /// 锟斤拷锟斤拷锟斤拷锟捷伙拷锟斤拷锟斤拷
         /// </summary>
         public byte [] SendBytes {
             get {
 
-                if (2 + 9 + AddData.Length + 2 <= 81&&Command!=Command.SuperGatewayAgent) {
+                if (2 + 9 + AddData.Length + 2 <= 81&&Command!=Command.SuperGatewayAgent && Command != Command.enjoyUpgrade2
+                    && Command != Command.WriteHomeId) {
                     byte [] bytes = new byte [16 + 9 + AddData.Length + 2];
 
                     string [] ipAddress = "192.168.1.20".Split ('.');//new Net.NetWiFi().IpAddress.ToString().Split('.');
@@ -63,27 +64,27 @@
                     bytes [11] = (byte)'C';//C
                     bytes [12] = (byte)'L';//L
                     bytes [13] = (byte)'E';//E
-                                           //引导码2位,0xAAAA固定
+                                           //锟斤拷锟斤拷锟斤拷2位,0xAAAA锟教讹拷
                     bytes [14] = 0xAA;
                     bytes [15] = 0xAA;
 
-                    bytes [16] = (byte)(11 + AddData.Length);//数据包长度
-                    bytes [17] = Global.LocalSubnetID; //源子网地址 0-254
-                    bytes [18] = Global.LocalDeviceID;//源设备地址 0-254
-                                                      //源设备类型2位
+                    bytes [16] = (byte)(11 + AddData.Length);//锟斤拷锟捷帮拷锟斤拷锟斤拷
+                    bytes [17] = Global.LocalSubnetID; //源锟斤拷锟斤拷锟斤拷址 0-254
+                    bytes [18] = Global.LocalDeviceID;//源锟借备锟斤拷址 0-254
+                                                      //源锟借备锟斤拷锟斤拷2位
                     bytes [19] = (byte)(Global.DeviceType / 256);
                     bytes [20] = (byte)(Global.DeviceType % 256);
-                    //操作码
+                    //锟斤拷锟斤拷锟斤拷
                     bytes [21] = (byte)((int)this.Command / 256);
                     bytes [22] = (byte)((int)this.Command % 256);
-                    //目标子网地址 0-254
+                    //目锟斤拷锟斤拷锟斤拷锟斤拷址 0-254
                     bytes [23] = this.SubnetID;
-                    //目标设备地址 0-254
+                    //目锟斤拷锟借备锟斤拷址 0-254
                     bytes [24] = this.DeviceID;
 
                     Array.Copy (AddData, 0, bytes, 25, AddData.Length);
 
-                    //CRC校验位
+                    //CRC校锟斤拷位
                     bytes [bytes.Length - 2] = 0;
                     bytes [bytes.Length - 1] = 0;
 
@@ -111,22 +112,22 @@
                     bytes [11] = (byte)'C';//C
                     bytes [12] = (byte)'L';//L
                     bytes [13] = (byte)'E';//E
-                                           //引导码2位,0xAAAA固定
+                                           //锟斤拷锟斤拷锟斤拷2位,0xAAAA锟教讹拷
                     bytes [14] = 0xAA;
                     bytes [15] = 0xAA;
 
-                    bytes [16] = 0xFF;//数据包长度
-                    bytes [17] = Global.LocalSubnetID; //源子网地址 0-254
-                    bytes [18] = Global.LocalDeviceID;//源设备地址 0-254
-                                                      //源设备类型2位
+                    bytes [16] = 0xFF;//锟斤拷锟捷帮拷锟斤拷锟斤拷
+                    bytes [17] = Global.LocalSubnetID; //源锟斤拷锟斤拷锟斤拷址 0-254
+                    bytes [18] = Global.LocalDeviceID;//源锟借备锟斤拷址 0-254
+                                                      //源锟借备锟斤拷锟斤拷2位
                     bytes [19] = (byte)(Global.DeviceType / 256);
                     bytes [20] = (byte)(Global.DeviceType % 256);
-                    //操作码
+                    //锟斤拷锟斤拷锟斤拷
                     bytes [21] = (byte)((int)this.Command / 256);
                     bytes [22] = (byte)((int)this.Command % 256);
-                    //目标子网地址 0-254
+                    //目锟斤拷锟斤拷锟斤拷锟斤拷址 0-254
                     bytes [23] = this.SubnetID;
-                    //目标设备地址 0-254
+                    //目锟斤拷锟借备锟斤拷址 0-254
                     bytes [24] = this.DeviceID;
 
                     //
@@ -142,7 +143,7 @@
         }
 
         /// <summary>
-        /// 操作码
+        /// 锟斤拷锟斤拷锟斤拷
         /// </summary>
         public Command Command;
 

--
Gitblit v1.8.0