stepper: Fix reset_step_clock corruption due to bitset typo

Commit b9b03dd0 had a typo in the flag updating.  The typo could
result in corruption of the stepper state.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-03-19 20:57:17 -04:00
parent 06c0463d44
commit d76658756e
1 changed files with 1 additions and 1 deletions

View File

@ -262,7 +262,7 @@ command_reset_step_clock(uint32_t *args)
if (s->count) if (s->count)
shutdown("Can't reset time when stepper active"); shutdown("Can't reset time when stepper active");
s->next_step_time = waketime; s->next_step_time = waketime;
s->flags = (s->flags & !SF_NEED_RESET) | SF_LAST_RESET; s->flags = (s->flags & ~SF_NEED_RESET) | SF_LAST_RESET;
irq_enable(); irq_enable();
} }
DECL_COMMAND(command_reset_step_clock, "reset_step_clock oid=%c clock=%u"); DECL_COMMAND(command_reset_step_clock, "reset_step_clock oid=%c clock=%u");