Initialize default units (#11295)

When `INCH_MODE_SUPPORT` is enabled no default unit is set. This fixes it.
This commit is contained in:
Giuliano 2018-07-18 02:37:30 +02:00 committed by Scott Lahteine
parent 71df1f7f57
commit aed1d17a2d

View file

@ -85,7 +85,7 @@ public:
#endif
#if ENABLED(DEBUG_GCODE_PARSER)
void debug();
static void debug();
#endif
// Reset is done before parsing
@ -217,6 +217,9 @@ public:
#if ENABLED(INCH_MODE_SUPPORT)
// Init linear units by constructor
GCodeParser() { set_input_linear_units(LINEARUNIT_MM); }
inline static void set_input_linear_units(const LinearUnit units) {
switch (units) {
case LINEARUNIT_INCH: