Don't disable idle task WDT when it's not enabled (#2856)

This commit is contained in:
Oxan van Leeuwen 2021-12-06 08:01:14 +01:00 committed by GitHub
parent d3e48e296f
commit ffc112c9d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,11 +42,11 @@ void arch_init() {
// Idle task watchdog is disabled on ESP-IDF // Idle task watchdog is disabled on ESP-IDF
#elif defined(USE_ARDUINO) #elif defined(USE_ARDUINO)
enableLoopWDT(); enableLoopWDT();
// Disable idle task watchdog on the core we're using (Arduino pins the process to a core) // Disable idle task watchdog on the core we're using (Arduino pins the task to a core)
#if CONFIG_ARDUINO_RUNNING_CORE == 0 #if defined(CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0) && CONFIG_ARDUINO_RUNNING_CORE == 0
disableCore0WDT(); disableCore0WDT();
#endif #endif
#if CONFIG_ARDUINO_RUNNING_CORE == 1 #if defined(CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1) && CONFIG_ARDUINO_RUNNING_CORE == 1
disableCore1WDT(); disableCore1WDT();
#endif #endif
#endif #endif