Browse Source

Allow G53 to go back to native space

Scott Lahteine 7 years ago
parent
commit
ff304d3767
1 changed files with 9 additions and 6 deletions
  1. 9
    6
      Marlin/src/gcode/geometry/G53-G59.cpp

+ 9
- 6
Marlin/src/gcode/geometry/G53-G59.cpp View File

@@ -50,15 +50,18 @@
50 50
   }
51 51
 
52 52
   /**
53
-   * In CNC G-code G53 is like a modifier
53
+   * G53: Apply native workspace to the current move
54
+   *
55
+   * In CNC G-code G53 is a modifier.
54 56
    * It precedes a movement command (or other modifiers) on the same line.
55 57
    * This is the first command to use parser.chain() to make this possible.
58
+   *
59
+   * Marlin also uses G53 on a line by itself to go back to native space.
56 60
    */
57
-  void GcodeSuite::G53() {
58
-    // If this command has more following...
59
-    if (parser.chain()) {
60
-      const int8_t _system = active_coordinate_system;
61
-      active_coordinate_system = -1;
61
+  inline void gcode_G53() {
62
+    const int8_t _system = active_coordinate_system;
63
+    active_coordinate_system = -1;
64
+    if (parser.chain()) { // If this command has more following...
62 65
       process_parsed_command();
63 66
       active_coordinate_system = _system;
64 67
     }

Loading…
Cancel
Save