From d2b1f5fc42255e3f1a8a7faf1af386cce9b701f5 Mon Sep 17 00:00:00 2001 From: Marius Muja Date: Sat, 20 Jan 2024 19:53:45 -0800 Subject: [PATCH] Remove defer calls --- components/ratgdo/ratgdo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 42b6bab..c40b69a 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -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(); } } }