From 81d297dd33911dbfdc93dbc3fa9747e511b7ce8e Mon Sep 17 00:00:00 2001
From: panlili2024 <14743743+panlili2024@user.noreply.gitee.com>
Date: 星期五, 08 十一月 2024 14:51:10 +0800
Subject: [PATCH] 优化透传数据解析

---
 HDL_TTLSDK485/src/main/java/com/hdl/sdk/ttl/Utils/HDLUtlis/SerialPortSendAndReceiveUtil.java |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/HDL_TTLSDK485/src/main/java/com/hdl/sdk/ttl/Utils/HDLUtlis/SerialPortSendAndReceiveUtil.java b/HDL_TTLSDK485/src/main/java/com/hdl/sdk/ttl/Utils/HDLUtlis/SerialPortSendAndReceiveUtil.java
index c975e28..92b725f 100644
--- a/HDL_TTLSDK485/src/main/java/com/hdl/sdk/ttl/Utils/HDLUtlis/SerialPortSendAndReceiveUtil.java
+++ b/HDL_TTLSDK485/src/main/java/com/hdl/sdk/ttl/Utils/HDLUtlis/SerialPortSendAndReceiveUtil.java
@@ -169,8 +169,8 @@
             // 鏇存柊鍙戦�佹槸鍚︽垚鍔熺殑淇℃伅
             SendDatas.ReceiveBytes(command, subnetID, deviceID, usefulBytes);
             //2019-8-20 澧炲姞鐩爣瀛愮綉鍙疯澶囧彿鍒ゆ柇
-            if ((desSubnetID == 0xFF && desSubnetID == 0xFF)
-                    || (desSubnetID == Crc.localSubnetID && desSubnetID == Crc.localDeviceID)) {
+            /*if ((desSubnetID == 0xFF && desSubnetID == 0xFF)
+                    || (desSubnetID == Crc.localSubnetID && desSubnetID == Crc.localDeviceID)) {*/
                 //鍙傛暟
                 UdpDataBean udpDataBean = new UdpDataBean();
                 udpDataBean.sourceSubnetID = subnetID;
@@ -178,11 +178,9 @@
                 udpDataBean.desSubnetID = desSubnetID;
                 udpDataBean.desDeviceID = desDeviceID;
                 udpDataBean.command = command;
-
                 udpDataBean.addBytes = usefulBytes;
                 HDLSerialPortCore.HandleInsideData(udpDataBean);
 
-            }
 
         }
     };
@@ -261,12 +259,12 @@
                         int desSubnetID = tempBytes[9] & 0xFF;
                         int desDeviceID = tempBytes[10] & 0xFF;
                         //濡傛灉涓嶆槸鍙戠粰鑷繁鐨勬暟鎹垨鑰呬笉鏄箍鎾殑鏁版嵁锛屼笉澶勭悊
-                        if (desSubnetID != Global.subnetID || desDeviceID != Global.deviceID) {
+                        /*if (desSubnetID != Global.subnetID || desDeviceID != Global.deviceID) {
                             if (desSubnetID != 0xFF || desDeviceID != 0xFF) {
                                 Log.d("涓插彛->鍥炲", "杩囨护鎺�=={鐩爣瀛愮綉:" + desSubnetID + ",鐩爣璁惧:" + desDeviceID + "}");
                                 continue;
                             }
-                        }
+                        }*/
 
                         byte[] usefulBytes = new byte[(tempBytes[2] & 0xFF) - 11];
                         // 澶嶅埗闄勫姞鏁版嵁

--
Gitblit v1.8.0