Skip to content

Commit

Permalink
Update Demo.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushsharma82 authored Sep 2, 2023
1 parent ae81c9c commit 9ea0d8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/Demo/Demo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void onOTAProgress(size_t current, size_t final) {
// Log every 1 second
if (millis() - ota_progress_millis > 1000) {
ota_progress_millis = millis();
Serial.printf("OTA update progress: %u%%\r", (current / (final / 100)));
Serial.printf("OTA update progress: %u%%\r", (final > 0 && current > 0) ? (current / (final / 100)) : 0);
}
}

Expand Down

0 comments on commit 9ea0d8c

Please sign in to comment.