fix: light state sometimes flip-flips
This commit is contained in:
parent
2a9126f7ac
commit
d95e9806bf
|
@ -432,9 +432,6 @@ namespace ratgdo {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
toggleLight();
|
toggleLight();
|
||||||
// We don't always get the state back so be optimistic
|
|
||||||
this->previousLightState = this->lightState;
|
|
||||||
this->lightState = LightState::LIGHT_STATE_ON;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RATGDOComponent::lightOff()
|
void RATGDOComponent::lightOff()
|
||||||
|
@ -444,9 +441,6 @@ namespace ratgdo {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
toggleLight();
|
toggleLight();
|
||||||
// We don't always get the state back so be optimistic
|
|
||||||
this->previousLightState = this->lightState;
|
|
||||||
this->lightState = LightState::LIGHT_STATE_OFF;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RATGDOComponent::toggleLight()
|
void RATGDOComponent::toggleLight()
|
||||||
|
|
Loading…
Reference in New Issue