File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ void setupOTA()
327
327
Serial.println (" Start updating " + type);
328
328
329
329
display.clearDisplay ();
330
- display.setTextSize (2 );
330
+ display.setTextSize (1 );
331
331
display.print (" updating..." );
332
332
333
333
display.display ();
@@ -338,16 +338,19 @@ void setupOTA()
338
338
isUpdating = false ;
339
339
})
340
340
.onProgress ([](unsigned int progress, unsigned int total) {
341
- Serial.printf (" Progress: %u%%\r " , (progress / (total / 100 )));
341
+ unsigned int percentValue = progress / (total / 100 );
342
+
343
+ Serial.printf (" Progress: %u%%\r " , percentValue);
342
344
343
345
display.clearDisplay ();
344
346
345
347
display.setCursor (0 , 0 );
346
- display.setTextSize (2 );
348
+ display.setTextSize (1 );
347
349
display.print (" updating..." );
348
350
349
351
display.setCursor (0 , 40 );
350
- display.print (progress);
352
+ display.setTextSize (2 );
353
+ display.print (percentValue);
351
354
display.print (" %" );
352
355
353
356
display.display ();
You can’t perform that action at this time.
0 commit comments