Clean up G34/M422

This commit is contained in:
Scott Lahteine
2020-08-13 03:39:59 -05:00
committed by InsanityAutomation
parent 123a2b28fc
commit fcd4fa4ab7
+6 -4
View File
@@ -51,6 +51,9 @@
#include "../../libs/least_squares_fit.h"
#endif
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
#include "../../core/debug_out.h"
/**
* G34: Z-Stepper automatic alignment
*
@@ -602,12 +605,13 @@ void GcodeSuite::M422() {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Final Z Move");
do_blocking_move_to_z(zgrind, MMM_TO_MMS(GANTRY_CALIBRATION_FEEDRATE));
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Backoff");
// Back off end plate, back to normal motion range
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Backoff");
do_blocking_move_to_z(zpounce, MMM_TO_MMS(GANTRY_CALIBRATION_FEEDRATE));
#if _REDUCE_CURRENT
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Restore Current");
#endif
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Restore Current");
// Reset current to original values
@@ -639,8 +643,6 @@ void GcodeSuite::M422() {
#endif
#endif
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Running Post Commands");
#ifdef GANTRY_CALIBRATION_COMMANDS_POST
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Running Post Commands");
gcode.process_subcommands_now_P(PSTR(GANTRY_CALIBRATION_COMMANDS_POST));