Merge pull request #6350 from thinkyhead/rc_more_dualx_logging

Add more Dual X logging
master
Scott Lahteine 8 years ago committed by GitHub
commit 3a40e637cd

@ -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; current_position[X_AXIS] = destination[X_AXIS] + duplicate_extruder_x_offset;
inactive_extruder_x_pos = RAW_X_POSITION(destination[X_AXIS]); inactive_extruder_x_pos = RAW_X_POSITION(destination[X_AXIS]);
extruder_duplication_enabled = false; 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; 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 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]) { 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); planner.buffer_line_kinematic(ltarget, _feedrate_mm_s, active_extruder);
return true; return false;
} }
// Get the cartesian distances moved in XYZE // 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]); if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = abs(difference[E_AXIS]);
// No E move either? Game over. // 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 // Minimum number of seconds to move the given distance
float seconds = cartesian_mm / _feedrate_mm_s; 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); planner.buffer_line_kinematic(ltarget, _feedrate_mm_s, active_extruder);
#endif #endif
return true; return false;
} }
#else // !IS_KINEMATIC #else // !IS_KINEMATIC
@ -10990,25 +10996,25 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
#if ENABLED(MESH_BED_LEVELING) #if ENABLED(MESH_BED_LEVELING)
if (mbl.active()) { if (mbl.active()) {
mesh_line_to_destination(MMS_SCALED(feedrate_mm_s)); mesh_line_to_destination(MMS_SCALED(feedrate_mm_s));
return false; return true;
} }
else else
#elif ENABLED(AUTO_BED_LEVELING_UBL) #elif ENABLED(AUTO_BED_LEVELING_UBL)
if (ubl.state.active) { if (ubl.state.active) {
ubl_line_to_destination(MMS_SCALED(feedrate_mm_s), active_extruder); ubl_line_to_destination(MMS_SCALED(feedrate_mm_s), active_extruder);
return false; return true;
} }
else else
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR) #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
if (planner.abl_enabled) { if (planner.abl_enabled) {
bilinear_line_to_destination(MMS_SCALED(feedrate_mm_s)); bilinear_line_to_destination(MMS_SCALED(feedrate_mm_s));
return false; return true;
} }
else else
#endif #endif
line_to_destination(MMS_SCALED(feedrate_mm_s)); line_to_destination(MMS_SCALED(feedrate_mm_s));
} }
return true; return false;
} }
#endif // !IS_KINEMATIC #endif // !IS_KINEMATIC
@ -11032,7 +11038,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
set_current_to_destination(); set_current_to_destination();
NOLESS(raised_parked_position[Z_AXIS], destination[Z_AXIS]); NOLESS(raised_parked_position[Z_AXIS], destination[Z_AXIS]);
delayed_move_time = millis(); delayed_move_time = millis();
return false; return true;
} }
} }
// unpark extruder: 1) raise, 2) move into starting XY position, 3) lower // 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; delayed_move_time = 0;
active_extruder_parked = false; active_extruder_parked = false;
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Clear active_extruder_parked");
#endif
break; break;
case DXC_DUPLICATION_MODE: case DXC_DUPLICATION_MODE:
if (active_extruder == 0) { 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. // move duplicate extruder into correct duplication position.
planner.set_position_mm( planner.set_position_mm(
LOGICAL_X_POSITION(inactive_extruder_x_pos), LOGICAL_X_POSITION(inactive_extruder_x_pos),
@ -11066,11 +11081,19 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
stepper.synchronize(); stepper.synchronize();
extruder_duplication_enabled = true; extruder_duplication_enabled = true;
active_extruder_parked = false; 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; break;
} }
} }
return true; return false;
} }
#endif // DUAL_X_CARRIAGE #endif // DUAL_X_CARRIAGE
@ -11107,12 +11130,12 @@ void prepare_move_to_destination() {
#endif #endif
#if IS_KINEMATIC #if IS_KINEMATIC
if (!prepare_kinematic_move_to(destination)) return; if (prepare_kinematic_move_to(destination)) return;
#else #else
#if ENABLED(DUAL_X_CARRIAGE) #if ENABLED(DUAL_X_CARRIAGE)
if (!prepare_move_to_destination_dualx()) return; if (prepare_move_to_destination_dualx()) return;
#endif #endif
if (!prepare_move_to_destination_cartesian()) return; if (prepare_move_to_destination_cartesian()) return;
#endif #endif
set_current_to_destination(); set_current_to_destination();

Loading…
Cancel
Save