Initial attempt to make speed configs multi-variant

Co-authored-by: chunmao.guo <chunmao.guo@bambulab.com>
Co-authored-by: zhimin.zeng <zhimin.zeng@bambulab.com>
Co-authored-by: qing.zhang <qing.zhang@bambulab.com>
This commit is contained in:
Noisyfox
2026-05-19 22:11:56 +08:00
parent e87b0d57b4
commit 1c8c7820c8
22 changed files with 648 additions and 512 deletions

View File

@@ -1472,7 +1472,7 @@ WipeTower::WipeTower(const PrintConfig& config, int plate_idx, Vec3d plate_origi
m_bridging(10.f),
m_no_sparse_layers(config.wipe_tower_no_sparse_layers),
m_gcode_flavor(config.gcode_flavor),
m_travel_speed(config.travel_speed),
m_travel_speed(config.travel_speed.get_at(get_extruder_index(config, (unsigned int)initial_tool))),
m_current_tool(initial_tool),
//wipe_volumes(flush_matrix)
m_enable_timelapse_print(config.timelapse_type.value == TimelapseType::tlSmooth),
@@ -1497,7 +1497,7 @@ WipeTower::WipeTower(const PrintConfig& config, int plate_idx, Vec3d plate_origi
// it is taken over following default. Speeds from config are not
// easily accessible here.
const float default_speed = 60.f;
m_first_layer_speed = config.get_abs_value("initial_layer_speed");
m_first_layer_speed = config.initial_layer_speed.get_at(get_extruder_index(config, (unsigned int)initial_tool));
if (m_first_layer_speed == 0.f) // just to make sure autospeed doesn't break it.
m_first_layer_speed = default_speed / 2.f;