tidy up
This commit is contained in:
parent
99a0fcdbbd
commit
931aceef65
|
@ -33,11 +33,14 @@ namespace ratgdo {
|
||||||
{
|
{
|
||||||
bool binary;
|
bool binary;
|
||||||
state->current_values_as_binary(&binary);
|
state->current_values_as_binary(&binary);
|
||||||
|
if (binary == this->_is_on)
|
||||||
|
return;
|
||||||
if (binary) {
|
if (binary) {
|
||||||
this->parent_->lightOn();
|
this->parent_->lightOn();
|
||||||
} else {
|
} else {
|
||||||
this->parent_->lightOff();
|
this->parent_->lightOff();
|
||||||
}
|
}
|
||||||
|
this->_is_on = binary;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ratgdo
|
} // namespace ratgdo
|
||||||
|
|
Loading…
Reference in New Issue