mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-25 03:16:51 +01:00
improve some log statements
This commit is contained in:
parent
637b43e892
commit
a7792f6b72
@ -37,11 +37,11 @@ public class MiBandNotifyAction extends NotifyAction {
|
|||||||
if (notifyDescriptor != null) {
|
if (notifyDescriptor != null) {
|
||||||
int properties = getCharacteristic().getProperties();
|
int properties = getCharacteristic().getProperties();
|
||||||
if ((properties & 0x10) > 0) {
|
if ((properties & 0x10) > 0) {
|
||||||
LOG.debug("properties & 0x10 > 0");
|
LOG.debug("use NOTIFICATION");
|
||||||
notifyDescriptor.setValue(enableFlag ? BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE : BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE);
|
notifyDescriptor.setValue(enableFlag ? BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE : BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE);
|
||||||
result = gatt.writeDescriptor(notifyDescriptor);
|
result = gatt.writeDescriptor(notifyDescriptor);
|
||||||
} else if ((properties & 0x20) > 0){
|
} else if ((properties & 0x20) > 0) {
|
||||||
LOG.debug("properties & 0x20 > 0");
|
LOG.debug("use INDICATION");
|
||||||
notifyDescriptor.setValue(enableFlag ? BluetoothGattDescriptor.ENABLE_INDICATION_VALUE : BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE);
|
notifyDescriptor.setValue(enableFlag ? BluetoothGattDescriptor.ENABLE_INDICATION_VALUE : BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE);
|
||||||
result = gatt.writeDescriptor(notifyDescriptor);
|
result = gatt.writeDescriptor(notifyDescriptor);
|
||||||
hasWrittenDescriptor = true;
|
hasWrittenDescriptor = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user