Move G12 to cpp

This commit is contained in:
Scott Lahteine 2017-09-15 22:13:05 -05:00
parent 56f4a43535
commit 94d9def81c
3 changed files with 14 additions and 7 deletions

View File

@ -361,10 +361,6 @@ void suicide() {
***************** GCode Handlers ***************** ***************** GCode Handlers *****************
**************************************************/ **************************************************/
#if ENABLED(NOZZLE_CLEAN_FEATURE)
#include "gcode/feature/clean/G12.h"
#endif
#if ENABLED(CNC_WORKSPACE_PLANES) #if ENABLED(CNC_WORKSPACE_PLANES)
#include "gcode/geometry/G17-G19.h" #include "gcode/geometry/G17-G19.h"
#endif #endif

View File

@ -20,10 +20,20 @@
* *
*/ */
#include "../../../inc/MarlinConfig.h"
#if ENABLED(NOZZLE_CLEAN_FEATURE)
#include "../../../libs/nozzle.h"
#include "../../gcode.h"
#include "../../parser.h"
#include "../../../module/motion.h"
/** /**
* G12: Clean the nozzle * G12: Clean the nozzle
*/ */
void gcode_G12() { void GcodeSuite::G12() {
// Don't allow nozzle cleaning without homing first // Don't allow nozzle cleaning without homing first
if (axis_unhomed_error()) return; if (axis_unhomed_error()) return;
@ -34,3 +44,5 @@ void gcode_G12() {
Nozzle::clean(pattern, strokes, radius, objects); Nozzle::clean(pattern, strokes, radius, objects);
} }
#endif // NOZZLE_CLEAN_FEATURE

View File

@ -112,7 +112,6 @@ void GcodeSuite::dwell(millis_t time) {
// //
// Placeholders for non-migrated codes // Placeholders for non-migrated codes
// //
extern void gcode_G12();
extern void gcode_G17(); extern void gcode_G17();
extern void gcode_G18(); extern void gcode_G18();
extern void gcode_G19(); extern void gcode_G19();
@ -313,7 +312,7 @@ void GcodeSuite::process_next_command() {
#if ENABLED(NOZZLE_CLEAN_FEATURE) #if ENABLED(NOZZLE_CLEAN_FEATURE)
case 12: case 12:
gcode_G12(); // G12: Nozzle Clean G12(); // G12: Nozzle Clean
break; break;
#endif // NOZZLE_CLEAN_FEATURE #endif // NOZZLE_CLEAN_FEATURE