Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Switch from serial-monitor-cli to node-serialport #1450

Merged
merged 7 commits into from
Feb 9, 2022

Conversation

benmcmorran
Copy link
Member

We keep get antivirus false positives from serial-monitor-cli, and version 10 of node-serialport now uses the Node-API so it should be stable across electron versions.

This PR should also address #1348.

@@ -124,7 +101,7 @@ export class SerialPortCtrl {
resolve();
return;
}
this._child.stdin.write(`{"cmd": "write", "payload": "${text}"}\n`, (error) => {
this._port.write(text + "\n", (error) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same as what we were previously writing during sendMessage, but what purpose does adding a newline serve?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches existing behavior from serial-monitor-cli. While the serial-monitor-cli end of line character is technically configurable using the -e command line argument, vscode-arduino never specifies that argument so it will always have its default value of \n.

Eventually newline should be configurable to address #1324.

@benmcmorran benmcmorran merged commit 815ab61 into main Feb 9, 2022
@benmcmorran benmcmorran deleted the dev/bemcmorr/use-node-serialport branch February 9, 2022 17:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants