ENH: apply fan speed immediately after changing layer

What: As title. The original code is always apply
at the end of last object of last layer, whichi is before
layer change

Why: the fan spped will be skipped if the last object is
skipped. So we must move the layer time fan speed setting
after changing layer, where is common gcode block and does
not belong to any object.

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: I442f80e00778b524576210b451f81dd15e25e14c
This commit is contained in:
salt.wei 2023-07-07 10:24:51 +08:00 committed by Lane.Wei
parent 18be0e3770
commit 989e4214c5
3 changed files with 39 additions and 5 deletions

View file

@ -2800,6 +2800,8 @@ GCode::LayerResult GCode::process_layer(
+ "\n";
config.set_key_value("max_layer_z", new ConfigOptionFloat(m_max_layer_z));
}
//BBS: set layer time fan speed after layer change gcode
gcode += ";_SET_FAN_SPEED_CHANGING_LAYER\n";
if (print.calib_mode() == CalibMode::Calib_Temp_Tower) {
auto offset = static_cast<unsigned int>(print_z / 10.001) * 5;