Unify debugging output with debug_out.h (#13388)
This commit is contained in:
@ -49,6 +49,9 @@
|
||||
#include "../../libs/L6470/L6470_Marlin.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
#include "../../core/debug_out.h"
|
||||
|
||||
#if ENABLED(QUICK_HOME)
|
||||
|
||||
static void quick_home_xy() {
|
||||
@ -113,9 +116,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Z_SAFE_HOMING >>>");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z_SAFE_HOMING >>>");
|
||||
|
||||
sync_plan_position();
|
||||
|
||||
@ -133,9 +134,7 @@
|
||||
|
||||
if (position_is_reachable(destination[X_AXIS], destination[Y_AXIS])) {
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Z_SAFE_HOMING", destination);
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Z_SAFE_HOMING", destination);
|
||||
|
||||
// This causes the carriage on Dual X to unpark
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
@ -154,9 +153,7 @@
|
||||
SERIAL_ECHO_MSG(MSG_ZPROBE_OUT);
|
||||
}
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< Z_SAFE_HOMING");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< Z_SAFE_HOMING");
|
||||
}
|
||||
|
||||
#endif // Z_SAFE_HOMING
|
||||
@ -182,12 +179,10 @@
|
||||
*/
|
||||
void GcodeSuite::G28(const bool always_home_all) {
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOLNPGM(">>> G28");
|
||||
log_machine_info();
|
||||
}
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOLNPGM(">>> G28");
|
||||
log_machine_info();
|
||||
}
|
||||
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
bool IDEX_saved_duplication_state = extruder_duplication_enabled;
|
||||
@ -200,9 +195,7 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
sync_plan_position();
|
||||
SERIAL_ECHOLNPGM("Simulated Homing");
|
||||
report_current_position();
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< G28");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< G28");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@ -215,12 +208,7 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
all_axes_homed() // homing needed only if never homed
|
||||
#endif
|
||||
) {
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOLNPGM("> homing not needed, skip");
|
||||
SERIAL_ECHOLNPGM("<<< G28");
|
||||
}
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> homing not needed, skip\n<<< G28");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -297,12 +285,7 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
// Raise Z before homing any other axes and z is not already high enough (never lower z)
|
||||
destination[Z_AXIS] = z_homing_height;
|
||||
if (destination[Z_AXIS] > current_position[Z_AXIS]) {
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING))
|
||||
SERIAL_ECHOLNPAIR("Raise Z (before homing) to ", destination[Z_AXIS]);
|
||||
#endif
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Raise Z (before homing) to ", destination[Z_AXIS]);
|
||||
do_blocking_move_to_z(destination[Z_AXIS]);
|
||||
}
|
||||
}
|
||||
@ -451,9 +434,7 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
|
||||
#endif
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< G28");
|
||||
#endif
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< G28");
|
||||
|
||||
#if HAS_DRIVER(L6470)
|
||||
// Set L6470 absolute position registers to counts
|
||||
|
Reference in New Issue
Block a user