emit error on serialPort error

This commit is contained in:
Petr Severa 2025-11-18 13:07:25 +01:00 committed by GitHub
parent f6fea65063
commit f0342def33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,7 +31,8 @@ class NodeJSSerialConnection extends SerialConnection {
});
this.serialPort.on("error", function(err) {
console.log("SerialPort Error: ", err.message)
console.error("SerialPort Error: ", err.message);
this.emit("error", err);
});
this.serialPort.on("data", async (data) => {