+[{"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