mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-24 01:28:11 -07:00
Address utf8 support when uploading JavaScript application
OFW PR 4364 by bekindpleaserewind
This commit is contained in:
@@ -153,10 +153,11 @@ async function upload(config) {
|
||||
port.write(`storage remove ${config.output}\x0d`);
|
||||
port.drain();
|
||||
await waitFor(">: ", 1000);
|
||||
port.write(`storage write_chunk ${config.output} ${appFile.length}\x0d`);
|
||||
const appFileBuffer = Buffer.from(appFile, "utf8");
|
||||
port.write(`storage write_chunk ${config.output} ${appFileBuffer.length}\x0d`);
|
||||
await waitFor("Ready", 1000);
|
||||
port.write(appFile);
|
||||
port.drain();
|
||||
port.write(appFileBuffer);
|
||||
await new Promise(resolve => port.drain(resolve));
|
||||
await waitFor(">: ", 1000);
|
||||
|
||||
console.log("Launching application");
|
||||
|
||||
Reference in New Issue
Block a user