1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Make progress print on the same line.

This commit is contained in:
Stavros Korokithakis 2015-12-01 05:26:05 +02:00
parent 6186383ea4
commit 1da7f91a08

View File

@ -33,7 +33,7 @@ void setup() {
Serial.println("End"); Serial.println("End");
}); });
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
Serial.printf("Progress: %u%%\n", (progress / (total / 100))); Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
}); });
ArduinoOTA.onError([](ota_error_t error) { ArduinoOTA.onError([](ota_error_t error) {
Serial.printf("Error[%u]: ", error); Serial.printf("Error[%u]: ", error);