mirror of
				https://github.com/davidgiven/fluxengine.git
				synced 2025-10-24 11:11:02 -07:00 
			
		
		
		
	Remove Track, which is now obsolete.
This commit is contained in:
		| @@ -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; | ||||
|   | ||||
| @@ -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> | ||||
|   | ||||
| @@ -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()); | ||||
| 	} | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -6,7 +6,6 @@ | ||||
| #include "fluxmap.h" | ||||
| #include "decoders/fluxmapreader.h" | ||||
| #include "sector.h" | ||||
| #include "track.h" | ||||
| #include <string.h> | ||||
| #include <fmt/format.h> | ||||
|  | ||||
|   | ||||
| @@ -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> | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -9,7 +9,6 @@ class Sector; | ||||
| class Fluxmap; | ||||
| class FluxmapReader; | ||||
| class RawBits; | ||||
| class Track; | ||||
| class DecoderProto; | ||||
|  | ||||
| #include "flux.h" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
							
								
								
									
										27
									
								
								lib/track.h
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								lib/track.h
									
									
									
									
									
								
							| @@ -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 | ||||
| @@ -8,7 +8,6 @@ | ||||
| #include "protocol.h" | ||||
| #include "decoders/rawbits.h" | ||||
| #include "sector.h" | ||||
| #include "track.h" | ||||
| #include "proto.h" | ||||
| #include "fmt/format.h" | ||||
|  | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user