From 4cbbe18afdb44b08636d217eb9a63b466502da75 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 10 Dec 2019 16:44:02 -0500 Subject: [PATCH] itersolve: Improve numerical stability of gen_steps_pre_active check Signed-off-by: Kevin O'Connor --- klippy/chelper/itersolve.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/klippy/chelper/itersolve.c b/klippy/chelper/itersolve.c index 807ca190..ee0571ee 100644 --- a/klippy/chelper/itersolve.c +++ b/klippy/chelper/itersolve.c @@ -162,7 +162,8 @@ itersolve_generate_steps(struct stepper_kinematics *sk, double flush_time) if (end > flush_time) end = flush_time; if (check_active(sk, m)) { - if (sk->gen_steps_pre_active && start > last_flush_time) { + if (sk->gen_steps_pre_active + && start > last_flush_time + .000000001) { // Must generate steps leading up to stepper activity force_steps_time = start; if (last_flush_time < start - sk->gen_steps_pre_active)