Browse Source

Move M220 to cpp

pull/1/head
Scott Lahteine 7 years ago
parent
commit
0e319104c2
  1. 2
      Marlin/src/Marlin.cpp
  2. 10
      Marlin/src/gcode/config/M220.cpp
  3. 5
      Marlin/src/gcode/gcode.cpp

2
Marlin/src/Marlin.cpp

@ -355,8 +355,6 @@ bool pin_is_protected(const int8_t pin) {
return false; return false;
} }
#include "gcode/config/M220.h"
#include "gcode/control/M226.h" #include "gcode/control/M226.h"
#if ENABLED(EXPERIMENTAL_I2CBUS) #if ENABLED(EXPERIMENTAL_I2CBUS)

10
Marlin/src/gcode/config/M220.h → Marlin/src/gcode/config/M220.cpp

@ -20,9 +20,15 @@
* *
*/ */
#include "../gcode.h"
#include "../../module/motion.h"
/** /**
* M220: Set speed percentage factor, aka "Feed Rate" (M220 S95) * M220: Set speed percentage factor, aka "Feed Rate" (M220 S95)
*/ */
void gcode_M220() { void GcodeSuite::M220() {
if (parser.seenval('S')) feedrate_percentage = parser.value_int();
if (parser.seenval('S'))
feedrate_percentage = parser.value_int();
} }

5
Marlin/src/gcode/gcode.cpp

@ -119,7 +119,6 @@ void GcodeSuite::dwell(millis_t time) {
extern void gcode_M163(); extern void gcode_M163();
extern void gcode_M164(); extern void gcode_M164();
extern void gcode_M165(); extern void gcode_M165();
extern void gcode_M220();
extern void gcode_M226(); extern void gcode_M226();
extern void gcode_M240(); extern void gcode_M240();
extern void gcode_M250(); extern void gcode_M250();
@ -559,9 +558,7 @@ void GcodeSuite::process_next_command() {
break; break;
#endif #endif
case 220: // M220: Set Feedrate Percentage: S<percent> ("FR" on your LCD) case 220: M220(); break; // M220: Set Feedrate Percentage: S<percent> ("FR" on your LCD)
gcode_M220();
break;
case 221: // M221: Set Flow Percentage case 221: // M221: Set Flow Percentage
M221(); M221();

Loading…
Cancel
Save