From a065a98f3782785940bbb6d226fb543d7f42e429 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Tue, 26 Nov 2024 11:11:15 +0800 Subject: [PATCH] [6.8.0] [fix] [blu add log] --- .../mogo/och/common/module/manager/bluetooth/BleManager.kt | 6 +++--- .../module/manager/bluetooth/OchBluetoothGattCallback.kt | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/OCH/common/common/src/main/java/com/mogo/och/common/module/manager/bluetooth/BleManager.kt b/OCH/common/common/src/main/java/com/mogo/och/common/module/manager/bluetooth/BleManager.kt index ee444bb364..88aebeb641 100644 --- a/OCH/common/common/src/main/java/com/mogo/och/common/module/manager/bluetooth/BleManager.kt +++ b/OCH/common/common/src/main/java/com/mogo/och/common/module/manager/bluetooth/BleManager.kt @@ -46,7 +46,7 @@ object BleManager : BaseBluetoothManager() { val bleDevItem = OchBluetoothGattCallback(result.device) if(!scanList.contains(bleDevItem)){ scanList.add(bleDevItem) - Log.d(TAG1, "添加item scanList个数:${scanList.size}") + Log.d(TAG1, "添加item ${bleDevItem} scanList个数:${scanList.size}") } Log.d(TAG, "callbackType:${callbackType}_____result:${result}") } @@ -127,13 +127,13 @@ object BleManager : BaseBluetoothManager() { if(!scanList.contains(ochBluetoothGattCallback)){ scanList.add(ochBluetoothGattCallback) } - Log.d(TAG1, "超时返回 scanList个数:${scanList.size}___sendDataIntDev个数:${sendDataIntDev.size}") + Log.d(TAG1, "超时返回 $ochBluetoothGattCallback scanList个数:${scanList.size}___sendDataIntDev个数:${sendDataIntDev.size}") } fun removeFromScandAndWrite(ochBluetoothGattCallback: OchBluetoothGattCallback) { sendDataIntDev.remove(ochBluetoothGattCallback) scanList.remove(ochBluetoothGattCallback) - Log.d(TAG1, "链接超次 scanList个数:${scanList.size}___sendDataIntDev个数:${sendDataIntDev.size}") + Log.d(TAG1, "链接超次 $ochBluetoothGattCallback scanList个数:${scanList.size}___sendDataIntDev个数:${sendDataIntDev.size}") } } \ No newline at end of file diff --git a/OCH/common/common/src/main/java/com/mogo/och/common/module/manager/bluetooth/OchBluetoothGattCallback.kt b/OCH/common/common/src/main/java/com/mogo/och/common/module/manager/bluetooth/OchBluetoothGattCallback.kt index 95e6dfa707..83f8892c59 100644 --- a/OCH/common/common/src/main/java/com/mogo/och/common/module/manager/bluetooth/OchBluetoothGattCallback.kt +++ b/OCH/common/common/src/main/java/com/mogo/och/common/module/manager/bluetooth/OchBluetoothGattCallback.kt @@ -278,4 +278,10 @@ class OchBluetoothGattCallback(device: BluetoothDevice) : BluetoothGattCallback( override fun hashCode(): Int { return _device.hashCode() } + + override fun toString(): String { + return "OchBluetoothGattCallback(_device=${device.name}_${device.address}_${device.type}_${device.uuids}_${device.alias})" + } + + } \ No newline at end of file