From e96468566d66b9e7bcf0c4450a7b988523def580 Mon Sep 17 00:00:00 2001 From: Robby Candra Date: Sun, 14 Jul 2019 16:28:38 +0700 Subject: [PATCH] Fix Z_PROBE_END_SCRIPT in ABL (#14621) --- Marlin/src/gcode/bedlevel/abl/G29.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 64ae54ef21..b7927b4fa2 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -963,12 +963,6 @@ G29_TYPE GcodeSuite::G29() { #endif // ABL_PLANAR - #ifdef Z_PROBE_END_SCRIPT - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Z Probe End Script: ", Z_PROBE_END_SCRIPT); - planner.synchronize(); - process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT)); - #endif - // Auto Bed Leveling is complete! Enable if possible. planner.leveling_active = dryrun ? abl_should_enable : true; } // !isnan(measured_z) @@ -985,6 +979,12 @@ G29_TYPE GcodeSuite::G29() { move_z_after_probing(); #endif + #ifdef Z_PROBE_END_SCRIPT + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Z Probe End Script: ", Z_PROBE_END_SCRIPT); + planner.synchronize(); + process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT)); + #endif + report_current_position(); G29_RETURN(isnan(measured_z));