Browse Source

Move G12 to cpp

pull/1/head
Scott Lahteine 7 years ago
parent
commit
94d9def81c
  1. 4
      Marlin/src/Marlin.cpp
  2. 14
      Marlin/src/gcode/feature/clean/G12.cpp
  3. 3
      Marlin/src/gcode/gcode.cpp

4
Marlin/src/Marlin.cpp

@ -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

14
Marlin/src/gcode/feature/clean/G12.h → Marlin/src/gcode/feature/clean/G12.cpp

@ -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

3
Marlin/src/gcode/gcode.cpp

@ -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

Loading…
Cancel
Save