Skip to content

Commit 646e28e

Browse files
committed
chore: create an example flow
1 parent 1965463 commit 646e28e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/switch-on-anchor-light.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"id":"f3cc3b94.c5e49","type":"function","z":"cf96057a.038f88","name":"Check Anchor Light","func":"\n\nlet _ = global.get('lodash')\nlet app = global.get('app')\n\nlet sog = app.getSelfPath('navigation.speedOverGround')\nlet acVoltage = app.getSelfPath('electrical.inverters.261.acin.voltage')\nlet rpm = app.getSelfPath('propulsion.port.revolutions')\nlet sun = app.getSelfPath('environment.sun')\n\nlet res = 0\nif ( acVoltage && _.isUndefined(acVoltage.value) && sog && !_.isUndefined(sog.value) && rpm && !_.isUndefined(rpm.value) && sun && !_.isUndefined(sun.value) ) {\n res = sog.value < 0.5 && rpm.value === 0 && sun.value === 'day'\n //res = 1\n}\n\nreturn {payload: res }","outputs":1,"noerr":0,"x":340,"y":100,"wires":[["8cd816d5.e67028"]]}]

0 commit comments

Comments
 (0)