mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-25 03:16:51 +01:00
Fix progress bar
This commit is contained in:
parent
8ba307657a
commit
5578691321
@ -190,10 +190,10 @@ public class UpdateFirmwareOperation extends AbstractBTLEOperation<MiBandSupport
|
||||
|
||||
if ((i > 0) && (i % 50 == 0)) {
|
||||
builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT), new byte[]{MiBandService.COMMAND_SYNC});
|
||||
builder.add(new SetProgressAction("Firmware update in progress", true, (firmwareProgress / len) * 100, getContext()));
|
||||
builder.add(new SetProgressAction("Firmware update in progress", true, (int)(((float) firmwareProgress) / len * 100), getContext()));
|
||||
}
|
||||
|
||||
LOG.info("Firmware update progress:" + firmwareProgress + " total len:" + len + " progress:" + (firmwareProgress / len));
|
||||
LOG.info("Firmware update progress:" + firmwareProgress + " total len:" + len + " progress:" + (int)(((float) firmwareProgress) / len * 100));
|
||||
}
|
||||
|
||||
if (!(len % packetLength == 0)) {
|
||||
|
Loading…
Reference in New Issue
Block a user