From d76658756ebbd1808774b475ca6e4367ec70b17e Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 19 Mar 2019 20:57:17 -0400 Subject: [PATCH] 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 --- src/stepper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stepper.c b/src/stepper.c index d8129c4a..2b6575b3 100644 --- a/src/stepper.c +++ b/src/stepper.c @@ -262,7 +262,7 @@ command_reset_step_clock(uint32_t *args) if (s->count) shutdown("Can't reset time when stepper active"); 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(); } DECL_COMMAND(command_reset_step_clock, "reset_step_clock oid=%c clock=%u");