Fix disconnect behaviour (#341)
This commit is contained in:
Родитель
98465ca8c7
Коммит
b25e248cc6
|
@ -7,7 +7,6 @@ function onDisconnectButtonClick() {
|
|||
log('Disconnecting from Bluetooth Device...');
|
||||
if (bluetoothDevice.gatt.connected) {
|
||||
bluetoothDevice.gatt.disconnect();
|
||||
log('> Bluetooth Device connected: ' + bluetoothDevice.gatt.connected);
|
||||
} else {
|
||||
log('> Bluetooth Device is already disconnected');
|
||||
}
|
||||
|
@ -69,6 +68,6 @@ function connect() {
|
|||
log('Connecting to Bluetooth Device...');
|
||||
return bluetoothDevice.gatt.connect()
|
||||
.then(gattServer => {
|
||||
log('> Bluetooth Device connected: ' + bluetoothDevice.gatt.connected);
|
||||
log('> Bluetooth Device connected');
|
||||
});
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче