From afa0eddcf0d7ab77eaaa205c9cd239c9389ae57c Mon Sep 17 00:00:00 2001 From: luc Date: Sat, 14 Nov 2015 22:04:17 +0800 Subject: [PATCH] Update to follow refactoring of info now it use struct instead of integer --- esp8266/webinterface.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/esp8266/webinterface.cpp b/esp8266/webinterface.cpp index 508d50f2..b552260d 100644 --- a/esp8266/webinterface.cpp +++ b/esp8266/webinterface.cpp @@ -2695,13 +2695,12 @@ void handleFileList() { } jsonfile+="],"; jsonfile+="\"status\":\"" + status + "\","; - uint32_t total; - uint32_t used; - SPIFFS.info(&total,&used); - jsonfile+="\"total\":\"" + formatBytes(total) + "\","; - jsonfile+="\"used\":\"" + formatBytes(used) + "\","; + FSInfo info; + SPIFFS.info(info); + jsonfile+="\"total\":\"" + formatBytes(info.totalBytes) + "\","; + jsonfile+="\"used\":\"" + formatBytes(info.usedBytes) + "\","; jsonfile+="\"occupation\":\"" ; - jsonfile+= intTostr(100*used/total); + jsonfile+= intTostr(100*info.usedBytes/info.totalBytes); jsonfile+="\""; jsonfile+="}"; path = "";