Rewrite of noaa_apt_sink
Rewrite of the noaa_apt_sink using the line synchronisation scheme from https://github.com/LongHairedHacker/apt-decoder/. The new implementation has been designed as a drop in replacement with the same interface. The code style/formating has been matched to the other source files in this repo.
Comments here or to ar3itrary in the matrix/irc-channel.
Differences to the previous implementation:
- Uses png++ instead of plain libpng
- Nicer interface and allowing for cleaner code
- libpng++ should be available on any standard linux distro
- fewer png internals exposed, less potential for mistakes
- Higher memory consumption as the whole image is kept in RAM (approx. 4MB)
- As png++ is only a wrapper around libpng, it consists solely of header files and does not provide its own shared object. Therefore it is only a build dependency required at compile time, not run time.
- More robust syncing code, ported from apt-decoder
- Uses a fuzzy matching/correlation to detect sync patterns
- Syncs on A and B patterns
- Resyncs twice on each line, if possible
- Considerably reduces slating (see image below)
- Tries to fill any gaps in the image generated with data from the modules sample history
- Images are written to disk every 250 lines, to have partial images even in case of crashes
Edited by Sebastian