mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-24 01:03:20 +02:00
@@ -639,6 +639,10 @@ public abstract class BluetoothCommunication {
|
|||||||
stopLeScan();
|
stopLeScan();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
gatt.readPhy();
|
||||||
|
}
|
||||||
|
|
||||||
connectionEstablished = true;
|
connectionEstablished = true;
|
||||||
setBtStatus(BT_STATUS_CODE.BT_CONNECTION_ESTABLISHED);
|
setBtStatus(BT_STATUS_CODE.BT_CONNECTION_ESTABLISHED);
|
||||||
|
|
||||||
@@ -698,6 +702,16 @@ public abstract class BluetoothCommunication {
|
|||||||
setBtMachineState(BT_MACHINE_STATE.BT_INIT_STATE);
|
setBtMachineState(BT_MACHINE_STATE.BT_INIT_STATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPhyRead(BluetoothGatt gatt, int txPhy, int rxPhy, int status) {
|
||||||
|
Timber.d("Current PHY read: TX=%d, RX=%d, status=%d", txPhy, rxPhy, status);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPhyUpdate(BluetoothGatt gatt, int txPhy, int rxPhy, int status) {
|
||||||
|
Timber.d("PHY update: TX=%d, RX=%d, status=%d", txPhy, rxPhy, status);
|
||||||
|
}
|
||||||
|
|
||||||
private void postDelayedHandleRequests() {
|
private void postDelayedHandleRequests() {
|
||||||
// Wait a short while before starting the next operation as suggested
|
// Wait a short while before starting the next operation as suggested
|
||||||
// on the android.jlelse.eu link above.
|
// on the android.jlelse.eu link above.
|
||||||
|
Reference in New Issue
Block a user