Browse Source

Small optimization for ftostr43

pull/1/head
Scott Lahteine 8 years ago
parent
commit
b98f72b483
  1. 4
      Marlin/ultralcd.cpp

4
Marlin/ultralcd.cpp

@ -2228,11 +2228,11 @@ char* ftostr43(const float& x) {
long xx = x * 1000; long xx = x * 1000;
char *conv_ptr = conv; char *conv_ptr = conv;
if (xx >= 0) { if (xx >= 0) {
*conv_ptr++ = ' '; conv_ptr++;
} }
else { else {
conv[0] = '-';
xx = -xx; xx = -xx;
conv[0] = '-';
} }
conv[1] = (xx / 1000) % 10 + '0'; conv[1] = (xx / 1000) % 10 + '0';
conv[2] = '.'; conv[2] = '.';

Loading…
Cancel
Save