Move G20_G21 to cpp

This commit is contained in:
Scott Lahteine 2017-09-15 23:18:05 -05:00
parent 9b4aa5ea8b
commit a1ee1628e5
3 changed files with 12 additions and 10 deletions

View file

@ -357,10 +357,6 @@ void suicide() {
***************** GCode Handlers ***************** ***************** GCode Handlers *****************
**************************************************/ **************************************************/
#if ENABLED(INCH_MODE_SUPPORT)
#include "gcode/units/G20_G21.h"
#endif
#if ENABLED(NOZZLE_PARK_FEATURE) #if ENABLED(NOZZLE_PARK_FEATURE)
#include "gcode/feature/pause/G27.h" #include "gcode/feature/pause/G27.h"
#endif #endif

View file

@ -116,8 +116,6 @@ void GcodeSuite::dwell(millis_t time) {
// //
// Placeholders for non-migrated codes // Placeholders for non-migrated codes
// //
extern void gcode_G20();
extern void gcode_G21();
extern void gcode_G27(); extern void gcode_G27();
extern void gcode_G30(); extern void gcode_G30();
extern void gcode_G31(); extern void gcode_G31();
@ -331,11 +329,11 @@ void GcodeSuite::process_next_command() {
#if ENABLED(INCH_MODE_SUPPORT) #if ENABLED(INCH_MODE_SUPPORT)
case 20: // G20: Inch Mode case 20: // G20: Inch Mode
gcode_G20(); G20();
break; break;
case 21: // G21: MM Mode case 21: // G21: MM Mode
gcode_G21(); G21();
break; break;
#endif // INCH_MODE_SUPPORT #endif // INCH_MODE_SUPPORT

View file

@ -20,12 +20,20 @@
* *
*/ */
#include "../../inc/MarlinConfig.h"
#if ENABLED(INCH_MODE_SUPPORT)
#include "../gcode.h"
/** /**
* G20: Set input mode to inches * 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 * 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