Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MACRO: add additional chamber filter speed after print has finished #45

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading