Skip to content

Commit

Permalink
adapt cancel and end macros
Browse files Browse the repository at this point in the history
  • Loading branch information
Elias Huwyler authored and Elias23 committed Jan 20, 2025
1 parent 0767bc7 commit e90b0d4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions macros/base/cancel_print.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ gcode:
{% set klippain_mmu_enabled = printer["gcode_macro _USER_VARIABLES"].klippain_mmu_enabled %}
{% set mmu_unload_on_cancel_print = printer["gcode_macro _USER_VARIABLES"].mmu_unload_on_cancel_print %}
{% set filter_enabled = printer["gcode_macro _USER_VARIABLES"].filter_enabled %}
{% set exhaust_enabled = printer["gcode_macro _USER_VARIABLES"].exhaust_enabled %}
{% 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 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 exhaust_filter_default_time = printer["gcode_macro _USER_VARIABLES"].filter_exhaust_default_time_on_end_print|default(600)|int %}
{% 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(20)|float %}

Expand Down Expand Up @@ -59,6 +61,12 @@ gcode:
UPDATE_DELAYED_GCODE ID=_STOP_FILTER_DELAYED DURATION={FILTER_TIME}
{% endif %}
{% endif %}
#Same for exhaust filter
{% if exhaust_enabled %}
{% set EXHAUST_TIME = params.FILTER_TIME|default(exhaust_filter_default_time)|int %}
START_EXHAUST SPEED=1
UPDATE_DELAYED_GCODE ID=_STOP_EXHAUST_DELAYED DURATION={EXHAUST_TIME}
{% endif %}

{% if light_enabled %}
LIGHT_ON S={light_intensity_end_print}
Expand Down
6 changes: 6 additions & 0 deletions macros/base/end_print.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ gcode:
UPDATE_DELAYED_GCODE ID=_STOP_FILTER_DELAYED DURATION={FILTER_TIME}
{% endif %}
{% endif %}
#Same for exhaust filter
{% if exhaust_enabled %}
{% set EXHAUST_TIME = params.FILTER_TIME|default(exhaust_filter_default_time)|int %}
START_EXHAUST SPEED=1
UPDATE_DELAYED_GCODE ID=_STOP_EXHAUST_DELAYED DURATION={EXHAUST_TIME}
{% endif %}

{% if light_enabled %}
LIGHT_ON S={light_intensity_end_print}
Expand Down

0 comments on commit e90b0d4

Please sign in to comment.