Skip to content

Commit

Permalink
Update variables to match naming scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
tehniemer committed Aug 27, 2024
1 parent a468b1c commit 5fec212
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions macros/helpers/prime_line.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ gcode:
{% set prime_line_adaptive = params.ADAPTIVE_MODE|default(1)|int %}
{% set prime_line_margin = params.LINE_MARGIN|default(printer["gcode_macro _USER_VARIABLES"].prime_line_margin)|default(5.0)|float %} # Used only in adaptive mode
{% set prime_line_charge_length = params.CHARGE_LENGTH|default(printer["gcode_macro _USER_VARIABLES"].prime_line_charge_length)|default(18)|float %}
{% set prime_line_wipe = printer["gcode_macro _USER_VARIABLES"].prime_line_wipe|default(False) %}
{% set prime_line_wipe_length = prime_line_length * 0.8 %}

# If the SIZE parameter is defined and not a dummy placeholder, we use it to do the adaptive bed mesh logic
Expand Down Expand Up @@ -55,8 +56,6 @@ gcode:
{% set Sz = printer["gcode_macro _USER_VARIABLES"].z_drop_speed * 60 %}
{% set verbose = printer["gcode_macro _USER_VARIABLES"].verbose %}

{% set wipe = printer["gcode_macro _USER_VARIABLES"].prime_line_wipe %}

{% set klippain_mmu_enabled = printer["gcode_macro _USER_VARIABLES"].klippain_mmu_enabled %}
{% set filament_sensor_enabled = printer["gcode_macro _USER_VARIABLES"].filament_sensor_enabled %}
{% set re_enable_filament_sensor = 0 %}
Expand Down Expand Up @@ -120,12 +119,12 @@ gcode:
G92 E0
{% if prime_line_direction == "X" %}
G1 X{prime_line_x + prime_line_way*prime_line_length} E{prime_line_purge_distance} F{speed}
{% if wipe %}
{% if prime_line_wipe %}
G1 X{prime_line_x + prime_line_wipe_length} F{St}
{% endif %}
{% elif prime_line_direction == "Y" %}
G1 Y{prime_line_y + prime_line_way*prime_line_length} E{prime_line_purge_distance} F{speed}
{% if wipe %}
{% if prime_line_wipe %}
G1 Y{prime_line_y + prime_line_wipe_length} F{St}
{% endif %}
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion user_templates/variables.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ variable_prime_line_flowrate: 10 # mm3/s used for the prime line
variable_prime_line_height: 0.6 # mm, used for actual cross section computation
variable_prime_line_margin: 5 # distance of purge line from fl_size rectangle
variable_prime_line_charge_length: 18 # length of filament to pressurize the nozzle before starting the move
variable_prime_line_wipe: True # enable a wipe of the nozzle after completing the prime line
variable_prime_line_wipe: False # enable a wipe of the nozzle after completing the prime line

## Length of filament to retract to reduce oozing after end of print (in mm)
variable_retract_length: 10
Expand Down

0 comments on commit 5fec212

Please sign in to comment.