1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-26 17:54:50 +02:00

wait if services are discovered, see issue #472 (#482)

This commit is contained in:
OliE
2019-07-14 17:06:17 +02:00
committed by GitHub
parent c246af7559
commit 4723243eaa

View File

@@ -306,6 +306,7 @@ public abstract class BluetoothCommunication {
public void onServicesDiscovered(BluetoothPeripheral peripheral) {
Timber.d("Successful Bluetooth services discovered");
onBluetoothDiscovery(peripheral);
resumeMachineState();
}
@Override
@@ -390,6 +391,7 @@ public abstract class BluetoothCommunication {
) {
Timber.d("Do LE scan before connecting to device");
central.scanForPeripheralsWithAddresses(new String[]{macAddress});
stopMachineState();
}
else {
Timber.d("No location permission, connecting without LE scan");