Skip to content

Commit c3d4042

Browse files
committed
Merge pull request #1122 from skorokithakis/patch-1
Make progress print on the same line.
2 parents 6186383 + c2c7cc3 commit c3d4042

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/ArduinoOTA/examples/BasicOTA/BasicOTA.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ void setup() {
3030
Serial.println("Start");
3131
});
3232
ArduinoOTA.onEnd([]() {
33-
Serial.println("End");
33+
Serial.println("\nEnd");
3434
});
3535
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
36-
Serial.printf("Progress: %u%%\n", (progress / (total / 100)));
36+
Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
3737
});
3838
ArduinoOTA.onError([](ota_error_t error) {
3939
Serial.printf("Error[%u]: ", error);

0 commit comments

Comments
 (0)