-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsignalk-flatten-delta.html
39 lines (35 loc) · 1.13 KB
/
signalk-flatten-delta.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
<script type="text/javascript">
RED.nodes.registerType('signalk-flatten-delta',{
category: 'Signal K',
color: '#ffcc01',
defaults: {
name: {value:""}
},
inputs:1,
outputs:1,
icon: "function.png",
label: function() {
return this.name||"signalk-flatten-delta";
},
paletteLabel: 'flatten delta'
});
</script>
<script type="text/x-red" data-template-name="signalk-flatten-delta">
<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>
</script>
<script type="text/x-red" data-help-name="signalk-flatten-delta">
<p>Function that flatten deltas from signalk-on-delta.</p>
<p>The output payload will be the value and the topic will be the path, The payload will also include context, $source, and source. </p>
<pre><code class="javascript">
{
"topic": "navigation.speedOverGround",
"payload": 2.45,
"source": {"label":"actisense","type":"NMEA2000","pgn":129026,"src":"3"},
"context": "vessels.self",
"$source": "actisense.3"
}
</code></pre>
</script>