Reduce some debug strings

This commit is contained in:
Scott Lahteine 2018-08-24 21:03:21 -05:00
parent b71c2b8651
commit e2b8fc4f17
2 changed files with 59 additions and 60 deletions

View file

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

View file

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