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

@@ -43,19 +43,25 @@ void AbstractDecoder::decodeToSectors(Track& track)
recordStart = fmr.tell();
decodeSectorRecord();
pushRecord(recordStart, fmr.tell());
Fluxmap::Position recordEnd = fmr.tell();
pushRecord(recordStart, recordEnd);
if (sector.status == Sector::DATA_MISSING)
{
/* The data is in a separate record. */
sector.headerStartTime = recordStart.ns();
sector.headerEndTime = recordEnd.ns();
r = advanceToNextRecord();
if (r == DATA_RECORD)
{
recordStart = fmr.tell();
decodeDataRecord();
pushRecord(recordStart, fmr.tell());
recordEnd = fmr.tell();
pushRecord(recordStart, recordEnd);
}
}
sector.dataStartTime = recordStart.ns();
sector.dataEndTime = recordEnd.ns();
if (sector.status != Sector::MISSING)
track.sectors.push_back(sector);