1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-03 19:41:46 +02:00

Add a timeout of 1 second before rebooting after firmware update.

This commit is contained in:
Daniele Gobbetti 2015-07-31 11:28:03 +02:00
parent 0a6dc8f7a0
commit fbbc2afda4

View File

@ -946,6 +946,7 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
LOG.info("Firmware update progress:" + firmwareProgress + " total len:" + len + " progress:" + (firmwareProgress / len));
if (firmwareProgress >= len) {
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()));
} else {
GB.updateInstallNotification("Firmware write failed", false, 0, getContext());