From b8eeea96ed9eee575ea36ed40f316866f38e2405 Mon Sep 17 00:00:00 2001 From: Ben Turley Date: Sat, 14 Oct 2023 11:20:03 -0600 Subject: [PATCH] Initialize _stepper_cnt to 0 --- src/FastAccelStepper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/FastAccelStepper.cpp b/src/FastAccelStepper.cpp index 93dc5c5a..c5db0513 100644 --- a/src/FastAccelStepper.cpp +++ b/src/FastAccelStepper.cpp @@ -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; @@ -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