Closed AaronYoung5 closed 8 months ago
Great catch! Thanks for the pull request. I think no one found this before because they use a single callback for all motors and then key off the motor ID.
I am going to release it to PyPi. I will add a comment here when it is available.
Thanks once again. The release is available in PyPi.
Hi, thanks for making this package, I've found it very useful! (I think) I've run into a bug with the
stepper_info_list
. TL;DR thestepper_info_list
is not copied between motor instances, so when you call a method that requires a callback, it will always overwrite all other instances. As in, all stepper motor instances share the same info list.This code snippet reproduces the issue that I see:
Which outputs:
Where the indented output (which is the result you get with the changes in this PR) is:
I've created this PR assuming this is a bug, but maybe I'm using the library wrong. Please let me know if that's the case. Thanks again!