-
-
Notifications
You must be signed in to change notification settings - Fork 432
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
feat: updated tool extrusion settings to respect printer config #1038
feat: updated tool extrusion settings to respect printer config #1038
Conversation
const safeAmount = Math.min(amount, this.maxExtrudeLength) | ||
const safeRate = Math.min(rate, this.maxExtrudeSpeed) |
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.
This logic isn't strictly necessary as this.valid
does a pretty good job of ensuring correctness before issuing an extrude/retract command. However, I so like this as a guardrail since it allows us to be confident that an extruder command won't exceed machine limits even if there was a logic bug in this form.
Now that I'm typing it out, I'm wondering if Klipper would even respect a command that would exceed its specified limits. I should test that.
At any rate, if Klipper handles this or if it's generally unwanted, I'll remove this portion. Just let me know!
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.
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.
That should not be necessary (to be honest, even the valid
check is probably overkill here), so I've gone ahead and reverted that small bit before doing the actual merge
I didn't know whether to title this as a feature or a bug fix or something else, so I defaulted to |
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.
lgtm!
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
Fixes #1032
Updates the
ToolheadSettings
component to respect an extruder'smax_extrude_only_velocity
andmax_extrude_only_distance
when trying to update the default extrusion distance/speed values. Also adds a last-resort speed/distance check on extrusion/retraction commandsSigned-off-by: Kieran Eglin kieran.eglin@gmail.com