Supporting Browser-based Javascript and Node.js
jnbastoky
Phidgetly
Posts: 16 Joined: Sun Apr 15, 2018 9:03 am
Contact:
Post
by jnbastoky » Tue Nov 05, 2024 7:38 pm
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.
jnbastoky
Phidgetly
Posts: 16 Joined: Sun Apr 15, 2018 9:03 am
Contact:
Post
by jnbastoky » Thu Dec 05, 2024 6:48 am
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);
jnbastoky
Phidgetly
Posts: 16 Joined: Sun Apr 15, 2018 9:03 am
Contact:
Post
by jnbastoky » Fri Dec 13, 2024 5:56 am
Is this Node Red module still supported? Any chance this will get patched?
Users browsing this forum: No registered users and 5 guests