diff --git a/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino b/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino index dab2f06..3381b9f 100644 --- a/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino +++ b/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino @@ -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); diff --git a/examples/ESP_AsyncFSBrowser/data/ace.ico.gz b/examples/ESP_AsyncFSBrowser/data/ace.ico.gz new file mode 100644 index 0000000..49e15bc Binary files /dev/null and b/examples/ESP_AsyncFSBrowser/data/ace.ico.gz differ diff --git a/examples/SmartSwitch/SmartSwitch.ino b/examples/SmartSwitch/SmartSwitch.ino index 727026e..a35688a 100644 --- a/examples/SmartSwitch/SmartSwitch.ino +++ b/examples/SmartSwitch/SmartSwitch.ino @@ -64,10 +64,10 @@ Use latest ESP core lib (from Github) #include #elif defined(ESP8266) #ifdef USE_LittleFS - #include + #include #define HSTNM "ssw8266-littlefs" - #define MYFS LittleFS - #include + #define MYFS LittleFS + #include #elif defined(USE_FatFS) #error "FatFS only on ESP32 for now!" #else @@ -550,10 +550,14 @@ 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")); + Serial.print(F("FS mount failed\n")); } #ifdef USE_AUTH_WS