Files
node-red-contrib-xilica/nodes/xilica-interval.html
2025-12-31 08:54:22 +01:00

41 lines
1.2 KiB
HTML

<script type="text/javascript">
RED.nodes.registerType('xilica-interval', {
category: 'Xilica',
color: '#D8E7FF',
defaults: {
name: { value: "" },
interval: { value: 100 }
},
inputs: 1,
outputs: 1,
icon: "font-awesome/fa-plug",
label: function () {
if (this.name) {
return this.name;
}
if (this.interval) {
return "xilica interval " + this.interval + "ms";
}
return "xilica interval";
}
});
</script>
<script type="text/x-red" data-template-name="xilica-interval">
<div class="form-row">
<label for="node-input-name">Name</label>
<input type="text" id="node-input-name">
</div>
<div class="form-row">
<label for="node-input-interval">Interval (ms)</label>
<input type="number" id="node-input-interval" min="10" max="60000">
</div>
</script>
<script type="text/x-red" data-help-name="xilica-interval">
<p>Builds an <code>INTERVAL</code> command for a Xilica Solaro processor.</p>
<p>On each input message, the node sets <code>msg.payload</code> to <code>INTERVAL &lt;value&gt;</code>. Wire the output into a <code>xilica-command</code> node to send it over TCP.</p>
<p>You can override the configured interval by setting <code>msg.interval</code> on the incoming message.</p>
</script>