Add refresh if data is not consistent

This commit is contained in:
Luc 2020-12-10 18:16:01 +01:00
parent b618710db4
commit e3545c8a5e
2 changed files with 6 additions and 0 deletions

View File

@ -154,6 +154,9 @@ uint64_t ESP_SD::totalBytes()
uint64_t ESP_SD::usedBytes()
{
if(freeBytes() >totalBytes() ) {
_sizechanged = true;
}
return totalBytes() - freeBytes();
}

View File

@ -144,6 +144,9 @@ uint64_t ESP_SD::totalBytes()
uint64_t ESP_SD::usedBytes()
{
if(freeBytes() >totalBytes() ) {
_sizechanged = true;
}
return totalBytes() - freeBytes();
}