ArduPilot / node-mavlink

This project is providing native TypeScript bindings and tools for sending and receiving MavLink messages over a verity of medium
GNU Lesser General Public License v3.0
72 stars 23 forks source link

Implement MavFTP protocol #26

Closed padcom closed 2 months ago

padcom commented 1 year ago

Here's a crazy idea:

  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 commented 2 months ago

https://github.com/padcom/node-mavlink-ftp