Bläddra i källkod

Move G92 to cpp

Scott Lahteine 7 år sedan
förälder
incheckning
04376975ce
3 ändrade filer med 11 tillägg och 6 borttagningar
  1. 0
    2
      Marlin/src/Marlin.cpp
  2. 2
    3
      Marlin/src/gcode/gcode.cpp
  3. 9
    1
      Marlin/src/gcode/geometry/G92.cpp

+ 0
- 2
Marlin/src/Marlin.cpp Visa fil

357
  ***************** GCode Handlers *****************
357
  ***************** GCode Handlers *****************
358
  **************************************************/
358
  **************************************************/
359
 
359
 
360
-#include "gcode/geometry/G92.h"
361
-
362
 #if HAS_RESUME_CONTINUE
360
 #if HAS_RESUME_CONTINUE
363
   #include "gcode/lcd/M0_M1.h"
361
   #include "gcode/lcd/M0_M1.h"
364
 #endif
362
 #endif

+ 2
- 3
Marlin/src/gcode/gcode.cpp Visa fil

116
 //
116
 //
117
 // Placeholders for non-migrated codes
117
 // Placeholders for non-migrated codes
118
 //
118
 //
119
-extern void gcode_G92();
120
 extern void gcode_M0_M1();
119
 extern void gcode_M0_M1();
121
 extern void gcode_M3_M4(bool is_M3);
120
 extern void gcode_M3_M4(bool is_M3);
122
 extern void gcode_M5();
121
 extern void gcode_M5();
394
         relative_mode = true;
393
         relative_mode = true;
395
         break;
394
         break;
396
 
395
 
397
-      case 92: // G92
398
-        gcode_G92();
396
+      case 92: // G92 - Set current axis position(s)
397
+        G92();
399
         break;
398
         break;
400
 
399
 
401
       #if HAS_MESH
400
       #if HAS_MESH

Marlin/src/gcode/geometry/G92.h → Marlin/src/gcode/geometry/G92.cpp Visa fil

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
+#include "../gcode.h"
24
+#include "../../module/motion.h"
25
+#include "../../module/stepper.h"
26
+
27
+#if ENABLED(I2C_POSITION_ENCODERS)
28
+  #include "../../feature/I2CPositionEncoder.h"
29
+#endif
30
+
23
 /**
31
 /**
24
  * G92: Set current position to given X Y Z E
32
  * G92: Set current position to given X Y Z E
25
  */
33
  */
26
-void gcode_G92() {
34
+void GcodeSuite::G92() {
27
   bool didXYZ = false,
35
   bool didXYZ = false,
28
        didE = parser.seenval('E');
36
        didE = parser.seenval('E');
29
 
37
 

Laddar…
Avbryt
Spara