From 234de3547c53fd9e4f35f8cfd61ded0a555256a2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 Sep 2017 02:36:22 -0500 Subject: [PATCH] Move M211 to cpp --- Marlin/src/Marlin.cpp | 2 -- Marlin/src/gcode/control/{M211.h => M211.cpp} | 5 ++++- Marlin/src/gcode/gcode.cpp | 5 +---- 3 files changed, 5 insertions(+), 7 deletions(-) rename Marlin/src/gcode/control/{M211.h => M211.cpp} (95%) diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index b3f9cf243..f9f94dccc 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -355,8 +355,6 @@ bool pin_is_protected(const int8_t pin) { return false; } -#include "gcode/control/M211.h" - #include "gcode/config/M220.h" #include "gcode/control/M226.h" diff --git a/Marlin/src/gcode/control/M211.h b/Marlin/src/gcode/control/M211.cpp similarity index 95% rename from Marlin/src/gcode/control/M211.h rename to Marlin/src/gcode/control/M211.cpp index 2c4d90de2..3b4498a18 100644 --- a/Marlin/src/gcode/control/M211.h +++ b/Marlin/src/gcode/control/M211.cpp @@ -20,12 +20,15 @@ * */ +#include "../gcode.h" +#include "../../module/motion.h" + /** * M211: Enable, Disable, and/or Report software endstops * * Usage: M211 S1 to enable, M211 S0 to disable, M211 alone for report */ -void gcode_M211() { +void GcodeSuite::M211() { SERIAL_ECHO_START(); #if HAS_SOFTWARE_ENDSTOPS if (parser.seen('S')) soft_endstops_enabled = parser.value_bool(); diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 30433e131..e037f6bf1 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -119,7 +119,6 @@ void GcodeSuite::dwell(millis_t time) { extern void gcode_M163(); extern void gcode_M164(); extern void gcode_M165(); -extern void gcode_M211(); extern void gcode_M220(); extern void gcode_M226(); extern void gcode_M240(); @@ -552,9 +551,7 @@ void GcodeSuite::process_next_command() { case 209: if (MIN_AUTORETRACT <= MAX_AUTORETRACT) M209(); break; // M209: Turn Automatic Retract Detection on/off #endif - case 211: // M211: Enable, Disable, and/or Report software endstops - gcode_M211(); - break; + case 211: M211(); break; // M211: Enable, Disable, and/or Report software endstops #if HOTENDS > 1 case 218: // M218: Set a tool offset