fix: typo in require parser-readline

pull/260/head
Christian Zahl 2022-09-23 08:50:53 +02:00
rodzic 96cdec45b2
commit 6f1db1b936
2 zmienionych plików z 24 dodań i 6 usunięć

20
.vscode/launch.json vendored 100644
Wyświetl plik

@ -0,0 +1,20 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main Process",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"env": {
"DEBUGCONTROL": "true",
},
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
},
"args" : ["."],
"outputCapture": "std"
}
]
}

Wyświetl plik

@ -100,9 +100,8 @@ io.attach(httpsserver);
const grblStrings = require("./grblStrings.js");
// Serial
const serialport = require('serialport');
const { SerialPort } = require('serialport')
const Readline = require('@serialport/parser-readline');
const { ReadlineParser } = require('@serialport/parser-readline');
// telnet
const net = require('net');
@ -914,7 +913,8 @@ io.on("connection", function(socket) {
if (data.type == "usb") {
console.log("connect", "Connecting to " + data.port + " via " + data.type);
port = new SerialPort(data.port, {
port = new SerialPort({
path: data.port,
baudRate: parseInt(data.baud),
hupcl: false // Don't set DTR - useful for X32 Reset
});
@ -924,9 +924,7 @@ io.on("connection", function(socket) {
port.isOpen = true;
}
parser = port.pipe(new Readline({
parser = port.pipe(new ReadlineParser({
delimiter: '\r\n'
}));