From 9343247e075fbc11e0ea83670f92543e2b1245f2 Mon Sep 17 00:00:00 2001 From: sargonphin <85966195+sargonphin@users.noreply.github.com> Date: Sun, 7 Apr 2024 17:48:13 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9Increase=20range=20of=20G34=20accur?= =?UTF-8?q?acy=20target=20=20(#26771)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Allow G34 accuracy down to 0.001mm, previous minimum was 0.01mm. --- Marlin/src/gcode/calibrate/G34_M422.cpp | 4 ++-- Marlin/src/inc/SanityCheck.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index 8b94dd53921b..7a27a61b9d71 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -115,8 +115,8 @@ void GcodeSuite::G34() { } const float z_auto_align_accuracy = parser.floatval('T', Z_STEPPER_ALIGN_ACC); - if (!WITHIN(z_auto_align_accuracy, 0.01f, 1.0f)) { - SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(T)arget accuracy out of bounds (0.01-1.0).")); + if (!WITHIN(z_auto_align_accuracy, 0.001f, 1.0f)) { + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(T)arget accuracy out of bounds (0.001-1.0).")); break; } diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index fdc78aa3e4b0..327d55760a6b 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3617,6 +3617,7 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive." #error "Z_STEPPER_ALIGN_STEPPER_XY requires 3 or 4 Z steppers." #endif #endif + static_assert(WITHIN(Z_STEPPER_ALIGN_ACC, 0.001, 1.0), "Z_STEPPER_ALIGN_ACC needs to be between 0.001 and 1.0"); #endif #if ENABLED(MECHANICAL_GANTRY_CALIBRATION)