mirror of
https://github.com/esphome/esphome.git
synced 2026-05-31 17:06:40 +08:00
[core] feed_wdt wraps feed_wdt_with_time (#15932)
This commit is contained in:
@@ -208,16 +208,8 @@ void Application::process_dump_config_() {
|
|||||||
|
|
||||||
void Application::feed_wdt() {
|
void Application::feed_wdt() {
|
||||||
// Cold entry: callers without a millis() timestamp in hand. Fetches the
|
// Cold entry: callers without a millis() timestamp in hand. Fetches the
|
||||||
// time and takes the same rate-limit paths as feed_wdt_with_time().
|
// time and defers to the hot path.
|
||||||
uint32_t now = MillisInternal::get();
|
this->feed_wdt_with_time(MillisInternal::get());
|
||||||
if (now - this->last_wdt_feed_ > WDT_FEED_INTERVAL_MS) {
|
|
||||||
this->feed_wdt_slow_(now);
|
|
||||||
}
|
|
||||||
#ifdef USE_STATUS_LED
|
|
||||||
if (now - this->last_status_led_service_ > STATUS_LED_DISPATCH_INTERVAL_MS) {
|
|
||||||
this->service_status_led_slow_(now);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HOT Application::feed_wdt_slow_(uint32_t time) {
|
void HOT Application::feed_wdt_slow_(uint32_t time) {
|
||||||
|
|||||||
Reference in New Issue
Block a user