diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-11-14 13:10:14 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-11-14 13:10:14 -0500 |
commit | 9ad8153d331273259d584efc72145acd71a8485a (patch) | |
tree | c6a29fd6f85acd7e0c310084484d6ed2924defc8 /src/stepper.c | |
parent | 941427554a23dd0ae963eb9df7d2724c7c90809b (diff) | |
download | kutter-9ad8153d331273259d584efc72145acd71a8485a.tar.gz kutter-9ad8153d331273259d584efc72145acd71a8485a.tar.xz kutter-9ad8153d331273259d584efc72145acd71a8485a.zip |
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>
Diffstat (limited to 'src/stepper.c')
-rw-r--r-- | src/stepper.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stepper.c b/src/stepper.c index 57b0dd93..8da71e84 100644 --- a/src/stepper.c +++ b/src/stepper.c @@ -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; |