From 4feff55a96d00c1342a5a3e5750dbcc3dae0914f Mon Sep 17 00:00:00 2001 From: douarvil-yamaichi <126433379+douarvil-yamaichi@users.noreply.github.com> Date: Thu, 11 May 2023 09:29:24 +0900 Subject: [PATCH] Fix single point probing (G30) target dive position Issue discussed at: https://forum.duet3d.com/topic/32248/g30-unexpected-probe-dive-motion-range --- src/GCodes/GCodes4.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GCodes/GCodes4.cpp b/src/GCodes/GCodes4.cpp index e739537658..325fbf26a3 100644 --- a/src/GCodes/GCodes4.cpp +++ b/src/GCodes/GCodes4.cpp @@ -1225,7 +1225,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply) noexcept ms.checkEndstops = true; ms.reduceAcceleration = true; ms.coords[Z_AXIS] = (IsAxisHomed(Z_AXIS)) - ? platform.AxisMinimum(Z_AXIS) - zp->GetDiveHeight() + zp->GetActualTriggerHeight() // Z axis has been homed, so no point in going very far + ? -zp->GetDiveHeight() + zp->GetActualTriggerHeight() // Z axis has been homed, so no point in going very far : -1.1 * platform.AxisTotalLength(Z_AXIS); // Z axis not homed yet, so treat this as a homing move ms.feedRate = zp->GetProbingSpeed(tapsDone); ms.linearAxesMentioned = true;