diff --git a/components/ratgdo/callbacks.h b/components/ratgdo/callbacks.h index 3023b3a..40e50c0 100644 --- a/components/ratgdo/callbacks.h +++ b/components/ratgdo/callbacks.h @@ -52,7 +52,7 @@ namespace ratgdo { bool is_expired(uint32_t now) const { bool expired = true; - for (auto& cb : this->callbacks_) { + for (const auto& cb : this->callbacks_) { if (cb.first >= now) { expired = false; } diff --git a/components/ratgdo/common.h b/components/ratgdo/common.h index e6571b5..1926c22 100644 --- a/components/ratgdo/common.h +++ b/components/ratgdo/common.h @@ -1,4 +1,4 @@ #pragma once -#define ESP_LOG1 ESP_LOGV -#define ESP_LOG2 ESP_LOGV \ No newline at end of file +#define ESP_LOG1 ESP_LOGD +#define ESP_LOG2 ESP_LOGD \ No newline at end of file diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index e7cc6be..42b6bab 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -434,7 +434,7 @@ namespace ratgdo { this->door_action(DoorAction::OPEN); // query state in case we don't get a status message - set_timeout("door_query_state", (*this->opening_duration + 1) * 1000, [=]() { + set_timeout("door_query_state", (*this->opening_duration + 2) * 1000, [=]() { if (*this->door_state != DoorState::OPEN && *this->door_state != DoorState::STOPPED) { this->received(DoorState::OPEN); // probably missed a status mesage, assume it's open this->query_status(); // query in case we're wrong and it's stopped @@ -464,7 +464,7 @@ namespace ratgdo { this->door_action(DoorAction::CLOSE); // query state in case we don't get a status message - set_timeout("door_query_state", (*this->closing_duration + 1) * 1000, [=]() { + set_timeout("door_query_state", (*this->closing_duration + 2) * 1000, [=]() { if (*this->door_state != DoorState::CLOSED && *this->door_state != DoorState::STOPPED) { this->received(DoorState::CLOSED); // probably missed a status mesage, assume it's closed this->query_status(); // query in case we're wrong and it's stopped