Fix Z_PROBE_END_SCRIPT in ABL (#14621)

This commit is contained in:
Robby Candra 2019-07-14 16:28:38 +07:00 committed by Scott Lahteine
parent a85cd042d8
commit e96468566d

View file

@ -963,12 +963,6 @@ G29_TYPE GcodeSuite::G29() {
#endif // ABL_PLANAR #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. // Auto Bed Leveling is complete! Enable if possible.
planner.leveling_active = dryrun ? abl_should_enable : true; planner.leveling_active = dryrun ? abl_should_enable : true;
} // !isnan(measured_z) } // !isnan(measured_z)
@ -985,6 +979,12 @@ G29_TYPE GcodeSuite::G29() {
move_z_after_probing(); move_z_after_probing();
#endif #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(); report_current_position();
G29_RETURN(isnan(measured_z)); G29_RETURN(isnan(measured_z));