diff --git a/lib/hal/HalStorage.cpp b/lib/hal/HalStorage.cpp index 825018e1..82b6e03c 100644 --- a/lib/hal/HalStorage.cpp +++ b/lib/hal/HalStorage.cpp @@ -60,12 +60,12 @@ uint64_t HalStorage::sdTotalBytes() const { return SDCard.sdTotalBytes(); } -uint64_t HalStorage::sdUsedBytes() const { +uint64_t HalStorage::sdUsedBytes() { StorageLock lock; return SDCard.sdUsedBytes(); } -uint64_t HalStorage::sdFreeBytes() const { +uint64_t HalStorage::sdFreeBytes() { uint64_t total = sdTotalBytes(); uint64_t used = sdUsedBytes(); if (total <= used) return 0; diff --git a/lib/hal/HalStorage.h b/lib/hal/HalStorage.h index 65e0a071..d9bee706 100644 --- a/lib/hal/HalStorage.h +++ b/lib/hal/HalStorage.h @@ -46,8 +46,8 @@ class HalStorage { bool removeDir(const char* path); uint64_t sdTotalBytes() const; - uint64_t sdUsedBytes() const; - uint64_t sdFreeBytes() const; + uint64_t sdUsedBytes(); + uint64_t sdFreeBytes(); static HalStorage& getInstance() { return instance; }