From e8df573ea3a5cc633412d8ac624a1749b7e365c0 Mon Sep 17 00:00:00 2001 From: Maxwell Hadley Date: Wed, 26 Feb 2014 21:18:42 +0000 Subject: [PATCH] Added message output to discrete-out --- hardware/BBB/145-digital-in.html | 2 +- hardware/BBB/145-digital-in.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hardware/BBB/145-digital-in.html b/hardware/BBB/145-digital-in.html index 8f6e4e78..30417071 100644 --- a/hardware/BBB/145-digital-in.html +++ b/hardware/BBB/145-digital-in.html @@ -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; diff --git a/hardware/BBB/145-digital-in.js b/hardware/BBB/145-digital-in.js index c401f494..64ed6bfc 100644 --- a/hardware/BBB/145-digital-in.js +++ b/hardware/BBB/145-digital-in.js @@ -319,6 +319,7 @@ function DiscreteOutputNode(n) { } } bonescript.digitalWrite(node.pin, newState ? 1 : 0); + node.send({ topic:node.topic, payload:newState }); node.currentState = newState; };