|
@@ -58,11 +58,11 @@ void safe_delay(millis_t ms) {
|
58
|
58
|
#define MINUSOR(n, alt) (n >= 0 ? (alt) : (n = -n, '-'))
|
59
|
59
|
|
60
|
60
|
// Convert a full-range unsigned 8bit int to a percentage
|
61
|
|
- char* ui8tostr_percent(const uint8_t i) {
|
62
|
|
- const uint8_t percent = ui8_to_percent(i);
|
63
|
|
- conv[3] = RJDIGIT(percent, 100);
|
64
|
|
- conv[4] = RJDIGIT(percent, 10);
|
65
|
|
- conv[5] = DIGIMOD(percent, 1);
|
|
61
|
+ char* ui8tostr4pct(const uint8_t i) {
|
|
62
|
+ const uint8_t n = ui8_to_percent(i);
|
|
63
|
+ conv[3] = RJDIGIT(n, 100);
|
|
64
|
+ conv[4] = RJDIGIT(n, 10);
|
|
65
|
+ conv[5] = DIGIMOD(n, 1);
|
66
|
66
|
conv[6] = '%';
|
67
|
67
|
return &conv[3];
|
68
|
68
|
}
|