From 562f2321d282eb16d538e6098b0155e0d91e7e4a Mon Sep 17 00:00:00 2001 From: Bruce j Beare Date: Sat, 23 Feb 2019 00:41:52 -0800 Subject: [PATCH] Fix a G34 bug, allow negative Z corrections (#13240) --- Marlin/src/gcode/calibrate/G34_M422.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index 9b1ba1c5ab..3c54f5207b 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -88,7 +88,7 @@ void GcodeSuite::G34() { } const float z_auto_align_amplification = parser.floatval('A', Z_STEPPER_ALIGN_AMP); - if (!WITHIN(z_auto_align_amplification, 0.5f, 2.0f)) { + if (!WITHIN(ABS(z_auto_align_amplification), 0.5f, 2.0f)) { SERIAL_ECHOLNPGM("?(A)mplification out of bounds (0.5-2.0)."); break; } @@ -137,7 +137,7 @@ void GcodeSuite::G34() { // For each iteration go through all probe positions (one per Z-Stepper) for (uint8_t zstepper = 0; zstepper < Z_STEPPER_COUNT; ++zstepper) { // Probe a Z height for each stepper - z_measured[zstepper] = probe_pt(z_auto_align_xpos[zstepper], z_auto_align_ypos[zstepper], PROBE_PT_RAISE, false); + z_measured[zstepper] = probe_pt(z_auto_align_xpos[zstepper], z_auto_align_ypos[zstepper], PROBE_PT_RAISE, 0, false); // Stop on error if (isnan(z_measured[zstepper])) {