1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-11-22 09:10:54 +00:00

Cleaning up prepareFileSystem, changing button style

This commit is contained in:
Lukas Bachschwell 2018-05-27 00:16:53 +02:00
parent d9648152ef
commit 35336208de
6 changed files with 17 additions and 17 deletions

View File

@ -51,7 +51,7 @@ Download the [Repository](https://github.com/s00500/ESPUI/archive/master.zip), G
ESPUI **NEEDS** its files burnt on the SPIFFS filesystem on the ESP. **Without this ESPUI will NOT work at all** ESPUI **NEEDS** its files burnt on the SPIFFS filesystem on the ESP. **Without this ESPUI will NOT work at all**
There are now two ways to do this: you can either use the upload tool or you use the library function `ESPUI.prepareFileSystem()` There are now two ways to do this: you can either use the upload tool or you use the library function `ESPUI.prepareFileSystem()`
#### Simple filesystem preparation (recomended, but currently not working well on esp32, see issues) #### Simple filesystem preparation (recomended)
Just open the example sketch **prepareFileSystem** and run it on the ESP, (give it 5 - 10 seconds), Just open the example sketch **prepareFileSystem** and run it on the ESP, (give it 5 - 10 seconds),
The library will create all needed files. The library will create all needed files.
@ -80,6 +80,10 @@ Now you are set to go and use any code you want to with this library
- ~~Setup SPIFFS using values in program memory~~ - ~~Setup SPIFFS using values in program memory~~
- ~~ESP8266 support~~ - ~~ESP8266 support~~
- ~~PlattformIO Integration~~
- Datagraph output -> *WIP*
- Number input -> *WIP*
- GZip Files to improve loadspeed and reduce server load
- Document slider - Document slider
- New images in docu - New images in docu
- proper return value (as int and not as string) for slider - proper return value (as int and not as string) for slider
@ -87,7 +91,6 @@ Now you are set to go and use any code you want to with this library
- Improve slider stability - Improve slider stability
- Improve general stability - Improve general stability
- Multiline Labels - Multiline Labels
- PlattformIO Integration
## Documentation ## Documentation

View File

@ -322,6 +322,7 @@
padding: 10px; padding: 10px;
border-radius: 3px; border-radius: 3px;
color: #fff; color: #fff;
background-color: #999999;
} }
/* Main Head Part /* Main Head Part

File diff suppressed because one or more lines are too long

View File

@ -85,7 +85,7 @@ void ESPUIClass::list() {
} }
void deleteFile(const char *path) { void deleteFile(const char *path) {
Serial.print(SPIFFS.exists(path)); if (debug) Serial.print(SPIFFS.exists(path));
if (!SPIFFS.exists(path)) { if (!SPIFFS.exists(path)) {
Serial.printf("File: %s does not exist, not deleting\n", path); Serial.printf("File: %s does not exist, not deleting\n", path);
return; return;
@ -145,18 +145,14 @@ void ESPUIClass::prepareFileSystem() {
Serial.println("SPIFFS Mount ESP8266 Done"); Serial.println("SPIFFS Mount ESP8266 Done");
#endif #endif
// TODO: This is a workaround, have to find out why SPIFFS on ESP32 behaves deleteFile("/index.htm");
// incredibly strangely, see issue #6
/*
deleteFile("/index.htm");
deleteFile("/css/style.css"); deleteFile("/css/style.css");
deleteFile("/css/normalize.css"); deleteFile("/css/normalize.css");
deleteFile("/js/zepto.min.js"); deleteFile("/js/zepto.min.js");
deleteFile("/js/controls.js"); deleteFile("/js/controls.js");
deleteFile("/js/slider.js"); deleteFile("/js/slider.js");
*/
Serial.println("Cleanup done"); Serial.println("Cleanup done");
@ -173,7 +169,7 @@ void ESPUIClass::prepareFileSystem() {
Serial.println("Done Initializing filesystem :-)"); Serial.println("Done Initializing filesystem :-)");
#if defined(ESP32) #if defined(ESP32)
listDir("/", 1); if(debug) listDir("/", 1);
#endif #endif
SPIFFS.end(); SPIFFS.end();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long