[core] Avoid double promotion in update interval and step formatting (#18825)

This commit is contained in:
J. Nick Koston
2026-08-28 15:12:50 -05:00
committed by GitHub
parent d4348335dd
commit 03147bc3b1
3 changed files with 28 additions and 16 deletions
+1 -3
View File
@@ -336,10 +336,8 @@ void log_update_interval(const char *tag, PollingComponent *component) {
uint32_t update_interval = component->get_update_interval();
if (update_interval == SCHEDULER_DONT_RUN) {
ESP_LOGCONFIG(tag, " Update Interval: never");
} else if (update_interval < 100) {
ESP_LOGCONFIG(tag, " Update Interval: %.3fs", update_interval / 1000.0f);
} else {
ESP_LOGCONFIG(tag, " Update Interval: %.1fs", update_interval / 1000.0f);
ESP_LOGCONFIG(tag, " Update Interval: %" PRIu32 ".%03" PRIu32 "s", update_interval / 1000, update_interval % 1000);
}
}
float Component::get_actual_setup_priority() const {