Skip to content

Conversation

@TheAdeo
Copy link

@TheAdeo TheAdeo commented Aug 23, 2025

Now heater_fan accepts SET_FAN_SPEED, while still respecting the minimum speed dictated by the heater being on (or off)

The heater being on or off automatically sets the minimum speed the fans needs to respect, while manual requests can only set the speed higher than that, or request a lower speed that will be set only when the heater turns off and the temp is below the one in the config.

Checklist

  • pr title makes sense
  • added a test case if possible (N/A)
  • if new feature, added to the readme
  • ci is happy and green

I don't know if I have to add it to the readme myself, and I don't know that the "ci" is, but there are no conflicts

Now heater_fan accepts SET_FAN_SPEED, while still respecting the minimum speed dictated by the heater being on (or off)

The heater being on or off automatically sets the minimum speed the fans needs to respect, while manual requests can only set the speed higher than that, or request a lower speed that will be set only when the heater turns off and the temp is below the one in the config.
The following command is available when a
[fan_generic config section](Config_Reference.md#fan_generic) is
enabled.
[fan_generic](Config_Reference.md#fan_generic)
Copy link
Contributor

Choose a reason for hiding this comment

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

This probably needs to be reflowed?

current_temp, target_temp = heater.get_temp(eventtime)
if target_temp or current_temp > self.heater_temp:
speed = self.fan_speed
if (target_temp or current_temp > self.heater_temp) and self.enabled_fan_speed > speed:
Copy link
Contributor

Choose a reason for hiding this comment

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

The logic here is a bit hard to follow, could we split it over multiple statements or something? I'm having a hard time understanding the interaction between last_gcode_speed and enabled_fan_speed as the code currently stands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants