Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

Commit

Permalink
Fix progress update (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed May 16, 2022
1 parent 950f12c commit 7f39c63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/esp_loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,10 @@ export class ESPLoader extends EventTarget {
? Math.round((block.length * uncompressedFilesize) / compressedFilesize)
: block.length;
position += flashWriteSize;
updateProgress(Math.min(written, filesize), filesize);
updateProgress(
Math.min(written, uncompressedFilesize),
uncompressedFilesize
);
}
this.logger.log(
"Took " + (Date.now() - stamp) + "ms to write " + filesize + " bytes"
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"noUnusedLocals": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"suppressImplicitAnyIndexErrors": true
"suppressImplicitAnyIndexErrors": true,
"importHelpers": true
},
"include": ["src/*"]
}

0 comments on commit 7f39c63

Please sign in to comment.