mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
45344c181aee65d2eb76d1f470e9fed36644b51d
Raising WDT_FEED_INTERVAL_MS to 300 ms in the previous commit also capped the status_led update cadence to ~3 Hz, because status_led::loop() was re-dispatched only from inside feed_wdt_slow_(). That distorts the error blink pattern (ERROR_PERIOD_MS = 250 ms with 150 ms on-window in status_led.cpp) — at a 300 ms dispatch interval, the LED can be sampled entirely inside or entirely outside the on-window on any given period, turning a readable blink into an aliased one. Split the two rate limits so they evolve independently: WDT_FEED_INTERVAL_MS = 300 ms — arch_feed_wdt() rate limit STATUS_LED_DISPATCH_INTERVAL_MS = 100 ms — status_led loop() dispatch The feed_wdt_with_time() hot path now has two independent gate checks (a load + sub + branch each). Fast path on both misses is the common case and remains cheap. feed_wdt_slow_() no longer touches status_led; the status_led re-dispatch moves into a new service_status_led_slow_() that's compiled in only when USE_STATUS_LED is set. No change to behavior on devices without status_led. Devices with status_led get the intended LED cadence restored (100 ms dispatch sits below the 150 ms error on-window and well below the 250 ms warning on- window). Flagged by Copilot review on application.h:242.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
545 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
