Remove defer calls

This commit is contained in:
Marius Muja 2024-01-20 19:53:45 -08:00
parent 9ec34310d2
commit d2b1f5fc42
1 changed files with 4 additions and 4 deletions

View File

@ -177,13 +177,13 @@ namespace ratgdo {
}
if (door_state == DoorState::CLOSED) {
defer([=]() { this->query_openings(); });
this->query_openings();
}
this->door_state = door_state;
auto now = millis();
if (!this->on_door_state_.is_expired(now)) {
defer([=]() { this->on_door_state_.trigger(now, door_state); });
this->on_door_state_.trigger(now, door_state);
} else {
this->on_door_state_.clear();
}
@ -198,7 +198,7 @@ namespace ratgdo {
}
if (learn_state == LearnState::INACTIVE) {
defer([=]() { this->query_paired_devices(); });
this->query_paired_devices();
}
this->learn_state = learn_state;
@ -249,7 +249,7 @@ namespace ratgdo {
this->motion_state = MotionState::CLEAR;
});
if (*this->light_state == LightState::OFF) {
defer([=]() { this->query_status(); });
this->query_status();
}
}
}