Bed fans off during prints without a heated chamber, remove unused bed PID

With the chamber open the bed fans only blow room air past the bed. PRINT_WARMUP
sets print_fans_off for CHAMBER 30 or less, _PRINT_CLEANUP clears it. Chamber
prints, the cooldown and heating the bed outside a print are unchanged.

The PID values in PRINT_WARMUP never took effect: the SET_HEATER_TEMPERATURE
override in bed_fans.cfg only passes on the target. The bed keeps its config
values; the misleading console messages are gone.

Tested with rendered macros only, not yet on the printer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-11-06 16:18:38 +01:00
1 parent 99b7109b5b
commit 1dcbc50bf6
3 files changed
+24 -17

No files matched your search

+17 -9
View File
@@ -1,4 +1,9 @@
# Bed fans driven by the bed heater (based on Ellis' bed fan macros)
#
# During a print without a heated chamber the fans stay off while the bed heats,
# soaks and prints: with the chamber open they only blow room air past the bed.
# PRINT_WARMUP sets print_fans_off, _PRINT_CLEANUP clears it. The cooldown after
# the print and heating the bed outside a print are not affected.
############### Config options ##################
@@ -7,6 +12,7 @@ variable_threshold: 50 # If bed temp target is above this threshold, fans will
variable_fast: 1.0 # Fan speed once bed temp is reached
variable_slow: 0.5 # Fan speed while bed is heating
variable_cooldown_temp: 40 # NEW: fans stop below this temp
variable_print_fans_off: False # set by PRINT_WARMUP for a print without a heated chamber
gcode:
########## Aliases #########
@@ -41,7 +47,8 @@ gcode:
# Vars
{% set THRESHOLD = printer["gcode_macro _BEDFANVARS"].threshold|int %}
{% set COOLDOWN = printer["gcode_macro _BEDFANVARS"].cooldown_temp|int %}
{% set FANS_OFF = printer["gcode_macro _BEDFANVARS"].print_fans_off %}
{% if HEATER|lower == "extruder" %}
M104 S{TARGET}
@@ -67,13 +74,13 @@ gcode:
# Stop normal heating loop if running
UPDATE_DELAYED_GCODE ID=bedfanloop DURATION=0
{% elif TARGET >= THRESHOLD %}
{% elif TARGET >= THRESHOLD and not FANS_OFF %}
# Heating above threshold
BEDFANSSLOW
UPDATE_DELAYED_GCODE ID=bedfanloop DURATION=1
{% else %}
# Low temp request
# Low temp request, or a print without a heated chamber
BEDFANSOFF
UPDATE_DELAYED_GCODE ID=bedfanloop DURATION=0
{% endif %}
@@ -93,9 +100,10 @@ gcode:
{% set S = params.S|int %}
# Vars
{% set THRESHOLD = printer["gcode_macro _BEDFANVARS"].threshold|int %}
{% if S >= THRESHOLD %}
BEDFANSSLOW # >= Threshold temp: Low speed fans while heating
{% set FANS_ON = S >= THRESHOLD and not printer["gcode_macro _BEDFANVARS"].print_fans_off %}
{% if FANS_ON %}
BEDFANSSLOW # >= Threshold temp: Low speed fans while heating
{% else %}
BEDFANSOFF # < Threshold temp: Turn bed fans off
{% endif %}
@@ -109,8 +117,8 @@ gcode:
{% endif %}
# Post-heating fan speeds
{% if S >= THRESHOLD %}
BEDFANSFAST # >= Threshold temp: Higher speed fans after heating finished
{% if FANS_ON %}
BEDFANSFAST # >= Threshold temp: Higher speed fans after heating finished
{% endif %}
# Replace M140 (Set Bed Temperature) to just be an alias of SET_HEATER_TEMPERATURE (which has associated bed fan logic if enabled)
@@ -152,7 +160,7 @@ gcode:
# Vars
{% set THRESHOLD = printer["gcode_macro _BEDFANVARS"].threshold|int %}
{% if printer.heater_bed.target >= THRESHOLD %} # Continue only if target temp greater than threshold.
{% if printer.heater_bed.target >= THRESHOLD and not printer["gcode_macro _BEDFANVARS"].print_fans_off %} # Continue only if target temp greater than threshold.
{% if printer.heater_bed.temperature|int >= (printer.heater_bed.target|int - 1) %}
BEDFANSFAST # If within 1 degree of target temp: Higher speed fans
{% else %}