Skip to content

Commit 6d0e43a

Browse files
committed
Sync with ESP3D to fix wdt issue when doing FORMATFS
1 parent 242aa94 commit 6d0e43a

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/core/esp3d_hal.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,11 @@ void ESP3DHal::checkTWDT() {
202202
// Watchdog feeder
203203
void ESP3DHal::wdtFeed() {
204204
#ifdef ARDUINO_ARCH_ESP32
205-
vTaskDelay(1);
205+
if (esp_task_wdt_status(NULL) == ESP_OK) {
206+
vTaskDelay(1);
207+
} else {
208+
delay(1);
209+
}
206210
return;
207211
#endif // ARDUINO_ARCH_ESP32
208212
#ifdef ARDUINO_ARCH_ESP8266

src/include/esp3d_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define _VERSION_ESP3D_H
2323

2424
// version and sources location
25-
#define FW_VERSION "3.0.0.5b1"
25+
#define FW_VERSION "3.0.0.6b1"
2626
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
2727

2828
#endif //_VERSION_ESP3D_H

src/modules/filesystem/flash/littlefs_esp32_filesystem.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ littlefs_esp32_filesystem.cpp - ESP3D littlefs filesystem configuration class
2323
defined(ARDUINO_ARCH_ESP32)
2424
#include <FS.h>
2525
#include <LittleFS.h>
26-
26+
extern "C" {
27+
#include "esp_littlefs.h"
28+
}
2729
#include <stack>
2830

2931
#include "../esp_filesystem.h"
@@ -58,7 +60,9 @@ bool ESP_FileSystem::rename(const char *oldpath, const char *newpath) {
5860
const char *ESP_FileSystem::FilesystemName() { return "LittleFS"; }
5961

6062
bool ESP_FileSystem::format() {
61-
bool res = LittleFS.format();
63+
//Use directly the function to avoid any wdt issue
64+
// bool res = LittleFS.format();
65+
bool res = (ESP_OK == esp_littlefs_format("spiffs"));
6266
if (res) {
6367
res = begin();
6468
}

0 commit comments

Comments
 (0)