Skip to content

Commit 4eb3649

Browse files
committed
Tentatively move OPEN state override to door_action check
1 parent ce7c061 commit 4eb3649

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

components/ratgdo/ratgdo.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,14 @@ namespace ratgdo {
620620
}
621621
#else
622622
this->protocol_->door_action(action);
623+
#endif
624+
#ifdef PROTOCOL_DRYCONTACT
625+
if (action == DoorAction::STOP || action == DoorAction::TOGGLE) {
626+
// Door will likely be open partially unless closed
627+
if (*this->door_state == DoorState::OPENING || *this->door_state == DoorState::CLOSING) {
628+
this->received(DoorState::OPEN);
629+
}
630+
}
623631
#endif
624632
}
625633

@@ -654,8 +662,6 @@ namespace ratgdo {
654662
this->door_action(delta > 0 ? DoorAction::OPEN : DoorAction::CLOSE);
655663
set_timeout("move_to_position", operation_time, [this] {
656664
this->door_action(DoorAction::STOP);
657-
this->received(DoorState::OPEN);
658-
this->cancel_position_sync_callbacks();
659665
});
660666
}
661667

0 commit comments

Comments
 (0)