diff --git a/macros/base/cancel_print.cfg b/macros/base/cancel_print.cfg index 128d0d138..a515d2b7b 100644 --- a/macros/base/cancel_print.cfg +++ b/macros/base/cancel_print.cfg @@ -11,6 +11,7 @@ gcode: {% set light_enabled = printer["gcode_macro _USER_VARIABLES"].light_enabled %} {% set status_leds_enabled = printer["gcode_macro _USER_VARIABLES"].status_leds_enabled %} {% set bed_mesh_enabled = printer["gcode_macro _USER_VARIABLES"].bed_mesh_enabled %} + {% set retract_length = printer["gcode_macro _USER_VARIABLES"].retract_length|default(10)|float %} {% set filament_sensor_enabled = printer["gcode_macro _USER_VARIABLES"].filament_sensor_enabled %} {% set filter_default_time = printer["gcode_macro _USER_VARIABLES"].filter_default_time_on_end_print|default(600)|int %} {% set hotend_fan_tach_enabled = printer["gcode_macro _USER_VARIABLES"].hotend_fan_tach_enabled %} @@ -25,7 +26,7 @@ gcode: {% endif %} {% elif printer.extruder.can_extrude %} G92 E0 - G1 E-{retract_length} F3600 + G1 E-{retract_length} F2100 {% endif %} {% if turn_off_heaters_in_end_print %} diff --git a/macros/base/end_print.cfg b/macros/base/end_print.cfg index 86c905a48..409cb2f46 100644 --- a/macros/base/end_print.cfg +++ b/macros/base/end_print.cfg @@ -12,6 +12,7 @@ gcode: {% set status_leds_enabled = printer["gcode_macro _USER_VARIABLES"].status_leds_enabled %} {% set bed_mesh_enabled = printer["gcode_macro _USER_VARIABLES"].bed_mesh_enabled %} {% set filter_default_time = printer["gcode_macro _USER_VARIABLES"].filter_default_time_on_end_print|default(600)|int %} + {% set retract_length = printer["gcode_macro _USER_VARIABLES"].retract_length|default(10)|float %} {% set filament_sensor_enabled = printer["gcode_macro _USER_VARIABLES"].filament_sensor_enabled %} {% set hotend_fan_tach_enabled = printer["gcode_macro _USER_VARIABLES"].hotend_fan_tach_enabled %} {% set retract_length = printer["gcode_macro _USER_VARIABLES"].retract_length|default(10)|float %} diff --git a/user_templates/variables.cfg b/user_templates/variables.cfg index fc144453a..8ca77786c 100644 --- a/user_templates/variables.cfg +++ b/user_templates/variables.cfg @@ -68,6 +68,9 @@ variable_retract_length: 10 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 +## Length of filament to retract to reduce oozing after end of print (in mm) +variable_retract_length: 10 + ## Park position used when pause, end_print, etc... variable_park_position_xy: -1, -1 variable_park_lift_z: 50