-
Notifications
You must be signed in to change notification settings - Fork 7k
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
RFC: drivers: stepper: API Specification Improvements #86052
Comments
Hi @jbehrensnx! We appreciate you submitting your first issue for our open-source project. 🌟 Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙 |
@jbehrensnx Thanks for creating this RFC. I'll try to address the suggested changes sequentially :)
True.
Not really sure if this is the case in the API documentation as of now. If a user wants to change micro_step_interval while the stepper is moving, i think it's completely okay.
We can introduce a new dedicated
I think this is already the case as of now, if you try to call any of the move commands with motor disabled, -ECANCELED will be the return value as per stepper api.
This sounds fair :) Todos:
|
Just to clarify: your opinion is, that
I mainly mentioned it because the the two tmc drivers don't do this, but yes the specification mentions the -ECANCELED. I should probably given this as an example of not following the api not being caught without tests in the test pr instead.
I would like to add both stop and emergency_stop as they have two different purposes, one to simply stop the motor during regular movement, and second to immediately stop the motor, regardless of the consequences. While these two functions would be the same for constant velocity drivers (gpio, counter + work timing source for step-dir), they would differ for acceleration based drivers like tmc50xx and the acceleration-counter timing source I am currently working on.
I would like to also clarify what |
Set the time interval between steps in microseconds(correction to be introduced: nanoseconds). Setting a time interval between two consecutive steps affects the speed of the stepper is evident imo.
so
Adding a todo for this
Took some inspiration from trinamic datasheet :)
👍 |
Introduction
As discussed in PR 85658, here is the RFC about ambiguities concerning the expected behavior in the stepper api.
Problem description
While the the stepper api has made significant improvements concerning its specification, some questions remain. The purpose of this RFC is to discuss these and find answers. This will then be used to improve the documentation, and refine the tests from PR 85658, hopefully ensuring consistent behavior from all drivers that use the api.
Proposed changes
Things that I myself have noticed:
Dependencies
Changes to the api will require modification of the existing drivers. Their limited number means that this will be manageable.
Alternatives
Not improving the specification will lead to (and to a degree already has) divergent behavior of stepper api drivers, which is a significant problem.
The text was updated successfully, but these errors were encountered: