Fix WDT error message when doing formating
Some checks failed
build-ci / build (push) Failing after 1m8s

Bum version
This commit is contained in:
Luc 2025-04-13 14:40:44 +08:00
parent 3f60af3ac1
commit 6e439231e3
3 changed files with 12 additions and 4 deletions

View File

@ -202,7 +202,11 @@ void ESP3DHal::checkTWDT() {
// Watchdog feeder // Watchdog feeder
void ESP3DHal::wdtFeed() { void ESP3DHal::wdtFeed() {
#ifdef ARDUINO_ARCH_ESP32 #ifdef ARDUINO_ARCH_ESP32
vTaskDelay(1); if (esp_task_wdt_status(NULL) == ESP_OK) {
vTaskDelay(1);
} else {
delay(1);
}
return; return;
#endif // ARDUINO_ARCH_ESP32 #endif // ARDUINO_ARCH_ESP32
#ifdef ARDUINO_ARCH_ESP8266 #ifdef ARDUINO_ARCH_ESP8266

View File

@ -22,7 +22,7 @@
#define _VERSION_ESP3D_H #define _VERSION_ESP3D_H
// version and sources location // 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" #define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
#endif //_VERSION_ESP3D_H #endif //_VERSION_ESP3D_H

View File

@ -23,7 +23,9 @@ littlefs_esp32_filesystem.cpp - ESP3D littlefs filesystem configuration class
defined(ARDUINO_ARCH_ESP32) defined(ARDUINO_ARCH_ESP32)
#include <FS.h> #include <FS.h>
#include <LittleFS.h> #include <LittleFS.h>
extern "C" {
#include "esp_littlefs.h"
}
#include <stack> #include <stack>
#include "../esp_filesystem.h" #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"; } const char *ESP_FileSystem::FilesystemName() { return "LittleFS"; }
bool ESP_FileSystem::format() { 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) { if (res) {
res = begin(); res = begin();
} }