[fix]
[blu add log]
This commit is contained in:
yangyakun
2024-11-26 11:11:15 +08:00
parent 425a0e3018
commit a065a98f37
2 changed files with 9 additions and 3 deletions

View File

@@ -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}")
}
}

View File

@@ -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})"
}
}