Skip to content

Commit

Permalink
switch to espruinoEval which is more tolerant of delays
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Oct 7, 2024
1 parent 6bda957 commit bfd7e46
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/uartUploadZIP.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
// Get existing files on SD card along with their size and CRCs of first 1k
function getExistingFiles() {
setStatus("Reading existing files...");
return new Promise(resolve => {
UART.eval(`(() => {
return UART.getConnection().espruinoEval(`(() => {
let info=[];
function recurse(dir,fn) {
if (dir[0]=="." || fn[0]==".") return;
Expand All @@ -59,8 +58,7 @@
}
require("fs").readdir().forEach(recurse.bind(null,""));
return info;
})()`, resolve);
});
})()`);
}

function uploadZIP() {
Expand Down

0 comments on commit bfd7e46

Please sign in to comment.