Fix build on some platforms

This commit is contained in:
Volodymyr Shymanskyy
2016-12-07 16:02:10 +02:00
parent 622fbba0b1
commit 9031ebd1a5

View File

@@ -50,7 +50,9 @@ void setup() {
void printPercent(uint32_t readLength, uint32_t contentLength) { void printPercent(uint32_t readLength, uint32_t contentLength) {
// If we know the total length // If we know the total length
if (contentLength != -1) { if (contentLength != -1) {
Serial.print(String("\r ") + ((100.0 * readLength) / contentLength) + "%"); Serial.print(F("\r "));
Serial.print((100.0 * readLength) / contentLength);
Serial.println('%');
} else { } else {
Serial.println(readLength); Serial.println(readLength);
} }