Commit d627d0c1 authored by Anon's avatar Anon
Browse files

LowEfforService: Move logging to ConnectionService.

parent c4dd4a06
...@@ -165,7 +165,13 @@ object ConnectionService { ...@@ -165,7 +165,13 @@ object ConnectionService {
} }
fun writeCharacteristic(characteristic: BluetoothGattCharacteristic): Boolean { 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( ...@@ -80,13 +80,7 @@ class LowEffortService(
val bytes = packet.getBytes() val bytes = packet.getBytes()
centralTx.value = bytes centralTx.value = bytes
val status = ConnectionService.writeCharacteristic(centralTx) return ConnectionService.writeCharacteristic(centralTx)
if (!status) {
Log.d(TAG, "Write status: $status")
}
return status
} }
fun setOnPacketReceivedListener(packetListener: OnPacketReceivedListener) { fun setOnPacketReceivedListener(packetListener: OnPacketReceivedListener) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment