1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-26 09:29:45 +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_) {
@ -132,6 +133,7 @@ void Drive::set_motor_on(bool motor_is_on) {
}
update_clocking_observer();
}
}
bool Drive::get_motor_on() {
return motor_is_on_;