Skip to content

Commit 74c1927

Browse files
committed
Slow down fs_put so it works on Nano boards
1 parent 93c9862 commit 74c1927

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

micropython.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,14 @@ class MicroPythonBoard {
217217
let output = await this.exec_raw({
218218
command: `f=open('${dest}','w')\nw=f.write`
219219
})
220-
for (let i = 0; i < content.length; i+=64) {
221-
let slice = content.slice(i, i+64)
220+
await sleep(100)
221+
for (let i = 0; i < content.length; i+=128) {
222+
let slice = content.slice(i, i+128)
222223
slice = slice.toString()
223224
slice = slice.replace(/"""/g, `\\"\\"\\"`)
224225
await this.serial.write(`w("""${slice}""")`)
225226
await this.serial.write(`\x04`)
226-
await sleep(50)
227+
await sleep(100)
227228
}
228229
return this.exit_raw_repl()
229230
}

0 commit comments

Comments
 (0)