|
@@ -3000,7 +3000,7 @@ inline void gcode_G28() {
|
3000
|
3000
|
int tmp_extruder = active_extruder;
|
3001
|
3001
|
active_extruder = !active_extruder;
|
3002
|
3002
|
HOMEAXIS(X);
|
3003
|
|
- inactive_extruder_x_pos = current_position[X_AXIS];
|
|
3003
|
+ inactive_extruder_x_pos = RAW_X_POSITION(current_position[X_AXIS]);
|
3004
|
3004
|
active_extruder = tmp_extruder;
|
3005
|
3005
|
HOMEAXIS(X);
|
3006
|
3006
|
// reset state used by the different modes
|
|
@@ -6746,16 +6746,16 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_m/*=0.0*/, bool n
|
6746
|
6746
|
|
6747
|
6747
|
switch (dual_x_carriage_mode) {
|
6748
|
6748
|
case DXC_FULL_CONTROL_MODE:
|
6749
|
|
- current_position[X_AXIS] = inactive_extruder_x_pos;
|
6750
|
|
- inactive_extruder_x_pos = destination[X_AXIS];
|
|
6749
|
+ current_position[X_AXIS] = LOGICAL_X_POSITION(inactive_extruder_x_pos);
|
|
6750
|
+ inactive_extruder_x_pos = RAW_X_POSITION(destination[X_AXIS]);
|
6751
|
6751
|
break;
|
6752
|
6752
|
case DXC_DUPLICATION_MODE:
|
6753
|
6753
|
active_extruder_parked = (active_extruder == 0); // this triggers the second extruder to move into the duplication position
|
6754
|
6754
|
if (active_extruder_parked)
|
6755
|
|
- current_position[X_AXIS] = inactive_extruder_x_pos;
|
|
6755
|
+ current_position[X_AXIS] = LOGICAL_X_POSITION(inactive_extruder_x_pos);
|
6756
|
6756
|
else
|
6757
|
6757
|
current_position[X_AXIS] = destination[X_AXIS] + duplicate_extruder_x_offset;
|
6758
|
|
- inactive_extruder_x_pos = destination[X_AXIS];
|
|
6758
|
+ inactive_extruder_x_pos = RAW_X_POSITION(destination[X_AXIS]);
|
6759
|
6759
|
extruder_duplication_enabled = false;
|
6760
|
6760
|
break;
|
6761
|
6761
|
default:
|
|
@@ -8026,7 +8026,12 @@ void mesh_line_to_destination(float fr_mm_m, uint8_t x_splits = 0xff, uint8_t y_
|
8026
|
8026
|
if (active_extruder_parked) {
|
8027
|
8027
|
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) {
|
8028
|
8028
|
// move duplicate extruder into correct duplication position.
|
8029
|
|
- planner.set_position_mm(inactive_extruder_x_pos, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
|
8029
|
+ planner.set_position_mm(
|
|
8030
|
+ LOGICAL_X_POSITION(inactive_extruder_x_pos),
|
|
8031
|
+ current_position[Y_AXIS],
|
|
8032
|
+ current_position[Z_AXIS],
|
|
8033
|
+ current_position[E_AXIS]
|
|
8034
|
+ );
|
8030
|
8035
|
planner.buffer_line(current_position[X_AXIS] + duplicate_extruder_x_offset,
|
8031
|
8036
|
current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], planner.max_feedrate_mm_s[X_AXIS], 1);
|
8032
|
8037
|
SYNC_PLAN_POSITION_KINEMATIC();
|