ENH: support curr extruder in timelapse gcode

jira: STUDIO-12119

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: If8fd91a6a1d54d3c5f4430c7f5c06685792c3a8e
This commit is contained in:
xun.zhang 2025-05-16 20:55:59 +08:00 committed by lane.wei
parent 8c78dd2256
commit faacd23e3f

View File

@ -4125,6 +4125,7 @@ GCode::LayerResult GCode::process_layer(
config.set_key_value("layer_z", new ConfigOptionFloat(print_z));
config.set_key_value("max_layer_z", new ConfigOptionFloat(m_max_layer_z));
config.set_key_value("most_used_physical_extruder_id", new ConfigOptionInt(m_config.physical_extruder_map.get_at(most_used_extruder)));
config.set_key_value("curr_physical_extruder_id", new ConfigOptionInt(m_config.physical_extruder_map.get_at(ctx.curr_extruder_id)));
config.set_key_value("timelapse_pos_x", new ConfigOptionInt(timelapse_pos.x()));
config.set_key_value("timelapse_pos_y", new ConfigOptionInt(timelapse_pos.y()));
config.set_key_value("has_timelapse_safe_pos", new ConfigOptionBool(timelapse_pos != DefaultTimelapsePos));