Unify debugging output with debug_out.h (#13388)
This commit is contained in:
@ -31,6 +31,9 @@
|
||||
|
||||
#include "../Marlin.h"
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
#include "../core/debug_out.h"
|
||||
|
||||
#if EXTRUDERS > 1
|
||||
toolchange_settings_t toolchange_settings; // Initialized by settings.load()
|
||||
#endif
|
||||
@ -169,12 +172,10 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
current_position[X_AXIS] = mpe_settings.parking_xpos[tmp_extruder] + offsetcompensation;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOPAIR("(1) Move extruder ", int(tmp_extruder));
|
||||
DEBUG_POS(" to new extruder ParkPos", current_position);
|
||||
}
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("(1) Move extruder ", int(tmp_extruder));
|
||||
DEBUG_POS(" to new extruder ParkPos", current_position);
|
||||
}
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.fast_feedrate, tmp_extruder);
|
||||
planner.synchronize();
|
||||
@ -183,12 +184,10 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
current_position[X_AXIS] = grabpos + offsetcompensation;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOPAIR("(2) Couple extruder ", int(tmp_extruder));
|
||||
DEBUG_POS(" to new extruder GrabPos", current_position);
|
||||
}
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("(2) Couple extruder ", int(tmp_extruder));
|
||||
DEBUG_POS(" to new extruder GrabPos", current_position);
|
||||
}
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.slow_feedrate, tmp_extruder);
|
||||
planner.synchronize();
|
||||
@ -199,12 +198,10 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
// STEP 3
|
||||
|
||||
current_position[X_AXIS] = mpe_settings.parking_xpos[tmp_extruder] + offsetcompensation;
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOPAIR("(3) Move extruder ", int(tmp_extruder));
|
||||
DEBUG_POS(" back to new extruder ParkPos", current_position);
|
||||
}
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("(3) Move extruder ", int(tmp_extruder));
|
||||
DEBUG_POS(" back to new extruder ParkPos", current_position);
|
||||
}
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.slow_feedrate, tmp_extruder);
|
||||
planner.synchronize();
|
||||
@ -212,12 +209,10 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
// STEP 4
|
||||
|
||||
current_position[X_AXIS] = mpe_settings.parking_xpos[active_extruder] + (active_extruder == 0 ? MPE_TRAVEL_DISTANCE : -MPE_TRAVEL_DISTANCE) + offsetcompensation;
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOPAIR("(4) Move extruder ", int(tmp_extruder));
|
||||
DEBUG_POS(" close to old extruder ParkPos", current_position);
|
||||
}
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("(4) Move extruder ", int(tmp_extruder));
|
||||
DEBUG_POS(" close to old extruder ParkPos", current_position);
|
||||
}
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.fast_feedrate, tmp_extruder);
|
||||
planner.synchronize();
|
||||
@ -226,12 +221,10 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
current_position[X_AXIS] = mpe_settings.parking_xpos[active_extruder] + offsetcompensation;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOPAIR("(5) Park extruder ", int(tmp_extruder));
|
||||
DEBUG_POS(" at old extruder ParkPos", current_position);
|
||||
}
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("(5) Park extruder ", int(tmp_extruder));
|
||||
DEBUG_POS(" at old extruder ParkPos", current_position);
|
||||
}
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.slow_feedrate, tmp_extruder);
|
||||
planner.synchronize();
|
||||
@ -240,19 +233,15 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
current_position[X_AXIS] = oldx;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOPAIR("(6) Move extruder ", int(tmp_extruder));
|
||||
DEBUG_POS(" to starting position", current_position);
|
||||
}
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("(6) Move extruder ", int(tmp_extruder));
|
||||
DEBUG_POS(" to starting position", current_position);
|
||||
}
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.fast_feedrate, tmp_extruder);
|
||||
planner.synchronize();
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Autopark done.");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Autopark done.");
|
||||
}
|
||||
|
||||
#elif ENABLED(PARKING_EXTRUDER)
|
||||
@ -302,15 +291,11 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
// STEP 1
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Start Autopark", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Start Autopark", current_position);
|
||||
|
||||
current_position[Z_AXIS] += toolchange_settings.z_raise;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("(1) Raise Z-Axis", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("(1) Raise Z-Axis", current_position);
|
||||
|
||||
fast_line_to_current(Z_AXIS);
|
||||
planner.synchronize();
|
||||
@ -319,43 +304,33 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
current_position[X_AXIS] = parkingposx[active_extruder] + x_offset;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOLNPAIR("(2) Park extruder ", int(active_extruder));
|
||||
DEBUG_POS("Moving ParkPos", current_position);
|
||||
}
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOLNPAIR("(2) Park extruder ", int(active_extruder));
|
||||
DEBUG_POS("Moving ParkPos", current_position);
|
||||
}
|
||||
|
||||
fast_line_to_current(X_AXIS);
|
||||
planner.synchronize();
|
||||
|
||||
// STEP 3
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(3) Disengage magnet ");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("(3) Disengage magnet ");
|
||||
|
||||
pe_deactivate_solenoid(active_extruder);
|
||||
|
||||
// STEP 4
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(4) Move to position near new extruder");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("(4) Move to position near new extruder");
|
||||
|
||||
current_position[X_AXIS] += active_extruder ? -10 : 10; // move 10mm away from parked extruder
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move away from parked extruder", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move away from parked extruder", current_position);
|
||||
|
||||
fast_line_to_current(X_AXIS);
|
||||
planner.synchronize();
|
||||
|
||||
// STEP 5
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(5) Engage magnetic field");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("(5) Engage magnetic field");
|
||||
|
||||
#if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT)
|
||||
pe_activate_solenoid(active_extruder); //just save power for inverted magnets
|
||||
@ -368,9 +343,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
current_position[X_AXIS] = grabpos + (tmp_extruder ? -10 : 10);
|
||||
fast_line_to_current(X_AXIS);
|
||||
current_position[X_AXIS] = grabpos;
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("(6) Unpark extruder", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("(6) Unpark extruder", current_position);
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS] * 0.5, active_extruder);
|
||||
planner.synchronize();
|
||||
|
||||
@ -382,16 +355,12 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
#endif
|
||||
;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("(7) Move midway between hotends", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("(7) Move midway between hotends", current_position);
|
||||
|
||||
fast_line_to_current(X_AXIS);
|
||||
planner.synchronize();
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
SERIAL_ECHOLNPGM("Autopark done.");
|
||||
#endif
|
||||
DEBUG_ECHOLNPGM("Autopark done.");
|
||||
}
|
||||
else { // nomove == true
|
||||
// Only engage magnetic field for new extruder
|
||||
@ -405,9 +374,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
current_position[Z_AXIS] += hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
|
||||
#endif
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Applying Z-offset", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Applying Z-offset", current_position);
|
||||
}
|
||||
|
||||
#endif // PARKING_EXTRUDER
|
||||
@ -433,15 +400,11 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
// 1. Raise Z to give enough clearance
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Starting Toolhead change", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Starting Toolhead change", current_position);
|
||||
|
||||
current_position[Z_AXIS] += toolchange_settings.z_raise;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("(1) Raise Z-Axis", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("(1) Raise Z-Axis", current_position);
|
||||
|
||||
fast_line_to_current(Z_AXIS);
|
||||
planner.synchronize();
|
||||
@ -450,86 +413,66 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
current_position[X_AXIS] = placexpos;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOLNPAIR("(2) Place old tool ", int(active_extruder));
|
||||
DEBUG_POS("Move X SwitchPos", current_position);
|
||||
}
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOLNPAIR("(2) Place old tool ", int(active_extruder));
|
||||
DEBUG_POS("Move X SwitchPos", current_position);
|
||||
}
|
||||
|
||||
fast_line_to_current(X_AXIS);
|
||||
planner.synchronize();
|
||||
|
||||
current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS - SWITCHING_TOOLHEAD_Y_SECURITY;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move Y SwitchPos + Security", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move Y SwitchPos + Security", current_position);
|
||||
|
||||
fast_line_to_current(Y_AXIS);
|
||||
planner.synchronize();
|
||||
|
||||
// 3. Unlock tool and drop it in the dock
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(3) Unlock and Place Toolhead");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("(3) Unlock and Place Toolhead");
|
||||
|
||||
MOVE_SERVO(SWITCHING_TOOLHEAD_SERVO_NR, angles[1]);
|
||||
safe_delay(500);
|
||||
|
||||
current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move Y SwitchPos", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move Y SwitchPos", current_position);
|
||||
|
||||
planner.buffer_line(current_position,(planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5), active_extruder);
|
||||
planner.synchronize();
|
||||
safe_delay(200);
|
||||
current_position[Y_AXIS] -= SWITCHING_TOOLHEAD_Y_CLEAR;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move back Y clear", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move back Y clear", current_position);
|
||||
|
||||
fast_line_to_current(Y_AXIS); // move away from docked toolhead
|
||||
planner.synchronize();
|
||||
|
||||
// 4. Move to the new toolhead
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(4) Move to new toolhead position");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("(4) Move to new toolhead position");
|
||||
|
||||
current_position[X_AXIS] = grabxpos;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move to new toolhead X", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move to new toolhead X", current_position);
|
||||
|
||||
fast_line_to_current(X_AXIS);
|
||||
planner.synchronize();
|
||||
current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS - SWITCHING_TOOLHEAD_Y_SECURITY;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move Y SwitchPos + Security", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move Y SwitchPos + Security", current_position);
|
||||
|
||||
fast_line_to_current(Y_AXIS);
|
||||
planner.synchronize();
|
||||
|
||||
// 5. Grab and lock the new toolhead
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(5) Grab and lock new toolhead ");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("(5) Grab and lock new toolhead ");
|
||||
|
||||
current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move Y SwitchPos", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move Y SwitchPos", current_position);
|
||||
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5, active_extruder);
|
||||
planner.synchronize();
|
||||
@ -540,16 +483,12 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
current_position[Y_AXIS] -= SWITCHING_TOOLHEAD_Y_CLEAR;
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move back Y clear", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move back Y clear", current_position);
|
||||
|
||||
fast_line_to_current(Y_AXIS); // move away from docked toolhead
|
||||
planner.synchronize();
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Toolhead change done.");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Toolhead change done.");
|
||||
}
|
||||
|
||||
#endif // SWITCHING_TOOLHEAD
|
||||
@ -563,17 +502,15 @@ inline void invalid_extruder_error(const uint8_t e) {
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
|
||||
inline void dualx_tool_change(const uint8_t tmp_extruder, bool &no_move) {
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOPGM("Dual X Carriage Mode ");
|
||||
switch (dual_x_carriage_mode) {
|
||||
case DXC_FULL_CONTROL_MODE: SERIAL_ECHOLNPGM("DXC_FULL_CONTROL_MODE"); break;
|
||||
case DXC_AUTO_PARK_MODE: SERIAL_ECHOLNPGM("DXC_AUTO_PARK_MODE"); break;
|
||||
case DXC_DUPLICATION_MODE: SERIAL_ECHOLNPGM("DXC_DUPLICATION_MODE"); break;
|
||||
case DXC_SCALED_DUPLICATION_MODE: SERIAL_ECHOLNPGM("DXC_SCALED_DUPLICATION_MODE"); break;
|
||||
}
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPGM("Dual X Carriage Mode ");
|
||||
switch (dual_x_carriage_mode) {
|
||||
case DXC_FULL_CONTROL_MODE: DEBUG_ECHOLNPGM("DXC_FULL_CONTROL_MODE"); break;
|
||||
case DXC_AUTO_PARK_MODE: DEBUG_ECHOLNPGM("DXC_AUTO_PARK_MODE"); break;
|
||||
case DXC_DUPLICATION_MODE: DEBUG_ECHOLNPGM("DXC_DUPLICATION_MODE"); break;
|
||||
case DXC_SCALED_DUPLICATION_MODE: DEBUG_ECHOLNPGM("DXC_SCALED_DUPLICATION_MODE"); break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
const float xhome = x_home_pos(active_extruder);
|
||||
if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE
|
||||
@ -581,9 +518,8 @@ inline void invalid_extruder_error(const uint8_t e) {
|
||||
&& (delayed_move_time || current_position[X_AXIS] != xhome) && ! no_move
|
||||
) {
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPAIR("MoveX to ", xhome);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("MoveX to ", xhome);
|
||||
|
||||
// Park old head
|
||||
planner.buffer_line(xhome, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], planner.settings.max_feedrate_mm_s[X_AXIS], active_extruder);
|
||||
planner.synchronize();
|
||||
@ -599,9 +535,7 @@ inline void invalid_extruder_error(const uint8_t e) {
|
||||
// This function resets the max/min values - the current position may be overwritten below.
|
||||
set_axis_is_at_home(X_AXIS);
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("New Extruder", current_position);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("New Extruder", current_position);
|
||||
|
||||
switch (dual_x_carriage_mode) {
|
||||
case DXC_FULL_CONTROL_MODE:
|
||||
@ -620,12 +554,10 @@ inline void invalid_extruder_error(const uint8_t e) {
|
||||
break;
|
||||
}
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOLNPAIR("Active extruder parked: ", active_extruder_parked ? "yes" : "no");
|
||||
DEBUG_POS("New extruder (parked)", current_position);
|
||||
}
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOLNPAIR("Active extruder parked: ", active_extruder_parked ? "yes" : "no");
|
||||
DEBUG_POS("New extruder (parked)", current_position);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // DUAL_X_CARRIAGE
|
||||
@ -680,9 +612,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
|
||||
|
||||
if (!no_move && !all_axes_homed()) {
|
||||
no_move = true;
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("No move on toolchange");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("No move on toolchange");
|
||||
}
|
||||
|
||||
#if HAS_LCD_MENU
|
||||
@ -777,10 +707,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
|
||||
move_nozzle_servo(tmp_extruder);
|
||||
#endif
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING))
|
||||
SERIAL_ECHOLNPAIR("Offset Tool XY by { ", xdiff, ", ", ydiff, ", ", zdiff, " }");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Offset Tool XY by { ", xdiff, ", ", ydiff, ", ", zdiff, " }");
|
||||
|
||||
// The newly-selected extruder XY is actually at...
|
||||
current_position[X_AXIS] += xdiff;
|
||||
@ -802,9 +729,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
|
||||
|
||||
// Return to position and lower again
|
||||
if (safe_to_move && !no_move && IsRunning()) {
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move back", destination);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Move back", destination);
|
||||
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
#if FAN_COUNT > 0
|
||||
|
Reference in New Issue
Block a user