From adca4a9b791d9100261b3c3f73efb4cd2dd4a0b8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 16 Sep 2017 01:14:21 -0500 Subject: [PATCH] Move M17 to cpp --- Marlin/src/Marlin.cpp | 2 -- Marlin/src/gcode/control/{M17.h => M17.cpp} | 6 +++++- Marlin/src/gcode/gcode.cpp | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) rename Marlin/src/gcode/control/{M17.h => M17.cpp} (90%) diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 2493e3fdf..3beaecf89 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -357,8 +357,6 @@ void suicide() { ***************** GCode Handlers ***************** **************************************************/ -#include "gcode/control/M17.h" - #if ENABLED(ADVANCED_PAUSE_FEATURE) // For M125, M600, M24 #include "gcode/feature/pause/common.h" diff --git a/Marlin/src/gcode/control/M17.h b/Marlin/src/gcode/control/M17.cpp similarity index 90% rename from Marlin/src/gcode/control/M17.h rename to Marlin/src/gcode/control/M17.cpp index 7ed3d4862..1a089794f 100644 --- a/Marlin/src/gcode/control/M17.h +++ b/Marlin/src/gcode/control/M17.cpp @@ -20,10 +20,14 @@ * */ +#include "../gcode.h" +#include "../../lcd/ultralcd.h" +#include "../../Marlin.h" + /** * M17: Enable power on all stepper motors */ -void gcode_M17() { +void GcodeSuite::M17() { LCD_MESSAGEPGM(MSG_NO_MOVE); enable_all_steppers(); } diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index e69c9fce6..99bac95ec 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -116,7 +116,6 @@ void GcodeSuite::dwell(millis_t time) { // // Placeholders for non-migrated codes // -extern void gcode_M17(); extern void gcode_M18_M84(); extern void gcode_M20(); extern void gcode_M21(); @@ -422,7 +421,7 @@ void GcodeSuite::process_next_command() { #endif case 17: // M17: Enable all stepper motors - gcode_M17(); + M17(); break; #if ENABLED(SDSUPPORT)