Move M220 to cpp

This commit is contained in:
Scott Lahteine 2017-09-17 02:39:44 -05:00
parent 234de3547c
commit 0e319104c2
3 changed files with 9 additions and 8 deletions

View File

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

View File

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

View File

@ -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_M220();
extern void gcode_M226();
extern void gcode_M240();
extern void gcode_M250();
@ -559,9 +558,7 @@ void GcodeSuite::process_next_command() {
break;
#endif
case 220: // M220: Set Feedrate Percentage: S<percent> ("FR" on your LCD)
gcode_M220();
break;
case 220: M220(); break; // M220: Set Feedrate Percentage: S<percent> ("FR" on your LCD)
case 221: // M221: Set Flow Percentage
M221();