Browse Source

Move M92 to cpp

Scott Lahteine 7 years ago
parent
commit
beb346e49f
3 changed files with 6 additions and 7 deletions
  1. 0
    2
      Marlin/src/Marlin.cpp
  2. 4
    1
      Marlin/src/gcode/config/M92.cpp
  3. 2
    4
      Marlin/src/gcode/gcode.cpp

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

359
   return false;
359
   return false;
360
 }
360
 }
361
 
361
 
362
-#include "gcode/config/M92.h"
363
-
364
 #if ENABLED(M100_FREE_MEMORY_WATCHER)
362
 #if ENABLED(M100_FREE_MEMORY_WATCHER)
365
   #include "gcode/calibrate/M100.h"
363
   #include "gcode/calibrate/M100.h"
366
 #endif
364
 #endif

Marlin/src/gcode/config/M92.h → Marlin/src/gcode/config/M92.cpp View File

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
+#include "../gcode.h"
24
+#include "../../module/planner.h"
25
+
23
 /**
26
 /**
24
  * M92: Set axis steps-per-unit for one or more axes, X, Y, Z, and E.
27
  * M92: Set axis steps-per-unit for one or more axes, X, Y, Z, and E.
25
  *      (Follows the same syntax as G92)
28
  *      (Follows the same syntax as G92)
26
  *
29
  *
27
  *      With multiple extruders use T to specify which one.
30
  *      With multiple extruders use T to specify which one.
28
  */
31
  */
29
-void gcode_M92() {
32
+void GcodeSuite::M92() {
30
 
33
 
31
   GET_TARGET_EXTRUDER();
34
   GET_TARGET_EXTRUDER();
32
 
35
 

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

116
 //
116
 //
117
 // Placeholders for non-migrated codes
117
 // Placeholders for non-migrated codes
118
 //
118
 //
119
-extern void gcode_M92();
120
 extern void gcode_M100();
119
 extern void gcode_M100();
121
 extern void gcode_M114();
120
 extern void gcode_M114();
122
 extern void gcode_M115();
121
 extern void gcode_M115();
498
       case 84: M18_M84(); break;  // M84: Disable all steppers or set timeout
497
       case 84: M18_M84(); break;  // M84: Disable all steppers or set timeout
499
       case 85: M85(); break;      // M85: Set inactivity stepper shutdown timeout
498
       case 85: M85(); break;      // M85: Set inactivity stepper shutdown timeout
500
 
499
 
501
-      case 92: // M92: Set the steps-per-unit for one or more axes
502
-        gcode_M92();
503
-        break;
500
+      case 92: M92(); break;      // M92: Set the steps-per-unit for one or more axes
501
+
504
       case 114: // M114: Report current position
502
       case 114: // M114: Report current position
505
         gcode_M114();
503
         gcode_M114();
506
         break;
504
         break;

Loading…
Cancel
Save