Fix a G34 bug, allow negative Z corrections (#13240)
This commit is contained in:
parent
edf025ed8d
commit
562f2321d2
|
@ -88,7 +88,7 @@ void GcodeSuite::G34() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const float z_auto_align_amplification = parser.floatval('A', Z_STEPPER_ALIGN_AMP);
|
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).");
|
SERIAL_ECHOLNPGM("?(A)mplification out of bounds (0.5-2.0).");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ void GcodeSuite::G34() {
|
||||||
// For each iteration go through all probe positions (one per Z-Stepper)
|
// For each iteration go through all probe positions (one per Z-Stepper)
|
||||||
for (uint8_t zstepper = 0; zstepper < Z_STEPPER_COUNT; ++zstepper) {
|
for (uint8_t zstepper = 0; zstepper < Z_STEPPER_COUNT; ++zstepper) {
|
||||||
// Probe a Z height for each stepper
|
// 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
|
// Stop on error
|
||||||
if (isnan(z_measured[zstepper])) {
|
if (isnan(z_measured[zstepper])) {
|
||||||
|
|
Loading…
Reference in a new issue