From 04e88d008e615564b2a695c066f287fda81f99c7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 20 Jun 2016 16:18:30 -0700 Subject: [PATCH] Clear up ordering in G30 --- Marlin/Marlin_main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index e1206e4883..21b286730f 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3839,11 +3839,13 @@ inline void gcode_G28() { * G30: Do a single Z probe at the current XY */ inline void gcode_G30() { + + setup_for_endstop_move(); + deploy_z_probe(); stepper.synchronize(); // TODO: clear the leveling matrix or the planner will be set incorrectly - setup_for_endstop_move(); // Too late. Must be done before deploying. run_z_probe(); @@ -3855,10 +3857,10 @@ inline void gcode_G28() { SERIAL_PROTOCOL(current_position[Z_AXIS] + 0.0001); SERIAL_EOL; - clean_up_after_endstop_move(); // Too early. must be done after the stowing. - stow_z_probe(); + clean_up_after_endstop_move(); + report_current_position(); }