Compare commits

...

3 Commits

Author SHA1 Message Date
Beat
7b1f522769
Merge 21d490cb77ebf5f52f084a43fa47119438101caa into 98df9e7f9af097588cf228db1821e2eba3e9259b 2024-12-18 11:32:46 -10:00
Beat
21d490cb77
Update ratgdo.cpp 2024-12-11 18:47:50 -05:00
Beat
60881341d8
Fix door close without obstruction sensor
With the old code, the door would not close the door when stopped, if you don't have the obstruction sensor connect (e.g door stopped)
2024-12-11 17:07:55 -05:00

View File

@ -460,11 +460,11 @@ namespace ratgdo {
return;
}
if (this->obstruction_sensor_detected_) {
this->door_action(DoorAction::CLOSE);
} else if (*this->door_state == DoorState::OPEN) {
if (!this->obstruction_sensor_detected_ && (*this->door_state == DoorState::OPEN || *this->door_state == DoorState::STOPPED)) {
ESP_LOGD(TAG, "No obstruction sensors detected. Close using TOGGLE.");
this->door_action(DoorAction::TOGGLE);
} else {
this->door_action(DoorAction::CLOSE);
}
if (*this->closing_duration > 0) {