From b60804bb662a56bcbb61a0ae5271756d70b24e91 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 3 Sep 2025 21:59:26 -0400 Subject: [PATCH] trapq: Set the head sentinel to a negative print_time If a stepper kinematics has a "scan window" defined during its first flush then the iterative solver may walk past the head sentinel. Set a small negative print_time for the head sentinel to avoid this corner case. Signed-off-by: Kevin O'Connor --- klippy/chelper/trapq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/klippy/chelper/trapq.c b/klippy/chelper/trapq.c index b9930e997..a21969414 100644 --- a/klippy/chelper/trapq.c +++ b/klippy/chelper/trapq.c @@ -49,6 +49,7 @@ trapq_alloc(void) list_init(&tq->moves); list_init(&tq->history); struct move *head_sentinel = move_alloc(), *tail_sentinel = move_alloc(); + head_sentinel->print_time = -1.0; tail_sentinel->print_time = tail_sentinel->move_t = NEVER_TIME; list_add_head(&head_sentinel->node, &tq->moves); list_add_tail(&tail_sentinel->node, &tq->moves);