Skip to content

Commit d3fabf4

Browse files
InsanityAutomationDarred
authored andcommitted
🐛 Fix IDEX Duplication Mode Positioning (MarlinFirmware#22914)
Fixing MarlinFirmware#22538
1 parent ae48786 commit d3fabf4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Marlin/src/module/motion.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1194,14 +1194,17 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) {
11941194
case DXC_DUPLICATION_MODE:
11951195
if (active_extruder == 0) {
11961196
// Restore planner to parked head (T1) X position
1197+
float x0_pos = current_position.x;
11971198
xyze_pos_t pos_now = current_position;
11981199
pos_now.x = inactive_extruder_x;
11991200
planner.set_position_mm(pos_now);
12001201

12011202
// Keep the same X or add the duplication X offset
12021203
xyze_pos_t new_pos = pos_now;
12031204
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE)
1204-
new_pos.x += duplicate_extruder_x_offset;
1205+
new_pos.x = x0_pos + duplicate_extruder_x_offset;
1206+
else
1207+
new_pos.x = _MIN(X_BED_SIZE - x0_pos, X_MAX_POS);
12051208

12061209
// Move duplicate extruder into the correct position
12071210
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Set planner X", inactive_extruder_x, " ... Line to X", new_pos.x);

0 commit comments

Comments
 (0)