Amazfit Bip: request GPS fw version earlier
(to avoid recreation of DeviceAttributes because fw2 is sometimes available and sometimes not.)
This commit is contained in:
parent
f6ce0c1a0e
commit
1ddea9268d
|
@ -1309,8 +1309,11 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
|
|||
|
||||
public void phase2Initialize(TransactionBuilder builder) {
|
||||
LOG.info("phase2Initialize...");
|
||||
enableFurtherNotifications(builder, true);
|
||||
requestBatteryInfo(builder);
|
||||
}
|
||||
|
||||
public void phase3Initialize(TransactionBuilder builder) {
|
||||
LOG.info("phase3Initialize...");
|
||||
setDateDisplay(builder);
|
||||
setTimeFormat(builder);
|
||||
setWearLocation(builder);
|
||||
|
|
|
@ -117,7 +117,9 @@ public class InitOperation extends AbstractBTLEOperation<MiBand2Support> {
|
|||
TransactionBuilder builder = createTransactionBuilder("Authenticated, now initialize phase 2");
|
||||
builder.add(new SetDeviceStateAction(getDevice(), GBDevice.State.INITIALIZING, getContext()));
|
||||
getSupport().requestDeviceInfo(builder);
|
||||
getSupport().enableFurtherNotifications(builder, true);
|
||||
getSupport().phase2Initialize(builder);
|
||||
getSupport().phase3Initialize(builder);
|
||||
getSupport().setInitialized(builder);
|
||||
getSupport().performImmediately(builder);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue