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

Add CONTROLLER_FAN_BED_HEATING option to control to run/not run the controller fan when the bed is heating #27409

Merged
merged 3 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,8 @@
// Use TEMP_SENSOR_SOC as a trigger for enabling the controller fan
//#define CONTROLLER_FAN_MIN_SOC_TEMP 40 // (°C) Turn on the fan if the SoC reaches this temperature

#define CONTROLLER_FAN_BED_HEATING // Turn on the fan when heating the bed

//#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
#if ENABLED(CONTROLLER_FAN_EDITABLE)
#define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu
Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/feature/controllerfan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ void ControllerFan::update() {
*/
const ena_mask_t axis_mask = TERN(CONTROLLER_FAN_USE_Z_ONLY, _BV(Z_AXIS), (ena_mask_t)~TERN0(CONTROLLER_FAN_IGNORE_Z, _BV(Z_AXIS)));
if ( (stepper.axis_enabled.bits & axis_mask)
|| TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0)
#if ALL(HAS_HEATED_BED, CONTROLLER_FAN_BED_HEATING)
|| thermalManager.temp_bed.soft_pwm_amount > 0
#endif
#ifdef CONTROLLER_FAN_MIN_BOARD_TEMP
|| thermalManager.wholeDegBoard() >= CONTROLLER_FAN_MIN_BOARD_TEMP
#endif
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/inc/Conditionals-4-adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,7 @@
#if !TEMP_SENSOR_BED
#undef BED_MINTEMP
#undef BED_MAXTEMP
#undef CONTROLLER_FAN_BED_HEATING
#endif
#if DISABLED(THERMAL_PROTECTION_BED)
#undef THERMAL_PROTECTION_BED_PERIOD
Expand Down
Loading