mirror of
				https://github.com/davidgiven/fluxengine.git
				synced 2025-10-24 11:11:02 -07:00 
			
		
		
		
	Update a few places which used -c for other purposes.
This commit is contained in:
		| @@ -22,9 +22,7 @@ static StringFlag destFlux({"--dest", "-d"}, | |||||||
|         globalConfig().setFluxSink(value); |         globalConfig().setFluxSink(value); | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
| static IntFlag destTrack({"--cylinder", "-c"}, "track to write to", 0); | static StringFlag destTracks({"--tracks", "-t"}, "tracks to write to", "c0h0"); | ||||||
|  |  | ||||||
| static IntFlag destHead({"--head", "-h"}, "head to write to", 0); |  | ||||||
|  |  | ||||||
| static DoubleFlag minInterval( | static DoubleFlag minInterval( | ||||||
|     {"--min-interval-us"}, "Minimum pulse interval", 2.0); |     {"--min-interval-us"}, "Minimum pulse interval", 2.0); | ||||||
| @@ -251,11 +249,14 @@ int mainAnalyseDriveResponse(int argc, const char* argv[]) | |||||||
|  |  | ||||||
|     if (globalConfig()->flux_sink().type() != FLUXTYPE_DRIVE) |     if (globalConfig()->flux_sink().type() != FLUXTYPE_DRIVE) | ||||||
|         error("this only makes sense with a real disk drive"); |         error("this only makes sense with a real disk drive"); | ||||||
|  |     auto tracks = parseCylinderHeadsString(destTracks); | ||||||
|  |     if (tracks.size() != 1) | ||||||
|  |         error("you must specify exactly one track"); | ||||||
|  |  | ||||||
|     usbSetDrive(globalConfig()->drive().drive(), |     usbSetDrive(globalConfig()->drive().drive(), | ||||||
|         globalConfig()->drive().high_density(), |         globalConfig()->drive().high_density(), | ||||||
|         globalConfig()->drive().index_mode()); |         globalConfig()->drive().index_mode()); | ||||||
|     usbSeek(destTrack); |     usbSeek(tracks[0].cylinder); | ||||||
|  |  | ||||||
|     std::cout << "Measuring rotational speed...\n"; |     std::cout << "Measuring rotational speed...\n"; | ||||||
|     nanoseconds_t period = usbGetRotationalPeriod(0); |     nanoseconds_t period = usbGetRotationalPeriod(0); | ||||||
| @@ -291,12 +292,12 @@ int mainAnalyseDriveResponse(int argc, const char* argv[]) | |||||||
|                 outFluxmap.appendPulse(); |                 outFluxmap.appendPulse(); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             usbWrite(destHead, outFluxmap.rawBytes(), 0); |             usbWrite(tracks[0].head, outFluxmap.rawBytes(), 0); | ||||||
|  |  | ||||||
|             /* Read the test pattern in again. */ |             /* Read the test pattern in again. */ | ||||||
|  |  | ||||||
|             Fluxmap inFluxmap; |             Fluxmap inFluxmap; | ||||||
|             inFluxmap.appendBytes(usbRead(destHead, true, period, 0)); |             inFluxmap.appendBytes(usbRead(tracks[0].head, true, period, 0)); | ||||||
|  |  | ||||||
|             /* Compute histogram. */ |             /* Compute histogram. */ | ||||||
|  |  | ||||||
|   | |||||||
| @@ -21,9 +21,7 @@ static StringFlag sourceFlux({"--source", "-s"}, | |||||||
|         globalConfig().setFluxSource(value); |         globalConfig().setFluxSource(value); | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
| static IntFlag trackFlag({"--cylinder", "-c"}, "Track to read.", 0); | static StringFlag destTracks({"--tracks", "-t"}, "tracks to write to", "c0h0"); | ||||||
|  |  | ||||||
| static IntFlag headFlag({"--head", "-h"}, "Head to read.", 0); |  | ||||||
|  |  | ||||||
| static SettableFlag dumpFluxFlag( | static SettableFlag dumpFluxFlag( | ||||||
|     {"--dump-flux", "-F"}, "Dump raw magnetic disk flux."); |     {"--dump-flux", "-F"}, "Dump raw magnetic disk flux."); | ||||||
| @@ -135,7 +133,10 @@ int mainInspect(int argc, const char* argv[]) | |||||||
|     flags.parseFlagsWithConfigFiles(argc, argv, {}); |     flags.parseFlagsWithConfigFiles(argc, argv, {}); | ||||||
|  |  | ||||||
|     auto fluxSource = FluxSource::create(globalConfig()); |     auto fluxSource = FluxSource::create(globalConfig()); | ||||||
|     const auto fluxmap = fluxSource->readFlux(trackFlag, headFlag)->next(); |     auto tracks = parseCylinderHeadsString(destTracks); | ||||||
|  |     if (tracks.size() != 1) | ||||||
|  |         error("you must specify exactly one track"); | ||||||
|  |     const auto fluxmap = fluxSource->readFlux(tracks[0])->next(); | ||||||
|  |  | ||||||
|     std::cout << fmt::format("0x{:x} bytes of data in {:.3f}ms\n", |     std::cout << fmt::format("0x{:x} bytes of data in {:.3f}ms\n", | ||||||
|         fluxmap->bytes(), |         fluxmap->bytes(), | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ static StringFlag sourceFlux({"-s", "--source"}, | |||||||
|         globalConfig().setFluxSource(value); |         globalConfig().setFluxSource(value); | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
| static IntFlag track({"--cylinder", "-c"}, "track to seek to", 0); | static IntFlag track({"--cylinder", "-t"}, "track to seek to", 0); | ||||||
|  |  | ||||||
| extern const std::map<std::string, std::string> readables; | extern const std::map<std::string, std::string> readables; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user