We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a85a7e1 commit 13ad1c2Copy full SHA for 13ad1c2
src/main.ts
@@ -324,12 +324,11 @@ async function main() {
324
325
await client.serialMonitorListen();
326
327
+ const utf8Decoder = new TextDecoder('utf-8');
328
client.listen('serial-monitor:data', (event: APIEvent<SerialMonitorDataPayload>) => {
329
let { bytes } = event.payload;
330
bytes = scenario?.processSerialBytes(bytes) ?? bytes;
- for (const byte of bytes) {
331
- process.stdout.write(String.fromCharCode(byte));
332
- }
+ process.stdout.write(utf8Decoder.decode(Buffer.from(bytes)));
333
334
serialLogStream?.write(Buffer.from(bytes));
335
expectEngine.feed(bytes);
0 commit comments