Browse Source

[2.0.x] fix compile errors when CNC_COORDINATE_SYSTEMS is enabled (#9380)

GMagician 7 years ago
parent
commit
e1117a8492
2 changed files with 9 additions and 10 deletions
  1. 0
    1
      Marlin/src/gcode/gcode.h
  2. 9
    9
      Marlin/src/gcode/geometry/G53-G59.cpp

+ 0
- 1
Marlin/src/gcode/gcode.h View File

397
   #endif
397
   #endif
398
 
398
 
399
   #if ENABLED(CNC_COORDINATE_SYSTEMS)
399
   #if ENABLED(CNC_COORDINATE_SYSTEMS)
400
-    bool select_coordinate_system(const int8_t _new);
401
     static void G53();
400
     static void G53();
402
     static void G54();
401
     static void G54();
403
     static void G55();
402
     static void G55();

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

22
 
22
 
23
 #include "../gcode.h"
23
 #include "../gcode.h"
24
 #include "../../module/motion.h"
24
 #include "../../module/motion.h"
25
-//#include "../../module/stepper.h"
26
 
25
 
27
 #if ENABLED(CNC_COORDINATE_SYSTEMS)
26
 #if ENABLED(CNC_COORDINATE_SYSTEMS)
27
+  #include "../../module/stepper.h"
28
 
28
 
29
   /**
29
   /**
30
    * Select a coordinate system and update the workspace offset.
30
    * Select a coordinate system and update the workspace offset.
31
    * System index -1 is used to specify machine-native.
31
    * System index -1 is used to specify machine-native.
32
    */
32
    */
33
-  bool GCodeSuite::select_coordinate_system(const int8_t _new) {
33
+  bool GcodeSuite::select_coordinate_system(const int8_t _new) {
34
     if (active_coordinate_system == _new) return false;
34
     if (active_coordinate_system == _new) return false;
35
     stepper.synchronize();
35
     stepper.synchronize();
36
     float old_offset[XYZ] = { 0 }, new_offset[XYZ] = { 0 };
36
     float old_offset[XYZ] = { 0 }, new_offset[XYZ] = { 0 };
54
    * It precedes a movement command (or other modifiers) on the same line.
54
    * It precedes a movement command (or other modifiers) on the same line.
55
    * This is the first command to use parser.chain() to make this possible.
55
    * This is the first command to use parser.chain() to make this possible.
56
    */
56
    */
57
-  void GCodeSuite::G53() {
57
+  void GcodeSuite::G53() {
58
     // If this command has more following...
58
     // If this command has more following...
59
     if (parser.chain()) {
59
     if (parser.chain()) {
60
       const int8_t _system = active_coordinate_system;
60
       const int8_t _system = active_coordinate_system;
80
       report_current_position();
80
       report_current_position();
81
     }
81
     }
82
   }
82
   }
83
-  void GCodeSuite::G54() { G54_59(); }
84
-  void GCodeSuite::G55() { G54_59(); }
85
-  void GCodeSuite::G56() { G54_59(); }
86
-  void GCodeSuite::G57() { G54_59(); }
87
-  void GCodeSuite::G58() { G54_59(); }
88
-  void GCodeSuite::G59() { G54_59(parser.subcode); }
83
+  void GcodeSuite::G54() { G54_59(); }
84
+  void GcodeSuite::G55() { G54_59(); }
85
+  void GcodeSuite::G56() { G54_59(); }
86
+  void GcodeSuite::G57() { G54_59(); }
87
+  void GcodeSuite::G58() { G54_59(); }
88
+  void GcodeSuite::G59() { G54_59(parser.subcode); }
89
 
89
 
90
 #endif // CNC_COORDINATE_SYSTEMS
90
 #endif // CNC_COORDINATE_SYSTEMS

Loading…
Cancel
Save