allow more configuration for bucket selections #1057
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which mods are added by this PR?
This allows more control over which bucket is selected for purging and for parking the nozzle after cleaning in the Decontaminator Purge Bucket & Nozzle Scrubber mod,
How was it tested?
I tested this modification on my Voron v2.4 350 build with all the combinations of new configuration options. The final implementation behaves with all combinations as expected.
Any background context you want to provide?
This includes the following three modifications:
use native Jinja variable _bucket_pos
The previous implementation of dynamically changing bucket_pos on each
run had an extremely confusing semantic of changing the variable early
in the execution of the macro but see the effect only on the next run of
the macro. This led to the situation that the first bucket position
after the machine started was never selected randomly, only all later
ones. While this for sure is not a major problem of the implementation
it is extremely confusing and makes extending the macro unnecessarily
complicated.
See the confusion this created on my side at
https://klipper.discourse.group/t/conditional-changing-of-a-variable-inside-a-macro/19161
By using the native Jinja variable _bucket_pos instead, we can make the
change effective immediately, making the macro behave how you would
intuitively expect.
variable_bucket_park: select bucket to park nozzle after cleaning
The previous implementation always parked the nozzle over the left
bucket after cleaning. While this makes sense in most cases it is
problematic when you happen to have something installed over the left
bucket, like the Klicky Probe. If parking the nozzle over the Klicky
Probe there is a certain risk to pull it out of the docking station by
accident with the move command following the cleaning procedure. When
we park the nozzle over the right bucket we can mitigate that risk.
The default value for variable_bucket_park is still to park over the
left bucket as in the original implementation.
variable_bucket_purge: select bucket for purging
In the original implementation, the bucket for purging was selected
randomly. Since I wanted to park the nozzle always over the right
bucket to avoid conflicts with the Klicky Probe and as such always
oozing into that (on my 350 build) smaller right bucket I thought that
it might be useful to compensate for this by always purging to the
larger left bucket.
Now you can select the bucket you want to do the purging. With the
default setting of -1 it will still randomly choose the bucket as
before.
my mod adheres to these rules.
license