Skip to content

Commit

Permalink
Update cancel_print.cfg
Browse files Browse the repository at this point in the history
Add same timed filter routine as in end_print
  • Loading branch information
tehniemer committed Dec 19, 2023
1 parent 0ef3d88 commit 10aeecf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion macros/base/cancel_print.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,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 filter_default_time = printer["gcode_macro _USER_VARIABLES"].filter_default_time_on_end_print|default(600)|int %}

PARK

Expand Down Expand Up @@ -41,8 +42,14 @@ gcode:

SDCARD_RESET_FILE

# If a filter is connected, and used during the print, continue filtering the air
# for a couple of min before stopping everything
{% if filter_enabled %}
STOP_FILTER
{% if printer['fan_generic filter'].speed > 0 %}
{% set FILTER_TIME = params.FILTER_TIME|default(filter_default_time)|int %}
START_FILTER SPEED=1
UPDATE_DELAYED_GCODE ID=_STOP_FILTER_DELAYED DURATION={FILTER_TIME}
{% endif %}
{% endif %}

{% if light_enabled %}
Expand Down

0 comments on commit 10aeecf

Please sign in to comment.