40 lines
1.2 KiB
HTML
40 lines
1.2 KiB
HTML
<script type="text/javascript">
|
|
RED.nodes.registerType('xilica-interval', {
|
|
category: 'Xilica',
|
|
color: '#000000',
|
|
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 <value></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>
|