From e126cbfef1be635790eb8af0aaf864fb0c7016ca Mon Sep 17 00:00:00 2001 From: Marius Muja Date: Mon, 22 Jan 2024 16:22:47 -0800 Subject: [PATCH] Shot in the dark --- components/ratgdo/ratgdo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 77aa95d..8c674af 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -605,11 +605,11 @@ namespace ratgdo { void RATGDOComponent::defer(std::function &&f) { - App.scheduler.set_timeout(this, "", 0, [=](){ f(); App.feed_wdt();}); + App.scheduler.set_timeout(this, "", 0, [=](){ f(); App.feed_wdt(); delay(1); yield(); }); } void RATGDOComponent::defer(const std::string &name, std::function &&f) { - App.scheduler.set_timeout(this, name, 0, [=](){ f(); App.feed_wdt();}); + App.scheduler.set_timeout(this, name, 0, [=](){ f(); App.feed_wdt(); delay(1); yield(); }); } void RATGDOComponent::subscribe_opening_duration(std::function&& f)