mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-11 17:59:10 +08:00
Fix web update available size
This commit is contained in:
parent
32b07c6740
commit
3d0beea62c
@ -1371,22 +1371,23 @@ void CONFIG::print_config(tpipe output, bool plaintext)
|
||||
BRIDGE::print(formatBytes(ESP.getFlashChipSize()).c_str(), output);
|
||||
if (!plaintext)BRIDGE::print(F("\","), output);
|
||||
else BRIDGE::print(F("\n"), output);
|
||||
#ifdef ARDUINO_ARCH_ESP8266
|
||||
#ifdef ARDUINO_ARCH_ESP8266
|
||||
fs::FSInfo info;
|
||||
SPIFFS.info(info);
|
||||
if (!plaintext)BRIDGE::print(F("\"update_size\":\""), output);
|
||||
else BRIDGE::print(F("Available Size for update: "), output);
|
||||
uint32_t flashsize = ESP.getFlashChipSize();
|
||||
if (flashsize > 1024 * 1024) flashsize = 1024 * 1024;
|
||||
BRIDGE::print(formatBytes(flashsize - ESP.getSketchSize()).c_str(), output);
|
||||
BRIDGE::print(formatBytes(flashsize - ESP.getSketchSize()-info.totalBytes).c_str(), output);
|
||||
if (!plaintext)BRIDGE::print(F("\","), output);
|
||||
else {
|
||||
if ((flashsize - ESP.getSketchSize()) > (flashsize / 2)) BRIDGE::println(F("(Ok)"), output);
|
||||
else BRIDGE::print(F("(Not enough)"), output);
|
||||
if ((flashsize - ESP.getSketchSize()-info.totalBytes) > (flashsize / 2)) BRIDGE::println(F("(Ok)"), output);
|
||||
else BRIDGE::println(F("(Not enough)"), output);
|
||||
}
|
||||
|
||||
if (!plaintext)BRIDGE::print(F("\"spiffs_size\":\""), output);
|
||||
else BRIDGE::print(F("Available Size for SPIFFS: "), output);
|
||||
fs::FSInfo info;
|
||||
SPIFFS.info(info);
|
||||
|
||||
BRIDGE::print(formatBytes(info.totalBytes).c_str(), output);
|
||||
if (!plaintext)BRIDGE::print(F("\","), output);
|
||||
else BRIDGE::print(F("\n"), output);
|
||||
|
@ -186,7 +186,7 @@ extern "C" {
|
||||
#endif
|
||||
#include "wificonf.h"
|
||||
//version and sources location
|
||||
#define FW_VERSION "0.9.101"
|
||||
#define FW_VERSION "0.9.102"
|
||||
#define REPOSITORY "https://github.com/luc-github/ESP3D"
|
||||
|
||||
typedef enum {
|
||||
|
Loading…
x
Reference in New Issue
Block a user