Browse Source

Move M82_M83 to cpp

Scott Lahteine 7 years ago
parent
commit
a911215b0e
3 changed files with 7 additions and 12 deletions
  1. 0
    2
      Marlin/src/Marlin.cpp
  2. 3
    8
      Marlin/src/gcode/gcode.cpp
  3. 4
    2
      Marlin/src/gcode/units/M82_M83.cpp

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

@@ -359,8 +359,6 @@ bool pin_is_protected(const int8_t pin) {
359 359
   return false;
360 360
 }
361 361
 
362
-#include "gcode/units/M82_M83.h"
363
-
364 362
 #include "gcode/control/M18_M84.h"
365 363
 
366 364
 #include "gcode/control/M85.h"

+ 3
- 8
Marlin/src/gcode/gcode.cpp View File

@@ -117,8 +117,6 @@ void GcodeSuite::dwell(millis_t time) {
117 117
 // Placeholders for non-migrated codes
118 118
 //
119 119
 extern void gcode_M18_M84();
120
-extern void gcode_M82();
121
-extern void gcode_M83();
122 120
 extern void gcode_M85();
123 121
 extern void gcode_M92();
124 122
 extern void gcode_M100();
@@ -495,12 +493,9 @@ void GcodeSuite::process_next_command() {
495 493
 
496 494
       case 81: M81(); break;      // M81: Turn off Power, including Power Supply, if possible
497 495
 
498
-      case 82: // M82: Set E axis normal mode (same as other axes)
499
-        gcode_M82();
500
-        break;
501
-      case 83: // M83: Set E axis relative mode
502
-        gcode_M83();
503
-        break;
496
+      case 82: M82(); break;      // M82: Set E axis normal mode (same as other axes)
497
+      case 83: M83(); break;      // M83: Set E axis relative mode
498
+
504 499
       case 18: // M18 => M84
505 500
       case 84: // M84: Disable all steppers or set timeout
506 501
         gcode_M18_M84();

Marlin/src/gcode/units/M82_M83.h → Marlin/src/gcode/units/M82_M83.cpp View File

@@ -20,12 +20,14 @@
20 20
  *
21 21
  */
22 22
 
23
+#include "../gcode.h"
24
+
23 25
 /**
24 26
  * M82: Set E codes absolute (default)
25 27
  */
26
-void gcode_M82() { gcode.axis_relative_modes[E_AXIS] = false; }
28
+void GcodeSuite::M82() { axis_relative_modes[E_AXIS] = false; }
27 29
 
28 30
 /**
29 31
  * M83: Set E codes relative while in Absolute Coordinates (G90) mode
30 32
  */
31
-void gcode_M83() { gcode.axis_relative_modes[E_AXIS] = true; }
33
+void GcodeSuite::M83() { axis_relative_modes[E_AXIS] = true; }

Loading…
Cancel
Save