-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should throw error when trying to Stepper.step() when Stepper.direction is undefined #736
Comments
Thanks for the report and for updating the docs. I wonder if |
It creates a new Error here, but doesn't look like anything is done with it: Can it just default to either cw or ccw? Or add a check up front that makes sure one is supplied initially, similar to other opts, like here: But I've got other concerns with the implementation, though maybe I'm just missing something. Where is |
Hmm, I was going to try and dive in on this, but it doesn't look like I've got the right hardware to run and test it. Time to place an order, I suppose! |
@hail-seitan Care to have a look at that PR? I don't have hardware, so I just implemented against tests. |
Right now you can call step() on a Stepper when its direction is undefined, without getting any errors. I spend a few hours trying to figure out why my stepper motor wasn't working, and it was because the direction was undefined. Stepper motors are nontrivial to wire so it would be nice to be alerted when code is broken.
I added a small warning in the Stepper wiki.
Thank you for your work on this awesome module!
The text was updated successfully, but these errors were encountered: