UNPKG

@droneblocks/node-red-dexi

Version:

You want to make sure you don't lose any of your flow development. Make sure to map the host "flows" directory to the container directory as shown below. This will store the flow on your host machine if/when the container is destroyed.

18 lines (16 loc) 574 B
module.exports = function(RED) { function FlyDownNode(config) { RED.nodes.createNode(this, config); var node = this; let distance = parseFloat(config.distance) || 1.0; // Default to 1.0 if undefined node.on('input', function(msg) { // Adheres to offboardnavcommand message format from dexi_interfaces msg.payload = { "command": "fly_down", "distance_or_degrees": distance } node.send(msg) }) } RED.nodes.registerType("down", FlyDownNode); }