Browse Source

Patch a display issue with LCD_DECIMAL_SMALL_XY

The `ftostr4sign` function got munged by the `WITHIN` patch
Scott Lahteine 7 years ago
parent
commit
e48a52a530
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/utility.cpp

+ 1
- 1
Marlin/utility.cpp View File

134
     // Convert float to rj string with 1234, _123, -123, _-12, 12.3, _1.2, or -1.2 format
134
     // Convert float to rj string with 1234, _123, -123, _-12, 12.3, _1.2, or -1.2 format
135
     char *ftostr4sign(const float& fx) {
135
     char *ftostr4sign(const float& fx) {
136
       int x = fx * 10;
136
       int x = fx * 10;
137
-      if (WITHIN(x, -99, 999)) return itostr4sign((int)fx);
137
+      if (!WITHIN(x, -99, 999)) return itostr4sign((int)fx);
138
       int xx = abs(x);
138
       int xx = abs(x);
139
       conv[0] = x < 0 ? '-' : (xx >= 100 ? DIGIMOD(xx, 100) : ' ');
139
       conv[0] = x < 0 ? '-' : (xx >= 100 ? DIGIMOD(xx, 100) : ' ');
140
       conv[1] = DIGIMOD(xx, 10);
140
       conv[1] = DIGIMOD(xx, 10);

Loading…
Cancel
Save