Float maths updates for 2.0.x parity (#11213)

Co-Authored-By: ejtagle <ejtagle@hotmail.com>
This commit is contained in:
Scott Lahteine
2018-07-06 21:44:33 -05:00
committed by GitHub
parent fc9f4ce2c0
commit ccb225f43a
25 changed files with 317 additions and 353 deletions

View File

@@ -39,6 +39,8 @@
#include "serial.h"
#endif
#define strtof strtod
/**
* GCode parser
*
@@ -194,15 +196,15 @@ public:
if (c == '\0' || c == ' ') break;
if (c == 'E' || c == 'e') {
*e = '\0';
const float ret = strtod(value_ptr, NULL);
const float ret = strtof(value_ptr, NULL);
*e = c;
return ret;
}
++e;
}
return strtod(value_ptr, NULL);
return strtof(value_ptr, NULL);
}
return 0.0;
return 0;
}
// Code value as a long or ulong