From 94232ca7208d0cfd841354443b565b1e29878732 Mon Sep 17 00:00:00 2001 From: Luc Date: Fri, 23 Oct 2015 11:56:16 +0800 Subject: [PATCH 1/3] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dc79d0fa..97b4d2d6 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,11 @@ Thanks to @lkarlslund for suggestion about independant reset using GPIO2 Have a bridge configurable by web (implemented) and optionally by printer (not yet implemented) Have a front end to know what is the wifi status (implemented) or know what is the print status (not yet implemented) - this part can be optional and removed by compilation directive if no need -Should be compatible with reprap printer (Marlin FW/Repetier FW) as soon as you can make both serial to communicate. +Should be compatible with reprap printer (Marlin FW/Repetier FW) as soon as you can make both serial to communicate. + +current release is v0.4-beta.1: https://github.com/luc-github/ESP8266/releases/tag/v0.4-beta.1, need to use at least staging version 1.6.5-1160-gef26c5f + +master may not work unless you use the latest code of https://github.com/esp8266/arduino due to delay between PR integration in staging/stable versions ##Hardware connection --Use GPIO2 to ground to reset all settings in hard way - 2-6 sec after boot / not before!! Set GPIO2 to ground before boot change boot mode and go to special boot that do not reach FW. Currently boot take 10 sec - giving 8 seconds to connect GPIO2 to GND and do an hard recovery for settings From eae00a364800fd54adb75075b1ba334b19bf619b Mon Sep 17 00:00:00 2001 From: luc Date: Fri, 23 Oct 2015 11:58:07 +0800 Subject: [PATCH 2/3] Display total space, used space and % occuped in file manager for SPIFFS --- esp8266/data - for more than 64K SPIFFS/settings.tpl | 7 ++++++- esp8266/webinterface.cpp | 10 +++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/esp8266/data - for more than 64K SPIFFS/settings.tpl b/esp8266/data - for more than 64K SPIFFS/settings.tpl index 438be91f..6a469c86 100644 --- a/esp8266/data - for more than 64K SPIFFS/settings.tpl +++ b/esp8266/data - for more than 64K SPIFFS/settings.tpl @@ -35,7 +35,12 @@ $SUCCESS_MSG$ function dispatchstatus(jsonresponse) { var content =""; -document.getElementById('status').innerHTML=jsonresponse.status; +content ="Status: "+jsonresponse.status; +content +="  Total space: "+jsonresponse.total; +content +="  Used space: "+jsonresponse.used; +content +="  Occupation: "+jsonresponse.occupation; +document.getElementById('status').innerHTML=content; +content =""; for (var i=0;i "; content +=jsonresponse.files[i].name; diff --git a/esp8266/webinterface.cpp b/esp8266/webinterface.cpp index a3accca2..a3ea5aad 100644 --- a/esp8266/webinterface.cpp +++ b/esp8266/webinterface.cpp @@ -2394,7 +2394,15 @@ void handleFileList() { f.close(); } jsonfile+="],"; - jsonfile+="\"status\":\"" + status + "\""; + jsonfile+="\"status\":\"" + status + "\","; + uint32_t total; + uint32_t used; + SPIFFS.info(&total,&used); + jsonfile+="\"total\":\"" + formatBytes(total) + "\","; + jsonfile+="\"used\":\"" + formatBytes(used) + "\","; + jsonfile+="\"occupation\":\"" ; + jsonfile+= intTostr(100*used/total); + jsonfile+="%\""; jsonfile+="}"; path = ""; web_interface->WebServer.send(200, "application/json", jsonfile); From 3cbb3fc14e83301f8fb660a941754af5eb40a9d5 Mon Sep 17 00:00:00 2001 From: luc Date: Fri, 23 Oct 2015 16:18:18 +0800 Subject: [PATCH 3/3] Fix typo issue --- esp8266/config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp8266/config.cpp b/esp8266/config.cpp index 17419516..db636506 100644 --- a/esp8266/config.cpp +++ b/esp8266/config.cpp @@ -333,7 +333,7 @@ Serial.print("SSDP : "); Serial.println("Disabled"); #endif Serial.print("mDNS : "); -#ifdef MDNS +#ifdef MDNS_FEATURE Serial.println("Enabled"); #else Serial.println("Disabled");