Przeglądaj źródła

Move M92 to cpp

Scott Lahteine 7 lat temu
rodzic
commit
beb346e49f

+ 0
- 2
Marlin/src/Marlin.cpp Wyświetl plik

@@ -359,8 +359,6 @@ bool pin_is_protected(const int8_t pin) {
359 359
   return false;
360 360
 }
361 361
 
362
-#include "gcode/config/M92.h"
363
-
364 362
 #if ENABLED(M100_FREE_MEMORY_WATCHER)
365 363
   #include "gcode/calibrate/M100.h"
366 364
 #endif

Marlin/src/gcode/config/M92.h → Marlin/src/gcode/config/M92.cpp Wyświetl plik

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

+ 2
- 4
Marlin/src/gcode/gcode.cpp Wyświetl plik

@@ -116,7 +116,6 @@ void GcodeSuite::dwell(millis_t time) {
116 116
 //
117 117
 // Placeholders for non-migrated codes
118 118
 //
119
-extern void gcode_M92();
120 119
 extern void gcode_M100();
121 120
 extern void gcode_M114();
122 121
 extern void gcode_M115();
@@ -498,9 +497,8 @@ void GcodeSuite::process_next_command() {
498 497
       case 84: M18_M84(); break;  // M84: Disable all steppers or set timeout
499 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 502
       case 114: // M114: Report current position
505 503
         gcode_M114();
506 504
         break;

Ładowanie…
Anuluj
Zapisz