mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-29 19:20:36 +02:00
Some more debug logging for #159
This commit is contained in:
@@ -564,6 +564,8 @@ public abstract class BluetoothCommunication {
|
|||||||
synchronized (lock) {
|
synchronized (lock) {
|
||||||
// check for pending request
|
// check for pending request
|
||||||
if (openRequest) {
|
if (openRequest) {
|
||||||
|
Timber.d("Request pending (queue %d %d)",
|
||||||
|
descriptorRequestQueue.size(), characteristicRequestQueue.size());
|
||||||
return; // yes, do nothing
|
return; // yes, do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -572,8 +574,9 @@ public abstract class BluetoothCommunication {
|
|||||||
if (descriptor != null) {
|
if (descriptor != null) {
|
||||||
descriptor.gattObject.setValue(descriptor.value);
|
descriptor.gattObject.setValue(descriptor.value);
|
||||||
|
|
||||||
Timber.d("Write descriptor %s: %s",
|
Timber.d("Write descriptor %s: %s (queue: %d %d)",
|
||||||
descriptor.gattObject.getUuid(), byteInHex(descriptor.gattObject.getValue()));
|
descriptor.gattObject.getUuid(), byteInHex(descriptor.gattObject.getValue()),
|
||||||
|
descriptorRequestQueue.size(), characteristicRequestQueue.size());
|
||||||
if (!bluetoothGatt.writeDescriptor(descriptor.gattObject)) {
|
if (!bluetoothGatt.writeDescriptor(descriptor.gattObject)) {
|
||||||
Timber.e("Failed to initiate write of descriptor %s",
|
Timber.e("Failed to initiate write of descriptor %s",
|
||||||
descriptor.gattObject.getUuid());
|
descriptor.gattObject.getUuid());
|
||||||
@@ -587,8 +590,9 @@ public abstract class BluetoothCommunication {
|
|||||||
if (characteristic != null) {
|
if (characteristic != null) {
|
||||||
characteristic.gattObject.setValue(characteristic.value);
|
characteristic.gattObject.setValue(characteristic.value);
|
||||||
|
|
||||||
Timber.d("Write characteristic %s: %s",
|
Timber.d("Write characteristic %s: %s (queue: %d %d)",
|
||||||
characteristic.gattObject.getUuid(), byteInHex(characteristic.gattObject.getValue()));
|
characteristic.gattObject.getUuid(), byteInHex(characteristic.gattObject.getValue()),
|
||||||
|
descriptorRequestQueue.size(), characteristicRequestQueue.size());
|
||||||
if (!bluetoothGatt.writeCharacteristic(characteristic.gattObject)) {
|
if (!bluetoothGatt.writeCharacteristic(characteristic.gattObject)) {
|
||||||
Timber.e("Failed to initiate write of characteristic %s",
|
Timber.e("Failed to initiate write of characteristic %s",
|
||||||
characteristic.gattObject.getUuid());
|
characteristic.gattObject.getUuid());
|
||||||
|
Reference in New Issue
Block a user