mirror of
https://github.com/esphome/esphome.git
synced 2025-09-15 01:32:19 +01:00
Merge remote-tracking branch 'upstream/loop_done' into loop_done
This commit is contained in:
@@ -98,6 +98,11 @@ void Application::loop() {
|
|||||||
this->feed_wdt(last_op_end_time);
|
this->feed_wdt(last_op_end_time);
|
||||||
|
|
||||||
for (Component *component : this->looping_components_) {
|
for (Component *component : this->looping_components_) {
|
||||||
|
// Skip components that are done or failed
|
||||||
|
if (component->should_skip_loop()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Update the cached time before each component runs
|
// Update the cached time before each component runs
|
||||||
this->loop_component_start_time_ = last_op_end_time;
|
this->loop_component_start_time_ = last_op_end_time;
|
||||||
|
|
||||||
|
@@ -211,8 +211,8 @@ void HOT Scheduler::call() {
|
|||||||
// Not reached timeout yet, done for this call
|
// Not reached timeout yet, done for this call
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Don't run on failed or loop-done components
|
// Don't run on failed components
|
||||||
if (item->component != nullptr && item->component->should_skip_loop()) {
|
if (item->component != nullptr && item->component->is_failed()) {
|
||||||
LockGuard guard{this->lock_};
|
LockGuard guard{this->lock_};
|
||||||
this->pop_raw_();
|
this->pop_raw_();
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user