dash BleIO: s/let/also

This commit is contained in:
Andrei Vereha 2021-03-03 17:07:18 +01:00
parent 7976df596e
commit c2627176cf

View file

@ -84,9 +84,8 @@ class BleIO(
fun flushIncomingQueues() { fun flushIncomingQueues() {
for (char in CharacteristicType.values()) { for (char in CharacteristicType.values()) {
do { do {
val found = incomingPackets[char]?.poll() val found = incomingPackets[char]?.poll()?.also {
found?.let { aapsLogger.warn(LTag.PUMPBTCOMM, "BleIO: ${char.name} queue not empty, flushing: {${it.toHex()}")
aapsLogger.warn(LTag.PUMPBTCOMM, "BleIO: ${char.name} queue not empty, flushing: {${found.toHex()}")
} }
} while (found != null) } while (found != null)
} }