Skip to content

Commit

Permalink
Merge pull request #204 from turley/fix-stepper-count-init
Browse files Browse the repository at this point in the history
Fix initialization of _stepper_cnt
  • Loading branch information
gin66 authored Oct 14, 2023
2 parents 2f2727e + b8eeea9 commit 8e1482a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/FastAccelStepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ FastAccelStepper fas_stepper[MAX_STEPPER];
//*************************************************************************************************
void FastAccelStepperEngine::init() {
_externalCallForPin = NULL;
_stepper_cnt = 0;
fas_init_engine(this, 255);
for (uint8_t i = 0; i < MAX_STEPPER; i++) {
_stepper[i] = NULL;
Expand All @@ -29,6 +30,7 @@ void FastAccelStepperEngine::init() {
#if defined(SUPPORT_CPU_AFFINITY)
void FastAccelStepperEngine::init(uint8_t cpu_core) {
_externalCallForPin = NULL;
_stepper_cnt = 0;
fas_init_engine(this, cpu_core);
}
#endif
Expand Down

0 comments on commit 8e1482a

Please sign in to comment.