ArduPilot / node-mavlink

This project is providing native TypeScript bindings and tools for sending and receiving MavLink messages over a verity of medium

Repository from Github https://github.comArduPilot/node-mavlinkRepository from Github https://github.comArduPilot/node-mavlink

Implement MavFTP protocol

padcom opened this issue · comments

Here's a crazy idea:

  • let's have a piped transform stream like this:
  const ftp = async (stream) => {
      for await (const packet of stream) {
        // do whatever with the packet

        yield packet // or not if you don't fancy others seeing this packet can be used to create filters!
      }
    return result;
  }

  const reader = port
    .pipe(new MavLinkPacketSplitter())
    .pipe(new MavLinkPacketParser())
    .pipe(ftp)

Inside the processing, let's implement a quick filter for the FTP-related packets and then the logic when to do what with the packets. This can also be linked with something like an "ftp client" to allow for a better DX.