mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-12-21 13:23:02 +01:00
update node-red
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
module.exports = function(RED) {
|
module.exports = function(RED) {
|
||||||
"use strict";
|
"use strict";
|
||||||
var exec = require('child_process').exec;
|
var exec = require('child_process').exec;
|
||||||
@@ -141,9 +142,9 @@ module.exports = function(RED) {
|
|||||||
var limit = 1;
|
var limit = 1;
|
||||||
if (node.out === "pwm") { limit = 100; }
|
if (node.out === "pwm") { limit = 100; }
|
||||||
if ((out >= 0) && (out <= limit)) {
|
if ((out >= 0) && (out <= limit)) {
|
||||||
if (RED.settings.verbose) { node.log("out: "+msg.payload); }
|
if (RED.settings.verbose) { node.log("out: "+out); }
|
||||||
if (node.child !== null) {
|
if (node.child !== null) {
|
||||||
node.child.stdin.write(msg.payload+"\n");
|
node.child.stdin.write(out+"\n");
|
||||||
node.status({fill:"green",shape:"dot",text:msg.payload.toString()});
|
node.status({fill:"green",shape:"dot",text:msg.payload.toString()});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user