@@ -1371,22 +1371,23 @@ void CONFIG::print_config(tpipe output, bool plaintext)
1371
1371
BRIDGE::print (formatBytes (ESP.getFlashChipSize ()).c_str (), output);
1372
1372
if (!plaintext)BRIDGE::print (F (" \" ," ), output);
1373
1373
else BRIDGE::print (F (" \n " ), output);
1374
- #ifdef ARDUINO_ARCH_ESP8266
1374
+ #ifdef ARDUINO_ARCH_ESP8266
1375
+ fs::FSInfo info;
1376
+ SPIFFS.info (info);
1375
1377
if (!plaintext)BRIDGE::print (F (" \" update_size\" :\" " ), output);
1376
1378
else BRIDGE::print (F (" Available Size for update: " ), output);
1377
1379
uint32_t flashsize = ESP.getFlashChipSize ();
1378
1380
if (flashsize > 1024 * 1024 ) flashsize = 1024 * 1024 ;
1379
- BRIDGE::print (formatBytes (flashsize - ESP.getSketchSize ()).c_str (), output);
1381
+ BRIDGE::print (formatBytes (flashsize - ESP.getSketchSize ()-info. totalBytes ).c_str (), output);
1380
1382
if (!plaintext)BRIDGE::print (F (" \" ," ), output);
1381
1383
else {
1382
- if ((flashsize - ESP.getSketchSize ()) > (flashsize / 2 )) BRIDGE::println (F (" (Ok)" ), output);
1383
- else BRIDGE::print (F (" (Not enough)" ), output);
1384
+ if ((flashsize - ESP.getSketchSize ()-info. totalBytes ) > (flashsize / 2 )) BRIDGE::println (F (" (Ok)" ), output);
1385
+ else BRIDGE::println (F (" (Not enough)" ), output);
1384
1386
}
1385
1387
1386
1388
if (!plaintext)BRIDGE::print (F (" \" spiffs_size\" :\" " ), output);
1387
1389
else BRIDGE::print (F (" Available Size for SPIFFS: " ), output);
1388
- fs::FSInfo info;
1389
- SPIFFS.info (info);
1390
+
1390
1391
BRIDGE::print (formatBytes (info.totalBytes ).c_str (), output);
1391
1392
if (!plaintext)BRIDGE::print (F (" \" ," ), output);
1392
1393
else BRIDGE::print (F (" \n " ), output);
0 commit comments