From e1117a8492f389bda7e911c3338fc16056ae4829 Mon Sep 17 00:00:00 2001 From: GMagician <3684609+GMagician@users.noreply.github.com> Date: Fri, 2 Feb 2018 08:45:46 +0100 Subject: [PATCH] [2.0.x] fix compile errors when CNC_COORDINATE_SYSTEMS is enabled (#9380) --- Marlin/src/gcode/gcode.h | 1 - Marlin/src/gcode/geometry/G53-G59.cpp | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 47142cae9b..e97646f9c5 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -397,7 +397,6 @@ private: #endif #if ENABLED(CNC_COORDINATE_SYSTEMS) - bool select_coordinate_system(const int8_t _new); static void G53(); static void G54(); static void G55(); diff --git a/Marlin/src/gcode/geometry/G53-G59.cpp b/Marlin/src/gcode/geometry/G53-G59.cpp index a00a65b6c7..4739fe458f 100644 --- a/Marlin/src/gcode/geometry/G53-G59.cpp +++ b/Marlin/src/gcode/geometry/G53-G59.cpp @@ -22,15 +22,15 @@ #include "../gcode.h" #include "../../module/motion.h" -//#include "../../module/stepper.h" #if ENABLED(CNC_COORDINATE_SYSTEMS) + #include "../../module/stepper.h" /** * Select a coordinate system and update the workspace offset. * System index -1 is used to specify machine-native. */ - bool GCodeSuite::select_coordinate_system(const int8_t _new) { + bool GcodeSuite::select_coordinate_system(const int8_t _new) { if (active_coordinate_system == _new) return false; stepper.synchronize(); float old_offset[XYZ] = { 0 }, new_offset[XYZ] = { 0 }; @@ -54,7 +54,7 @@ * It precedes a movement command (or other modifiers) on the same line. * This is the first command to use parser.chain() to make this possible. */ - void GCodeSuite::G53() { + void GcodeSuite::G53() { // If this command has more following... if (parser.chain()) { const int8_t _system = active_coordinate_system; @@ -80,11 +80,11 @@ report_current_position(); } } - void GCodeSuite::G54() { G54_59(); } - void GCodeSuite::G55() { G54_59(); } - void GCodeSuite::G56() { G54_59(); } - void GCodeSuite::G57() { G54_59(); } - void GCodeSuite::G58() { G54_59(); } - void GCodeSuite::G59() { G54_59(parser.subcode); } + void GcodeSuite::G54() { G54_59(); } + void GcodeSuite::G55() { G54_59(); } + void GcodeSuite::G56() { G54_59(); } + void GcodeSuite::G57() { G54_59(); } + void GcodeSuite::G58() { G54_59(); } + void GcodeSuite::G59() { G54_59(parser.subcode); } #endif // CNC_COORDINATE_SYSTEMS