From 1061b5d3ec36c556838bbb2d6a4048f6bfe963c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Fri, 27 Dec 2024 18:18:29 +0000 Subject: [PATCH] idler: adjust distance threshold MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before, the axis limits had an error of 25° so 225° would actually be measured as 250°. Now after fixing axisUnitToTruncatedUnit to return a more accurate value, the new values are lower. Adjust the distances by 20° to offset previous error. --- src/modules/idler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/idler.cpp b/src/modules/idler.cpp index 1539a3d..5b68e13 100644 --- a/src/modules/idler.cpp +++ b/src/modules/idler.cpp @@ -64,7 +64,7 @@ void Idler::FinishMove() { } bool Idler::StallGuardAllowed(bool forward) const { - const uint8_t checkDistance = forward ? 220 : 200; + const uint8_t checkDistance = forward ? 200 : 180; return AxisDistance(mm::axisUnitToTruncatedUnit(mm::motion.CurPosition())) > checkDistance; }