mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-06-04 04:48:55 +00:00
feat: wait ready
This commit is contained in:
@@ -57,9 +57,13 @@
|
||||
retries = 2;
|
||||
while (retries-- > 0 && !success) {
|
||||
try {
|
||||
await port.updateFirmware(file, (transferred, total) => {
|
||||
progress = transferred / total;
|
||||
});
|
||||
await port.updateFirmware(
|
||||
file,
|
||||
(transferred, total) => {
|
||||
progress = transferred / total;
|
||||
},
|
||||
retries === 0,
|
||||
);
|
||||
|
||||
success = true;
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user