Shot in the dark

This commit is contained in:
Marius Muja 2024-01-22 16:22:47 -08:00
parent 8fe0a53764
commit e126cbfef1
1 changed files with 2 additions and 2 deletions

View File

@ -605,11 +605,11 @@ namespace ratgdo {
void RATGDOComponent::defer(std::function<void()> &&f) { void RATGDOComponent::defer(std::function<void()> &&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<void()> &&f) { void RATGDOComponent::defer(const std::string &name, std::function<void()> &&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<void(float)>&& f) void RATGDOComponent::subscribe_opening_duration(std::function<void(float)>&& f)