From 5e63efc1d9510ea896089b9a55c54878945a73cd Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 Sep 2017 01:33:25 -0500 Subject: [PATCH] Move M201 to cpp --- Marlin/src/Marlin.cpp | 2 -- Marlin/src/gcode/config/{M201.h => M201.cpp} | 5 ++++- Marlin/src/gcode/gcode.cpp | 7 +++---- 3 files changed, 7 insertions(+), 7 deletions(-) rename Marlin/src/gcode/config/{M201.h => M201.cpp} (94%) diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 976ae21da2..5db1348b1d 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/config/M201.h" - #if 0 // Not used for Sprinter/grbl gen6 #include "gcode/config/M202.h" #endif diff --git a/Marlin/src/gcode/config/M201.h b/Marlin/src/gcode/config/M201.cpp similarity index 94% rename from Marlin/src/gcode/config/M201.h rename to Marlin/src/gcode/config/M201.cpp index 24743f6dfb..d6740499aa 100644 --- a/Marlin/src/gcode/config/M201.h +++ b/Marlin/src/gcode/config/M201.cpp @@ -20,12 +20,15 @@ * */ +#include "../gcode.h" +#include "../../module/planner.h" + /** * M201: Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000) * * With multiple extruders use T to specify which one. */ -void gcode_M201() { +void GcodeSuite::M201() { GET_TARGET_EXTRUDER(); diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index c6fddf2580..b1c36da3d4 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_M201(); extern void gcode_M203(); extern void gcode_M204(); extern void gcode_M205(); @@ -530,9 +529,9 @@ void GcodeSuite::process_next_command() { case 200: // M200: Set filament diameter, E to cubic units M200(); break; - case 201: // M201: Set max acceleration for print moves (units/s^2) - gcode_M201(); - break; + + case 201: M201(); break; // M201: Set max acceleration for print moves (units/s^2) + #if 0 // Not used for Sprinter/grbl gen6 case 202: // M202 gcode_M202();