mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Added message output to discrete-out
This commit is contained in:
parent
430300fa04
commit
e8df573ea3
@ -342,7 +342,7 @@ the Inverting property is not applied to this value.
|
||||
name: { value:"" }
|
||||
},
|
||||
inputs:1, // set the number of inputs - only 0 or 1
|
||||
outputs:0, // set the number of outputs - 0 to n
|
||||
outputs:1, // set the number of outputs - 0 to n
|
||||
icon: "arrow-out.png", // set the icon (held in public/icons)
|
||||
label: function() { // sets the default label contents
|
||||
return this.name || "discrete-out: " + this.pin;
|
||||
|
@ -319,6 +319,7 @@ function DiscreteOutputNode(n) {
|
||||
}
|
||||
}
|
||||
bonescript.digitalWrite(node.pin, newState ? 1 : 0);
|
||||
node.send({ topic:node.topic, payload:newState });
|
||||
node.currentState = newState;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user