Make scheduler debuging work with idf >= 5 (#5052)

This commit is contained in:
Jimmy Hedman 2023-07-05 12:05:27 +02:00 committed by GitHub
parent a326dcaf0e
commit 979f014799
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,16 +154,16 @@ void HOT Scheduler::call() {
if (now - last_print > 2000) { if (now - last_print > 2000) {
last_print = now; last_print = now;
std::vector<std::unique_ptr<SchedulerItem>> old_items; std::vector<std::unique_ptr<SchedulerItem>> old_items;
ESP_LOGVV(TAG, "Items: count=%u, now=%u", this->items_.size(), now); ESP_LOGVV(TAG, "Items: count=%u, now=%" PRIu32, this->items_.size(), now);
while (!this->empty_()) { while (!this->empty_()) {
this->lock_.lock(); this->lock_.lock();
auto item = std::move(this->items_[0]); auto item = std::move(this->items_[0]);
this->pop_raw_(); this->pop_raw_();
this->lock_.unlock(); this->lock_.unlock();
ESP_LOGVV(TAG, " %s '%s' interval=%u last_execution=%u (%u) next=%u (%u)", item->get_type_str(), ESP_LOGVV(TAG, " %s '%s' interval=%" PRIu32 " last_execution=%" PRIu32 " (%u) next=%" PRIu32 " (%u)",
item->name.c_str(), item->interval, item->last_execution, item->last_execution_major, item->get_type_str(), item->name.c_str(), item->interval, item->last_execution,
item->next_execution(), item->next_execution_major()); item->last_execution_major, item->next_execution(), item->next_execution_major());
old_items.push_back(std::move(item)); old_items.push_back(std::move(item));
} }