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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user