1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-21 02:17:08 +00:00

Attempted to implement Sleeper in Drive and therefore in DiskController. Also corrected a couple of nonconformant file names.

This commit is contained in:
Thomas Harte
2017-08-20 11:54:54 -04:00
parent e3f2118757
commit 49285e9caa
7 changed files with 54 additions and 12 deletions
+6
View File
@@ -18,18 +18,24 @@ void Drive::set_disk(const std::shared_ptr<Disk> &disk) {
disk_ = disk;
track_ = nullptr;
has_disk_ = !!disk_;
update_sleep_observer();
}
void Drive::set_disk_with_track(const std::shared_ptr<Track> &track) {
disk_ = nullptr;
track_ = track;
has_disk_ = !!track_;
update_sleep_observer();
}
bool Drive::has_disk() {
return has_disk_;
}
bool Drive::is_sleeping() {
return !has_disk_;
}
bool Drive::get_is_track_zero() {
return head_position_ == 0;
}