aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/stepper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stepper.c b/src/stepper.c
index 2b6575b3..dfab89df 100644
--- a/src/stepper.c
+++ b/src/stepper.c
@@ -221,8 +221,9 @@ command_queue_step(uint32_t *args)
if (m->count == 1 && (m->flags || flags & SF_LAST_RESET))
// count=1 moves after a reset or dir change can have small intervals
flags |= SF_NO_NEXT_CHECK;
- s->flags = flags & ~SF_LAST_RESET;
+ flags &= ~SF_LAST_RESET;
if (s->count) {
+ s->flags = flags;
if (s->first)
*s->plast = m;
else
@@ -231,6 +232,7 @@ command_queue_step(uint32_t *args)
} else if (flags & SF_NEED_RESET) {
move_free(m);
} else {
+ s->flags = flags;
s->first = m;
stepper_load_next(s, s->next_step_time + m->interval);
sched_add_timer(&s->time);