From fa169a5e43646c3d62874134ad910b13fe850ecb Mon Sep 17 00:00:00 2001 From: mverch67 Date: Mon, 14 Jul 2025 17:14:21 +0200 Subject: [PATCH] compare IDF versions --- src/platform/esp32/main-esp32.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform/esp32/main-esp32.cpp b/src/platform/esp32/main-esp32.cpp index 679938c35..f233db777 100644 --- a/src/platform/esp32/main-esp32.cpp +++ b/src/platform/esp32/main-esp32.cpp @@ -25,6 +25,8 @@ #include #include +#include "esp_idf_version.h" + #if !defined(CONFIG_IDF_TARGET_ESP32S2) && !MESHTASTIC_EXCLUDE_BLUETOOTH void setBluetoothEnable(bool enable) { @@ -169,7 +171,7 @@ void esp32Setup() // #define APP_WATCHDOG_SECS 45 #define APP_WATCHDOG_SECS 90 -#if defined(CONFIG_IDF_TARGET_ESP32C6) || defined(SENSECAP_INDICATOR) +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) esp_task_wdt_config_t *wdt_config = (esp_task_wdt_config_t *)malloc(sizeof(esp_task_wdt_config_t)); wdt_config->timeout_ms = APP_WATCHDOG_SECS * 1000; wdt_config->idle_core_mask = 0;