itersolve: Implement a step+dir+step filter

Some stepper motor drivers do not respond well to rapid "step +
direction change + step" events.  In particular, it is believed this
can cause "over current" events on the tmc2208 drivers when they are
in "stealthchop" mode.  Detect these events and remove them from the
generated step times.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2020-02-25 12:54:55 -05:00
parent 8f8c1e2c58
commit c9cb462f90
3 changed files with 85 additions and 8 deletions

View File

@@ -16,6 +16,9 @@ struct stepper_kinematics {
double step_dist, commanded_pos;
struct stepcompress *sc;
double next_move_print_time, next_step_time;
int next_step_dir;
double last_flush_time, last_move_time;
struct trapq *tq;
int active_flags;