Compare commits

...

3 Commits

Author SHA1 Message Date
Beat
bfe20af6c8
Merge 21d490cb77ebf5f52f084a43fa47119438101caa into 5846d3bf6b9632ddc3709fda4dc668bba7b04f23 2024-12-16 20:02:36 -05: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) {