Merge remote-tracking branch 'refs/remotes/origin/master' into ESP-512K-64KSPIFFS

This commit is contained in:
luc 2015-10-23 16:33:06 +08:00
commit f52360954d
3 changed files with 20 additions and 3 deletions

View File

@ -12,6 +12,10 @@ Have a front end to know what is the wifi status (implemented) or know what is t
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
--Use GPIO0 to ground to be in update mode

View File

@ -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 <jsonresponse.files.length;i++){
content +="<TR><TD style=\"cursor:hand;\" onclick=\"window.open('"+jsonresponse.files[i].name+"');\">";
content +=jsonresponse.files[i].name;

View File

@ -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);