mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-10-26 07:46:11 +01:00
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 <kevin@koconnor.net>
This commit is contained in:
@@ -49,6 +49,7 @@ trapq_alloc(void)
|
|||||||
list_init(&tq->moves);
|
list_init(&tq->moves);
|
||||||
list_init(&tq->history);
|
list_init(&tq->history);
|
||||||
struct move *head_sentinel = move_alloc(), *tail_sentinel = move_alloc();
|
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;
|
tail_sentinel->print_time = tail_sentinel->move_t = NEVER_TIME;
|
||||||
list_add_head(&head_sentinel->node, &tq->moves);
|
list_add_head(&head_sentinel->node, &tq->moves);
|
||||||
list_add_tail(&tail_sentinel->node, &tq->moves);
|
list_add_tail(&tail_sentinel->node, &tq->moves);
|
||||||
|
|||||||
Reference in New Issue
Block a user