Skip to content
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
7 changes: 7 additions & 0 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,13 @@ void Temperature::init() {
#endif
#endif

#if ENABLED(USE_CONTROLLER_FAN)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be #if HAS_CONTROLLER_FAN to mirror the others.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then i would have to specifically define HAS_CONTROLLER_FAN in a separate file. As far i can tell the ENABLED is a other version of it without the hassle to redefine it via a check.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already defined, but you're right to use ENABLED(USE_CONTROLLER_FAN). The other fans are enabled independent of any configuration options, simply on the basis of the pins being defined. (This is a legacy from Marlin 1.0.x.)

SET_OUTPUT(CONTROLLER_FAN_PIN);
#if ENABLED(FAST_PWM_FAN)
setPwmFrequency(CONTROLLER_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
#endif
#endif

#if ENABLED(HEATER_0_USES_MAX6675)

OUT_WRITE(SCK_PIN, LOW);
Expand Down