|
@@ -9324,6 +9324,12 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
|
9324
|
9324
|
current_position[X_AXIS] = destination[X_AXIS] + duplicate_extruder_x_offset;
|
9325
|
9325
|
inactive_extruder_x_pos = RAW_X_POSITION(destination[X_AXIS]);
|
9326
|
9326
|
extruder_duplication_enabled = false;
|
|
9327
|
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
9328
|
+ if (DEBUGGING(LEVELING)) {
|
|
9329
|
+ SERIAL_ECHOLNPAIR("Set inactive_extruder_x_pos=", inactive_extruder_x_pos);
|
|
9330
|
+ SERIAL_ECHOLNPGM("Clear extruder_duplication_enabled");
|
|
9331
|
+ }
|
|
9332
|
+ #endif
|
9327
|
9333
|
break;
|
9328
|
9334
|
}
|
9329
|
9335
|
|
|
@@ -10871,7 +10877,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
10871
|
10877
|
// If the move is only in Z/E don't split up the move
|
10872
|
10878
|
if (ltarget[X_AXIS] == current_position[X_AXIS] && ltarget[Y_AXIS] == current_position[Y_AXIS]) {
|
10873
|
10879
|
planner.buffer_line_kinematic(ltarget, _feedrate_mm_s, active_extruder);
|
10874
|
|
- return true;
|
|
10880
|
+ return false;
|
10875
|
10881
|
}
|
10876
|
10882
|
|
10877
|
10883
|
// Get the cartesian distances moved in XYZE
|
|
@@ -10885,7 +10891,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
10885
|
10891
|
if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = abs(difference[E_AXIS]);
|
10886
|
10892
|
|
10887
|
10893
|
// No E move either? Game over.
|
10888
|
|
- if (UNEAR_ZERO(cartesian_mm)) return false;
|
|
10894
|
+ if (UNEAR_ZERO(cartesian_mm)) return true;
|
10889
|
10895
|
|
10890
|
10896
|
// Minimum number of seconds to move the given distance
|
10891
|
10897
|
float seconds = cartesian_mm / _feedrate_mm_s;
|
|
@@ -10970,7 +10976,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
10970
|
10976
|
planner.buffer_line_kinematic(ltarget, _feedrate_mm_s, active_extruder);
|
10971
|
10977
|
#endif
|
10972
|
10978
|
|
10973
|
|
- return true;
|
|
10979
|
+ return false;
|
10974
|
10980
|
}
|
10975
|
10981
|
|
10976
|
10982
|
#else // !IS_KINEMATIC
|
|
@@ -10990,25 +10996,25 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
10990
|
10996
|
#if ENABLED(MESH_BED_LEVELING)
|
10991
|
10997
|
if (mbl.active()) {
|
10992
|
10998
|
mesh_line_to_destination(MMS_SCALED(feedrate_mm_s));
|
10993
|
|
- return false;
|
|
10999
|
+ return true;
|
10994
|
11000
|
}
|
10995
|
11001
|
else
|
10996
|
11002
|
#elif ENABLED(AUTO_BED_LEVELING_UBL)
|
10997
|
11003
|
if (ubl.state.active) {
|
10998
|
11004
|
ubl_line_to_destination(MMS_SCALED(feedrate_mm_s), active_extruder);
|
10999
|
|
- return false;
|
|
11005
|
+ return true;
|
11000
|
11006
|
}
|
11001
|
11007
|
else
|
11002
|
11008
|
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
11003
|
11009
|
if (planner.abl_enabled) {
|
11004
|
11010
|
bilinear_line_to_destination(MMS_SCALED(feedrate_mm_s));
|
11005
|
|
- return false;
|
|
11011
|
+ return true;
|
11006
|
11012
|
}
|
11007
|
11013
|
else
|
11008
|
11014
|
#endif
|
11009
|
11015
|
line_to_destination(MMS_SCALED(feedrate_mm_s));
|
11010
|
11016
|
}
|
11011
|
|
- return true;
|
|
11017
|
+ return false;
|
11012
|
11018
|
}
|
11013
|
11019
|
|
11014
|
11020
|
#endif // !IS_KINEMATIC
|
|
@@ -11032,7 +11038,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
11032
|
11038
|
set_current_to_destination();
|
11033
|
11039
|
NOLESS(raised_parked_position[Z_AXIS], destination[Z_AXIS]);
|
11034
|
11040
|
delayed_move_time = millis();
|
11035
|
|
- return false;
|
|
11041
|
+ return true;
|
11036
|
11042
|
}
|
11037
|
11043
|
}
|
11038
|
11044
|
// unpark extruder: 1) raise, 2) move into starting XY position, 3) lower
|
|
@@ -11047,9 +11053,18 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
11047
|
11053
|
);
|
11048
|
11054
|
delayed_move_time = 0;
|
11049
|
11055
|
active_extruder_parked = false;
|
|
11056
|
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
11057
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Clear active_extruder_parked");
|
|
11058
|
+ #endif
|
11050
|
11059
|
break;
|
11051
|
11060
|
case DXC_DUPLICATION_MODE:
|
11052
|
11061
|
if (active_extruder == 0) {
|
|
11062
|
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
11063
|
+ if (DEBUGGING(LEVELING)) {
|
|
11064
|
+ SERIAL_ECHOPAIR("Set planner X", LOGICAL_X_POSITION(inactive_extruder_x_pos));
|
|
11065
|
+ SERIAL_ECHOLNPAIR(" ... Line to X", current_position[X_AXIS] + duplicate_extruder_x_offset);
|
|
11066
|
+ }
|
|
11067
|
+ #endif
|
11053
|
11068
|
// move duplicate extruder into correct duplication position.
|
11054
|
11069
|
planner.set_position_mm(
|
11055
|
11070
|
LOGICAL_X_POSITION(inactive_extruder_x_pos),
|
|
@@ -11066,11 +11081,19 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
11066
|
11081
|
stepper.synchronize();
|
11067
|
11082
|
extruder_duplication_enabled = true;
|
11068
|
11083
|
active_extruder_parked = false;
|
|
11084
|
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
11085
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Set extruder_duplication_enabled\nClear active_extruder_parked");
|
|
11086
|
+ #endif
|
|
11087
|
+ }
|
|
11088
|
+ else {
|
|
11089
|
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
11090
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Active extruder not 0");
|
|
11091
|
+ #endif
|
11069
|
11092
|
}
|
11070
|
11093
|
break;
|
11071
|
11094
|
}
|
11072
|
11095
|
}
|
11073
|
|
- return true;
|
|
11096
|
+ return false;
|
11074
|
11097
|
}
|
11075
|
11098
|
|
11076
|
11099
|
#endif // DUAL_X_CARRIAGE
|
|
@@ -11107,12 +11130,12 @@ void prepare_move_to_destination() {
|
11107
|
11130
|
#endif
|
11108
|
11131
|
|
11109
|
11132
|
#if IS_KINEMATIC
|
11110
|
|
- if (!prepare_kinematic_move_to(destination)) return;
|
|
11133
|
+ if (prepare_kinematic_move_to(destination)) return;
|
11111
|
11134
|
#else
|
11112
|
11135
|
#if ENABLED(DUAL_X_CARRIAGE)
|
11113
|
|
- if (!prepare_move_to_destination_dualx()) return;
|
|
11136
|
+ if (prepare_move_to_destination_dualx()) return;
|
11114
|
11137
|
#endif
|
11115
|
|
- if (!prepare_move_to_destination_cartesian()) return;
|
|
11138
|
+ if (prepare_move_to_destination_cartesian()) return;
|
11116
|
11139
|
#endif
|
11117
|
11140
|
|
11118
|
11141
|
set_current_to_destination();
|