Page 1 of 1
Node-RED digitaloutput node missing break statement.
Posted: Tue Nov 05, 2024 7:38 pm
by jnbastoky
In the Node-RED library phidget22-digitalout.js is missing the break; statement at the end of case 'setState' (line 46). This is causing the default case to get executed even through setState matches and is therefore generating an incorrect error.
Re: Node-RED digitaloutput node missing break statement.
Posted: Thu Dec 05, 2024 6:48 am
by jnbastoky
here's the patch
Code: Select all
--- node_modules/node-red-contrib-phidget22/dist/phidget22-digitaloutput.js
+++ phidget22-digitaloutput.js
@@ -43,6 +43,7 @@
}
case 'setState': {
invokeMethod(function () { var _a; return digitalOutput.setState((_a = msg.payload) === null || _a === void 0 ? void 0 : _a.state); }, 'setState');
+ break;
}
default: {
node.error('Unsupported message topic: ' + msg.topic);
Re: Node-RED digitaloutput node missing break statement.
Posted: Fri Dec 13, 2024 5:56 am
by jnbastoky
Is this Node Red module still supported? Any chance this will get patched?