Skip to content

Commit

Permalink
MACRO: add additional chamber filter speed after print has finished (#45
Browse files Browse the repository at this point in the history
)
  • Loading branch information
HelgeKeck authored Dec 20, 2024
1 parent 15677b4 commit 2952105
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions configuration/macros/chamber_filter.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
####
[gcode_macro RatOS]
variable_chamber_filter_enable: True # True|False = enable chamber filter control
variable_chamber_filter_speed: 1.0 # float = chamber filter fan speed.
variable_chamber_filter_speed: 0.5 # float = chamber filter fan speed.
variable_chamber_filter_disable_speed: 1.0 # float = chamber filter fan speed after the print has finished.
variable_chamber_filter_enable_at: "after_print_start" # before_print_start|after_print_start|print_end = when to enable the filter
variable_chamber_filter_disable_period: 300 # int = disable fan after X seconds after the print ends
variable_chamber_filter_disable_bed_temp: 0 # int = wait for X°C bed temp after the print ends before disabling the filter
Expand Down Expand Up @@ -65,7 +66,7 @@ gcode:
RATOS_ECHO PREFIX="CHAMBER_FILTER" MSG="Activating chamber filter..."

# set fan speed
_CHAMBER_FILTER_TURN_ON
_CHAMBER_FILTER_TURN_ON AT={at}

# visual feedback
{% if chamber_filter_enable_at == "print_end" %}
Expand Down Expand Up @@ -125,8 +126,14 @@ gcode:
####
[gcode_macro _CHAMBER_FILTER_TURN_ON]
gcode:
# parameters
{% set at = params.AT|default('')|lower %}

# config
{% set chamber_filter_speed = printer["gcode_macro RatOS"].chamber_filter_speed|default(0)|float %}
{% if at == "print_end" %}
{% set chamber_filter_speed = printer["gcode_macro RatOS"].chamber_filter_disable_speed|default(0)|float %}
{% endif %}

# reset timer
UPDATE_DELAYED_GCODE ID=_CHAMBER_FILTER_OFF_TIMER DURATION=0
Expand Down

0 comments on commit 2952105

Please sign in to comment.