gin66 / FastAccelStepper

A high speed stepper library for Atmega 168/328p (nano), Atmega32u4, Atmega 2560, ESP32, ESP32S2, ESP32S3, ESP32C3 and Atmel SAM Due
MIT License
283 stars 67 forks source link

Fix initialization of _stepper_cnt #204

Closed turley closed 8 months ago

turley commented 8 months ago

This was causing stepper initialization to randomly fail (on ESP32-S3) because sometimes _stepper_cnt was initialized to a non-zero value, and the check for _stepper_cnt >= MAX_STEPPER (in stepperConnectToPin) evaluated to true – even on the first stepper added.