From 9d17d48bcab7e047b64770dafabe60f50519f9c7 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 28 Sep 2019 23:23:15 -0400 Subject: [PATCH] Ensures `cycles_per_revolution_` is populated for fixed-rate drives. --- Storage/Disk/Drive.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Disk/Drive.cpp b/Storage/Disk/Drive.cpp index 8a702b568..e0068ba5d 100644 --- a/Storage/Disk/Drive.cpp +++ b/Storage/Disk/Drive.cpp @@ -20,8 +20,8 @@ using namespace Storage::Disk; Drive::Drive(int input_clock_rate, int revolutions_per_minute, int number_of_heads): Storage::TimedEventLoop(input_clock_rate), - rotational_multiplier_(60.0f / float(revolutions_per_minute)), available_heads_(number_of_heads) { + set_rotation_speed(revolutions_per_minute); const auto seed = static_cast(std::chrono::system_clock::now().time_since_epoch().count()); std::default_random_engine randomiser(seed);