Browse Source

Use the percent util func in the string func. (#13523)

Marcio Teixeira 5 years ago
parent
commit
d992dfe7d5
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/src/core/utility.cpp

+ 1
- 1
Marlin/src/core/utility.cpp View File

@@ -59,7 +59,7 @@ void safe_delay(millis_t ms) {
59 59
 
60 60
   // Convert a full-range unsigned 8bit int to a percentage
61 61
   char* ui8tostr_percent(const uint8_t i) {
62
-    const uint16_t percent = 100 * i / 255;
62
+    const uint8_t percent = ui8_to_percent(i);
63 63
     conv[3] = RJDIGIT(percent, 100);
64 64
     conv[4] = RJDIGIT(percent, 10);
65 65
     conv[5] = DIGIMOD(percent, 1);

Loading…
Cancel
Save