mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00:00 
			
		
		
		
	Added message output to discrete-out
This commit is contained in:
		| @@ -342,7 +342,7 @@ the Inverting property is not applied to this value. | |||||||
|             name: { value:"" } |             name: { value:"" } | ||||||
|         }, |         }, | ||||||
|         inputs:1,                	// set the number of inputs - only 0 or 1 |         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) |         icon: "arrow-out.png",    	// set the icon (held in public/icons) | ||||||
|         label: function() {      	// sets the default label contents |         label: function() {      	// sets the default label contents | ||||||
|             return this.name || "discrete-out: " + this.pin; |             return this.name || "discrete-out: " + this.pin; | ||||||
|   | |||||||
| @@ -319,6 +319,7 @@ function DiscreteOutputNode(n) { | |||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             bonescript.digitalWrite(node.pin, newState ? 1 : 0); |             bonescript.digitalWrite(node.pin, newState ? 1 : 0); | ||||||
|  |             node.send({ topic:node.topic, payload:newState }); | ||||||
|             node.currentState = newState; |             node.currentState = newState; | ||||||
|         }; |         }; | ||||||
|      |      | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user