Skip to content

Commit

Permalink
Initialize _stepper_cnt to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
turley authored Oct 14, 2023
1 parent dfad0dd commit b8eeea9
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 b8eeea9

Please sign in to comment.