fine tune retraction test

This commit is contained in:
SoftFever 2023-05-10 21:51:10 +08:00
parent c9fcc421c9
commit 35f8dba5ab
3 changed files with 3 additions and 19 deletions

View file

@ -2859,7 +2859,7 @@ GCode::LayerResult GCode::process_layer(
m_calib_config.set_key_value("outer_wall_speed", new ConfigOptionFloat(std::round(_speed)));
}
else if (print.calib_mode() == CalibMode::Calib_Retraction_tower) {
auto _length = print.calib_params().start + std::floor(print_z) * print.calib_params().step;
auto _length = print.calib_params().start + std::floor(std::max(0.0,print_z-0.4)) * print.calib_params().step;
DynamicConfig _cfg;
_cfg.set_key_value("retraction_length", new ConfigOptionFloats{_length});
writer().config.apply(_cfg);