From a2f857c93f062d3586b76f58921f874fa6daec2b Mon Sep 17 00:00:00 2001 From: gn0st1c Date: Thu, 22 Mar 2018 15:47:35 +0300 Subject: [PATCH] Update utils.ino SPIFFS_SUPPORT info. why don't we free some bytes here --- code/espurna/utils.ino | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/code/espurna/utils.ino b/code/espurna/utils.ino index bef49c81..a1baee1d 100644 --- a/code/espurna/utils.ino +++ b/code/espurna/utils.ino @@ -227,24 +227,17 @@ void info() { DEBUG_MSG_P(PSTR("[INIT] Flash size (SDK): %8u bytes / %4d sectors\n"), ESP.getFlashChipSize(), sectors(ESP.getFlashChipSize())); DEBUG_MSG_P(PSTR("[INIT] Firmware size: %8u bytes / %4d sectors\n"), ESP.getSketchSize(), sectors(ESP.getSketchSize())); DEBUG_MSG_P(PSTR("[INIT] OTA size: %8u bytes / %4d sectors\n"), ESP.getFreeSketchSpace(), sectors(ESP.getFreeSketchSpace())); - #if SPIFFS_SUPPORT - FSInfo fs_info; - bool fs = SPIFFS.info(fs_info); - if (fs) { - DEBUG_MSG_P(PSTR("[INIT] SPIFFS size: %8u bytes / %4d sectors\n"), fs_info.totalBytes, sectors(fs_info.totalBytes)); - } - #else - DEBUG_MSG_P(PSTR("[INIT] SPIFFS size: %8u bytes / %4d sectors\n"), 0, 0); - #endif DEBUG_MSG_P(PSTR("[INIT] EEPROM size: %8u bytes / %4d sectors\n"), settingsMaxSize(), sectors(settingsMaxSize())); - DEBUG_MSG_P(PSTR("[INIT] Empty space: %8u bytes / 4 sectors\n"), 4 * SPI_FLASH_SEC_SIZE); + DEBUG_MSG_P(PSTR("[INIT] Empty space: %8u bytes / 4 sectors\n"), 4 * SPI_FLASH_SEC_SIZE); DEBUG_MSG_P(PSTR("\n")); // ------------------------------------------------------------------------- #if SPIFFS_SUPPORT + FSInfo fs_info; + bool fs = SPIFFS.info(fs_info); if (fs) { - DEBUG_MSG_P(PSTR("[INIT] SPIFFS total size: %8u bytes\n"), fs_info.totalBytes); + DEBUG_MSG_P(PSTR("[INIT] SPIFFS total size: %8u bytes / %4d sectors\n"), fs_info.totalBytes, sectors(fs_info.totalBytes)); DEBUG_MSG_P(PSTR("[INIT] used size: %8u bytes\n"), fs_info.usedBytes); DEBUG_MSG_P(PSTR("[INIT] block size: %8u bytes\n"), fs_info.blockSize); DEBUG_MSG_P(PSTR("[INIT] page size: %8u bytes\n"), fs_info.pageSize);