Skip to content

Commit 0a46418

Browse files
committed
fix: write serial output as raw bytes to stdout #32
1 parent fdf65fd commit 0a46418

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,10 @@ async function main() {
324324

325325
await client.serialMonitorListen();
326326

327-
const utf8Decoder = new TextDecoder('utf-8');
328327
client.listen('serial-monitor:data', (event: APIEvent<SerialMonitorDataPayload>) => {
329328
let { bytes } = event.payload;
330329
bytes = scenario?.processSerialBytes(bytes) ?? bytes;
331-
process.stdout.write(utf8Decoder.decode(Buffer.from(bytes)));
330+
process.stdout.write(new Uint8Array(bytes));
332331

333332
serialLogStream?.write(Buffer.from(bytes));
334333
expectEngine.feed(bytes);

0 commit comments

Comments
 (0)