Browse Source

Reduce some debug strings

pull/1/head
Scott Lahteine 6 years ago
parent
commit
e2b8fc4f17
  1. 80
      Marlin/src/core/utility.cpp
  2. 41
      Marlin/src/module/tool_change.cpp

80
Marlin/src/core/utility.cpp

@ -262,37 +262,38 @@ void safe_delay(millis_t ms) {
#include "../feature/bedlevel/bedlevel.h"
void log_machine_info() {
SERIAL_ECHOPGM("Machine Type: ");
#if ENABLED(DELTA)
SERIAL_ECHOLNPGM("Delta");
#elif IS_SCARA
SERIAL_ECHOLNPGM("SCARA");
#elif IS_CORE
SERIAL_ECHOLNPGM("Core");
#else
SERIAL_ECHOLNPGM("Cartesian");
#endif
SERIAL_ECHOPGM("Probe: ");
#if ENABLED(PROBE_MANUALLY)
SERIAL_ECHOLNPGM("PROBE_MANUALLY");
#elif ENABLED(FIX_MOUNTED_PROBE)
SERIAL_ECHOLNPGM("FIX_MOUNTED_PROBE");
#elif ENABLED(BLTOUCH)
SERIAL_ECHOLNPGM("BLTOUCH");
#elif HAS_Z_SERVO_PROBE
SERIAL_ECHOLNPGM("SERVO PROBE");
#elif ENABLED(Z_PROBE_SLED)
SERIAL_ECHOLNPGM("Z_PROBE_SLED");
#elif ENABLED(Z_PROBE_ALLEN_KEY)
SERIAL_ECHOLNPGM("Z_PROBE_ALLEN_KEY");
#else
SERIAL_ECHOLNPGM("NONE");
#endif
SERIAL_ECHOLNPGM("Machine Type: "
#if ENABLED(DELTA)
"Delta"
#elif IS_SCARA
"SCARA"
#elif IS_CORE
"Core"
#else
"Cartesian"
#endif
);
SERIAL_ECHOLNPGM("Probe: "
#if ENABLED(PROBE_MANUALLY)
"PROBE_MANUALLY"
#elif ENABLED(FIX_MOUNTED_PROBE)
"FIX_MOUNTED_PROBE"
#elif ENABLED(BLTOUCH)
"BLTOUCH"
#elif HAS_Z_SERVO_PROBE
"SERVO PROBE"
#elif ENABLED(Z_PROBE_SLED)
"Z_PROBE_SLED"
#elif ENABLED(Z_PROBE_ALLEN_KEY)
"Z_PROBE_ALLEN_KEY"
#else
"NONE"
#endif
);
#if HAS_BED_PROBE
SERIAL_ECHOPAIR("Probe Offset X:", X_PROBE_OFFSET_FROM_EXTRUDER);
SERIAL_ECHOPAIR(" Y:", Y_PROBE_OFFSET_FROM_EXTRUDER);
SERIAL_ECHOPGM("Probe Offset X:" STRINGIFY(X_PROBE_OFFSET_FROM_EXTRUDER) " Y:" STRINGIFY(Y_PROBE_OFFSET_FROM_EXTRUDER));
SERIAL_ECHOPAIR(" Z:", zprobe_zoffset);
#if X_PROBE_OFFSET_FROM_EXTRUDER > 0
SERIAL_ECHOPGM(" (Right");
@ -328,16 +329,17 @@ void safe_delay(millis_t ms) {
#endif
#if HAS_ABL
SERIAL_ECHOPGM("Auto Bed Leveling: ");
#if ENABLED(AUTO_BED_LEVELING_LINEAR)
SERIAL_ECHOPGM("LINEAR");
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
SERIAL_ECHOPGM("BILINEAR");
#elif ENABLED(AUTO_BED_LEVELING_3POINT)
SERIAL_ECHOPGM("3POINT");
#elif ENABLED(AUTO_BED_LEVELING_UBL)
SERIAL_ECHOPGM("UBL");
#endif
SERIAL_ECHOLNPGM("Auto Bed Leveling: "
#if ENABLED(AUTO_BED_LEVELING_LINEAR)
"LINEAR"
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
"BILINEAR"
#elif ENABLED(AUTO_BED_LEVELING_3POINT)
"3POINT"
#elif ENABLED(AUTO_BED_LEVELING_UBL)
"UBL"
#endif
);
if (planner.leveling_active) {
SERIAL_ECHOLNPGM(" (enabled)");
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)

41
Marlin/src/module/tool_change.cpp

@ -122,25 +122,22 @@
grabpos = parkingposx[tmp_extruder] + hotend_offset[X_AXIS][active_extruder]
+ (tmp_extruder == 0 ? -(PARKING_EXTRUDER_GRAB_DISTANCE) : PARKING_EXTRUDER_GRAB_DISTANCE);
/**
* Steps:
* 1. Raise Z-Axis to give enough clearance
* 2. Move to park position of old extruder
* 3. Disengage magnetic field, wait for delay
* 4. Move near new extruder
* 5. Engage magnetic field for new extruder
* 6. Move to parking incl. offset of new extruder
* 7. Lower Z-Axis
* 1. Raise Z-Axis to give enough clearance
* 2. Move to park position of old extruder
* 3. Disengage magnetic field, wait for delay
* 4. Move near new extruder
* 5. Engage magnetic field for new extruder
* 6. Move to parking incl. offset of new extruder
* 7. Lower Z-Axis
*/
// STEP 1
#if ENABLED(DEBUG_LEVELING_FEATURE)
SERIAL_ECHOLNPGM("Starting Autopark");
if (DEBUGGING(LEVELING)) DEBUG_POS("current position:", current_position);
if (DEBUGGING(LEVELING)) DEBUG_POS("Start Autopark", current_position);
#endif
current_position[Z_AXIS] += PARKING_EXTRUDER_SECURITY_RAISE;
#if ENABLED(DEBUG_LEVELING_FEATURE)
SERIAL_ECHOLNPGM("(1) Raise Z-Axis ");
if (DEBUGGING(LEVELING)) DEBUG_POS("Moving to Raised Z-Position", current_position);
if (DEBUGGING(LEVELING)) DEBUG_POS("(1) Raise Z-Axis", current_position);
#endif
planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[Z_AXIS], active_extruder);
planner.synchronize();
@ -148,33 +145,35 @@
// STEP 2
current_position[X_AXIS] = parkingposx[active_extruder] + hotend_offset[X_AXIS][active_extruder];
#if ENABLED(DEBUG_LEVELING_FEATURE)
SERIAL_ECHOLNPAIR("(2) Park extruder ", active_extruder);
if (DEBUGGING(LEVELING)) DEBUG_POS("Moving ParkPos", current_position);
if (DEBUGGING(LEVELING)) {
SERIAL_ECHOLNPAIR("(2) Park extruder ", int(active_extruder));
DEBUG_POS("Moving ParkPos", current_position);
}
#endif
planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
planner.synchronize();
// STEP 3
#if ENABLED(DEBUG_LEVELING_FEATURE)
SERIAL_ECHOLNPGM("(3) Disengage magnet ");
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(3) Disengage magnet ");
#endif
pe_deactivate_magnet(active_extruder);
// STEP 4
#if ENABLED(DEBUG_LEVELING_FEATURE)
SERIAL_ECHOLNPGM("(4) Move to position near new extruder");
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(4) Move to position near new extruder");
#endif
current_position[X_AXIS] += (active_extruder == 0 ? 10 : -10); // move 10mm away from parked extruder
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("Moving away from parked extruder", current_position);
if (DEBUGGING(LEVELING)) DEBUG_POS("Move away from parked extruder", current_position);
#endif
planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
planner.synchronize();
// STEP 5
#if ENABLED(DEBUG_LEVELING_FEATURE)
SERIAL_ECHOLNPGM("(5) Engage magnetic field");
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(5) Engage magnetic field");
#endif
#if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT)
@ -187,8 +186,7 @@
planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
current_position[X_AXIS] = grabpos;
#if ENABLED(DEBUG_LEVELING_FEATURE)
SERIAL_ECHOLNPAIR("(6) Unpark extruder ", tmp_extruder);
if (DEBUGGING(LEVELING)) DEBUG_POS("Move UnparkPos", current_position);
if (DEBUGGING(LEVELING)) DEBUG_POS("(6) Unpark extruder", current_position);
#endif
planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS]/2, active_extruder);
planner.synchronize();
@ -196,8 +194,7 @@
// Step 7
current_position[X_AXIS] = midpos - hotend_offset[X_AXIS][tmp_extruder];
#if ENABLED(DEBUG_LEVELING_FEATURE)
SERIAL_ECHOLNPGM("(7) Move midway between hotends");
if (DEBUGGING(LEVELING)) DEBUG_POS("Move midway to new extruder", current_position);
if (DEBUGGING(LEVELING)) DEBUG_POS("(7) Move midway between hotends", current_position);
#endif
planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
planner.synchronize();

Loading…
Cancel
Save