Skip to content

Commit

Permalink
Fix finally
Browse files Browse the repository at this point in the history
  • Loading branch information
cziter15 committed Jun 16, 2024
1 parent 544a382 commit e6907ec
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/ksf/ksConstants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,27 @@ namespace ksf
static EOTAType::Type otaBootType{EOTAType::NO_OTA}; // Will be true if this launch is just after OTA flash.
static uint32_t uptime_low32, uptime_high32; // Variables for assembling 64-bit version of millis.


#if ESP32
template <typename T, typename = void>
struct is_defined : std::false_type {};

template <typename T>
struct is_defined<T, std::void_t<decltype(T::timeout_ms)>> : std::true_type {};

void initializeFramework()
{
#if ESP32
#if (ARDUINO >= 10812)
esp_task_wdt_config_t twdt_config = {
#ifdef CONFIG_SOC_CPU_CORES_NUM
esp_task_wdt_config_t twdt_config = {
.timeout_ms = KSF_WATCHDOG_TIMEOUT_SECS * 1000,
.idle_core_mask = (1 << CONFIG_SOC_CPU_CORES_NUM) - 1,
.trigger_panic = true,
};

esp_task_wdt_init(&twdt_config);
#else
esp_task_wdt_init(KSF_WATCHDOG_TIMEOUT_SECS, true);
#endif
esp_task_wdt_init(&twdt_config);
#else
esp_task_wdt_init(KSF_WATCHDOG_TIMEOUT_SECS * 1000, true);
#endif
/* Initialize filesystem. */
LittleFS.begin(true);
#endif
Expand Down

0 comments on commit e6907ec

Please sign in to comment.