mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
LOG_UPDATE_INTERVAL: correctly report "never" (#2240)
This commit is contained in:
parent
e2d97b6f36
commit
7f76f3726f
2 changed files with 5 additions and 2 deletions
|
@ -38,8 +38,12 @@ extern const float LATE;
|
||||||
|
|
||||||
} // namespace setup_priority
|
} // namespace setup_priority
|
||||||
|
|
||||||
|
static const uint32_t SCHEDULER_DONT_RUN = 4294967295UL;
|
||||||
|
|
||||||
#define LOG_UPDATE_INTERVAL(this) \
|
#define LOG_UPDATE_INTERVAL(this) \
|
||||||
if (this->get_update_interval() < 100) { \
|
if (this->get_update_interval() == SCHEDULER_DONT_RUN) { \
|
||||||
|
ESP_LOGCONFIG(TAG, " Update Interval: never"); \
|
||||||
|
} else if (this->get_update_interval() < 100) { \
|
||||||
ESP_LOGCONFIG(TAG, " Update Interval: %.3fs", this->get_update_interval() / 1000.0f); \
|
ESP_LOGCONFIG(TAG, " Update Interval: %.3fs", this->get_update_interval() / 1000.0f); \
|
||||||
} else { \
|
} else { \
|
||||||
ESP_LOGCONFIG(TAG, " Update Interval: %.1fs", this->get_update_interval() / 1000.0f); \
|
ESP_LOGCONFIG(TAG, " Update Interval: %.1fs", this->get_update_interval() / 1000.0f); \
|
||||||
|
|
|
@ -7,7 +7,6 @@ namespace esphome {
|
||||||
|
|
||||||
static const char *const TAG = "scheduler";
|
static const char *const TAG = "scheduler";
|
||||||
|
|
||||||
static const uint32_t SCHEDULER_DONT_RUN = 4294967295UL;
|
|
||||||
static const uint32_t MAX_LOGICALLY_DELETED_ITEMS = 10;
|
static const uint32_t MAX_LOGICALLY_DELETED_ITEMS = 10;
|
||||||
|
|
||||||
// Uncomment to debug scheduler
|
// Uncomment to debug scheduler
|
||||||
|
|
Loading…
Reference in a new issue