Merge pull request #6350 from thinkyhead/rc_more_dualx_logging

Add more Dual X logging
This commit is contained in:
Scott Lahteine 2017-04-15 02:02:54 -05:00 committed by GitHub
commit 3a40e637cd

View file

@ -9324,6 +9324,12 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
current_position[X_AXIS] = destination[X_AXIS] + duplicate_extruder_x_offset;
inactive_extruder_x_pos = RAW_X_POSITION(destination[X_AXIS]);
extruder_duplication_enabled = false;
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
SERIAL_ECHOLNPAIR("Set inactive_extruder_x_pos=", inactive_extruder_x_pos);
SERIAL_ECHOLNPGM("Clear extruder_duplication_enabled");
}
#endif
break;
}
@ -10871,7 +10877,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
// If the move is only in Z/E don't split up the move
if (ltarget[X_AXIS] == current_position[X_AXIS] && ltarget[Y_AXIS] == current_position[Y_AXIS]) {
planner.buffer_line_kinematic(ltarget, _feedrate_mm_s, active_extruder);
return true;
return false;
}
// Get the cartesian distances moved in XYZE
@ -10885,7 +10891,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = abs(difference[E_AXIS]);
// No E move either? Game over.
if (UNEAR_ZERO(cartesian_mm)) return false;
if (UNEAR_ZERO(cartesian_mm)) return true;
// Minimum number of seconds to move the given distance
float seconds = cartesian_mm / _feedrate_mm_s;
@ -10970,7 +10976,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
planner.buffer_line_kinematic(ltarget, _feedrate_mm_s, active_extruder);
#endif
return true;
return false;
}
#else // !IS_KINEMATIC
@ -10990,25 +10996,25 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
#if ENABLED(MESH_BED_LEVELING)
if (mbl.active()) {
mesh_line_to_destination(MMS_SCALED(feedrate_mm_s));
return false;
return true;
}
else
#elif ENABLED(AUTO_BED_LEVELING_UBL)
if (ubl.state.active) {
ubl_line_to_destination(MMS_SCALED(feedrate_mm_s), active_extruder);
return false;
return true;
}
else
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
if (planner.abl_enabled) {
bilinear_line_to_destination(MMS_SCALED(feedrate_mm_s));
return false;
return true;
}
else
#endif
line_to_destination(MMS_SCALED(feedrate_mm_s));
}
return true;
return false;
}
#endif // !IS_KINEMATIC
@ -11032,7 +11038,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
set_current_to_destination();
NOLESS(raised_parked_position[Z_AXIS], destination[Z_AXIS]);
delayed_move_time = millis();
return false;
return true;
}
}
// 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) {
);
delayed_move_time = 0;
active_extruder_parked = false;
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Clear active_extruder_parked");
#endif
break;
case DXC_DUPLICATION_MODE:
if (active_extruder == 0) {
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR("Set planner X", LOGICAL_X_POSITION(inactive_extruder_x_pos));
SERIAL_ECHOLNPAIR(" ... Line to X", current_position[X_AXIS] + duplicate_extruder_x_offset);
}
#endif
// move duplicate extruder into correct duplication position.
planner.set_position_mm(
LOGICAL_X_POSITION(inactive_extruder_x_pos),
@ -11066,11 +11081,19 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
stepper.synchronize();
extruder_duplication_enabled = true;
active_extruder_parked = false;
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Set extruder_duplication_enabled\nClear active_extruder_parked");
#endif
}
else {
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Active extruder not 0");
#endif
}
break;
}
}
return true;
return false;
}
#endif // DUAL_X_CARRIAGE
@ -11107,12 +11130,12 @@ void prepare_move_to_destination() {
#endif
#if IS_KINEMATIC
if (!prepare_kinematic_move_to(destination)) return;
if (prepare_kinematic_move_to(destination)) return;
#else
#if ENABLED(DUAL_X_CARRIAGE)
if (!prepare_move_to_destination_dualx()) return;
if (prepare_move_to_destination_dualx()) return;
#endif
if (!prepare_move_to_destination_cartesian()) return;
if (prepare_move_to_destination_cartesian()) return;
#endif
set_current_to_destination();