From f240bb24d1ccede7edb304fcfdc9633e28738fde 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 fee1640..7b72f07 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; }