mirror of
https://github.com/esphome/esphome.git
synced 2025-09-11 07:42:26 +01:00
Merge branch 'scheduler_skip_add_no_change' into integration
This commit is contained in:
@@ -358,7 +358,7 @@ void HOT Scheduler::call(uint32_t now) {
|
|||||||
this->process_to_add();
|
this->process_to_add();
|
||||||
|
|
||||||
// Track if any items were added to to_add_ during this call (intervals or from callbacks)
|
// Track if any items were added to to_add_ during this call (intervals or from callbacks)
|
||||||
bool added_items = false;
|
bool has_added_items = false;
|
||||||
|
|
||||||
#ifdef ESPHOME_DEBUG_SCHEDULER
|
#ifdef ESPHOME_DEBUG_SCHEDULER
|
||||||
static uint64_t last_print = 0;
|
static uint64_t last_print = 0;
|
||||||
@@ -514,11 +514,11 @@ void HOT Scheduler::call(uint32_t now) {
|
|||||||
this->recycle_item_(std::move(item));
|
this->recycle_item_(std::move(item));
|
||||||
}
|
}
|
||||||
|
|
||||||
added_items |= this->to_add_.empty() == false;
|
has_added_items |= !this->to_add_.empty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (added_items) {
|
if (has_added_items) {
|
||||||
this->process_to_add();
|
this->process_to_add();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user