1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:31 +02:00

update node-red

This commit is contained in:
kev 2018-05-21 17:14:27 +08:00
parent 2f1876fb06
commit 8a6dc500f3

View File

@ -1,3 +1,4 @@
module.exports = function(RED) {
"use strict";
var exec = require('child_process').exec;
@ -141,9 +142,9 @@ module.exports = function(RED) {
var limit = 1;
if (node.out === "pwm") { limit = 100; }
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) {
node.child.stdin.write(msg.payload+"\n");
node.child.stdin.write(out+"\n");
node.status({fill:"green",shape:"dot",text:msg.payload.toString()});
}
else {