stepper: Reset the next step time on a stepper stop
Automatically reset the next step time to zero on a stepper_stop() call. This makes the host code simpler as it no longer needs to schedule an explicit reset_step_clock command on the step after a homing operation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -238,6 +238,7 @@ void
|
||||
stepper_stop(struct stepper *s)
|
||||
{
|
||||
sched_del_timer(&s->time);
|
||||
s->next_step_time = 0;
|
||||
s->position = -stepper_get_position(s);
|
||||
s->count = 0;
|
||||
s->flags &= SF_INVERT_STEP;
|
||||
|
||||
Reference in New Issue
Block a user