1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-10-04 01:57:54 +00:00

Avoids observer communication if motor status hasn't changed.

This commit is contained in:
Thomas Harte 2018-08-03 21:11:22 -04:00
parent 74a2f717b3
commit 78c7137427

View File

@ -117,6 +117,7 @@ bool Drive::get_is_ready() {
}
void Drive::set_motor_on(bool motor_is_on) {
if(motor_is_on_ != motor_is_on) {
motor_is_on_ = motor_is_on;
if(observer_) {
@ -131,6 +132,7 @@ void Drive::set_motor_on(bool motor_is_on) {
if(disk_) disk_->flush_tracks();
}
update_clocking_observer();
}
}
bool Drive::get_motor_on() {