Option to show babysteps total since G28 (#13580)

This commit is contained in:
Roxy-3D
2019-04-06 18:04:34 -05:00
committed by Scott Lahteine
parent 3221658a78
commit 9cee81d47e
91 changed files with 443 additions and 123 deletions

View File

@ -214,6 +214,19 @@ void safe_delay(millis_t ms) {
return &conv[1];
}
// Convert signed float to string (5 digit) with -1.2345 / _0.0000 / +1.2345 format
char* ftostr54sign(const float &f, char plus/*=' '*/) {
long i = (f * 100000 + (f < 0 ? -5: 5)) / 10;
conv[0] = i ? MINUSOR(i, plus) : ' ';
conv[1] = DIGIMOD(i, 10000);
conv[2] = '.';
conv[3] = DIGIMOD(i, 1000);
conv[4] = DIGIMOD(i, 100);
conv[5] = DIGIMOD(i, 10);
conv[6] = DIGIMOD(i, 1);
return &conv[0];
}
// Convert unsigned float to rj string with 12345 format
char* ftostr5rj(const float &f) {
const long i = ((f < 0 ? -f : f) * 10 + 5) / 10;

View File

@ -91,6 +91,9 @@ inline void serial_delay(const millis_t ms) {
// Convert signed float to string (6 digit) with -1.234 / _0.000 / +1.234 format
char* ftostr43sign(const float &x, char plus=' ');
// Convert signed float to string (5 digit) with -1.2345 / _0.0000 / +1.2345 format
char* ftostr54sign(const float &x, char plus=' ');
// Convert unsigned float to rj string with 12345 format
char* ftostr5rj(const float &x);