Compare commits

...

3 Commits

Author SHA1 Message Date
Beat bfe20af6c8
Merge 21d490cb77 into 5846d3bf6b 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
1 changed files with 3 additions and 3 deletions

View File

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