1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Added 'bbb-' prefix to all node names

This commit is contained in:
Maxwell Hadley 2014-03-05 23:31:38 +00:00
parent 87f83c5a56
commit 3b7acd821e
2 changed files with 45 additions and 45 deletions

View File

@ -14,8 +14,8 @@
limitations under the License. limitations under the License.
--> -->
<!-- Edit dialog for analogue-in --> <!-- Edit dialog for bbb-analogue-in -->
<script type="text/x-red" data-template-name="analogue-in"> <script type="text/x-red" data-template-name="bbb-analogue-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>
<select type="text" id="node-input-pin" style="width: 150px;"> <select type="text" id="node-input-pin" style="width: 150px;">
@ -54,8 +54,8 @@
</div> </div>
</script> </script>
<!-- Help text for analogue-in --> <!-- Help text for bbb-analogue-in -->
<script type="text/x-red" data-help-name="analogue-in"> <script type="text/x-red" data-help-name="bbb-analogue-in">
<p> <p>
Analogue input for the Beaglebone Black. Reads an analogue pin when triggered by Analogue input for the Beaglebone Black. Reads an analogue pin when triggered by
a message. a message.
@ -75,9 +75,9 @@ voltage ten times in rapid succession for each input message and output the mean
</p> </p>
</script> </script>
<!-- Register analogue-in node --> <!-- Register bbb-analogue-in node -->
<script type="text/javascript"> <script type="text/javascript">
RED.nodes.registerType('analogue-in', { RED.nodes.registerType('bbb-analogue-in', {
category: 'advanced-input', // the palette category category: 'advanced-input', // the palette category
color:"#de7224", color:"#de7224",
defaults: { // defines the editable properties of the node defaults: { // defines the editable properties of the node
@ -91,7 +91,7 @@ voltage ten times in rapid succession for each input message and output the mean
outputs:1, // set the number of outputs - 0 to n outputs:1, // set the number of outputs - 0 to n
icon: "BBB.png", // set the icon (held in public/icons) icon: "BBB.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 || "analogue-in: " + this.pin; return this.name || "bbb-analogue-in: " + this.pin;
}, },
labelStyle: function() { // sets the class to apply to the label labelStyle: function() { // sets the class to apply to the label
return this.name ? "node_label_italic" : ""; return this.name ? "node_label_italic" : "";
@ -183,8 +183,8 @@ voltage ten times in rapid succession for each input message and output the mean
}); });
</script> </script>
<!-- Edit dialog for discrete-in --> <!-- Edit dialog for bbb-discrete-in -->
<script type="text/x-red" data-template-name="discrete-in"> <script type="text/x-red" data-template-name="bbb-discrete-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>
<select type="text" id="node-input-pin" style="width: 200px;"> <select type="text" id="node-input-pin" style="width: 200px;">
@ -253,8 +253,8 @@ voltage ten times in rapid succession for each input message and output the mean
</div> </div>
</script> </script>
<!-- Help text for discrete-in --> <!-- Help text for bbb-discrete-in -->
<script type="text/x-red" data-help-name="discrete-in"> <script type="text/x-red" data-help-name="bbb-discrete-in">
<p> <p>
Discrete input for the Beaglebone Black. Sends a message with payload 0 or 1 on the Discrete input for the Beaglebone Black. Sends a message with payload 0 or 1 on the
first output when the pin changes state, and logs the total time in the active state. first output when the pin changes state, and logs the total time in the active state.
@ -276,9 +276,9 @@ press. When using buttons or switches, enable debouncing to improve reliability.
</p> </p>
</script> </script>
<!-- Register discrete-in node --> <!-- Register bbb-discrete-in node -->
<script type="text/javascript"> <script type="text/javascript">
RED.nodes.registerType('discrete-in', { RED.nodes.registerType('bbb-discrete-in', {
category: 'advanced-input', // the palette category category: 'advanced-input', // the palette category
color:"#de7224", color:"#de7224",
defaults: { // defines the editable properties of the node defaults: { // defines the editable properties of the node
@ -294,7 +294,7 @@ press. When using buttons or switches, enable debouncing to improve reliability.
outputs:2, // set the number of outputs - 0 to n outputs:2, // set the number of outputs - 0 to n
icon: "BBB.png", // set the icon (held in public/icons) icon: "BBB.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-in: " + this.pin; return this.name || "bbb-discrete-in: " + this.pin;
}, },
labelStyle: function() { // sets the class to apply to the label labelStyle: function() { // sets the class to apply to the label
return this.name ? "node_label_italic" : ""; return this.name ? "node_label_italic" : "";
@ -302,8 +302,8 @@ press. When using buttons or switches, enable debouncing to improve reliability.
}); });
</script> </script>
<!-- Edit dialog for pulse-in --> <!-- Edit dialog for bbb-pulse-in -->
<script type="text/x-red" data-template-name="pulse-in"> <script type="text/x-red" data-template-name="bbb-pulse-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>
<select type="text" id="node-input-pin" style="width: 200px;"> <select type="text" id="node-input-pin" style="width: 200px;">
@ -373,8 +373,8 @@ press. When using buttons or switches, enable debouncing to improve reliability.
</div> </div>
</script> </script>
<!-- Help text for pulse-in --> <!-- Help text for bbb-pulse-in -->
<script type="text/x-red" data-help-name="pulse-in"> <script type="text/x-red" data-help-name="bbb-pulse-in">
<p> <p>
Pulse input for the Beaglebone Black. Counts input pulses or pulse edges: outputs Pulse input for the Beaglebone Black. Counts input pulses or pulse edges: outputs
total counts and the rate of counts/sec, with scaling. total counts and the rate of counts/sec, with scaling.
@ -387,9 +387,9 @@ any other input message will reset it to zero.
</p> </p>
</script> </script>
<!-- Register pulse-in node --> <!-- Register bbb-pulse-in node -->
<script type="text/javascript"> <script type="text/javascript">
RED.nodes.registerType('pulse-in', { RED.nodes.registerType('bbb-pulse-in', {
category: 'advanced-input', // the palette category category: 'advanced-input', // the palette category
color:"#de7224", color:"#de7224",
defaults: { // defines the editable properties of the node defaults: { // defines the editable properties of the node
@ -405,7 +405,7 @@ any other input message will reset it to zero.
outputs:2, // set the number of outputs - 0 to n outputs:2, // set the number of outputs - 0 to n
icon: "BBB.png", // set the icon (held in public/icons) icon: "BBB.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 || "pulse-in: " + this.pin; return this.name || "bbb-pulse-in: " + this.pin;
}, },
labelStyle: function() { // sets the class to apply to the label labelStyle: function() { // sets the class to apply to the label
return this.name ? "node_label_italic" : ""; return this.name ? "node_label_italic" : "";
@ -413,8 +413,8 @@ any other input message will reset it to zero.
}); });
</script> </script>
<!-- Edit dialog for discrete-out --> <!-- Edit dialog for bbb-discrete-out -->
<script type="text/x-red" data-template-name="discrete-out"> <script type="text/x-red" data-template-name="bbb-discrete-out">
<div class="form-row"> <div class="form-row">
<label for="node-input-pin"><i class="icon-asterisk"></i>Output pin</label> <label for="node-input-pin"><i class="icon-asterisk"></i>Output pin</label>
<select type="text" id="node-input-pin" style="width: 200px;"> <select type="text" id="node-input-pin" style="width: 200px;">
@ -477,8 +477,8 @@ any other input message will reset it to zero.
</div> </div>
</script> </script>
<!-- Help text for discrete-out --> <!-- Help text for bbb-discrete-out -->
<script type="text/x-red" data-help-name="discrete-out"> <script type="text/x-red" data-help-name="bbb-discrete-out">
<p> <p>
Directly control an output pin on the Beaglebone Black. Directly control an output pin on the Beaglebone Black.
</p> </p>
@ -498,9 +498,9 @@ the Inverting property is not applied to this value.
</p> </p>
</script> </script>
<!-- Register discrete-out node --> <!-- Register bbb-discrete-out node -->
<script type="text/javascript"> <script type="text/javascript">
RED.nodes.registerType('discrete-out', { RED.nodes.registerType('bbb-discrete-out', {
category: 'advanced-input', // the palette category category: 'advanced-input', // the palette category
color:"#de7224", color:"#de7224",
defaults: { // defines the editable properties of the node defaults: { // defines the editable properties of the node
@ -515,7 +515,7 @@ the Inverting property is not applied to this value.
icon: "BBB.png", // set the icon (held in public/icons) icon: "BBB.png", // set the icon (held in public/icons)
align:"right", align:"right",
label: function() { // sets the default label contents label: function() { // sets the default label contents
return this.name || "discrete-out: " + this.pin; return this.name || "bbb-discrete-out: " + this.pin;
}, },
labelStyle: function() { // sets the class to apply to the label labelStyle: function() { // sets the class to apply to the label
return this.name ? "node_label_italic" : ""; return this.name ? "node_label_italic" : "";
@ -523,8 +523,8 @@ the Inverting property is not applied to this value.
}); });
</script> </script>
<!-- Edit dialog for pulse-out --> <!-- Edit dialog for bbb-pulse-out -->
<script type="text/x-red" data-template-name="pulse-out"> <script type="text/x-red" data-template-name="bbb-pulse-out">
<div class="form-row"> <div class="form-row">
<label for="node-input-pin"><i class="icon-asterisk"></i>Output pin</label> <label for="node-input-pin"><i class="icon-asterisk"></i>Output pin</label>
<select type="text" id="node-input-pin" style="width: 200px;"> <select type="text" id="node-input-pin" style="width: 200px;">
@ -588,8 +588,8 @@ the Inverting property is not applied to this value.
</div> </div>
</script> </script>
<!-- Help text for pulse-out --> <!-- Help text for bbb-pulse-out -->
<script type="text/x-red" data-help-name="pulse-out"> <script type="text/x-red" data-help-name="bbb-pulse-out">
<p> <p>
Pulse an output pin on the Beaglebone Black. Pulse an output pin on the Beaglebone Black.
</p> </p>
@ -611,9 +611,9 @@ the pin changes state: its payload is the new state (0 or 1).
</p> </p>
</script> </script>
<!-- Register pulse-out node --> <!-- Register bbb-pulse-out node -->
<script type="text/javascript"> <script type="text/javascript">
RED.nodes.registerType('pulse-out', { RED.nodes.registerType('bbb-pulse-out', {
category: 'advanced-input', // the palette category category: 'advanced-input', // the palette category
color:"#de7224", color:"#de7224",
defaults: { // defines the editable properties of the node defaults: { // defines the editable properties of the node
@ -628,7 +628,7 @@ the pin changes state: its payload is the new state (0 or 1).
icon: "BBB.png", // set the icon (held in public/icons) icon: "BBB.png", // set the icon (held in public/icons)
align:"right", align:"right",
label: function() { // sets the default label contents label: function() { // sets the default label contents
return this.name || "pulse-out: " + this.pin; return this.name || "bbb-pulse-out: " + this.pin;
}, },
labelStyle: function() { // sets the class to apply to the label labelStyle: function() { // sets the class to apply to the label
return this.name ? "node_label_italic" : ""; return this.name ? "node_label_italic" : "";

View File

@ -24,7 +24,7 @@ try {
require("util").log("[145-BBB-hardware] Error: cannot find module 'bonescript'"); require("util").log("[145-BBB-hardware] Error: cannot find module 'bonescript'");
} }
// Node constructor for analogue-in // Node constructor for bbb-analogue-in
function AnalogueInputNode(n) { function AnalogueInputNode(n) {
// Create a RED node // Create a RED node
RED.nodes.createNode(this, n); RED.nodes.createNode(this, n);
@ -80,7 +80,7 @@ function AnalogueInputNode(n) {
} }
} }
// Node constructor for discrete-in // Node constructor for bbb-discrete-in
function DiscreteInputNode(n) { function DiscreteInputNode(n) {
RED.nodes.createNode(this, n); RED.nodes.createNode(this, n);
@ -248,7 +248,7 @@ function DiscreteInputNode(n) {
} }
} }
// Node constructor for pulse-in // Node constructor for bbb-pulse-in
function PulseInputNode(n) { function PulseInputNode(n) {
RED.nodes.createNode(this, n); RED.nodes.createNode(this, n);
@ -340,7 +340,7 @@ function PulseInputNode(n) {
} }
} }
// Node constructor for discrete-out // Node constructor for bbb-discrete-out
function DiscreteOutputNode(n) { function DiscreteOutputNode(n) {
RED.nodes.createNode(this, n); RED.nodes.createNode(this, n);
@ -396,7 +396,7 @@ function DiscreteOutputNode(n) {
} }
} }
// Node constructor for pulse-out // Node constructor for bbb-pulse-out
function PulseOutputNode(n) { function PulseOutputNode(n) {
RED.nodes.createNode(this, n); RED.nodes.createNode(this, n);
@ -471,11 +471,11 @@ function PulseOutputNode(n) {
} }
// Register the nodes by name. This must be called before overriding any of the Node functions. // Register the nodes by name. This must be called before overriding any of the Node functions.
RED.nodes.registerType("analogue-in", AnalogueInputNode); RED.nodes.registerType("bbb-analogue-in", AnalogueInputNode);
RED.nodes.registerType("discrete-in", DiscreteInputNode); RED.nodes.registerType("bbb-discrete-in", DiscreteInputNode);
RED.nodes.registerType("pulse-in", PulseInputNode); RED.nodes.registerType("bbb-pulse-in", PulseInputNode);
RED.nodes.registerType("discrete-out", DiscreteOutputNode); RED.nodes.registerType("bbb-discrete-out", DiscreteOutputNode);
RED.nodes.registerType("pulse-out", PulseOutputNode); RED.nodes.registerType("bbb-pulse-out", PulseOutputNode);
// On close, detach the interrupt (if we attached one) and clear any active timers // On close, detach the interrupt (if we attached one) and clear any active timers
DiscreteInputNode.prototype.close = function () { DiscreteInputNode.prototype.close = function () {