Patch to make Z look more like X and Y on UltraLCD

This commit is contained in:
Scott Lahteine
2014-12-06 20:59:06 -08:00
parent 3d1da45f3e
commit a2109cb492
3 changed files with 16 additions and 2 deletions

View File

@ -1496,7 +1496,20 @@ char *ftostr12ns(const float &x)
return conv;
}
// Convert int to lj string with +123.0 format
// convert float to space-padded string with -_23.4_ format
char *ftostr32np(const float &x) {
char *c = ftostr32(x);
if (c[0] == '0' || c[0] == '-') {
if (c[0] == '0') c[0] = ' ';
if (c[1] == '0') c[1] = ' ';
}
if (c[5] == '0') {
c[5] = ' ';
if (c[4] == '0') c[4] = c[3] = ' ';
}
return c;
}
char *itostr31(const int &xx)
{
conv[0]=(xx>=0)?'+':'-';