fix aux fan issue for third party printers

This commit is contained in:
SoftFever 2022-10-25 21:42:36 +08:00
parent ec28acf476
commit bd672054cc
5 changed files with 8 additions and 7 deletions

View file

@ -1499,7 +1499,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
}
// Disable fan.
if (print.config().close_fan_the_first_x_layers.get_at(initial_extruder_id)) {
if (m_config.auxiliary_fan.value && print.config().close_fan_the_first_x_layers.get_at(initial_extruder_id)) {
file.write(m_writer.set_fan(0));
//BBS: disable additional fan
file.write(m_writer.set_additional_fan(0));
@ -1806,7 +1806,8 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
file.write(this->retract(false, true));
file.write(m_writer.set_fan(0));
//BBS: make sure the additional fan is closed when end
file.write(m_writer.set_additional_fan(0));
if(m_config.auxiliary_fan.value)
file.write(m_writer.set_additional_fan(0));
if (is_bbl_printers) {
//BBS: close spaghetti detector
//Note: M981 is also used to tell xcam the last layer is finished, so we need always send it even if spaghetti option is disabled.

View file

@ -774,7 +774,7 @@ std::string CoolingBuffer::apply_layer_cooldown(
new_gcode += GCodeWriter::set_fan(m_config.gcode_flavor, m_fan_speed);
}
//BBS
if (additional_fan_speed_new != m_additional_fan_speed) {
if (additional_fan_speed_new != m_additional_fan_speed && m_config.auxiliary_fan.value) {
m_additional_fan_speed = additional_fan_speed_new;
new_gcode += GCodeWriter::set_additional_fan(m_additional_fan_speed);
}
@ -811,7 +811,7 @@ std::string CoolingBuffer::apply_layer_cooldown(
//BBS: force to write a fan speed command again
if (m_current_fan_speed != -1)
new_gcode += GCodeWriter::set_fan(m_config.gcode_flavor, m_current_fan_speed);
if (m_additional_fan_speed != -1)
if (m_additional_fan_speed != -1 && m_config.auxiliary_fan.value)
new_gcode += GCodeWriter::set_additional_fan(m_additional_fan_speed);
}
else if (line->type & CoolingLine::TYPE_EXTRUDE_END) {