ENH: support curr extruder in timelapse gcode

jira: STUDIO-12119

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: If8fd91a6a1d54d3c5f4430c7f5c06685792c3a8e
(cherry picked from commit faacd23e3fba22b290e6fd47bce9de704c1165a1)
This commit is contained in:
xun.zhang
2025-05-16 20:55:59 +08:00
committed by Noisyfox
parent 7c8ea0ecfc
commit d9b68c6eef

View File

@@ -4615,6 +4615,7 @@ 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((int)timelapse_pos.x()));
config.set_key_value("timelapse_pos_y", new ConfigOptionInt((int)timelapse_pos.y()));
config.set_key_value("has_timelapse_safe_pos", new ConfigOptionBool(timelapse_pos != DefaultTimelapsePos));