First draft of the visualiser.

This commit is contained in:
David Given
2019-08-27 01:07:57 +02:00
parent f8b6d5e6fb
commit b9a53e0d1c
7 changed files with 118 additions and 2 deletions

View File

@@ -9,6 +9,7 @@
#include "decoders/decoders.h"
#include "sector.h"
#include "sectorset.h"
#include "visualiser.h"
#include "record.h"
#include "image.h"
#include "bytes.h"
@@ -34,6 +35,11 @@ static StringFlag destination(
"write the raw magnetic flux to this file",
"");
static StringFlag visualise(
{ "--write-svg" },
"write a visualisation of the disk to this file",
"");
static SettableFlag justRead(
{ "--just-read" },
"just read the disk and do no further processing");
@@ -253,6 +259,9 @@ void readDiskCommand(AbstractDecoder& decoder)
std::cout << size << " bytes decoded." << std::endl;
}
if (!visualise.get().empty())
visualiseSectorsToFile(allSectors, visualise.get());
writeSectorsToFile(allSectors, outputSpec);
if (failures)
std::cerr << "Warning: some sectors could not be decoded." << std::endl;