Limit the max open files on fat variant, takes a lot of RAM otherwise (10 are default)

Added missing icon
This commit is contained in:
lorol
2020-07-11 18:54:39 -04:00
parent 1f3541b1dd
commit 30df4976dd
3 changed files with 18 additions and 5 deletions

View File

@@ -157,7 +157,16 @@ void setup(){
MDNS.addService("http","tcp",80);
MYFS.begin();
//FS
#ifdef USE_FatFS
if (MYFS.begin(false,"/ffat",3)) { //limit the RAM usage, bottom line 8kb + 4kb takes per each file, default is 10
#else
if (MYFS.begin()) {
#endif
Serial.print(F("FS mounted\n"));
} else {
Serial.print(F("FS mount failed\n"));
}
ws.onEvent(onWsEvent);
server.addHandler(&ws);

Binary file not shown.

View File

@@ -550,7 +550,11 @@ void setup(){
Serial.printf("Temp set %+2.1f\n", ee.tempe);
//FS
#ifdef USE_FatFS
if (MYFS.begin(false,"/ffat",3)) { //limit the RAM usage, bottom line 8kb + 4kb takes per each file, default is 10
#else
if (MYFS.begin()) {
#endif
Serial.print(F("FS mounted\n"));
} else {
Serial.print(F("FS mount failed\n"));