Browse Source

Fix for #201

pull/1/head
daid 12 years ago
parent
commit
87ff61a8a6
  1. 4
      Marlin/ultralcd.pde

4
Marlin/ultralcd.pde

@ -2967,7 +2967,7 @@ char *itostr4(const int &xx)
// convert float to string with +1234.5 format // convert float to string with +1234.5 format
char *ftostr51(const float &x) char *ftostr51(const float &x)
{ {
int xx=x*10; long xx=x*10;
conv[0]=(xx>=0)?'+':'-'; conv[0]=(xx>=0)?'+':'-';
xx=abs(xx); xx=abs(xx);
conv[1]=(xx/10000)%10+'0'; conv[1]=(xx/10000)%10+'0';
@ -2983,7 +2983,7 @@ char *ftostr51(const float &x)
// convert float to string with +123.45 format // convert float to string with +123.45 format
char *ftostr52(const float &x) char *ftostr52(const float &x)
{ {
int xx=x*100; long xx=x*100;
conv[0]=(xx>=0)?'+':'-'; conv[0]=(xx>=0)?'+':'-';
xx=abs(xx); xx=abs(xx);
conv[1]=(xx/10000)%10+'0'; conv[1]=(xx/10000)%10+'0';

Loading…
Cancel
Save