From dc8ae12444d1d887394eb525e2b80dd120dc4c87 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期二, 20 二月 2024 13:43:56 +0800
Subject: [PATCH] Merge branch 'wjc' into dev-hxb

---
 HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/connect/HDLUdpConnect.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/connect/HDLUdpConnect.java b/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/connect/HDLUdpConnect.java
index cff6a99..8bcbcb0 100644
--- a/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/connect/HDLUdpConnect.java
+++ b/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/connect/HDLUdpConnect.java
@@ -32,6 +32,7 @@
 import com.hdl.sdk.link.common.utils.gson.GsonConvert;
 import com.hdl.sdk.link.core.config.HDLLinkConfig;
 import com.hdl.sdk.link.core.protocol.LinkMessageDecoder;
+import com.hdl.sdk.link.core.protocol.LinkMessageDecoderUdp;
 import com.hdl.sdk.link.core.protocol.LinkMessageEncoder;
 import com.hdl.sdk.link.socket.client.UdpClient;
 import com.hdl.sdk.link.socket.codec.MessagePipeLine;
@@ -104,8 +105,8 @@
                 .getSystemService(Context.WIFI_SERVICE);
         options.setWifiManager(manager);
         final MessagePipeLine pipeLine = new MessagePipeLine();
-        pipeLine.add(new LinkMessageDecoder());
-        pipeLine.add(new LinkMessageEncoder());
+        pipeLine.add(new LinkMessageDecoderUdp());
+//        pipeLine.add(new LinkMessageEncoder());
         options.setHandleMessage(pipeLine);
         return options;
     }
@@ -507,8 +508,8 @@
                             }.getType());
                             GatewayBean gateway = response.getObjects();
                             if (gateway != null) {
-                                if (!TextUtils.isEmpty(HDLLinkConfig.getInstance().getGatewayId())
-                                        && !TextUtils.isEmpty(HDLLinkConfig.getInstance().getHomeId())) {
+                                if (!TextUtils.isEmpty(gateway.getGatewayId())
+                                        && !TextUtils.isEmpty(gateway.getHomeId())) {
                                     //涓荤綉鍏冲苟涓旀槸褰撳墠缁戝畾鐨勭綉鍏�
                                     if ("true".equals(gateway.getMaster().toLowerCase())) {
                                         if (gateway.getGatewayId().equals(HDLLinkConfig.getInstance().getGatewayId())

--
Gitblit v1.8.0