Set drive before checking rotation speed for writing

This commit is contained in:
Eric Anderson
2020-12-24 23:11:34 -08:00
parent f1506d0dbd
commit d3a5bb08d3

View File

@@ -39,6 +39,7 @@ public:
{
if (hardSectorCount.get())
{
usbSetDrive(_drive, high_density, indexMode);
std::cerr << "Measuring rotational speed... " << std::flush;
nanoseconds_t oneRevolution = usbGetRotationalPeriod(hardSectorCount);
_hardSectorThreshold = oneRevolution * 3 / (4 * hardSectorCount);