🎨 Fewer serial macros
This commit is contained in:
committed by
Scott Lahteine
parent
6d96c221bd
commit
b661795ae5
@ -121,8 +121,8 @@ void recalc_delta_settings() {
|
||||
*/
|
||||
|
||||
#define DELTA_DEBUG(VAR) do { \
|
||||
SERIAL_ECHOLNPAIR_P(PSTR("Cartesian X"), VAR.x, SP_Y_STR, VAR.y, SP_Z_STR, VAR.z); \
|
||||
SERIAL_ECHOLNPAIR_P(PSTR("Delta A"), delta.a, SP_B_STR, delta.b, SP_C_STR, delta.c); \
|
||||
SERIAL_ECHOLNPGM_P(PSTR("Cartesian X"), VAR.x, SP_Y_STR, VAR.y, SP_Z_STR, VAR.z); \
|
||||
SERIAL_ECHOLNPGM_P(PSTR("Delta A"), delta.a, SP_B_STR, delta.b, SP_C_STR, delta.c); \
|
||||
}while(0)
|
||||
|
||||
void inverse_kinematics(const xyz_pos_t &raw) {
|
||||
|
@ -429,7 +429,7 @@ void Endstops::event_handler() {
|
||||
#endif
|
||||
|
||||
#define _ENDSTOP_HIT_ECHO(A,C) do{ \
|
||||
SERIAL_ECHOPAIR(" " STRINGIFY(A) ":", planner.triggered_position_mm(_AXIS(A))); _SET_STOP_CHAR(A,C); }while(0)
|
||||
SERIAL_ECHOPGM(" " STRINGIFY(A) ":", planner.triggered_position_mm(_AXIS(A))); _SET_STOP_CHAR(A,C); }while(0)
|
||||
|
||||
#define _ENDSTOP_HIT_TEST(A,C) \
|
||||
if (TERN0(HAS_##A##_MIN, TEST(hit_state, A##_MIN)) || TERN0(HAS_##A##_MAX, TEST(hit_state, A##_MAX))) \
|
||||
@ -1271,7 +1271,7 @@ void Endstops::update() {
|
||||
#endif
|
||||
|
||||
uint16_t endstop_change = live_state_local ^ old_live_state_local;
|
||||
#define ES_REPORT_CHANGE(S) if (TEST(endstop_change, S)) SERIAL_ECHOPAIR(" " STRINGIFY(S) ":", TEST(live_state_local, S))
|
||||
#define ES_REPORT_CHANGE(S) if (TEST(endstop_change, S)) SERIAL_ECHOPGM(" " STRINGIFY(S) ":", TEST(live_state_local, S))
|
||||
|
||||
if (endstop_change) {
|
||||
#if HAS_X_MIN
|
||||
|
@ -195,7 +195,7 @@ inline void report_more_positions() {
|
||||
// Report the logical position for a given machine position
|
||||
inline void report_logical_position(const xyze_pos_t &rpos) {
|
||||
const xyze_pos_t lpos = rpos.asLogical();
|
||||
SERIAL_ECHOPAIR_P(
|
||||
SERIAL_ECHOPGM_P(
|
||||
LIST_N(DOUBLE(LINEAR_AXES),
|
||||
X_LBL, lpos.x,
|
||||
SP_Y_LBL, lpos.y,
|
||||
@ -257,7 +257,7 @@ void report_current_position_projected() {
|
||||
/**
|
||||
* Output the current grbl compatible state to serial while moving
|
||||
*/
|
||||
void report_current_grblstate_moving() { SERIAL_ECHOLNPAIR("S_XYZ:", int(M_State_grbl)); }
|
||||
void report_current_grblstate_moving() { SERIAL_ECHOLNPGM("S_XYZ:", int(M_State_grbl)); }
|
||||
|
||||
/**
|
||||
* Output the current position (processed) to serial while moving
|
||||
@ -266,7 +266,7 @@ void report_current_position_projected() {
|
||||
|
||||
get_cartesian_from_steppers();
|
||||
const xyz_pos_t lpos = cartes.asLogical();
|
||||
SERIAL_ECHOPAIR(
|
||||
SERIAL_ECHOPGM(
|
||||
"X:", lpos.x
|
||||
#if HAS_Y_AXIS
|
||||
, " Y:", lpos.y
|
||||
@ -774,7 +774,7 @@ void restore_feedrate_and_scaling() {
|
||||
#endif
|
||||
|
||||
if (DEBUGGING(LEVELING))
|
||||
SERIAL_ECHOLNPAIR("Axis ", AS_CHAR(AXIS_CHAR(axis)), " min:", soft_endstop.min[axis], " max:", soft_endstop.max[axis]);
|
||||
SERIAL_ECHOLNPGM("Axis ", AS_CHAR(AXIS_CHAR(axis)), " min:", soft_endstop.min[axis], " max:", soft_endstop.max[axis]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -969,10 +969,10 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) {
|
||||
#endif
|
||||
|
||||
/*
|
||||
SERIAL_ECHOPAIR("mm=", cartesian_mm);
|
||||
SERIAL_ECHOPAIR(" seconds=", seconds);
|
||||
SERIAL_ECHOPAIR(" segments=", segments);
|
||||
SERIAL_ECHOPAIR(" segment_mm=", cartesian_segment_mm);
|
||||
SERIAL_ECHOPGM("mm=", cartesian_mm);
|
||||
SERIAL_ECHOPGM(" seconds=", seconds);
|
||||
SERIAL_ECHOPGM(" segments=", segments);
|
||||
SERIAL_ECHOPGM(" segment_mm=", cartesian_segment_mm);
|
||||
SERIAL_EOL();
|
||||
//*/
|
||||
|
||||
@ -1035,9 +1035,9 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) {
|
||||
const float inv_duration = scaled_fr_mm_s / cartesian_segment_mm;
|
||||
#endif
|
||||
|
||||
// SERIAL_ECHOPAIR("mm=", cartesian_mm);
|
||||
// SERIAL_ECHOLNPAIR(" segments=", segments);
|
||||
// SERIAL_ECHOLNPAIR(" segment_mm=", cartesian_segment_mm);
|
||||
//SERIAL_ECHOPGM("mm=", cartesian_mm);
|
||||
//SERIAL_ECHOLNPGM(" segments=", segments);
|
||||
//SERIAL_ECHOLNPGM(" segment_mm=", cartesian_segment_mm);
|
||||
|
||||
// Get the raw current position as starting point
|
||||
xyze_pos_t raw = current_position;
|
||||
@ -1204,7 +1204,7 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) {
|
||||
new_pos.x += duplicate_extruder_x_offset;
|
||||
|
||||
// Move duplicate extruder into the correct position
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Set planner X", inactive_extruder_x, " ... Line to X", new_pos.x);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Set planner X", inactive_extruder_x, " ... Line to X", new_pos.x);
|
||||
if (!planner.buffer_line(new_pos, planner.settings.max_feedrate_mm_s[X_AXIS], 1)) break;
|
||||
planner.synchronize();
|
||||
|
||||
@ -1515,11 +1515,11 @@ void prepare_line_to_destination() {
|
||||
const feedRate_t home_fr_mm_s = fr_mm_s ?: homing_feedrate(axis);
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("...(", AS_CHAR(AXIS_CHAR(axis)), ", ", distance, ", ");
|
||||
DEBUG_ECHOPGM("...(", AS_CHAR(AXIS_CHAR(axis)), ", ", distance, ", ");
|
||||
if (fr_mm_s)
|
||||
DEBUG_ECHO(fr_mm_s);
|
||||
else
|
||||
DEBUG_ECHOPAIR("[", home_fr_mm_s, "]");
|
||||
DEBUG_ECHOPGM("[", home_fr_mm_s, "]");
|
||||
DEBUG_ECHOLNPGM(")");
|
||||
}
|
||||
|
||||
@ -1595,12 +1595,12 @@ void prepare_line_to_destination() {
|
||||
* "trusted" position).
|
||||
*/
|
||||
void set_axis_never_homed(const AxisEnum axis) {
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> set_axis_never_homed(", AS_CHAR(AXIS_CHAR(axis)), ")");
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> set_axis_never_homed(", AS_CHAR(AXIS_CHAR(axis)), ")");
|
||||
|
||||
set_axis_untrusted(axis);
|
||||
set_axis_unhomed(axis);
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("<<< set_axis_never_homed(", AS_CHAR(AXIS_CHAR(axis)), ")");
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< set_axis_never_homed(", AS_CHAR(AXIS_CHAR(axis)), ")");
|
||||
|
||||
TERN_(I2C_POSITION_ENCODERS, I2CPEM.unhomed(axis));
|
||||
}
|
||||
@ -1683,7 +1683,7 @@ void prepare_line_to_destination() {
|
||||
|
||||
// Check if home distance within endstop assumed repeatability noise of .05mm and warn.
|
||||
if (ABS(phaseDelta) * planner.steps_to_mm[axis] / phasePerUStep < 0.05f)
|
||||
SERIAL_ECHOLNPAIR("Selected home phase ", home_phase[axis],
|
||||
SERIAL_ECHOLNPGM("Selected home phase ", home_phase[axis],
|
||||
" too close to endstop trigger phase ", phaseCurrent,
|
||||
". Pick a different phase for ", AS_CHAR(AXIS_CHAR(axis)));
|
||||
|
||||
@ -1695,7 +1695,7 @@ void prepare_line_to_destination() {
|
||||
|
||||
// Optional debug messages
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOLNPAIR(
|
||||
DEBUG_ECHOLNPGM(
|
||||
"Endstop ", AS_CHAR(AXIS_CHAR(axis)), " hit at Phase:", phaseCurrent,
|
||||
" Delta:", phaseDelta, " Distance:", mmDelta
|
||||
);
|
||||
@ -1741,7 +1741,7 @@ void prepare_line_to_destination() {
|
||||
) return;
|
||||
#endif
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> homeaxis(", AS_CHAR(AXIS_CHAR(axis)), ")");
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> homeaxis(", AS_CHAR(AXIS_CHAR(axis)), ")");
|
||||
|
||||
const int axis_home_dir = TERN0(DUAL_X_CARRIAGE, axis == X_AXIS)
|
||||
? TOOL_X_HOME_DIR(active_extruder) : home_dir(axis);
|
||||
@ -1780,7 +1780,7 @@ void prepare_line_to_destination() {
|
||||
const xyz_float_t backoff = SENSORLESS_BACKOFF_MM;
|
||||
if ((TERN0(X_SENSORLESS, axis == X_AXIS) || TERN0(Y_SENSORLESS, axis == Y_AXIS) || TERN0(Z_SENSORLESS, axis == Z_AXIS) || TERN0(I_SENSORLESS, axis == I_AXIS) || TERN0(J_SENSORLESS, axis == J_AXIS) || TERN0(K_SENSORLESS, axis == K_AXIS)) && backoff[axis]) {
|
||||
const float backoff_length = -ABS(backoff[axis]) * axis_home_dir;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Sensorless backoff: ", backoff_length, "mm");
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Sensorless backoff: ", backoff_length, "mm");
|
||||
do_homing_move(axis, backoff_length, homing_feedrate(axis));
|
||||
}
|
||||
#endif
|
||||
@ -1796,7 +1796,7 @@ void prepare_line_to_destination() {
|
||||
// Fast move towards endstop until triggered
|
||||
//
|
||||
const float move_length = 1.5f * max_length(TERN(DELTA, Z_AXIS, axis)) * axis_home_dir;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Home Fast: ", move_length, "mm");
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Home Fast: ", move_length, "mm");
|
||||
do_homing_move(axis, move_length, 0.0, !use_probe_bump);
|
||||
|
||||
#if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH_SLOW_MODE)
|
||||
@ -1806,7 +1806,7 @@ void prepare_line_to_destination() {
|
||||
// If a second homing move is configured...
|
||||
if (bump) {
|
||||
// Move away from the endstop by the axis HOMING_BUMP_MM
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Move Away: ", -bump, "mm");
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Move Away: ", -bump, "mm");
|
||||
do_homing_move(axis, -bump, TERN(HOMING_Z_WITH_PROBE, (axis == Z_AXIS ? z_probe_fast_mm_s : 0), 0), false);
|
||||
|
||||
#if ENABLED(DETECT_BROKEN_ENDSTOP)
|
||||
@ -1839,7 +1839,7 @@ void prepare_line_to_destination() {
|
||||
|
||||
// Slow move towards endstop until triggered
|
||||
const float rebump = bump * 2;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Re-bump: ", rebump, "mm");
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Re-bump: ", rebump, "mm");
|
||||
do_homing_move(axis, rebump, get_homing_bump_feedrate(axis), true);
|
||||
|
||||
#if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH)
|
||||
@ -2003,7 +2003,7 @@ void prepare_line_to_destination() {
|
||||
|
||||
// Retrace by the amount specified in delta_endstop_adj if more than min steps.
|
||||
if (adjDistance * (Z_HOME_DIR) < 0 && ABS(adjDistance) > minDistance) { // away from endstop, more than min distance
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("adjDistance:", adjDistance);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("adjDistance:", adjDistance);
|
||||
do_homing_move(axis, adjDistance, get_homing_bump_feedrate(axis));
|
||||
}
|
||||
|
||||
@ -2050,7 +2050,7 @@ void prepare_line_to_destination() {
|
||||
if (axis == Z_AXIS) fwretract.current_hop = 0.0;
|
||||
#endif
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("<<< homeaxis(", AS_CHAR(AXIS_CHAR(axis)), ")");
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< homeaxis(", AS_CHAR(AXIS_CHAR(axis)), ")");
|
||||
|
||||
} // homeaxis()
|
||||
|
||||
@ -2075,7 +2075,7 @@ void prepare_line_to_destination() {
|
||||
* Callers must sync the planner position after calling this!
|
||||
*/
|
||||
void set_axis_is_at_home(const AxisEnum axis) {
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> set_axis_is_at_home(", AS_CHAR(AXIS_CHAR(axis)), ")");
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> set_axis_is_at_home(", AS_CHAR(AXIS_CHAR(axis)), ")");
|
||||
|
||||
set_axis_trusted(axis);
|
||||
set_axis_homed(axis);
|
||||
@ -2104,7 +2104,7 @@ void set_axis_is_at_home(const AxisEnum axis) {
|
||||
|
||||
current_position.z -= probe.offset.z;
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("*** Z HOMED WITH PROBE (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) ***\n> probe.offset.z = ", probe.offset.z);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("*** Z HOMED WITH PROBE (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) ***\n> probe.offset.z = ", probe.offset.z);
|
||||
|
||||
#else
|
||||
|
||||
@ -2125,17 +2125,17 @@ void set_axis_is_at_home(const AxisEnum axis) {
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
#if HAS_HOME_OFFSET
|
||||
DEBUG_ECHOLNPAIR("> home_offset[", AS_CHAR(AXIS_CHAR(axis)), "] = ", home_offset[axis]);
|
||||
DEBUG_ECHOLNPGM("> home_offset[", AS_CHAR(AXIS_CHAR(axis)), "] = ", home_offset[axis]);
|
||||
#endif
|
||||
DEBUG_POS("", current_position);
|
||||
DEBUG_ECHOLNPAIR("<<< set_axis_is_at_home(", AS_CHAR(AXIS_CHAR(axis)), ")");
|
||||
DEBUG_ECHOLNPGM("<<< set_axis_is_at_home(", AS_CHAR(AXIS_CHAR(axis)), ")");
|
||||
}
|
||||
}
|
||||
|
||||
#if HAS_WORKSPACE_OFFSET
|
||||
void update_workspace_offset(const AxisEnum axis) {
|
||||
workspace_offset[axis] = home_offset[axis] + position_shift[axis];
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Axis ", AS_CHAR(AXIS_CHAR(axis)), " home_offset = ", home_offset[axis], " position_shift = ", position_shift[axis]);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Axis ", AS_CHAR(AXIS_CHAR(axis)), " home_offset = ", home_offset[axis], " position_shift = ", position_shift[axis]);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1858,7 +1858,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
);
|
||||
|
||||
/* <-- add a slash to enable
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
" _populate_block FR:", fr_mm_s,
|
||||
" A:", target.a, " (", da, " steps)"
|
||||
" B:", target.b, " (", db, " steps)"
|
||||
@ -2331,10 +2331,10 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
if (max_vfr > 0 && cs > max_vfr) {
|
||||
NOMORE(speed_factor, max_vfr / cs); // respect volumetric extruder limit (if any)
|
||||
/* <-- add a slash to enable
|
||||
SERIAL_ECHOPAIR("volumetric extruder limit enforced: ", (cs * CIRCLE_AREA(filament_size[extruder] * 0.5f)));
|
||||
SERIAL_ECHOPAIR(" mm^3/s (", cs);
|
||||
SERIAL_ECHOPAIR(" mm/s) limited to ", (max_vfr * CIRCLE_AREA(filament_size[extruder] * 0.5f)));
|
||||
SERIAL_ECHOPAIR(" mm^3/s (", max_vfr);
|
||||
SERIAL_ECHOPGM("volumetric extruder limit enforced: ", (cs * CIRCLE_AREA(filament_size[extruder] * 0.5f)));
|
||||
SERIAL_ECHOPGM(" mm^3/s (", cs);
|
||||
SERIAL_ECHOPGM(" mm/s) limited to ", (max_vfr * CIRCLE_AREA(filament_size[extruder] * 0.5f)));
|
||||
SERIAL_ECHOPGM(" mm^3/s (", max_vfr);
|
||||
SERIAL_ECHOLNPGM(" mm/s)");
|
||||
//*/
|
||||
}
|
||||
@ -2921,44 +2921,44 @@ bool Planner::buffer_segment(const abce_pos_t &abce
|
||||
#endif
|
||||
|
||||
/* <-- add a slash to enable
|
||||
SERIAL_ECHOPAIR(" buffer_segment FR:", fr_mm_s);
|
||||
SERIAL_ECHOPGM(" buffer_segment FR:", fr_mm_s);
|
||||
#if IS_KINEMATIC
|
||||
SERIAL_ECHOPAIR(" A:", abce.a, " (", position.a, "->", target.a, ") B:", abce.b);
|
||||
SERIAL_ECHOPGM(" A:", abce.a, " (", position.a, "->", target.a, ") B:", abce.b);
|
||||
#else
|
||||
SERIAL_ECHOPAIR_P(SP_X_LBL, abce.a);
|
||||
SERIAL_ECHOPAIR(" (", position.x, "->", target.x);
|
||||
SERIAL_ECHOPGM_P(SP_X_LBL, abce.a);
|
||||
SERIAL_ECHOPGM(" (", position.x, "->", target.x);
|
||||
SERIAL_CHAR(')');
|
||||
SERIAL_ECHOPAIR_P(SP_Y_LBL, abce.b);
|
||||
SERIAL_ECHOPGM_P(SP_Y_LBL, abce.b);
|
||||
#endif
|
||||
SERIAL_ECHOPAIR(" (", position.y, "->", target.y);
|
||||
SERIAL_ECHOPGM(" (", position.y, "->", target.y);
|
||||
#if LINEAR_AXES >= ABC
|
||||
#if ENABLED(DELTA)
|
||||
SERIAL_ECHOPAIR(") C:", abce.c);
|
||||
SERIAL_ECHOPGM(") C:", abce.c);
|
||||
#else
|
||||
SERIAL_CHAR(')');
|
||||
SERIAL_ECHOPAIR_P(SP_Z_LBL, abce.c);
|
||||
SERIAL_ECHOPGM_P(SP_Z_LBL, abce.c);
|
||||
#endif
|
||||
SERIAL_ECHOPAIR(" (", position.z, "->", target.z);
|
||||
SERIAL_ECHOPGM(" (", position.z, "->", target.z);
|
||||
SERIAL_CHAR(')');
|
||||
#endif
|
||||
#if LINEAR_AXES >= 4
|
||||
SERIAL_ECHOPAIR_P(SP_I_LBL, abce.i);
|
||||
SERIAL_ECHOPAIR(" (", position.i, "->", target.i);
|
||||
SERIAL_ECHOPGM_P(SP_I_LBL, abce.i);
|
||||
SERIAL_ECHOPGM(" (", position.i, "->", target.i);
|
||||
SERIAL_CHAR(')');
|
||||
#endif
|
||||
#if LINEAR_AXES >= 5
|
||||
SERIAL_ECHOPAIR_P(SP_J_LBL, abce.j);
|
||||
SERIAL_ECHOPAIR(" (", position.j, "->", target.j);
|
||||
SERIAL_ECHOPGM_P(SP_J_LBL, abce.j);
|
||||
SERIAL_ECHOPGM(" (", position.j, "->", target.j);
|
||||
SERIAL_CHAR(')');
|
||||
#endif
|
||||
#if LINEAR_AXES >= 6
|
||||
SERIAL_ECHOPAIR_P(SP_K_LBL, abce.k);
|
||||
SERIAL_ECHOPAIR(" (", position.k, "->", target.k);
|
||||
SERIAL_ECHOPGM_P(SP_K_LBL, abce.k);
|
||||
SERIAL_ECHOPGM(" (", position.k, "->", target.k);
|
||||
SERIAL_CHAR(')');
|
||||
#endif
|
||||
#if HAS_EXTRUDERS
|
||||
SERIAL_ECHOPAIR_P(SP_E_LBL, abce.e);
|
||||
SERIAL_ECHOLNPAIR(" (", position.e, "->", target.e, ")");
|
||||
SERIAL_ECHOPGM_P(SP_E_LBL, abce.e);
|
||||
SERIAL_ECHOLNPGM(" (", position.e, "->", target.e, ")");
|
||||
#else
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
@ -3186,7 +3186,7 @@ inline void limit_and_warn(float &val, const uint8_t axis, PGM_P const setting_n
|
||||
SERIAL_CHAR(AXIS_CHAR(lim_axis));
|
||||
SERIAL_ECHOPGM(" Max ");
|
||||
SERIAL_ECHOPGM_P(setting_name);
|
||||
SERIAL_ECHOLNPAIR(" limited to ", val);
|
||||
SERIAL_ECHOLNPGM(" limited to ", val);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ void PrintCounter::saveStats() {
|
||||
inline void _service_when(char buffer[], const char * const msg, const uint32_t when) {
|
||||
SERIAL_ECHOPGM(STR_STATS);
|
||||
SERIAL_ECHOPGM_P(msg);
|
||||
SERIAL_ECHOLNPAIR(" in ", duration_t(when).toString(buffer));
|
||||
SERIAL_ECHOLNPGM(" in ", duration_t(when).toString(buffer));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -187,7 +187,7 @@ void PrintCounter::showStats() {
|
||||
char buffer[22];
|
||||
|
||||
SERIAL_ECHOPGM(STR_STATS);
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
"Prints: ", data.totalPrints,
|
||||
", Finished: ", data.finishedPrints,
|
||||
", Failed: ", data.totalPrints - data.finishedPrints
|
||||
@ -197,21 +197,21 @@ void PrintCounter::showStats() {
|
||||
SERIAL_ECHOPGM(STR_STATS);
|
||||
duration_t elapsed = data.printTime;
|
||||
elapsed.toString(buffer);
|
||||
SERIAL_ECHOPAIR("Total time: ", buffer);
|
||||
SERIAL_ECHOPGM("Total time: ", buffer);
|
||||
#if ENABLED(DEBUG_PRINTCOUNTER)
|
||||
SERIAL_ECHOPAIR(" (", data.printTime);
|
||||
SERIAL_ECHOPGM(" (", data.printTime);
|
||||
SERIAL_CHAR(')');
|
||||
#endif
|
||||
|
||||
elapsed = data.longestPrint;
|
||||
elapsed.toString(buffer);
|
||||
SERIAL_ECHOPAIR(", Longest job: ", buffer);
|
||||
SERIAL_ECHOPGM(", Longest job: ", buffer);
|
||||
#if ENABLED(DEBUG_PRINTCOUNTER)
|
||||
SERIAL_ECHOPAIR(" (", data.longestPrint);
|
||||
SERIAL_ECHOPGM(" (", data.longestPrint);
|
||||
SERIAL_CHAR(')');
|
||||
#endif
|
||||
|
||||
SERIAL_ECHOPAIR("\n" STR_STATS "Filament used: ", data.filamentUsed / 1000);
|
||||
SERIAL_ECHOPGM("\n" STR_STATS "Filament used: ", data.filamentUsed / 1000);
|
||||
SERIAL_CHAR('m');
|
||||
SERIAL_EOL();
|
||||
|
||||
|
@ -111,7 +111,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
|
||||
* If true, move to MAX_X and release the solenoid
|
||||
*/
|
||||
static void dock_sled(const bool stow) {
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("dock_sled(", stow, ")");
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("dock_sled(", stow, ")");
|
||||
|
||||
// Dock sled a bit closer to ensure proper capturing
|
||||
do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET - ((stow) ? 1 : 0));
|
||||
@ -274,7 +274,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
|
||||
* Raise Z to a minimum height to make room for a probe to move
|
||||
*/
|
||||
void Probe::do_z_raise(const float z_raise) {
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Probe::do_z_raise(", z_raise, ")");
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probe::do_z_raise(", z_raise, ")");
|
||||
float z_dest = z_raise;
|
||||
if (offset.z < 0) z_dest -= offset.z;
|
||||
do_z_clearance(z_dest);
|
||||
@ -367,7 +367,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
|
||||
#if ENABLED(WAIT_FOR_NOZZLE_HEAT)
|
||||
const celsius_t hotendPreheat = hotend_temp > thermalManager.degTargetHotend(0) ? hotend_temp : 0;
|
||||
if (hotendPreheat) {
|
||||
DEBUG_ECHOPAIR("hotend (", hotendPreheat, ")");
|
||||
DEBUG_ECHOPGM("hotend (", hotendPreheat, ")");
|
||||
thermalManager.setTargetHotend(hotendPreheat, 0);
|
||||
}
|
||||
#elif ENABLED(WAIT_FOR_BED_HEAT)
|
||||
@ -378,7 +378,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
|
||||
const celsius_t bedPreheat = bed_temp > thermalManager.degTargetBed() ? bed_temp : 0;
|
||||
if (bedPreheat) {
|
||||
if (hotendPreheat) DEBUG_ECHOPGM(" and ");
|
||||
DEBUG_ECHOPAIR("bed (", bedPreheat, ")");
|
||||
DEBUG_ECHOPGM("bed (", bedPreheat, ")");
|
||||
thermalManager.setTargetBed(bedPreheat);
|
||||
}
|
||||
#endif
|
||||
@ -400,7 +400,7 @@ bool Probe::set_deployed(const bool deploy) {
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_POS("Probe::set_deployed", current_position);
|
||||
DEBUG_ECHOLNPAIR("deploy: ", deploy);
|
||||
DEBUG_ECHOLNPGM("deploy: ", deploy);
|
||||
}
|
||||
|
||||
if (endstops.z_probe_enabled == deploy) return false;
|
||||
@ -629,7 +629,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) {
|
||||
|
||||
const float first_probe_z = current_position.z;
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("1st Probe Z:", first_probe_z);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("1st Probe Z:", first_probe_z);
|
||||
|
||||
// Raise to give the probe clearance
|
||||
do_blocking_move_to_z(current_position.z + Z_CLEARANCE_MULTI_PROBE, z_probe_fast_mm_s);
|
||||
@ -723,7 +723,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) {
|
||||
|
||||
const float z2 = current_position.z;
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("2nd Probe Z:", z2, " Discrepancy:", first_probe_z - z2);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("2nd Probe Z:", z2, " Discrepancy:", first_probe_z - z2);
|
||||
|
||||
// Return a weighted average of the fast and slow probes
|
||||
const float measured_z = (z2 * 3.0 + first_probe_z * 2.0) * 0.2;
|
||||
@ -751,7 +751,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
|
||||
DEBUG_SECTION(log_probe, "Probe::probe_at_point", DEBUGGING(LEVELING));
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOLNPAIR(
|
||||
DEBUG_ECHOLNPGM(
|
||||
"...(", LOGICAL_X_POSITION(rx), ", ", LOGICAL_Y_POSITION(ry),
|
||||
", ", raise_after == PROBE_PT_RAISE ? "raise" : raise_after == PROBE_PT_LAST_STOW ? "stow (last)" : raise_after == PROBE_PT_STOW ? "stow" : "none",
|
||||
", ", verbose_level,
|
||||
@ -788,7 +788,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
|
||||
if (stow()) measured_z = NAN; // Error on stow?
|
||||
|
||||
if (verbose_level > 2)
|
||||
SERIAL_ECHOLNPAIR("Bed X: ", LOGICAL_X_POSITION(rx), " Y: ", LOGICAL_Y_POSITION(ry), " Z: ", measured_z);
|
||||
SERIAL_ECHOLNPGM("Bed X: ", LOGICAL_X_POSITION(rx), " Y: ", LOGICAL_Y_POSITION(ry), " Z: ", measured_z);
|
||||
}
|
||||
|
||||
if (isnan(measured_z)) {
|
||||
@ -864,7 +864,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
|
||||
#endif
|
||||
#if ((ENABLED(DELTA) && (HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(Y))) || HAS_CURRENT_HOME(Z))
|
||||
auto debug_current_on = [](PGM_P const s, const int16_t a, const int16_t b) {
|
||||
if (DEBUGGING(LEVELING)) { DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b); }
|
||||
if (DEBUGGING(LEVELING)) { DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPGM(" current: ", a, " -> ", b); }
|
||||
};
|
||||
#endif
|
||||
if (onoff) {
|
||||
|
@ -58,7 +58,7 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE
|
||||
cartes.y = a_sin + b_sin + scara_offset.y; // phi
|
||||
|
||||
/*
|
||||
DEBUG_ECHOLNPAIR(
|
||||
DEBUG_ECHOLNPGM(
|
||||
"SCARA FK Angle a=", a,
|
||||
" b=", b,
|
||||
" a_sin=", a_sin,
|
||||
@ -66,7 +66,7 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE
|
||||
" b_sin=", b_sin,
|
||||
" b_cos=", b_cos
|
||||
);
|
||||
DEBUG_ECHOLNPAIR(" cartes (X,Y) = "(cartes.x, ", ", cartes.y, ")");
|
||||
DEBUG_ECHOLNPGM(" cartes (X,Y) = "(cartes.x, ", ", cartes.y, ")");
|
||||
//*/
|
||||
}
|
||||
|
||||
@ -80,13 +80,13 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE
|
||||
else {
|
||||
// MORGAN_SCARA uses a Cartesian XY home position
|
||||
xyz_pos_t homeposition = { X_HOME_POS, Y_HOME_POS, Z_HOME_POS };
|
||||
//DEBUG_ECHOLNPAIR_P(PSTR("homeposition X"), homeposition.x, SP_Y_LBL, homeposition.y);
|
||||
//DEBUG_ECHOLNPGM_P(PSTR("homeposition X"), homeposition.x, SP_Y_LBL, homeposition.y);
|
||||
|
||||
delta = homeposition;
|
||||
forward_kinematics(delta.a, delta.b);
|
||||
current_position[axis] = cartes[axis];
|
||||
|
||||
//DEBUG_ECHOLNPAIR_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y);
|
||||
//DEBUG_ECHOLNPGM_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y);
|
||||
update_software_endstops(axis);
|
||||
}
|
||||
}
|
||||
@ -132,7 +132,7 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE
|
||||
/*
|
||||
DEBUG_POS("SCARA IK", raw);
|
||||
DEBUG_POS("SCARA IK", delta);
|
||||
DEBUG_ECHOLNPAIR(" SCARA (x,y) ", sx, ",", sy, " C2=", C2, " S2=", S2, " Theta=", THETA, " Psi=", PSI);
|
||||
DEBUG_ECHOLNPGM(" SCARA (x,y) ", sx, ",", sy, " C2=", C2, " S2=", S2, " Theta=", THETA, " Psi=", PSI);
|
||||
//*/
|
||||
}
|
||||
|
||||
@ -150,13 +150,13 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE
|
||||
#define SCARA_OFFSET_THETA2 131 // degrees
|
||||
#endif
|
||||
ab_float_t homeposition = { SCARA_OFFSET_THETA1, SCARA_OFFSET_THETA2 };
|
||||
//DEBUG_ECHOLNPAIR("homeposition A:", homeposition.a, " B:", homeposition.b);
|
||||
//DEBUG_ECHOLNPGM("homeposition A:", homeposition.a, " B:", homeposition.b);
|
||||
|
||||
inverse_kinematics(homeposition);
|
||||
forward_kinematics(delta.a, delta.b);
|
||||
current_position[axis] = cartes[axis];
|
||||
|
||||
//DEBUG_ECHOLNPAIR_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y);
|
||||
//DEBUG_ECHOLNPGM_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y);
|
||||
update_software_endstops(axis);
|
||||
}
|
||||
}
|
||||
@ -172,7 +172,7 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE
|
||||
/*
|
||||
DEBUG_POS("SCARA IK", raw);
|
||||
DEBUG_POS("SCARA IK", delta);
|
||||
SERIAL_ECHOLNPAIR(" SCARA (x,y) ", x, ",", y," Theta1=", THETA1, " Theta2=", THETA2);
|
||||
SERIAL_ECHOLNPGM(" SCARA (x,y) ", x, ",", y," Theta1=", THETA1, " Theta2=", THETA2);
|
||||
//*/
|
||||
}
|
||||
|
||||
@ -185,13 +185,13 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE
|
||||
current_position.z = Z_HOME_POS;
|
||||
else {
|
||||
xyz_pos_t homeposition = { X_HOME_POS, Y_HOME_POS, Z_HOME_POS };
|
||||
//DEBUG_ECHOLNPAIR_P(PSTR("homeposition X"), homeposition.x, SP_Y_LBL, homeposition.y, SP_Z_LBL, homeposition.z);
|
||||
//DEBUG_ECHOLNPGM_P(PSTR("homeposition X"), homeposition.x, SP_Y_LBL, homeposition.y, SP_Z_LBL, homeposition.z);
|
||||
|
||||
inverse_kinematics(homeposition);
|
||||
forward_kinematics(delta.a, delta.b, delta.c);
|
||||
current_position[axis] = cartes[axis];
|
||||
|
||||
//DEBUG_ECHOLNPAIR_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y);
|
||||
//DEBUG_ECHOLNPGM_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y);
|
||||
update_software_endstops(axis);
|
||||
}
|
||||
}
|
||||
@ -289,13 +289,13 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE
|
||||
|
||||
delta.set(DEGREES(THETA), DEGREES(PHI), DEGREES(PSI));
|
||||
|
||||
//SERIAL_ECHOLNPAIR(" SCARA (x,y,z) ", spos.x , ",", spos.y, ",", spos.z, " Rho=", RHO, " Rho2=", RHO2, " Theta=", THETA, " Phi=", PHI, " Psi=", PSI, " Gamma=", GAMMA);
|
||||
//SERIAL_ECHOLNPGM(" SCARA (x,y,z) ", spos.x , ",", spos.y, ",", spos.z, " Rho=", RHO, " Rho2=", RHO2, " Theta=", THETA, " Phi=", PHI, " Psi=", PSI, " Gamma=", GAMMA);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void scara_report_positions() {
|
||||
SERIAL_ECHOLNPAIR("SCARA Theta:", planner.get_axis_position_degrees(A_AXIS)
|
||||
SERIAL_ECHOLNPGM("SCARA Theta:", planner.get_axis_position_degrees(A_AXIS)
|
||||
#if ENABLED(AXEL_TPARA)
|
||||
, " Phi:", planner.get_axis_position_degrees(B_AXIS)
|
||||
, " Psi:", planner.get_axis_position_degrees(C_AXIS)
|
||||
|
@ -2353,7 +2353,7 @@ void MarlinSettings::postprocess() {
|
||||
else if (!validating) {
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHO(version);
|
||||
DEBUG_ECHOLNPAIR(" stored settings retrieved (", eeprom_index - (EEPROM_OFFSET), " bytes; crc ", (uint32_t)working_crc, ")");
|
||||
DEBUG_ECHOLNPGM(" stored settings retrieved (", eeprom_index - (EEPROM_OFFSET), " bytes; crc ", (uint32_t)working_crc, ")");
|
||||
}
|
||||
|
||||
if (!validating && !eeprom_error) postprocess();
|
||||
@ -2380,7 +2380,7 @@ void MarlinSettings::postprocess() {
|
||||
|
||||
if (ubl.storage_slot >= 0) {
|
||||
load_mesh(ubl.storage_slot);
|
||||
DEBUG_ECHOLNPAIR("Mesh ", ubl.storage_slot, " loaded from storage.");
|
||||
DEBUG_ECHOLNPGM("Mesh ", ubl.storage_slot, " loaded from storage.");
|
||||
}
|
||||
else {
|
||||
ubl.reset();
|
||||
@ -2436,7 +2436,7 @@ void MarlinSettings::postprocess() {
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
|
||||
inline void ubl_invalid_slot(const int s) {
|
||||
DEBUG_ECHOLNPAIR("?Invalid slot.\n", s, " mesh slots available.");
|
||||
DEBUG_ECHOLNPGM("?Invalid slot.\n", s, " mesh slots available.");
|
||||
UNUSED(s);
|
||||
}
|
||||
|
||||
@ -2467,7 +2467,7 @@ void MarlinSettings::postprocess() {
|
||||
const int16_t a = calc_num_meshes();
|
||||
if (!WITHIN(slot, 0, a - 1)) {
|
||||
ubl_invalid_slot(a);
|
||||
DEBUG_ECHOLNPAIR("E2END=", persistentStore.capacity() - 1, " meshes_end=", meshes_end, " slot=", slot);
|
||||
DEBUG_ECHOLNPGM("E2END=", persistentStore.capacity() - 1, " meshes_end=", meshes_end, " slot=", slot);
|
||||
DEBUG_EOL();
|
||||
return;
|
||||
}
|
||||
@ -2489,7 +2489,7 @@ void MarlinSettings::postprocess() {
|
||||
persistentStore.access_finish();
|
||||
|
||||
if (status) SERIAL_ECHOLNPGM("?Unable to save mesh data.");
|
||||
else DEBUG_ECHOLNPAIR("Mesh saved in slot ", slot);
|
||||
else DEBUG_ECHOLNPGM("Mesh saved in slot ", slot);
|
||||
|
||||
#else
|
||||
|
||||
@ -2533,7 +2533,7 @@ void MarlinSettings::postprocess() {
|
||||
#endif
|
||||
|
||||
if (status) SERIAL_ECHOLNPGM("?Unable to load mesh data.");
|
||||
else DEBUG_ECHOLNPAIR("Mesh loaded from slot ", slot);
|
||||
else DEBUG_ECHOLNPGM("Mesh loaded from slot ", slot);
|
||||
|
||||
EEPROM_FINISH();
|
||||
|
||||
@ -3010,8 +3010,8 @@ void MarlinSettings::reset() {
|
||||
#if DISABLED(DISABLE_M503)
|
||||
|
||||
#define CONFIG_ECHO_START() gcode.report_echo_start(forReplay)
|
||||
#define CONFIG_ECHO_MSG(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPAIR(V); }while(0)
|
||||
#define CONFIG_ECHO_MSG_P(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPAIR_P(V); }while(0)
|
||||
#define CONFIG_ECHO_MSG(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM(V); }while(0)
|
||||
#define CONFIG_ECHO_MSG_P(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM_P(V); }while(0)
|
||||
#define CONFIG_ECHO_HEADING(STR) gcode.report_heading(forReplay, PSTR(STR))
|
||||
|
||||
void M92_report(const bool echo=true, const int8_t e=-1);
|
||||
@ -3027,7 +3027,7 @@ void MarlinSettings::reset() {
|
||||
//
|
||||
CONFIG_ECHO_HEADING("Linear Units");
|
||||
#if ENABLED(INCH_MODE_SUPPORT)
|
||||
SERIAL_ECHOPAIR(" G2", AS_DIGIT(parser.linear_unit_factor == 1.0), " ;");
|
||||
SERIAL_ECHOPGM(" G2", AS_DIGIT(parser.linear_unit_factor == 1.0), " ;");
|
||||
#else
|
||||
SERIAL_ECHOPGM(" G21 ;");
|
||||
#endif
|
||||
@ -3096,7 +3096,7 @@ void MarlinSettings::reset() {
|
||||
LOOP_L_N(py, GRID_MAX_POINTS_Y) {
|
||||
LOOP_L_N(px, GRID_MAX_POINTS_X) {
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR(" G29 S3 I", px, " J", py);
|
||||
SERIAL_ECHOPGM(" G29 S3 I", px, " J", py);
|
||||
SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(mbl.z_values[px][py]), 5);
|
||||
}
|
||||
}
|
||||
@ -3121,7 +3121,7 @@ void MarlinSettings::reset() {
|
||||
LOOP_L_N(py, GRID_MAX_POINTS_Y) {
|
||||
LOOP_L_N(px, GRID_MAX_POINTS_X) {
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR(" G29 W I", px, " J", py);
|
||||
SERIAL_ECHOPGM(" G29 W I", px, " J", py);
|
||||
SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(z_values[px][py]), 5);
|
||||
}
|
||||
}
|
||||
|
@ -2845,7 +2845,7 @@ int32_t Stepper::triggered_position(const AxisEnum axis) {
|
||||
#endif
|
||||
|
||||
void Stepper::report_a_position(const xyz_long_t &pos) {
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
LIST_N(DOUBLE(LINEAR_AXES),
|
||||
TERN(SAYS_A, PSTR(STR_COUNT_A), PSTR(STR_COUNT_X)), pos.x,
|
||||
TERN(SAYS_B, PSTR("B:"), SP_Y_LBL), pos.y,
|
||||
@ -3167,7 +3167,7 @@ void Stepper::report_positions() {
|
||||
|
||||
#if HAS_MOTOR_CURRENT_SPI
|
||||
|
||||
//SERIAL_ECHOLNPAIR("Digipotss current ", current);
|
||||
//SERIAL_ECHOLNPGM("Digipotss current ", current);
|
||||
|
||||
const uint8_t digipot_ch[] = DIGIPOT_CHANNELS;
|
||||
set_digipot_value_spi(digipot_ch[driver], current);
|
||||
|
@ -394,7 +394,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY,
|
||||
void Temperature::report_fan_speed(const uint8_t fan) {
|
||||
if (fan >= FAN_COUNT) return;
|
||||
PORT_REDIRECT(SerialMask::All);
|
||||
SERIAL_ECHOLNPAIR("M106 P", fan, " S", fan_speed[fan]);
|
||||
SERIAL_ECHOLNPGM("M106 P", fan, " S", fan_speed[fan]);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -676,7 +676,7 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
LIMIT(bias, 20, max_pow - 20);
|
||||
d = (bias > max_pow >> 1) ? max_pow - 1 - bias : bias;
|
||||
|
||||
SERIAL_ECHOPAIR(STR_BIAS, bias, STR_D_COLON, d, STR_T_MIN, minT, STR_T_MAX, maxT);
|
||||
SERIAL_ECHOPGM(STR_BIAS, bias, STR_D_COLON, d, STR_T_MIN, minT, STR_T_MAX, maxT);
|
||||
if (cycles > 2) {
|
||||
const float Ku = (4.0f * d) / (float(M_PI) * (maxT - minT) * 0.5f),
|
||||
Tu = float(t_low + t_high) * 0.001f,
|
||||
@ -687,12 +687,12 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
tune_pid.Ki = tune_pid.Kp * 2.0f / Tu;
|
||||
tune_pid.Kd = tune_pid.Kp * Tu * df;
|
||||
|
||||
SERIAL_ECHOLNPAIR(STR_KU, Ku, STR_TU, Tu);
|
||||
SERIAL_ECHOLNPGM(STR_KU, Ku, STR_TU, Tu);
|
||||
if (ischamber || isbed)
|
||||
SERIAL_ECHOLNPGM(" No overshoot");
|
||||
else
|
||||
SERIAL_ECHOLNPGM(STR_CLASSIC_PID);
|
||||
SERIAL_ECHOLNPAIR(STR_KP, tune_pid.Kp, STR_KI, tune_pid.Ki, STR_KD, tune_pid.Kd);
|
||||
SERIAL_ECHOLNPGM(STR_KP, tune_pid.Kp, STR_KI, tune_pid.Ki, STR_KD, tune_pid.Kd);
|
||||
}
|
||||
}
|
||||
SHV((bias + d) >> 1);
|
||||
@ -756,13 +756,13 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
|
||||
#if EITHER(PIDTEMPBED, PIDTEMPCHAMBER)
|
||||
PGM_P const estring = GHV(PSTR("chamber"), PSTR("bed"), NUL_STR);
|
||||
say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp);
|
||||
say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki);
|
||||
say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPAIR("Kd ", tune_pid.Kd);
|
||||
say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPGM("Kp ", tune_pid.Kp);
|
||||
say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPGM("Ki ", tune_pid.Ki);
|
||||
say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPGM("Kd ", tune_pid.Kd);
|
||||
#else
|
||||
say_default_(); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp);
|
||||
say_default_(); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki);
|
||||
say_default_(); SERIAL_ECHOLNPAIR("Kd ", tune_pid.Kd);
|
||||
say_default_(); SERIAL_ECHOLNPGM("Kp ", tune_pid.Kp);
|
||||
say_default_(); SERIAL_ECHOLNPGM("Ki ", tune_pid.Ki);
|
||||
say_default_(); SERIAL_ECHOLNPGM("Kd ", tune_pid.Kd);
|
||||
#endif
|
||||
|
||||
auto _set_hotend_pid = [](const uint8_t e, const PID_t &in_pid) {
|
||||
@ -996,7 +996,7 @@ void Temperature::_temp_error(const heater_id_t heater_id, PGM_P const serial_ms
|
||||
OPTCODE(HAS_TEMP_BED, case H_BED: SERIAL_ECHOPGM(STR_HEATER_BED); break)
|
||||
default:
|
||||
if (real_heater_id >= 0)
|
||||
SERIAL_ECHOLNPAIR("E", real_heater_id);
|
||||
SERIAL_ECHOLNPGM("E", real_heater_id);
|
||||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
@ -1728,7 +1728,7 @@ void Temperature::manage_heater() {
|
||||
|
||||
void Temperature::M305_report(const uint8_t t_index, const bool forReplay/*=true*/) {
|
||||
gcode.report_heading_etc(forReplay, PSTR(STR_USER_THERMISTORS));
|
||||
SERIAL_ECHOPAIR(" M305 P", AS_DIGIT(t_index));
|
||||
SERIAL_ECHOPGM(" M305 P", AS_DIGIT(t_index));
|
||||
|
||||
const user_thermistor_t &t = user_thermistor[t_index];
|
||||
|
||||
@ -2535,7 +2535,7 @@ void Temperature::init() {
|
||||
case H_CHAMBER: SERIAL_ECHOPGM("chamber"); break;
|
||||
default: SERIAL_ECHO(heater_id);
|
||||
}
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
" ; sizeof(running_temp):", sizeof(running_temp),
|
||||
" ; State:", state, " ; Timer:", timer, " ; Temperature:", current, " ; Target Temp:", target
|
||||
#if HEATER_IDLE_HANDLER
|
||||
@ -2813,7 +2813,7 @@ void Temperature::disable_all_heaters() {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ECHOPGM("Temp measurement error! ");
|
||||
#if HAS_MAX31855
|
||||
SERIAL_ECHOPAIR("MAX31855 Fault: (", max_tc_temp & 0x7, ") >> ");
|
||||
SERIAL_ECHOPGM("MAX31855 Fault: (", max_tc_temp & 0x7, ") >> ");
|
||||
if (max_tc_temp & 0x1)
|
||||
SERIAL_ECHOLNPGM("Open Circuit");
|
||||
else if (max_tc_temp & 0x2)
|
||||
@ -2825,7 +2825,7 @@ void Temperature::disable_all_heaters() {
|
||||
max865ref.clearFault();
|
||||
if (fault_31865) {
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHOLNPAIR("\nMAX31865 Fault: (", fault_31865, ") >>");
|
||||
SERIAL_ECHOLNPGM("\nMAX31865 Fault: (", fault_31865, ") >>");
|
||||
if (fault_31865 & MAX31865_FAULT_HIGHTHRESH)
|
||||
SERIAL_ECHOLNPGM("RTD High Threshold");
|
||||
if (fault_31865 & MAX31865_FAULT_LOWTHRESH)
|
||||
@ -3543,7 +3543,7 @@ void Temperature::isr() {
|
||||
SERIAL_PRINT(t, SFP);
|
||||
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
||||
// Temperature MAX SPI boards do not have an OVERSAMPLENR defined
|
||||
SERIAL_ECHOPAIR(" (", TERN(HAS_MAXTC_LIBRARIES, k == 'T', false) ? r : r * RECIPROCAL(OVERSAMPLENR));
|
||||
SERIAL_ECHOPGM(" (", TERN(HAS_MAXTC_LIBRARIES, k == 'T', false) ? r : r * RECIPROCAL(OVERSAMPLENR));
|
||||
SERIAL_CHAR(')');
|
||||
#endif
|
||||
delay(2);
|
||||
@ -3576,19 +3576,19 @@ void Temperature::isr() {
|
||||
#if HAS_MULTI_HOTEND
|
||||
HOTEND_LOOP() print_heater_state((heater_id_t)e, degHotend(e), degTargetHotend(e) OPTARG(SHOW_TEMP_ADC_VALUES, rawHotendTemp(e)));
|
||||
#endif
|
||||
SERIAL_ECHOPAIR(" @:", getHeaterPower((heater_id_t)target_extruder));
|
||||
SERIAL_ECHOPGM(" @:", getHeaterPower((heater_id_t)target_extruder));
|
||||
#if HAS_HEATED_BED
|
||||
SERIAL_ECHOPAIR(" B@:", getHeaterPower(H_BED));
|
||||
SERIAL_ECHOPGM(" B@:", getHeaterPower(H_BED));
|
||||
#endif
|
||||
#if HAS_HEATED_CHAMBER
|
||||
SERIAL_ECHOPAIR(" C@:", getHeaterPower(H_CHAMBER));
|
||||
SERIAL_ECHOPGM(" C@:", getHeaterPower(H_CHAMBER));
|
||||
#endif
|
||||
#if HAS_COOLER
|
||||
SERIAL_ECHOPAIR(" C@:", getHeaterPower(H_COOLER));
|
||||
SERIAL_ECHOPGM(" C@:", getHeaterPower(H_COOLER));
|
||||
#endif
|
||||
#if HAS_MULTI_HOTEND
|
||||
HOTEND_LOOP() {
|
||||
SERIAL_ECHOPAIR(" @", e);
|
||||
SERIAL_ECHOPGM(" @", e);
|
||||
SERIAL_CHAR(':');
|
||||
SERIAL_ECHO(getHeaterPower((heater_id_t)e));
|
||||
}
|
||||
@ -3896,7 +3896,7 @@ void Temperature::isr() {
|
||||
const bool wants_to_cool = isProbeAboveTemp(target_temp),
|
||||
will_wait = !(wants_to_cool && no_wait_for_cooling);
|
||||
if (will_wait)
|
||||
SERIAL_ECHOLNPAIR("Waiting for probe to ", (wants_to_cool ? PSTR("cool down") : PSTR("heat up")), " to ", target_temp, " degrees.");
|
||||
SERIAL_ECHOLNPGM("Waiting for probe to ", (wants_to_cool ? PSTR("cool down") : PSTR("heat up")), " to ", target_temp, " degrees.");
|
||||
|
||||
#if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE)
|
||||
KEEPALIVE_STATE(NOT_BUSY);
|
||||
|
@ -189,7 +189,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
|
||||
current_position.x = mpe_settings.parking_xpos[new_tool] + offsetcompensation;
|
||||
|
||||
DEBUG_ECHOPAIR("(1) Move extruder ", new_tool);
|
||||
DEBUG_ECHOPGM("(1) Move extruder ", new_tool);
|
||||
DEBUG_POS(" to new extruder ParkPos", current_position);
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool);
|
||||
@ -199,7 +199,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
|
||||
current_position.x = grabpos + offsetcompensation;
|
||||
|
||||
DEBUG_ECHOPAIR("(2) Couple extruder ", new_tool);
|
||||
DEBUG_ECHOPGM("(2) Couple extruder ", new_tool);
|
||||
DEBUG_POS(" to new extruder GrabPos", current_position);
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool);
|
||||
@ -212,7 +212,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
|
||||
current_position.x = mpe_settings.parking_xpos[new_tool] + offsetcompensation;
|
||||
|
||||
DEBUG_ECHOPAIR("(3) Move extruder ", new_tool);
|
||||
DEBUG_ECHOPGM("(3) Move extruder ", new_tool);
|
||||
DEBUG_POS(" back to new extruder ParkPos", current_position);
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool);
|
||||
@ -222,7 +222,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
|
||||
current_position.x = mpe_settings.parking_xpos[active_extruder] + (active_extruder == 0 ? MPE_TRAVEL_DISTANCE : -MPE_TRAVEL_DISTANCE) + offsetcompensation;
|
||||
|
||||
DEBUG_ECHOPAIR("(4) Move extruder ", new_tool);
|
||||
DEBUG_ECHOPGM("(4) Move extruder ", new_tool);
|
||||
DEBUG_POS(" close to old extruder ParkPos", current_position);
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool);
|
||||
@ -232,7 +232,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
|
||||
current_position.x = mpe_settings.parking_xpos[active_extruder] + offsetcompensation;
|
||||
|
||||
DEBUG_ECHOPAIR("(5) Park extruder ", new_tool);
|
||||
DEBUG_ECHOPGM("(5) Park extruder ", new_tool);
|
||||
DEBUG_POS(" at old extruder ParkPos", current_position);
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool);
|
||||
@ -242,7 +242,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
|
||||
current_position.x = oldx;
|
||||
|
||||
DEBUG_ECHOPAIR("(6) Move extruder ", new_tool);
|
||||
DEBUG_ECHOPGM("(6) Move extruder ", new_tool);
|
||||
DEBUG_POS(" to starting position", current_position);
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool);
|
||||
@ -277,9 +277,9 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
|
||||
if (homed_towards_final_tool) {
|
||||
pe_solenoid_magnet_off(1 - final_tool);
|
||||
DEBUG_ECHOLNPAIR("Disengage magnet", 1 - final_tool);
|
||||
DEBUG_ECHOLNPGM("Disengage magnet", 1 - final_tool);
|
||||
pe_solenoid_magnet_on(final_tool);
|
||||
DEBUG_ECHOLNPAIR("Engage magnet", final_tool);
|
||||
DEBUG_ECHOLNPGM("Engage magnet", final_tool);
|
||||
parking_extruder_set_parked(false);
|
||||
return false;
|
||||
}
|
||||
@ -318,7 +318,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
if (!extruder_parked) {
|
||||
current_position.x = parkingposx[active_extruder] + x_offset;
|
||||
|
||||
DEBUG_ECHOLNPAIR("(1) Park extruder ", active_extruder);
|
||||
DEBUG_ECHOLNPGM("(1) Park extruder ", active_extruder);
|
||||
DEBUG_POS("Moving ParkPos", current_position);
|
||||
|
||||
fast_line_to_current(X_AXIS);
|
||||
@ -521,7 +521,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
|
||||
current_position.x = placexpos;
|
||||
|
||||
DEBUG_ECHOLNPAIR("(1) Place old tool ", active_extruder);
|
||||
DEBUG_ECHOLNPGM("(1) Place old tool ", active_extruder);
|
||||
DEBUG_POS("Move X SwitchPos", current_position);
|
||||
|
||||
fast_line_to_current(X_AXIS);
|
||||
@ -627,7 +627,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
|
||||
current_position.y = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR;
|
||||
|
||||
SERIAL_ECHOLNPAIR("(1) Place old tool ", active_extruder);
|
||||
SERIAL_ECHOLNPGM("(1) Place old tool ", active_extruder);
|
||||
DEBUG_POS("Move Y SwitchPos + Security", current_position);
|
||||
|
||||
fast_line_to_current(Y_AXIS);
|
||||
@ -759,7 +759,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
// 2. Move to position near active extruder parking
|
||||
|
||||
DEBUG_SYNCHRONIZE();
|
||||
DEBUG_ECHOLNPAIR("(2) Move near active extruder parking", active_extruder);
|
||||
DEBUG_ECHOLNPGM("(2) Move near active extruder parking", active_extruder);
|
||||
DEBUG_POS("Moving ParkPos", current_position);
|
||||
|
||||
current_position.set(hoffs.x + placexpos,
|
||||
@ -769,7 +769,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
// 3. Move gently to park position of active extruder
|
||||
|
||||
DEBUG_SYNCHRONIZE();
|
||||
SERIAL_ECHOLNPAIR("(3) Move gently to park position of active extruder", active_extruder);
|
||||
SERIAL_ECHOLNPGM("(3) Move gently to park position of active extruder", active_extruder);
|
||||
DEBUG_POS("Moving ParkPos", current_position);
|
||||
|
||||
current_position.y -= SWITCHING_TOOLHEAD_Y_CLEAR;
|
||||
@ -858,7 +858,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
&& IsRunning() && !no_move // ...and movement is permitted
|
||||
&& (delayed_move_time || current_position.x != xhome) // ...and delayed_move_time is set OR not "already parked"...
|
||||
) {
|
||||
DEBUG_ECHOLNPAIR("MoveX to ", xhome);
|
||||
DEBUG_ECHOLNPGM("MoveX to ", xhome);
|
||||
current_position.x = xhome;
|
||||
line_to_current_position(planner.settings.max_feedrate_mm_s[X_AXIS]); // Park the current head
|
||||
planner.synchronize();
|
||||
@ -878,7 +878,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
current_position.x = inactive_extruder_x;
|
||||
// Save the inactive extruder's position (from the old current_position)
|
||||
inactive_extruder_x = destination.x;
|
||||
DEBUG_ECHOLNPAIR("DXC Full Control curr.x=", current_position.x, " dest.x=", destination.x);
|
||||
DEBUG_ECHOLNPGM("DXC Full Control curr.x=", current_position.x, " dest.x=", destination.x);
|
||||
break;
|
||||
case DXC_AUTO_PARK_MODE:
|
||||
idex_set_parked();
|
||||
@ -890,7 +890,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
||||
// Ensure X axis DIR pertains to the correct carriage
|
||||
stepper.set_directions();
|
||||
|
||||
DEBUG_ECHOLNPAIR("Active extruder parked: ", active_extruder_parked ? "yes" : "no");
|
||||
DEBUG_ECHOLNPGM("Active extruder parked: ", active_extruder_parked ? "yes" : "no");
|
||||
DEBUG_POS("New extruder (parked)", current_position);
|
||||
}
|
||||
|
||||
@ -1170,7 +1170,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||
(void)check_tool_sensor_stats(active_extruder, true);
|
||||
|
||||
// The newly-selected extruder XYZ is actually at...
|
||||
DEBUG_ECHOLNPAIR("Offset Tool XYZ by { ", diff.x, ", ", diff.y, ", ", diff.z, " }");
|
||||
DEBUG_ECHOLNPGM("Offset Tool XYZ by { ", diff.x, ", ", diff.y, ", ", diff.z, " }");
|
||||
current_position += diff;
|
||||
|
||||
// Tell the planner the new "current position"
|
||||
|
Reference in New Issue
Block a user