Remove Track, which is now obsolete.

This commit is contained in:
David Given
2021-07-16 00:00:11 +02:00
parent f589e094b2
commit 5d889d4d95
14 changed files with 8 additions and 45 deletions

View File

@@ -69,7 +69,7 @@ public:
_sector->status = (gotdatachecksum == wanteddatachecksum) ? Sector::OK : Sector::BAD_CHECKSUM;
}
std::set<unsigned> requiredSectors(Track& track) const
std::set<unsigned> requiredSectors(unsigned cylinder, unsigned head) const override
{
static std::set<unsigned> sectors = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
return sectors;

View File

@@ -8,7 +8,6 @@
#include "crc.h"
#include "bytes.h"
#include "decoders/rawbits.h"
#include "track.h"
#include "fmt/format.h"
#include <string.h>
#include <algorithm>

View File

@@ -167,7 +167,7 @@ public:
_sector->status = (wantCrc == gotCrc) ? Sector::OK : Sector::BAD_CHECKSUM;
}
std::set<unsigned> requiredSectors(Track& track) const
std::set<unsigned> requiredSectors(unsigned cylinder, unsigned head) const override
{
return iterate(_config.required_sectors());
}

View File

@@ -4,7 +4,6 @@
#include "protocol.h"
#include "decoders/decoders.h"
#include "sector.h"
#include "track.h"
#include "macintosh.h"
#include "bytes.h"
#include "fmt/format.h"
@@ -191,16 +190,16 @@ public:
_sector->data.writer().append(userData.slice(12, 512)).append(userData.slice(0, 12));
}
std::set<unsigned> requiredSectors(Track& track) const
std::set<unsigned> requiredSectors(unsigned cylinder, unsigned head) const
{
int count;
if (track.physicalTrack < 16)
if (cylinder < 16)
count = 12;
else if (track.physicalTrack < 32)
else if (cylinder < 32)
count = 11;
else if (track.physicalTrack < 48)
else if (cylinder < 48)
count = 10;
else if (track.physicalTrack < 64)
else if (cylinder < 64)
count = 9;
else
count = 8;

View File

@@ -5,7 +5,6 @@
#include "fluxmap.h"
#include "decoders/fluxmapreader.h"
#include "sector.h"
#include "track.h"
#include <string.h>
const int SECTOR_SIZE = 256;

View File

@@ -177,7 +177,7 @@ public:
_sector->status = (wantChecksum == gotChecksum) ? Sector::OK : Sector::BAD_CHECKSUM;
}
std::set<unsigned> requiredSectors(Track& track) const
std::set<unsigned> requiredSectors(unsigned cylinder, unsigned head) const override
{
static std::set<unsigned> sectors = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
return sectors;

View File

@@ -6,7 +6,6 @@
#include "fluxmap.h"
#include "decoders/fluxmapreader.h"
#include "sector.h"
#include "track.h"
#include <string.h>
#include <fmt/format.h>

View File

@@ -7,7 +7,6 @@
#include "victor9k.h"
#include "crc.h"
#include "bytes.h"
#include "track.h"
#include "fmt/format.h"
#include <string.h>
#include <algorithm>

View File

@@ -22,7 +22,6 @@
#include "flux.h"
#include "protocol.h"
#include "decoders/rawbits.h"
#include "track.h"
#include "sector.h"
#include "image.h"
#include "lib/decoders/decoders.pb.h"

View File

@@ -9,7 +9,6 @@ class Sector;
class Fluxmap;
class FluxmapReader;
class RawBits;
class Track;
class DecoderProto;
#include "flux.h"

View File

@@ -10,7 +10,6 @@
#include "sector.h"
#include "bytes.h"
#include "decoders/rawbits.h"
#include "track.h"
#include "flux.h"
#include "image.h"
#include "imagewriter/imagewriter.h"

View File

@@ -1,27 +0,0 @@
#ifndef TRACK_H
#define TRACK_H
class Fluxmap;
class FluxSource;
class AbstractDecoder;
class Track
{
public:
Track(unsigned track, unsigned side):
physicalTrack(track),
physicalSide(side)
{}
public:
unsigned physicalTrack;
unsigned physicalSide;
FluxSource* fluxsource;
std::unique_ptr<Fluxmap> fluxmap;
std::vector<Sector> sectors;
};
typedef std::vector<std::unique_ptr<Track>> TrackVector;
#endif

View File

@@ -8,7 +8,6 @@
#include "protocol.h"
#include "decoders/rawbits.h"
#include "sector.h"
#include "track.h"
#include "proto.h"
#include "fmt/format.h"

View File

@@ -4,7 +4,6 @@
#include "fluxmap.h"
#include "writer.h"
#include "sector.h"
#include "track.h"
#include "proto.h"
#include "lib/fluxsource/fluxsource.h"
#include "lib/fluxsink/fluxsink.h"