itersolve: Improve numerical stability of gen_steps_pre_active check

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-12-10 16:44:02 -05:00
parent 04b3603a1e
commit 4cbbe18afd
1 changed files with 2 additions and 1 deletions

View File

@ -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)