mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-01 12:05:37 +02:00
Add a timeout of 1 second before rebooting after firmware update.
This commit is contained in:
parent
0a6dc8f7a0
commit
fbbc2afda4
@ -946,6 +946,7 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
|
|||||||
LOG.info("Firmware update progress:" + firmwareProgress + " total len:" + len + " progress:" + (firmwareProgress / len));
|
LOG.info("Firmware update progress:" + firmwareProgress + " total len:" + len + " progress:" + (firmwareProgress / len));
|
||||||
if (firmwareProgress >= len) {
|
if (firmwareProgress >= len) {
|
||||||
builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT), new byte[]{MiBandService.COMMAND_SYNC});
|
builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT), new byte[]{MiBandService.COMMAND_SYNC});
|
||||||
|
builder.wait(1000);
|
||||||
builder.add(new SetProgressAction("Firmware installation complete", false, 100, getContext()));
|
builder.add(new SetProgressAction("Firmware installation complete", false, 100, getContext()));
|
||||||
} else {
|
} else {
|
||||||
GB.updateInstallNotification("Firmware write failed", false, 0, getContext());
|
GB.updateInstallNotification("Firmware write failed", false, 0, getContext());
|
||||||
|
Loading…
Reference in New Issue
Block a user