Move G20_G21 to cpp
This commit is contained in:
parent
9b4aa5ea8b
commit
a1ee1628e5
@ -357,10 +357,6 @@ void suicide() {
|
||||
***************** GCode Handlers *****************
|
||||
**************************************************/
|
||||
|
||||
#if ENABLED(INCH_MODE_SUPPORT)
|
||||
#include "gcode/units/G20_G21.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
#include "gcode/feature/pause/G27.h"
|
||||
#endif
|
||||
|
@ -116,8 +116,6 @@ void GcodeSuite::dwell(millis_t time) {
|
||||
//
|
||||
// Placeholders for non-migrated codes
|
||||
//
|
||||
extern void gcode_G20();
|
||||
extern void gcode_G21();
|
||||
extern void gcode_G27();
|
||||
extern void gcode_G30();
|
||||
extern void gcode_G31();
|
||||
@ -331,11 +329,11 @@ void GcodeSuite::process_next_command() {
|
||||
|
||||
#if ENABLED(INCH_MODE_SUPPORT)
|
||||
case 20: // G20: Inch Mode
|
||||
gcode_G20();
|
||||
G20();
|
||||
break;
|
||||
|
||||
case 21: // G21: MM Mode
|
||||
gcode_G21();
|
||||
G21();
|
||||
break;
|
||||
#endif // INCH_MODE_SUPPORT
|
||||
|
||||
|
@ -20,12 +20,20 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(INCH_MODE_SUPPORT)
|
||||
|
||||
#include "../gcode.h"
|
||||
|
||||
/**
|
||||
* G20: Set input mode to inches
|
||||
*/
|
||||
void gcode_G20() { parser.set_input_linear_units(LINEARUNIT_INCH); }
|
||||
void GcodeSuite::G20() { parser.set_input_linear_units(LINEARUNIT_INCH); }
|
||||
|
||||
/**
|
||||
* G21: Set input mode to millimeters
|
||||
*/
|
||||
void gcode_G21() { parser.set_input_linear_units(LINEARUNIT_MM); }
|
||||
void GcodeSuite::G21() { parser.set_input_linear_units(LINEARUNIT_MM); }
|
||||
|
||||
#endif // INCH_MODE_SUPPORT
|
Loading…
Reference in New Issue
Block a user