mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Changed comments to match the format used in 145-digital-in.*
This commit is contained in:
parent
65a0c9336f
commit
f0ea85570f
@ -14,7 +14,7 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Define the edit dialog -->
|
<!-- Edit dialog for analogue-in -->
|
||||||
<script type="text/x-red" data-template-name="analog-in">
|
<script type="text/x-red" data-template-name="analog-in">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-pin"><i class="icon-asterisk"></i>Input pin</label>
|
<label for="node-input-pin"><i class="icon-asterisk"></i>Input pin</label>
|
||||||
@ -54,10 +54,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Add help text -->
|
<!-- Help text for analogue-in -->
|
||||||
<script type="text/x-red" data-help-name="analog-in">
|
<script type="text/x-red" data-help-name="analog-in">
|
||||||
<p>
|
<p>
|
||||||
Analogue input for the Beaglebone Black. Reads an analogue pin when triggered
|
Analogue input for the Beaglebone Black. Reads an analogue pin when triggered by
|
||||||
|
a message.
|
||||||
</p>
|
</p>
|
||||||
<p>The output message topic is the node topic: the output message value is the
|
<p>The output message topic is the node topic: the output message value is the
|
||||||
scaled analogue input or NaN if a read error occurs.
|
scaled analogue input or NaN if a read error occurs.
|
||||||
@ -74,7 +75,7 @@ voltage ten times in rapid succession for each input message and output the mean
|
|||||||
</p>
|
</p>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Register the node -->
|
<!-- Register analogue-in node -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('analog-in', {
|
RED.nodes.registerType('analog-in', {
|
||||||
category: 'advanced-input', // the palette category
|
category: 'advanced-input', // the palette category
|
||||||
|
@ -24,7 +24,7 @@ try {
|
|||||||
require("util").log("[144-analog-in] Error: cannot find module 'bonescript'");
|
require("util").log("[144-analog-in] Error: cannot find module 'bonescript'");
|
||||||
}
|
}
|
||||||
|
|
||||||
// The main node definition - most things happen in here
|
// Node constructor for analogue-in
|
||||||
function AnalogInputNode(n) {
|
function AnalogInputNode(n) {
|
||||||
// Create a RED node
|
// Create a RED node
|
||||||
RED.nodes.createNode(this, n);
|
RED.nodes.createNode(this, n);
|
||||||
@ -40,8 +40,7 @@ function AnalogInputNode(n) {
|
|||||||
this.averages = 1;
|
this.averages = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define 'node' to allow us to access 'this' from within callbacks (the 'var' is essential -
|
// Define 'node' to allow us to access 'this' from within callbacks
|
||||||
// otherwise there is only one global 'node' for all instances of AnalogInputNode!)
|
|
||||||
var node = this;
|
var node = this;
|
||||||
|
|
||||||
// Variables used for input averaging
|
// Variables used for input averaging
|
||||||
|
Loading…
Reference in New Issue
Block a user