From cab8aff5622d542b8bddc3f50674e8f4453fcf42 Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <49808844+DmitryBorisenko33@users.noreply.github.com> Date: Sat, 19 Dec 2020 13:39:04 +0100 Subject: [PATCH] fixed var type --- src/FileSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FileSystem.cpp b/src/FileSystem.cpp index c4559685..d33c8857 100644 --- a/src/FileSystem.cpp +++ b/src/FileSystem.cpp @@ -15,7 +15,7 @@ void getFSInfo() { size_t maxPathLength = buf.maxPathLength; // лимит на пути и имена файлов size_t freeBytes = totalBytes - usedBytes; - float freePer = freeBytes * 100 / totalBytes; + float freePer = ((float) freeBytes / totalBytes) * 100; jsonWriteStr(configSetupJson, F("freeBytes"), String(freePer) + "% (" + String(freeBytes) + ")");