Skip to content

Commit

Permalink
variable_bucket_purge: select bucket for purging
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
schiele committed Oct 3, 2024
1 parent a683bbf commit 720a192
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ variable_bucket_gap: 22
# installation of purge bucket at rear left.
variable_bucket_start: 0

# Which bucket should the purge be done? -1 = random, 0 = left, 1 = right
variable_bucket_purge: -1

# Which bucket should we park the nozzle at the end of purge? 0 = left, 1 = right
variable_bucket_park: 0

Expand Down Expand Up @@ -157,8 +160,12 @@ gcode:
## Check if user enabled purge option or not.
{% if enable_purge %}

### Randomly select left or right bin for purge. 0 = left, 1 = right
{% set _bucket_pos = (range(2) | random) %}
{% if bucket_purge < 0 %}
### Randomly select left or right bin for purge. 0 = left, 1 = right
{% set _bucket_pos = (range(2) | random) %}
{% else %}
{% set _bucket_pos = bucket_purge %}
{% endif %}

### Raise Z for travel.
G1 Z{brush_top + clearance_z} F{prep_spd_z}
Expand Down

0 comments on commit 720a192

Please sign in to comment.