From f1f75d8dbb136a656342b484b7048841fbfdde24 Mon Sep 17 00:00:00 2001 From: Luca Toniolo <10792599+grandixximo@users.noreply.github.com> Date: Sun, 4 Oct 2026 12:41:58 +0800 Subject: [PATCH] homing: drop the dead HOME_DELAY timer in HOME_FINAL_MOVE_START The timer branch incremented pause_timer, fell through, and zeroed it in the same servo cycle; it has never delayed anything since the 2022 state-machine rework dropped its break (becaf35c2f). The missing delay was reported as a bug (#4621) and the resolution was to declare the current behavior intended (#4628, docs updated). Remove the dead code and say in a comment that the absence of HOME_DELAY here is deliberate, so the state no longer reads as an accidental omission. --- src/emc/motion/homing.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/emc/motion/homing.c b/src/emc/motion/homing.c index a2b6c9b367f..adec003afe1 100644 --- a/src/emc/motion/homing.c +++ b/src/emc/motion/homing.c @@ -1385,12 +1385,10 @@ static int base_1joint_state_machine(int joint_num) H[joint_num].pause_timer = 0; break; } - /* has delay timed out? */ - if (H[joint_num].pause_timer < (HOME_DELAY * servo_freq)) { - /* no, update timer and wait some more */ - H[joint_num].pause_timer++; - } - H[joint_num].pause_timer = 0; + /* No HOME_DELAY here, unlike the other *_START states: + homing is complete once the joint has stopped, this move + to the home position is only a convenience. See + docs/src/code/homing.dot */ // neg home sequence: sync final move if ( (H[joint_num].home_sequence < 0)