@parallaxcontrol/node-red-control
Version:
A comprehensive package of Node-RED nodes designed to seamlessly integrate with the Parallax Control Engine, offering enhanced control capabilities for AV Automation.
42 lines (39 loc) • 1.42 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('and-gate', {
category: 'parallax',
color: '#C0C0C0',
defaults: {
name: { value: "" },
numInputs: { value: 2, required: true }
},
inputs: 1,
outputs: 1,
icon: "arrow-in.svg",
label: function() {
return this.name || "and-gate";
},
labelStyle: function() {
return this.name ? "node_label_italic" : "";
}
});
</script>
<script type="text/html" data-template-name="and-gate">
<!-- Name -->
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<!-- Inputs -->
<div class="form-row">
<label for="node-input-numInputs"><i class="icon-tag"></i> Number of Inputs</label>
<input type="number" id="node-input-numInputs" placeholder="Number of inputs">
</div>
<!-- Node Property Window Notes -->
<div>
<small>Use the input-select node to specify the input to connect to.<br>
Expects: msg.payload of type JSON Object {"Input":1,"Value":true} </small>
</div>
</script>
<script type="text/html" data-help-name="and-gate">
<p>Logic Node: This node acts as an AND gate, outputting true only if all configured inputs are true.</p>
</script>