562935844@qq.com
2023-11-27 566ddb2ea03e2514de50f2ca861a2674f6e840ac
HDL_TTLSDK485/src/main/java/com/hdl/sdk/ttl/HDLDeviceManger/Core/HandleSearch.java
@@ -250,7 +250,7 @@
                            public void run() {
                                if (bean.getCount() < 3) {
                                    HDLLog.I("没有收到新设备,发送第 " + (bean.getCount() + 1) + " 次搜索命令");
                                    secondTimeSearch(random1, random2, HDLDeviceManager.realDevicesDataList);
                                    secondTimeSearch(random1, random2, (bean.getCount() + 1), HDLDeviceManager.realDevicesDataList);
                                } else {
                                    if (searchTimer != null) {
                                        searchTimer.cancel();
@@ -275,7 +275,7 @@
                }
            }
        }, 500, 500);
        }, 800, 800);
    }
    /**
@@ -329,7 +329,7 @@
     * @param arg2            随机数2
     * @param devicesDataList 所有设备信息集
     */
    public static void secondTimeSearch(byte arg1, byte arg2, List<DevicesData> devicesDataList) {
    public static void secondTimeSearch(byte arg1, byte arg2, int countSend, List<DevicesData> devicesDataList) {
        if (devicesDataList == null || devicesDataList.size() == 0) {
            return;
        }
@@ -375,7 +375,7 @@
                    sendData += (bytes[i] & 0xff) + ",";
                }
            }
            HDLLog.I("第二次发送的搜索数据:" + sendData);
            HDLLog.I("第" + countSend + "次发送的搜索数据:" + sendData);
            HDLCommand.cusSendCommand(Configuration.DEVICES_SEARCH_COMMAND, 255, 255, bytes);
        }
    }