Compare commits

...

4 Commits

Author SHA1 Message Date
Beat 997379e36b
Merge 21d490cb77 into a2bd0287b1 2025-01-08 16:52:46 -10:00
pre-commit-ci[bot] a2bd0287b1
[pre-commit.ci] pre-commit autoupdate (#354)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-08 16:52:44 -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
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ repos:
- id: end-of-file-fixer
- id: check-added-large-files
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.5
rev: v19.1.6
hooks:
- id: clang-format
types_or:

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) {