Initialize default units (#11295)
When `INCH_MODE_SUPPORT` is enabled no default unit is set. This fixes it.
This commit is contained in:
parent
71df1f7f57
commit
aed1d17a2d
1 changed files with 4 additions and 1 deletions
|
@ -85,7 +85,7 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||||
void debug();
|
static void debug();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Reset is done before parsing
|
// Reset is done before parsing
|
||||||
|
@ -217,6 +217,9 @@ public:
|
||||||
|
|
||||||
#if ENABLED(INCH_MODE_SUPPORT)
|
#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) {
|
inline static void set_input_linear_units(const LinearUnit units) {
|
||||||
switch (units) {
|
switch (units) {
|
||||||
case LINEARUNIT_INCH:
|
case LINEARUNIT_INCH:
|
||||||
|
|
Reference in a new issue