From 5eeafe3af80bfd88306bd8ad9e76c8f4b51ca35f Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期四, 17 十二月 2020 14:16:20 +0800
Subject: [PATCH] 增加本地发送的重发机制

---
 HDL_ON/DAL/DriverLayer/Packet.cs |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/HDL_ON/DAL/DriverLayer/Packet.cs b/HDL_ON/DAL/DriverLayer/Packet.cs
index 78c1cd2..4f04a07 100644
--- a/HDL_ON/DAL/DriverLayer/Packet.cs
+++ b/HDL_ON/DAL/DriverLayer/Packet.cs
@@ -309,7 +309,7 @@
                             if (ac.GetBusId() == subnetID + "_" + deviceID + "_" + receiveBytes[0])
                             {
                                 ac.curTempType = receiveBytes[1];
-                                ac.indoorTemp = receiveBytes[2];
+                                ac.trait_IndoorTemp.curValue = receiveBytes[2];
                                 ac.trait_on_off.curValue = receiveBytes[8] == 1 ? "on" : "off";
                                 ac.curModeIndex = receiveBytes[9];
                                 ac.curFanIndex = receiveBytes[10];
@@ -563,7 +563,7 @@
                         {
                             if (ac.GetBusId() == subnetID + "_" + deviceID + "_" + receiveBytes[0])
                             {
-                                ac.indoorTemp = receiveBytes[1];
+                                ac.trait_IndoorTemp.curValue = receiveBytes[1];
                                 FunctionPage.UpdataStates(ac);
                             }
                         }
@@ -574,8 +574,8 @@
                         MainPage.Log($"name : {Name} ; mac : {mac}");
                         if (DB_ResidenceData.Instance.residenceGatewayMAC == mac)
                         {
-                            DriverLayer.Control.Ins.GatewayOnline = true;
-                            DriverLayer.Control.Ins.IsRemote = false;
+                            Control.Ins.GatewayOnline = true;
+                            Control.Ins.IsRemote = false;
                             DAL.Mqtt.MqttClient.DisConnectRemote();//鏂紑mqtt
                         }
                         break;
@@ -644,12 +644,12 @@
                         receiveFlag += string.Format("{0},{1}", usefulBytes[0], usefulBytes[1]);
                         break;
                     case Command.ReadRemark:
-                        DriverLayer.Control.Ins.myUdp.ReceiveReadRemark(usefulBytes);
+                        new Control_Udp().ReceiveReadRemark(usefulBytes);
                         break;
                     default:
                         break;
                 }
-                DriverLayer.Control.Ins.myUdp.ReceiveRepeatManager(receiveFlag);
+                Control_Udp.ReceiveRepeatManager(receiveFlag,usefulBytes);
             }
             catch (Exception ex)
             {

--
Gitblit v1.8.0