mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
read LittleFS.totalBytes only once on start
This commit is contained in:
@@ -373,6 +373,7 @@ void System::start() {
|
||||
if (low_clock_) {
|
||||
setCpuFrequencyMhz(160);
|
||||
}
|
||||
fstotal_ = LittleFS.totalBytes(); // read only once, it takes 500 ms to read
|
||||
#endif
|
||||
|
||||
EMSESP::esp8266React.getNetworkSettingsService()->read([&](NetworkSettings & networkSettings) {
|
||||
@@ -784,7 +785,7 @@ void System::show_system(uuid::console::Shell & shell) {
|
||||
shell.printfln(F(" SDK version: %s"), ESP.getSdkVersion());
|
||||
shell.printfln(F(" CPU frequency: %lu MHz"), ESP.getCpuFreqMHz());
|
||||
shell.printfln(F(" Free heap: %lu bytes"), (uint32_t)ESP.getFreeHeap());
|
||||
shell.printfln(F(" FS used/total: %lu/%lu (bytes)"), LittleFS.usedBytes(), LittleFS.totalBytes());
|
||||
shell.printfln(F(" FS used/total: %lu/%lu (bytes)"), LittleFS.usedBytes(), FStotal());
|
||||
shell.println();
|
||||
|
||||
shell.println("Network:");
|
||||
|
||||
Reference in New Issue
Block a user