Move M211 to cpp

This commit is contained in:
Scott Lahteine 2017-09-17 02:36:22 -05:00
parent 6c7bad8bc3
commit 234de3547c
3 changed files with 5 additions and 7 deletions

View File

@ -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"

View File

@ -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();

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_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