node-mavlink icon indicating copy to clipboard operation
node-mavlink copied to clipboard

Implement MavFTP protocol

Open padcom opened this issue 2 years ago • 0 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.

padcom avatar Apr 04 '23 22:04 padcom