Skip to content
Snippets Groups Projects
Commit d627d0c1 authored by Anon's avatar Anon
Browse files

LowEfforService: Move logging to ConnectionService.

parent c4dd4a06
No related branches found
No related tags found
No related merge requests found
......@@ -165,7 +165,13 @@ object ConnectionService {
}
fun writeCharacteristic(characteristic: BluetoothGattCharacteristic): Boolean {
return connection?.writeCharacteristic(characteristic) ?: false
val status = connection?.writeCharacteristic(characteristic) ?: false
if (!status) {
Log.d(TAG, "Write status: $status")
}
return status
}
}
\ No newline at end of file
......@@ -80,13 +80,7 @@ class LowEffortService(
val bytes = packet.getBytes()
centralTx.value = bytes
val status = ConnectionService.writeCharacteristic(centralTx)
if (!status) {
Log.d(TAG, "Write status: $status")
}
return status
return ConnectionService.writeCharacteristic(centralTx)
}
fun setOnPacketReceivedListener(packetListener: OnPacketReceivedListener) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment