Fix overhang fan speed bugs (#14788)

This commit is contained in:
Kiss Lorand
2026-07-25 18:38:21 -03:00
committed by GitHub
parent fc5aec425e
commit 68ce4da19f
2 changed files with 25 additions and 5 deletions
+7 -2
View File
@@ -844,7 +844,10 @@ std::string CoolingBuffer::apply_layer_cooldown(
ironing_fan_control = false; // ORCA: Add support for ironing fan speed control
ironing_fan_speed = 0; // ORCA: Add support for ironing fan speed control
}
if (fan_speed_new != m_fan_speed) {
// A tool change may keep the same configured base fan speed while the physical fan is
// still running at the previous filament's overhang speed. Restore the base speed before
// emitting G-code for the new tool in that case.
if (fan_speed_new != m_fan_speed || (immediately_apply && m_current_fan_speed != fan_speed_new)) {
m_fan_speed = fan_speed_new;
m_current_fan_speed = fan_speed_new;
if (immediately_apply)
@@ -1040,8 +1043,10 @@ std::string CoolingBuffer::apply_layer_cooldown(
new_gcode += GCodeWriter::set_fan(m_config.gcode_flavor, m_current_fan_speed, part_cooling_fan_min_pwm);
fan_speed_change_requests[CoolingLine::TYPE_FORCE_RESUME_FAN] = false;
}
else
else {
new_gcode += GCodeWriter::set_fan(m_config.gcode_flavor, m_fan_speed, part_cooling_fan_min_pwm);
m_current_fan_speed = m_fan_speed;
}
need_set_fan = false;
}
pos = line_end;