This commit is contained in:
Dmitry Borisenko
2020-12-19 13:51:53 +01:00
parent cab8aff562
commit 5280a8914f
2 changed files with 4 additions and 5 deletions

View File

@@ -1,10 +1,7 @@
#include "FileSystem.h"
#include "Global.h"
// Информация о ФС
void getFSInfo() {
// Информация о ФС
FSInfo buf;
if (getInfo(buf)) {
SerialPrint("I", F("FS"), F("Get FS info completed"));
@@ -17,7 +14,7 @@ void getFSInfo() {
size_t freeBytes = totalBytes - usedBytes;
float freePer = ((float) freeBytes / totalBytes) * 100;
jsonWriteStr(configSetupJson, F("freeBytes"), String(freePer) + "% (" + String(freeBytes) + ")");
jsonWriteStr(configSetupJson, F("freeBytes"), String(freePer) + "% (" + prettyBytes(freeBytes) + ")");
SerialPrint("I", F("FS"), "totalBytes=" + String(totalBytes));
SerialPrint("I", F("FS"), "usedBytes=" + String(usedBytes));

View File

@@ -1,4 +1,5 @@
#include "Utils/WiFiUtils.h"
#include "FileSystem.h"
void routerConnect() {
@@ -145,6 +146,7 @@ void wifiSignalInit() {
ts.add(
SYGNAL, 1000 * 60, [&](void*) {
SerialPrint("I", "System", printMemoryStatus());
getFSInfo();
switch (RSSIquality()) {
case 0:
jsonWriteStr(configSetupJson, F("signal"), F("Уровень WiFi сигнала: <font color='red'>не подключено к роутеру</font>"));