-
Notifications
You must be signed in to change notification settings - Fork 2
/
signalk-send-pathvalue.html
52 lines (48 loc) · 1.46 KB
/
signalk-send-pathvalue.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<script type="text/javascript">
RED.nodes.registerType('signalk-send-pathvalue',{
category: 'Signal K',
color: '#ffcc01',
defaults: {
name: {value:""},
source: {value: ""},
meta: {value:"", required:false}
},
inputs:1,
outputs:0,
icon: "bridge.png",
align: 'right',
label: function() {
return this.name||"signalk-send-pathvalue";
},
paletteLabel: 'send pathvalue',
oneditprepare: () => {
$("#node-input-meta").typedInput({
type:"json",
types:["json"]
})
}
});
</script>
<script type="text/x-red" data-template-name="signalk-send-pathvalue">
<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>
<div class="form-row">
<label for="node-input-source"><i class="icon-tag"></i> $source</label>
<input type="text" id="node-input-source" placeholder="$source">
</div>
<div class="form-row">
<label for="node-input-meta"><i class="icon-tag"></i> Meta</label>
<input type="text" id="node-input-meta" placeholder='{"units": "V"}'>
</div>
</script>
<script type="text/x-red" data-help-name="signalk-send-pathvalue">
<p>Output that sends a delta through the server. Input should be topic and payload</p>
<pre><code class="javascript">
{
"topic":"navigation.speedOverGround",
"payload":20.45
}
</code></pre>
</script>