-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Stepstick Lookup Table and Config Options #340
base: main
Are you sure you want to change the base?
Conversation
Current state of this: |
I think this is good, just need someone else to test |
912b359
to
906b372
Compare
906b372
to
65d1a22
Compare
| Stepstick Type | Config Name | Sense Resistor | Max Current | | ||
|-----------------------------------------|-------------------------|----------------|-------------| | ||
| BTT Kraken S1-4 | KRAKEN_2160_8A | 0.022 | 8 | | ||
| BTT Kraken S5-8 | KRAKEN_2160_3A | 0.022 | 3 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These (5-8) use the default 0.075 ohm sense resistor.
"REFERENCE_2209": (0.11, 2), | ||
"REFERENCE_5160": (0.075, 3), | ||
"KRAKEN_2160_8A": (0.022, 8), | ||
"KRAKEN_2160_3A": (0.022, 3), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be 0.075
"config", | ||
f"""Neither 'stepper_driver_type' or 'sense_resistor' is defined for [{self.name}]. | ||
Using default value of {self.sense_resistor} ohm sense resistor. | ||
If this is incorrect, your drivers or board may be damaged.""", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drivers, steppers or board.
see: #325
This PR adds a lookup table for known stepsticks (more will be added as time goes on), some logic for a new config option called 'stepstick_type', and documentation on the logic.
Heres the rundown:
If sense_resistor is defined: use it with full priority, no exceptions
else if stepstick_type is defined: use its lookup table value for sense_resistor
else use tmc default and warn user
if stepstick_type is defined: use its max_current value
else use tmc default
While I agree we should not have defaults set for configuration options like this, I also am not a fan of breaking everyones configs at this state in the project.