mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
Missing the FILE_SIZE_DIVIDER for gigabits - This results in the number
being printed with the decimal point in the wrong place.
This commit is contained in:
parent
8fc9ec7e17
commit
ca6d521a0a
@ -212,6 +212,7 @@ int Parser::format_bytes(size_t filesize, char* buf, size_t len)
|
||||
return snprintf_P(buf, len, PSTR("%d" D_DECIMAL_POINT "%02d " D_FILE_SIZE_MEGABYTES), filesize / 100,
|
||||
filesize % 100);
|
||||
|
||||
filesize = filesize / D_FILE_SIZE_DIVIDER; // multiply by 100 for 2 decimal place
|
||||
return snprintf_P(buf, len, PSTR("%d" D_DECIMAL_POINT "%02d " D_FILE_SIZE_GIGABYTES), filesize / 100,
|
||||
filesize % 100);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user