Browse Source

Move M211 to cpp

Scott Lahteine 6 years ago
parent
commit
234de3547c
3 changed files with 5 additions and 7 deletions
  1. 0
    2
      Marlin/src/Marlin.cpp
  2. 4
    1
      Marlin/src/gcode/control/M211.cpp
  3. 1
    4
      Marlin/src/gcode/gcode.cpp

+ 0
- 2
Marlin/src/Marlin.cpp View File

@@ -355,8 +355,6 @@ bool pin_is_protected(const int8_t pin) {
355 355
   return false;
356 356
 }
357 357
 
358
-#include "gcode/control/M211.h"
359
-
360 358
 #include "gcode/config/M220.h"
361 359
 
362 360
 #include "gcode/control/M226.h"

Marlin/src/gcode/control/M211.h → Marlin/src/gcode/control/M211.cpp View File

@@ -20,12 +20,15 @@
20 20
  *
21 21
  */
22 22
 
23
+#include "../gcode.h"
24
+#include "../../module/motion.h"
25
+
23 26
 /**
24 27
  * M211: Enable, Disable, and/or Report software endstops
25 28
  *
26 29
  * Usage: M211 S1 to enable, M211 S0 to disable, M211 alone for report
27 30
  */
28
-void gcode_M211() {
31
+void GcodeSuite::M211() {
29 32
   SERIAL_ECHO_START();
30 33
   #if HAS_SOFTWARE_ENDSTOPS
31 34
     if (parser.seen('S')) soft_endstops_enabled = parser.value_bool();

+ 1
- 4
Marlin/src/gcode/gcode.cpp View File

@@ -119,7 +119,6 @@ void GcodeSuite::dwell(millis_t time) {
119 119
 extern void gcode_M163();
120 120
 extern void gcode_M164();
121 121
 extern void gcode_M165();
122
-extern void gcode_M211();
123 122
 extern void gcode_M220();
124 123
 extern void gcode_M226();
125 124
 extern void gcode_M240();
@@ -552,9 +551,7 @@ void GcodeSuite::process_next_command() {
552 551
         case 209: if (MIN_AUTORETRACT <= MAX_AUTORETRACT) M209(); break;  // M209: Turn Automatic Retract Detection on/off
553 552
       #endif
554 553
 
555
-      case 211: // M211: Enable, Disable, and/or Report software endstops
556
-        gcode_M211();
557
-        break;
554
+      case 211: M211(); break;    // M211: Enable, Disable, and/or Report software endstops
558 555
 
559 556
       #if HOTENDS > 1
560 557
         case 218: // M218: Set a tool offset

Loading…
Cancel
Save