diff --git a/esp3d/src/core/esp3d_hal.cpp b/esp3d/src/core/esp3d_hal.cpp index 286342f5..608b8096 100644 --- a/esp3d/src/core/esp3d_hal.cpp +++ b/esp3d/src/core/esp3d_hal.cpp @@ -202,7 +202,11 @@ void ESP3DHal::checkTWDT() { // Watchdog feeder void ESP3DHal::wdtFeed() { #ifdef ARDUINO_ARCH_ESP32 - vTaskDelay(1); + if (esp_task_wdt_status(NULL) == ESP_OK) { + vTaskDelay(1); + } else { + delay(1); + } return; #endif // ARDUINO_ARCH_ESP32 #ifdef ARDUINO_ARCH_ESP8266 diff --git a/esp3d/src/include/esp3d_version.h b/esp3d/src/include/esp3d_version.h index 3671f4d4..30e01ac6 100644 --- a/esp3d/src/include/esp3d_version.h +++ b/esp3d/src/include/esp3d_version.h @@ -22,7 +22,7 @@ #define _VERSION_ESP3D_H // version and sources location -#define FW_VERSION "3.0.0.5b1" +#define FW_VERSION "3.0.0.6b1" #define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0" #endif //_VERSION_ESP3D_H diff --git a/esp3d/src/modules/filesystem/flash/littlefs_esp32_filesystem.cpp b/esp3d/src/modules/filesystem/flash/littlefs_esp32_filesystem.cpp index b937695c..20d915d3 100644 --- a/esp3d/src/modules/filesystem/flash/littlefs_esp32_filesystem.cpp +++ b/esp3d/src/modules/filesystem/flash/littlefs_esp32_filesystem.cpp @@ -23,7 +23,9 @@ littlefs_esp32_filesystem.cpp - ESP3D littlefs filesystem configuration class defined(ARDUINO_ARCH_ESP32) #include #include - +extern "C" { + #include "esp_littlefs.h" + } #include #include "../esp_filesystem.h" @@ -58,7 +60,9 @@ bool ESP_FileSystem::rename(const char *oldpath, const char *newpath) { const char *ESP_FileSystem::FilesystemName() { return "LittleFS"; } bool ESP_FileSystem::format() { - bool res = LittleFS.format(); + //Use directly the function to avoid any wdt issue + // bool res = LittleFS.format(); + bool res = (ESP_OK == esp_littlefs_format("spiffs")); if (res) { res = begin(); }