Merge pull request #681 from davidgiven/bb679

Allow writing to Greaseweazle disks again by not setting hardSectorThresholdNs to inf.
This commit is contained in:
David Given
2023-05-25 21:58:59 +02:00
committed by GitHub

View File

@@ -83,9 +83,12 @@ void measureDiskRotation()
if (!globalConfig()->drive().hard_sector_threshold_ns())
{
int count = globalConfig()->drive().hard_sector_count();
globalConfig().setTransient("drive.hard_sector_threshold_ns",
std::to_string(oneRevolution * 3 /
(4 * globalConfig()->drive().hard_sector_count())));
count ? std::to_string(
oneRevolution * 3 /
(4 * globalConfig()->drive().hard_sector_count()))
: "0");
}
if (oneRevolution == 0)