Handle the case of openers that stop door instead of opening it when toggling door while closing.
This commit is contained in:
parent
187cd60320
commit
79490cb6b0
|
@ -153,10 +153,15 @@ namespace secplus1 {
|
||||||
this->toggle_door();
|
this->toggle_door();
|
||||||
} else if (this->door_state == DoorState::STOPPED) {
|
} else if (this->door_state == DoorState::STOPPED) {
|
||||||
this->toggle_door(); // this starts closing door
|
this->toggle_door(); // this starts closing door
|
||||||
// this changes direction of door
|
|
||||||
this->on_door_state_([=](DoorState s) {
|
this->on_door_state_([=](DoorState s) {
|
||||||
if (s==DoorState::CLOSING) {
|
if (s==DoorState::CLOSING) {
|
||||||
|
// this changes direction of the door on some openers, on others it stops it
|
||||||
this->toggle_door();
|
this->toggle_door();
|
||||||
|
this->on_door_state_([=](DoorState s) {
|
||||||
|
if (s==DoorState::STOPPED) {
|
||||||
|
this->toggle_door();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue