🎨 Fewer serial macros
This commit is contained in:
committed by
Scott Lahteine
parent
6d96c221bd
commit
b661795ae5
@ -134,12 +134,12 @@ void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const
|
||||
switch (axis) {
|
||||
case CORE_AXIS_1:
|
||||
//block->steps[CORE_AXIS_2] += influence_distance_mm[axis] * planner.settings.axis_steps_per_mm[CORE_AXIS_2];
|
||||
//SERIAL_ECHOLNPAIR("CORE_AXIS_1 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis],
|
||||
//SERIAL_ECHOLNPGM("CORE_AXIS_1 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis],
|
||||
// " da=", da, " db=", db, " block->steps[axis]=", block->steps[axis], " err_corr=", error_correction);
|
||||
break;
|
||||
case CORE_AXIS_2:
|
||||
//block->steps[CORE_AXIS_1] += influence_distance_mm[axis] * planner.settings.axis_steps_per_mm[CORE_AXIS_1];;
|
||||
//SERIAL_ECHOLNPAIR("CORE_AXIS_2 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis],
|
||||
//SERIAL_ECHOLNPGM("CORE_AXIS_2 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis],
|
||||
// " da=", da, " db=", db, " block->steps[axis]=", block->steps[axis], " err_corr=", error_correction);
|
||||
break;
|
||||
case NORMAL_AXIS: break;
|
||||
|
@ -336,11 +336,11 @@ float bilinear_z_offset(const xy_pos_t &raw) {
|
||||
/*
|
||||
static float last_offset = 0;
|
||||
if (ABS(last_offset - offset) > 0.2) {
|
||||
SERIAL_ECHOLNPAIR("Sudden Shift at x=", rel.x, " / ", bilinear_grid_spacing.x, " -> thisg.x=", thisg.x);
|
||||
SERIAL_ECHOLNPAIR(" y=", rel.y, " / ", bilinear_grid_spacing.y, " -> thisg.y=", thisg.y);
|
||||
SERIAL_ECHOLNPAIR(" ratio.x=", ratio.x, " ratio.y=", ratio.y);
|
||||
SERIAL_ECHOLNPAIR(" z1=", z1, " z2=", z2, " z3=", z3, " z4=", z4);
|
||||
SERIAL_ECHOLNPAIR(" L=", L, " R=", R, " offset=", offset);
|
||||
SERIAL_ECHOLNPGM("Sudden Shift at x=", rel.x, " / ", bilinear_grid_spacing.x, " -> thisg.x=", thisg.x);
|
||||
SERIAL_ECHOLNPGM(" y=", rel.y, " / ", bilinear_grid_spacing.y, " -> thisg.y=", thisg.y);
|
||||
SERIAL_ECHOLNPGM(" ratio.x=", ratio.x, " ratio.y=", ratio.y);
|
||||
SERIAL_ECHOLNPGM(" z1=", z1, " z2=", z2, " z3=", z3, " z4=", z4);
|
||||
SERIAL_ECHOLNPGM(" L=", L, " R=", R, " offset=", offset);
|
||||
}
|
||||
last_offset = offset;
|
||||
//*/
|
||||
|
@ -51,7 +51,7 @@ void unified_bed_leveling::report_current_mesh() {
|
||||
GRID_LOOP(x, y)
|
||||
if (!isnan(z_values[x][y])) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR(" M421 I", x, " J", y);
|
||||
SERIAL_ECHOPGM(" M421 I", x, " J", y);
|
||||
SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, z_values[x][y], 4);
|
||||
serial_delay(75); // Prevent Printrun from exploding
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ public:
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
if (WITHIN(x1_i, 0, (GRID_MAX_POINTS_X) - 1)) DEBUG_ECHOPGM("yi"); else DEBUG_ECHOPGM("x1_i");
|
||||
DEBUG_ECHOLNPAIR(" out of bounds in z_correction_for_x_on_horizontal_mesh_line(rx0=", rx0, ",x1_i=", x1_i, ",yi=", yi, ")");
|
||||
DEBUG_ECHOLNPGM(" out of bounds in z_correction_for_x_on_horizontal_mesh_line(rx0=", rx0, ",x1_i=", x1_i, ",yi=", yi, ")");
|
||||
}
|
||||
|
||||
// The requested location is off the mesh. Return UBL_Z_RAISE_WHEN_OFF_MESH or NAN.
|
||||
@ -231,7 +231,7 @@ public:
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
if (WITHIN(xi, 0, (GRID_MAX_POINTS_X) - 1)) DEBUG_ECHOPGM("y1_i"); else DEBUG_ECHOPGM("xi");
|
||||
DEBUG_ECHOLNPAIR(" out of bounds in z_correction_for_y_on_vertical_mesh_line(ry0=", ry0, ", xi=", xi, ", y1_i=", y1_i, ")");
|
||||
DEBUG_ECHOLNPGM(" out of bounds in z_correction_for_y_on_vertical_mesh_line(ry0=", ry0, ", xi=", xi, ", y1_i=", y1_i, ")");
|
||||
}
|
||||
|
||||
// The requested location is off the mesh. Return UBL_Z_RAISE_WHEN_OFF_MESH or NAN.
|
||||
@ -275,11 +275,11 @@ public:
|
||||
// because part of the Mesh is undefined and we don't have the
|
||||
// information we need to complete the height correction.
|
||||
|
||||
if (DEBUGGING(MESH_ADJUST)) DEBUG_ECHOLNPAIR("??? Yikes! NAN in ");
|
||||
if (DEBUGGING(MESH_ADJUST)) DEBUG_ECHOLNPGM("??? Yikes! NAN in ");
|
||||
}
|
||||
|
||||
if (DEBUGGING(MESH_ADJUST)) {
|
||||
DEBUG_ECHOPAIR("get_z_correction(", rx0, ", ", ry0);
|
||||
DEBUG_ECHOPGM("get_z_correction(", rx0, ", ", ry0);
|
||||
DEBUG_ECHOLNPAIR_F(") => ", z0, 6);
|
||||
}
|
||||
|
||||
|
@ -428,7 +428,7 @@ void unified_bed_leveling::G29() {
|
||||
SERIAL_ECHOLNPGM("Mesh invalidated. Probing mesh.");
|
||||
}
|
||||
if (param.V_verbosity > 1) {
|
||||
SERIAL_ECHOPAIR("Probing around (", param.XY_pos.x);
|
||||
SERIAL_ECHOPGM("Probing around (", param.XY_pos.x);
|
||||
SERIAL_CHAR(',');
|
||||
SERIAL_DECIMAL(param.XY_pos.y);
|
||||
SERIAL_ECHOLNPGM(").\n");
|
||||
@ -602,7 +602,7 @@ void unified_bed_leveling::G29() {
|
||||
}
|
||||
|
||||
if (!WITHIN(param.KLS_storage_slot, 0, a - 1)) {
|
||||
SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1);
|
||||
SERIAL_ECHOLNPGM("?Invalid storage slot.\n?Use 0 to ", a - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -630,7 +630,7 @@ void unified_bed_leveling::G29() {
|
||||
}
|
||||
|
||||
if (!WITHIN(param.KLS_storage_slot, 0, a - 1)) {
|
||||
SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1);
|
||||
SERIAL_ECHOLNPGM("?Invalid storage slot.\n?Use 0 to ", a - 1);
|
||||
goto LEAVE;
|
||||
}
|
||||
|
||||
@ -653,7 +653,7 @@ void unified_bed_leveling::G29() {
|
||||
#endif
|
||||
|
||||
#ifdef Z_PROBE_END_SCRIPT
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
|
||||
if (probe_deployed) {
|
||||
planner.synchronize();
|
||||
gcode.process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT));
|
||||
@ -690,7 +690,7 @@ void unified_bed_leveling::adjust_mesh_to_mean(const bool cflag, const_float_t o
|
||||
if (!isnan(z_values[x][y]))
|
||||
sum_of_diff_squared += sq(z_values[x][y] - mean);
|
||||
|
||||
SERIAL_ECHOLNPAIR("# of samples: ", n);
|
||||
SERIAL_ECHOLNPGM("# of samples: ", n);
|
||||
SERIAL_ECHOLNPAIR_F("Mean Mesh Height: ", mean, 6);
|
||||
|
||||
const float sigma = SQRT(sum_of_diff_squared / (n + 1));
|
||||
@ -735,7 +735,7 @@ void unified_bed_leveling::shift_mesh_height() {
|
||||
if (do_ubl_mesh_map) display_map(param.T_map_type);
|
||||
|
||||
const uint8_t point_num = (GRID_MAX_POINTS - count) + 1;
|
||||
SERIAL_ECHOLNPAIR("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, ".");
|
||||
SERIAL_ECHOLNPGM("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, ".");
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS)));
|
||||
|
||||
#if HAS_LCD_MENU
|
||||
@ -1450,7 +1450,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
#endif
|
||||
if (param.V_verbosity > 3) {
|
||||
serial_spaces(16);
|
||||
SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z);
|
||||
SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
|
||||
}
|
||||
incremental_LSF(&lsf_results, points[0], measured_z);
|
||||
}
|
||||
@ -1469,7 +1469,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
measured_z -= get_z_correction(points[1]);
|
||||
if (param.V_verbosity > 3) {
|
||||
serial_spaces(16);
|
||||
SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z);
|
||||
SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
|
||||
}
|
||||
incremental_LSF(&lsf_results, points[1], measured_z);
|
||||
}
|
||||
@ -1489,7 +1489,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
measured_z -= get_z_correction(points[2]);
|
||||
if (param.V_verbosity > 3) {
|
||||
serial_spaces(16);
|
||||
SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z);
|
||||
SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
|
||||
}
|
||||
incremental_LSF(&lsf_results, points[2], measured_z);
|
||||
}
|
||||
@ -1517,7 +1517,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
rpos.y = y_min + dy * (zig_zag ? param.J_grid_size - 1 - iy : iy);
|
||||
|
||||
if (!abort_flag) {
|
||||
SERIAL_ECHOLNPAIR("Tilting mesh point ", point_num, "/", total_points, "\n");
|
||||
SERIAL_ECHOLNPGM("Tilting mesh point ", point_num, "/", total_points, "\n");
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points));
|
||||
|
||||
measured_z = probe.probe_at_point(rpos, parser.seen_test('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity); // TODO: Needs error handling
|
||||
@ -1545,7 +1545,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
|
||||
if (param.V_verbosity > 3) {
|
||||
serial_spaces(16);
|
||||
SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z);
|
||||
SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
|
||||
}
|
||||
incremental_LSF(&lsf_results, rpos, measured_z);
|
||||
}
|
||||
@ -1648,7 +1648,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
DEBUG_ECHOLNPAIR_F("0 : ", normed(safe_homing_xy, 0), 6);
|
||||
d_from(); DEBUG_ECHOPGM("safe home with Z=");
|
||||
DEBUG_ECHOLNPAIR_F("mesh value ", normed(safe_homing_xy, get_z_correction(safe_homing_xy)), 6);
|
||||
DEBUG_ECHOPAIR(" Z error = (", Z_SAFE_HOMING_X_POINT, ",", Z_SAFE_HOMING_Y_POINT);
|
||||
DEBUG_ECHOPGM(" Z error = (", Z_SAFE_HOMING_X_POINT, ",", Z_SAFE_HOMING_Y_POINT);
|
||||
DEBUG_ECHOLNPAIR_F(") = ", get_z_correction(safe_homing_xy), 6);
|
||||
#endif
|
||||
} // DEBUGGING(LEVELING)
|
||||
@ -1722,7 +1722,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
if (storage_slot == -1)
|
||||
SERIAL_ECHOPGM("No Mesh Loaded.");
|
||||
else
|
||||
SERIAL_ECHOPAIR("Mesh ", storage_slot, " Loaded.");
|
||||
SERIAL_ECHOPGM("Mesh ", storage_slot, " Loaded.");
|
||||
SERIAL_EOL();
|
||||
serial_delay(50);
|
||||
|
||||
@ -1736,14 +1736,14 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
SERIAL_ECHOLNPAIR_F("Probe Offset M851 Z", probe.offset.z, 7);
|
||||
#endif
|
||||
|
||||
SERIAL_ECHOLNPAIR("MESH_MIN_X " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); serial_delay(50);
|
||||
SERIAL_ECHOLNPAIR("MESH_MIN_Y " STRINGIFY(MESH_MIN_Y) "=", MESH_MIN_Y); serial_delay(50);
|
||||
SERIAL_ECHOLNPAIR("MESH_MAX_X " STRINGIFY(MESH_MAX_X) "=", MESH_MAX_X); serial_delay(50);
|
||||
SERIAL_ECHOLNPAIR("MESH_MAX_Y " STRINGIFY(MESH_MAX_Y) "=", MESH_MAX_Y); serial_delay(50);
|
||||
SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X); serial_delay(50);
|
||||
SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y); serial_delay(50);
|
||||
SERIAL_ECHOLNPAIR("MESH_X_DIST ", MESH_X_DIST);
|
||||
SERIAL_ECHOLNPAIR("MESH_Y_DIST ", MESH_Y_DIST); serial_delay(50);
|
||||
SERIAL_ECHOLNPGM("MESH_MIN_X " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); serial_delay(50);
|
||||
SERIAL_ECHOLNPGM("MESH_MIN_Y " STRINGIFY(MESH_MIN_Y) "=", MESH_MIN_Y); serial_delay(50);
|
||||
SERIAL_ECHOLNPGM("MESH_MAX_X " STRINGIFY(MESH_MAX_X) "=", MESH_MAX_X); serial_delay(50);
|
||||
SERIAL_ECHOLNPGM("MESH_MAX_Y " STRINGIFY(MESH_MAX_Y) "=", MESH_MAX_Y); serial_delay(50);
|
||||
SERIAL_ECHOLNPGM("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X); serial_delay(50);
|
||||
SERIAL_ECHOLNPGM("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y); serial_delay(50);
|
||||
SERIAL_ECHOLNPGM("MESH_X_DIST ", MESH_X_DIST);
|
||||
SERIAL_ECHOLNPGM("MESH_Y_DIST ", MESH_Y_DIST); serial_delay(50);
|
||||
|
||||
SERIAL_ECHOPGM("X-Axis Mesh Points at: ");
|
||||
LOOP_L_N(i, GRID_MAX_POINTS_X) {
|
||||
@ -1762,27 +1762,27 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
SERIAL_EOL();
|
||||
|
||||
#if HAS_KILL
|
||||
SERIAL_ECHOLNPAIR("Kill pin on :", KILL_PIN, " state:", kill_state());
|
||||
SERIAL_ECHOLNPGM("Kill pin on :", KILL_PIN, " state:", kill_state());
|
||||
#endif
|
||||
|
||||
SERIAL_EOL();
|
||||
serial_delay(50);
|
||||
|
||||
#if ENABLED(UBL_DEVEL_DEBUGGING)
|
||||
SERIAL_ECHOLNPAIR("ubl_state_at_invocation :", ubl_state_at_invocation, "\nubl_state_recursion_chk :", ubl_state_recursion_chk);
|
||||
SERIAL_ECHOLNPGM("ubl_state_at_invocation :", ubl_state_at_invocation, "\nubl_state_recursion_chk :", ubl_state_recursion_chk);
|
||||
serial_delay(50);
|
||||
|
||||
SERIAL_ECHOLNPAIR("Meshes go from ", hex_address((void*)settings.meshes_start_index()), " to ", hex_address((void*)settings.meshes_end_index()));
|
||||
SERIAL_ECHOLNPGM("Meshes go from ", hex_address((void*)settings.meshes_start_index()), " to ", hex_address((void*)settings.meshes_end_index()));
|
||||
serial_delay(50);
|
||||
|
||||
SERIAL_ECHOLNPAIR("sizeof(ubl) : ", sizeof(ubl)); SERIAL_EOL();
|
||||
SERIAL_ECHOLNPAIR("z_value[][] size: ", sizeof(z_values)); SERIAL_EOL();
|
||||
SERIAL_ECHOLNPGM("sizeof(ubl) : ", sizeof(ubl)); SERIAL_EOL();
|
||||
SERIAL_ECHOLNPGM("z_value[][] size: ", sizeof(z_values)); SERIAL_EOL();
|
||||
serial_delay(25);
|
||||
|
||||
SERIAL_ECHOLNPAIR("EEPROM free for UBL: ", hex_address((void*)(settings.meshes_end_index() - settings.meshes_start_index())));
|
||||
SERIAL_ECHOLNPGM("EEPROM free for UBL: ", hex_address((void*)(settings.meshes_end_index() - settings.meshes_start_index())));
|
||||
serial_delay(50);
|
||||
|
||||
SERIAL_ECHOLNPAIR("EEPROM can hold ", settings.calc_num_meshes(), " meshes.\n");
|
||||
SERIAL_ECHOLNPGM("EEPROM can hold ", settings.calc_num_meshes(), " meshes.\n");
|
||||
serial_delay(25);
|
||||
#endif // UBL_DEVEL_DEBUGGING
|
||||
|
||||
@ -1829,7 +1829,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
}
|
||||
|
||||
if (!parser.has_value() || !WITHIN(parser.value_int(), 0, a - 1)) {
|
||||
SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1);
|
||||
SERIAL_ECHOLNPGM("?Invalid storage slot.\n?Use 0 to ", a - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1838,7 +1838,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
float tmp_z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
|
||||
settings.load_mesh(param.KLS_storage_slot, &tmp_z_values);
|
||||
|
||||
SERIAL_ECHOLNPAIR("Subtracting mesh in slot ", param.KLS_storage_slot, " from current mesh.");
|
||||
SERIAL_ECHOLNPGM("Subtracting mesh in slot ", param.KLS_storage_slot, " from current mesh.");
|
||||
|
||||
GRID_LOOP(x, y) {
|
||||
z_values[x][y] -= tmp_z_values[x][y];
|
||||
|
@ -146,9 +146,9 @@ public:
|
||||
transfer_timeout = millis() + TIMEOUT;
|
||||
switch (static_cast<FileTransfer>(packet_type)) {
|
||||
case FileTransfer::QUERY:
|
||||
SERIAL_ECHOPAIR("PFT:version:", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH);
|
||||
SERIAL_ECHOPGM("PFT:version:", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH);
|
||||
#if ENABLED(BINARY_STREAM_COMPRESSION)
|
||||
SERIAL_ECHOLNPAIR(":compression:heatshrink,", HEATSHRINK_STATIC_WINDOW_BITS, ",", HEATSHRINK_STATIC_LOOKAHEAD_BITS);
|
||||
SERIAL_ECHOLNPGM(":compression:heatshrink,", HEATSHRINK_STATIC_WINDOW_BITS, ",", HEATSHRINK_STATIC_LOOKAHEAD_BITS);
|
||||
#else
|
||||
SERIAL_ECHOLNPGM(":compression:none");
|
||||
#endif
|
||||
@ -322,7 +322,7 @@ public:
|
||||
if (packet.header.checksum == packet.header_checksum) {
|
||||
// The SYNC control packet is a special case in that it doesn't require the stream sync to be correct
|
||||
if (static_cast<Protocol>(packet.header.protocol()) == Protocol::CONTROL && static_cast<ProtocolControl>(packet.header.type()) == ProtocolControl::SYNC) {
|
||||
SERIAL_ECHOLNPAIR("ss", sync, ",", buffer_size, ",", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH);
|
||||
SERIAL_ECHOLNPGM("ss", sync, ",", buffer_size, ",", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH);
|
||||
stream_state = StreamState::PACKET_RESET;
|
||||
break;
|
||||
}
|
||||
@ -337,7 +337,7 @@ public:
|
||||
stream_state = StreamState::PACKET_PROCESS;
|
||||
}
|
||||
else if (packet.header.sync == sync - 1) { // ok response must have been lost
|
||||
SERIAL_ECHOLNPAIR("ok", packet.header.sync); // transmit valid packet received and drop the payload
|
||||
SERIAL_ECHOLNPGM("ok", packet.header.sync); // transmit valid packet received and drop the payload
|
||||
stream_state = StreamState::PACKET_RESET;
|
||||
}
|
||||
else if (packet_retries) {
|
||||
@ -393,7 +393,7 @@ public:
|
||||
packet_retries = 0;
|
||||
bytes_received += packet.header.size;
|
||||
|
||||
SERIAL_ECHOLNPAIR("ok", packet.header.sync); // transmit valid packet received
|
||||
SERIAL_ECHOLNPGM("ok", packet.header.sync); // transmit valid packet received
|
||||
dispatch();
|
||||
stream_state = StreamState::PACKET_RESET;
|
||||
break;
|
||||
@ -402,7 +402,7 @@ public:
|
||||
packet_retries++;
|
||||
stream_state = StreamState::PACKET_RESET;
|
||||
SERIAL_ECHO_MSG("Resend request ", packet_retries);
|
||||
SERIAL_ECHOLNPAIR("rs", sync);
|
||||
SERIAL_ECHOLNPGM("rs", sync);
|
||||
}
|
||||
else
|
||||
stream_state = StreamState::PACKET_ERROR;
|
||||
@ -412,7 +412,7 @@ public:
|
||||
stream_state = StreamState::PACKET_RESEND;
|
||||
break;
|
||||
case StreamState::PACKET_ERROR:
|
||||
SERIAL_ECHOLNPAIR("fe", packet.header.sync);
|
||||
SERIAL_ECHOLNPGM("fe", packet.header.sync);
|
||||
reset(); // reset everything, resync required
|
||||
stream_state = StreamState::PACKET_RESET;
|
||||
break;
|
||||
|
@ -39,7 +39,7 @@ void stop();
|
||||
#include "../core/debug_out.h"
|
||||
|
||||
bool BLTouch::command(const BLTCommand cmd, const millis_t &ms) {
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPAIR("BLTouch Command :", cmd);
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch Command :", cmd);
|
||||
MOVE_SERVO(Z_PROBE_SERVO_NR, cmd);
|
||||
safe_delay(_MAX(ms, (uint32_t)BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay
|
||||
return triggered();
|
||||
@ -64,7 +64,7 @@ void BLTouch::init(const bool set_voltage/*=false*/) {
|
||||
#else
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOLNPAIR("last_written_mode - ", last_written_mode);
|
||||
DEBUG_ECHOLNPGM("last_written_mode - ", last_written_mode);
|
||||
DEBUG_ECHOLNPGM("config mode - "
|
||||
#if ENABLED(BLTOUCH_SET_5V_MODE)
|
||||
"BLTOUCH_SET_5V_MODE"
|
||||
@ -175,7 +175,7 @@ bool BLTouch::status_proc() {
|
||||
_set_SW_mode(); // Incidentally, _set_SW_mode() will also RESET any active alarm
|
||||
const bool tr = triggered(); // If triggered in SW mode, the pin is up, it is STOWED
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("BLTouch is ", tr);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch is ", tr);
|
||||
|
||||
if (tr) _stow(); else _deploy(); // Turn off SW mode, reset any trigger, honor pin state
|
||||
return !tr;
|
||||
@ -187,7 +187,7 @@ void BLTouch::mode_conv_proc(const bool M5V) {
|
||||
* BLTOUCH V3.0: This will set the mode (twice) and sadly, a STOW is needed at the end, because of the deploy
|
||||
* BLTOUCH V3.1: This will set the mode and store it in the eeprom. The STOW is not needed but does not hurt
|
||||
*/
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("BLTouch Set Mode - ", M5V);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch Set Mode - ", M5V);
|
||||
_deploy();
|
||||
if (M5V) _set_5V_mode(); else _set_OD_mode();
|
||||
_mode_store();
|
||||
|
@ -85,15 +85,15 @@ void StepperDAC::print_values() {
|
||||
if (!dac_present) return;
|
||||
SERIAL_ECHO_MSG("Stepper current values in % (Amps):");
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(SP_X_LBL, dac_perc(X_AXIS), PSTR(" ("), dac_amps(X_AXIS), PSTR(")"));
|
||||
SERIAL_ECHOPGM_P(SP_X_LBL, dac_perc(X_AXIS), PSTR(" ("), dac_amps(X_AXIS), PSTR(")"));
|
||||
#if HAS_Y_AXIS
|
||||
SERIAL_ECHOPAIR_P(SP_Y_LBL, dac_perc(Y_AXIS), PSTR(" ("), dac_amps(Y_AXIS), PSTR(")"));
|
||||
SERIAL_ECHOPGM_P(SP_Y_LBL, dac_perc(Y_AXIS), PSTR(" ("), dac_amps(Y_AXIS), PSTR(")"));
|
||||
#endif
|
||||
#if HAS_Z_AXIS
|
||||
SERIAL_ECHOPAIR_P(SP_Z_LBL, dac_perc(Z_AXIS), PSTR(" ("), dac_amps(Z_AXIS), PSTR(")"));
|
||||
SERIAL_ECHOPGM_P(SP_Z_LBL, dac_perc(Z_AXIS), PSTR(" ("), dac_amps(Z_AXIS), PSTR(")"));
|
||||
#endif
|
||||
#if HAS_EXTRUDERS
|
||||
SERIAL_ECHOLNPAIR_P(SP_E_LBL, dac_perc(E_AXIS), PSTR(" ("), dac_amps(E_AXIS), PSTR(")"));
|
||||
SERIAL_ECHOLNPGM_P(SP_E_LBL, dac_perc(E_AXIS), PSTR(" ("), dac_amps(E_AXIS), PSTR(")"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ void I2CPositionEncoder::init(const uint8_t address, const AxisEnum axis) {
|
||||
|
||||
initialized = true;
|
||||
|
||||
SERIAL_ECHOLNPAIR("Setting up encoder on ", AS_CHAR(axis_codes[encoderAxis]), " axis, addr = ", address);
|
||||
SERIAL_ECHOLNPGM("Setting up encoder on ", AS_CHAR(axis_codes[encoderAxis]), " axis, addr = ", address);
|
||||
|
||||
position = get_position();
|
||||
}
|
||||
@ -67,7 +67,7 @@ void I2CPositionEncoder::update() {
|
||||
/*
|
||||
if (trusted) { //commented out as part of the note below
|
||||
trusted = false;
|
||||
SERIAL_ECHOLNPAIR("Fault detected on ", AS_CHAR(axis_codes[encoderAxis]), " axis encoder. Disengaging error correction until module is trusted again.");
|
||||
SERIAL_ECHOLNPGM("Fault detected on ", AS_CHAR(axis_codes[encoderAxis]), " axis encoder. Disengaging error correction until module is trusted again.");
|
||||
}
|
||||
*/
|
||||
return;
|
||||
@ -92,7 +92,7 @@ void I2CPositionEncoder::update() {
|
||||
if (millis() - lastErrorTime > I2CPE_TIME_TRUSTED) {
|
||||
trusted = true;
|
||||
|
||||
SERIAL_ECHOLNPAIR("Untrusted encoder module on ", AS_CHAR(axis_codes[encoderAxis]), " axis has been fault-free for set duration, reinstating error correction.");
|
||||
SERIAL_ECHOLNPGM("Untrusted encoder module on ", AS_CHAR(axis_codes[encoderAxis]), " axis has been fault-free for set duration, reinstating error correction.");
|
||||
|
||||
//the encoder likely lost its place when the error occurred, so we'll reset and use the printer's
|
||||
//idea of where it the axis is to re-initialize
|
||||
@ -103,10 +103,10 @@ void I2CPositionEncoder::update() {
|
||||
zeroOffset -= (positionInTicks - get_position());
|
||||
|
||||
#ifdef I2CPE_DEBUG
|
||||
SERIAL_ECHOLNPAIR("Current position is ", pos);
|
||||
SERIAL_ECHOLNPAIR("Position in encoder ticks is ", positionInTicks);
|
||||
SERIAL_ECHOLNPAIR("New zero-offset of ", zeroOffset);
|
||||
SERIAL_ECHOPAIR("New position reads as ", get_position());
|
||||
SERIAL_ECHOLNPGM("Current position is ", pos);
|
||||
SERIAL_ECHOLNPGM("Position in encoder ticks is ", positionInTicks);
|
||||
SERIAL_ECHOLNPGM("New zero-offset of ", zeroOffset);
|
||||
SERIAL_ECHOPGM("New position reads as ", get_position());
|
||||
SERIAL_CHAR('(');
|
||||
SERIAL_DECIMAL(mm_from_count(get_position()));
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
@ -149,12 +149,12 @@ void I2CPositionEncoder::update() {
|
||||
const int32_t error = get_axis_error_steps(false);
|
||||
#endif
|
||||
|
||||
//SERIAL_ECHOLNPAIR("Axis error steps: ", error);
|
||||
//SERIAL_ECHOLNPGM("Axis error steps: ", error);
|
||||
|
||||
#ifdef I2CPE_ERR_THRESH_ABORT
|
||||
if (ABS(error) > I2CPE_ERR_THRESH_ABORT * planner.settings.axis_steps_per_mm[encoderAxis]) {
|
||||
//kill(PSTR("Significant Error"));
|
||||
SERIAL_ECHOLNPAIR("Axis error over threshold, aborting!", error);
|
||||
SERIAL_ECHOLNPGM("Axis error over threshold, aborting!", error);
|
||||
safe_delay(5000);
|
||||
}
|
||||
#endif
|
||||
@ -173,7 +173,7 @@ void I2CPositionEncoder::update() {
|
||||
LOOP_L_N(i, I2CPE_ERR_PRST_ARRAY_SIZE) sumP += errPrst[i];
|
||||
const int32_t errorP = int32_t(sumP * RECIPROCAL(I2CPE_ERR_PRST_ARRAY_SIZE));
|
||||
SERIAL_CHAR(axis_codes[encoderAxis]);
|
||||
SERIAL_ECHOLNPAIR(" : CORRECT ERR ", errorP * planner.steps_to_mm[encoderAxis], "mm");
|
||||
SERIAL_ECHOLNPGM(" : CORRECT ERR ", errorP * planner.steps_to_mm[encoderAxis], "mm");
|
||||
babystep.add_steps(encoderAxis, -LROUND(errorP));
|
||||
errPrstIdx = 0;
|
||||
}
|
||||
@ -193,7 +193,7 @@ void I2CPositionEncoder::update() {
|
||||
const millis_t ms = millis();
|
||||
if (ELAPSED(ms, nextErrorCountTime)) {
|
||||
SERIAL_CHAR(axis_codes[encoderAxis]);
|
||||
SERIAL_ECHOLNPAIR(" : LARGE ERR ", error, "; diffSum=", diffSum);
|
||||
SERIAL_ECHOLNPGM(" : LARGE ERR ", error, "; diffSum=", diffSum);
|
||||
errorCount++;
|
||||
nextErrorCountTime = ms + I2CPE_ERR_CNT_DEBOUNCE_MS;
|
||||
}
|
||||
@ -213,7 +213,7 @@ void I2CPositionEncoder::set_homed() {
|
||||
|
||||
#ifdef I2CPE_DEBUG
|
||||
SERIAL_CHAR(axis_codes[encoderAxis]);
|
||||
SERIAL_ECHOLNPAIR(" axis encoder homed, offset of ", zeroOffset, " ticks.");
|
||||
SERIAL_ECHOLNPGM(" axis encoder homed, offset of ", zeroOffset, " ticks.");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -253,7 +253,7 @@ float I2CPositionEncoder::get_axis_error_mm(const bool report) {
|
||||
|
||||
if (report) {
|
||||
SERIAL_CHAR(axis_codes[encoderAxis]);
|
||||
SERIAL_ECHOLNPAIR(" axis target=", target, "mm; actual=", actual, "mm; err=", error, "mm");
|
||||
SERIAL_ECHOLNPGM(" axis target=", target, "mm; actual=", actual, "mm; err=", error, "mm");
|
||||
}
|
||||
|
||||
return error;
|
||||
@ -288,7 +288,7 @@ int32_t I2CPositionEncoder::get_axis_error_steps(const bool report) {
|
||||
|
||||
if (report) {
|
||||
SERIAL_CHAR(axis_codes[encoderAxis]);
|
||||
SERIAL_ECHOLNPAIR(" axis target=", target, "; actual=", encoderCountInStepperTicksScaled, "; err=", error);
|
||||
SERIAL_ECHOLNPGM(" axis target=", target, "; actual=", encoderCountInStepperTicksScaled, "; err=", error);
|
||||
}
|
||||
|
||||
if (suppressOutput) {
|
||||
@ -424,15 +424,15 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) {
|
||||
|
||||
travelledDistance = mm_from_count(ABS(stopCount - startCount));
|
||||
|
||||
SERIAL_ECHOLNPAIR("Attempted travel: ", travelDistance, "mm");
|
||||
SERIAL_ECHOLNPAIR(" Actual travel: ", travelledDistance, "mm");
|
||||
SERIAL_ECHOLNPGM("Attempted travel: ", travelDistance, "mm");
|
||||
SERIAL_ECHOLNPGM(" Actual travel: ", travelledDistance, "mm");
|
||||
|
||||
//Calculate new axis steps per unit
|
||||
old_steps_mm = planner.settings.axis_steps_per_mm[encoderAxis];
|
||||
new_steps_mm = (old_steps_mm * travelDistance) / travelledDistance;
|
||||
|
||||
SERIAL_ECHOLNPAIR("Old steps/mm: ", old_steps_mm);
|
||||
SERIAL_ECHOLNPAIR("New steps/mm: ", new_steps_mm);
|
||||
SERIAL_ECHOLNPGM("Old steps/mm: ", old_steps_mm);
|
||||
SERIAL_ECHOLNPGM("New steps/mm: ", new_steps_mm);
|
||||
|
||||
//Save new value
|
||||
planner.settings.axis_steps_per_mm[encoderAxis] = new_steps_mm;
|
||||
@ -449,7 +449,7 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) {
|
||||
|
||||
if (iter > 1) {
|
||||
total /= (float)iter;
|
||||
SERIAL_ECHOLNPAIR("Average steps/mm: ", total);
|
||||
SERIAL_ECHOLNPGM("Average steps/mm: ", total);
|
||||
}
|
||||
|
||||
ec = oldec;
|
||||
@ -675,18 +675,18 @@ void I2CPositionEncodersMgr::change_module_address(const uint8_t oldaddr, const
|
||||
// First check 'new' address is not in use
|
||||
Wire.beginTransmission(I2C_ADDRESS(newaddr));
|
||||
if (!Wire.endTransmission()) {
|
||||
SERIAL_ECHOLNPAIR("?There is already a device with that address on the I2C bus! (", newaddr, ")");
|
||||
SERIAL_ECHOLNPGM("?There is already a device with that address on the I2C bus! (", newaddr, ")");
|
||||
return;
|
||||
}
|
||||
|
||||
// Now check that we can find the module on the oldaddr address
|
||||
Wire.beginTransmission(I2C_ADDRESS(oldaddr));
|
||||
if (Wire.endTransmission()) {
|
||||
SERIAL_ECHOLNPAIR("?No module detected at this address! (", oldaddr, ")");
|
||||
SERIAL_ECHOLNPGM("?No module detected at this address! (", oldaddr, ")");
|
||||
return;
|
||||
}
|
||||
|
||||
SERIAL_ECHOLNPAIR("Module found at ", oldaddr, ", changing address to ", newaddr);
|
||||
SERIAL_ECHOLNPGM("Module found at ", oldaddr, ", changing address to ", newaddr);
|
||||
|
||||
// Change the modules address
|
||||
Wire.beginTransmission(I2C_ADDRESS(oldaddr));
|
||||
@ -722,11 +722,11 @@ void I2CPositionEncodersMgr::report_module_firmware(const uint8_t address) {
|
||||
// First check there is a module
|
||||
Wire.beginTransmission(I2C_ADDRESS(address));
|
||||
if (Wire.endTransmission()) {
|
||||
SERIAL_ECHOLNPAIR("?No module detected at this address! (", address, ")");
|
||||
SERIAL_ECHOLNPGM("?No module detected at this address! (", address, ")");
|
||||
return;
|
||||
}
|
||||
|
||||
SERIAL_ECHOLNPAIR("Requesting version info from module at address ", address, ":");
|
||||
SERIAL_ECHOLNPGM("Requesting version info from module at address ", address, ":");
|
||||
|
||||
Wire.beginTransmission(I2C_ADDRESS(address));
|
||||
Wire.write(I2CPE_SET_REPORT_MODE);
|
||||
@ -773,13 +773,13 @@ int8_t I2CPositionEncodersMgr::parse() {
|
||||
else if (parser.seenval('I')) {
|
||||
|
||||
if (!parser.has_value()) {
|
||||
SERIAL_ECHOLNPAIR("?I seen, but no index specified! [0-", I2CPE_ENCODER_CNT - 1, "]");
|
||||
SERIAL_ECHOLNPGM("?I seen, but no index specified! [0-", I2CPE_ENCODER_CNT - 1, "]");
|
||||
return I2CPE_PARSE_ERR;
|
||||
};
|
||||
|
||||
I2CPE_idx = parser.value_byte();
|
||||
if (I2CPE_idx >= I2CPE_ENCODER_CNT) {
|
||||
SERIAL_ECHOLNPAIR("?Index out of range. [0-", I2CPE_ENCODER_CNT - 1, "]");
|
||||
SERIAL_ECHOLNPGM("?Index out of range. [0-", I2CPE_ENCODER_CNT - 1, "]");
|
||||
return I2CPE_PARSE_ERR;
|
||||
}
|
||||
|
||||
@ -954,7 +954,7 @@ void I2CPositionEncodersMgr::M864() {
|
||||
else return;
|
||||
}
|
||||
|
||||
SERIAL_ECHOLNPAIR("Changing module at address ", I2CPE_addr, " to address ", newAddress);
|
||||
SERIAL_ECHOLNPGM("Changing module at address ", I2CPE_addr, " to address ", newAddress);
|
||||
|
||||
change_module_address(I2CPE_addr, newAddress);
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ class I2CPositionEncodersMgr {
|
||||
|
||||
static void report_status(const int8_t idx) {
|
||||
CHECK_IDX();
|
||||
SERIAL_ECHOLNPAIR("Encoder ", idx, ": ");
|
||||
SERIAL_ECHOLNPGM("Encoder ", idx, ": ");
|
||||
encoders[idx].get_raw_count();
|
||||
encoders[idx].passes_test(true);
|
||||
}
|
||||
@ -261,32 +261,32 @@ class I2CPositionEncodersMgr {
|
||||
|
||||
static void report_error_count(const int8_t idx, const AxisEnum axis) {
|
||||
CHECK_IDX();
|
||||
SERIAL_ECHOLNPAIR("Error count on ", AS_CHAR(axis_codes[axis]), " axis is ", encoders[idx].get_error_count());
|
||||
SERIAL_ECHOLNPGM("Error count on ", AS_CHAR(axis_codes[axis]), " axis is ", encoders[idx].get_error_count());
|
||||
}
|
||||
|
||||
static void reset_error_count(const int8_t idx, const AxisEnum axis) {
|
||||
CHECK_IDX();
|
||||
encoders[idx].set_error_count(0);
|
||||
SERIAL_ECHOLNPAIR("Error count on ", AS_CHAR(axis_codes[axis]), " axis has been reset.");
|
||||
SERIAL_ECHOLNPGM("Error count on ", AS_CHAR(axis_codes[axis]), " axis has been reset.");
|
||||
}
|
||||
|
||||
static void enable_ec(const int8_t idx, const bool enabled, const AxisEnum axis) {
|
||||
CHECK_IDX();
|
||||
encoders[idx].set_ec_enabled(enabled);
|
||||
SERIAL_ECHOPAIR("Error correction on ", AS_CHAR(axis_codes[axis]));
|
||||
SERIAL_ECHOPGM("Error correction on ", AS_CHAR(axis_codes[axis]));
|
||||
SERIAL_ECHO_TERNARY(encoders[idx].get_ec_enabled(), " axis is ", "en", "dis", "abled.\n");
|
||||
}
|
||||
|
||||
static void set_ec_threshold(const int8_t idx, const float newThreshold, const AxisEnum axis) {
|
||||
CHECK_IDX();
|
||||
encoders[idx].set_ec_threshold(newThreshold);
|
||||
SERIAL_ECHOLNPAIR("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis set to ", newThreshold, "mm.");
|
||||
SERIAL_ECHOLNPGM("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis set to ", newThreshold, "mm.");
|
||||
}
|
||||
|
||||
static void get_ec_threshold(const int8_t idx, const AxisEnum axis) {
|
||||
CHECK_IDX();
|
||||
const float threshold = encoders[idx].get_ec_threshold();
|
||||
SERIAL_ECHOLNPAIR("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis is ", threshold, "mm.");
|
||||
SERIAL_ECHOLNPGM("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis is ", threshold, "mm.");
|
||||
}
|
||||
|
||||
static int8_t idx_from_axis(const AxisEnum axis) {
|
||||
|
@ -106,20 +106,20 @@ void FWRetract::retract(const bool retracting OPTARG(HAS_MULTI_EXTRUDER, bool sw
|
||||
#endif
|
||||
|
||||
/* // debugging
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
"retracting ", AS_DIGIT(retracting),
|
||||
" swapping ", swapping,
|
||||
" active extruder ", active_extruder
|
||||
);
|
||||
LOOP_L_N(i, EXTRUDERS) {
|
||||
SERIAL_ECHOLNPAIR("retracted[", i, "] ", AS_DIGIT(retracted[i]));
|
||||
SERIAL_ECHOLNPGM("retracted[", i, "] ", AS_DIGIT(retracted[i]));
|
||||
#if HAS_MULTI_EXTRUDER
|
||||
SERIAL_ECHOLNPAIR("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i]));
|
||||
SERIAL_ECHOLNPGM("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i]));
|
||||
#endif
|
||||
}
|
||||
SERIAL_ECHOLNPAIR("current_position.z ", current_position.z);
|
||||
SERIAL_ECHOLNPAIR("current_position.e ", current_position.e);
|
||||
SERIAL_ECHOLNPAIR("current_hop ", current_hop);
|
||||
SERIAL_ECHOLNPGM("current_position.z ", current_position.z);
|
||||
SERIAL_ECHOLNPGM("current_position.e ", current_position.e);
|
||||
SERIAL_ECHOLNPGM("current_hop ", current_hop);
|
||||
//*/
|
||||
|
||||
const float base_retract = TERN1(RETRACT_SYNC_MIXING, (MIXING_STEPPERS))
|
||||
@ -181,18 +181,18 @@ void FWRetract::retract(const bool retracting OPTARG(HAS_MULTI_EXTRUDER, bool sw
|
||||
#endif
|
||||
|
||||
/* // debugging
|
||||
SERIAL_ECHOLNPAIR("retracting ", AS_DIGIT(retracting));
|
||||
SERIAL_ECHOLNPAIR("swapping ", AS_DIGIT(swapping));
|
||||
SERIAL_ECHOLNPAIR("active_extruder ", active_extruder);
|
||||
SERIAL_ECHOLNPGM("retracting ", AS_DIGIT(retracting));
|
||||
SERIAL_ECHOLNPGM("swapping ", AS_DIGIT(swapping));
|
||||
SERIAL_ECHOLNPGM("active_extruder ", active_extruder);
|
||||
LOOP_L_N(i, EXTRUDERS) {
|
||||
SERIAL_ECHOLNPAIR("retracted[", i, "] ", AS_DIGIT(retracted[i]));
|
||||
SERIAL_ECHOLNPGM("retracted[", i, "] ", AS_DIGIT(retracted[i]));
|
||||
#if HAS_MULTI_EXTRUDER
|
||||
SERIAL_ECHOLNPAIR("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i]));
|
||||
SERIAL_ECHOLNPGM("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i]));
|
||||
#endif
|
||||
}
|
||||
SERIAL_ECHOLNPAIR("current_position.z ", current_position.z);
|
||||
SERIAL_ECHOLNPAIR("current_position.e ", current_position.e);
|
||||
SERIAL_ECHOLNPAIR("current_hop ", current_hop);
|
||||
SERIAL_ECHOLNPGM("current_position.z ", current_position.z);
|
||||
SERIAL_ECHOLNPGM("current_position.e ", current_position.e);
|
||||
SERIAL_ECHOLNPGM("current_hop ", current_hop);
|
||||
//*/
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ void FWRetract::M207() {
|
||||
}
|
||||
|
||||
void FWRetract::M207_report() {
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M207 S"), LINEAR_UNIT(settings.retract_length)
|
||||
, PSTR(" W"), LINEAR_UNIT(settings.swap_retract_length)
|
||||
, PSTR(" F"), LINEAR_UNIT(MMS_TO_MMM(settings.retract_feedrate_mm_s))
|
||||
@ -240,7 +240,7 @@ void FWRetract::M208() {
|
||||
}
|
||||
|
||||
void FWRetract::M208_report() {
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
" M208 S", LINEAR_UNIT(settings.retract_recover_extra)
|
||||
, " W", LINEAR_UNIT(settings.swap_retract_recover_extra)
|
||||
, " F", LINEAR_UNIT(MMS_TO_MMM(settings.retract_recover_feedrate_mm_s))
|
||||
@ -261,7 +261,7 @@ void FWRetract::M208_report() {
|
||||
}
|
||||
|
||||
void FWRetract::M209_report() {
|
||||
SERIAL_ECHOLNPAIR(" M209 S", AS_DIGIT(autoretract_enabled));
|
||||
SERIAL_ECHOLNPGM(" M209 S", AS_DIGIT(autoretract_enabled));
|
||||
}
|
||||
|
||||
#endif // FWRETRACT_AUTORETRACT
|
||||
|
@ -68,13 +68,13 @@ Joystick joystick;
|
||||
void Joystick::report() {
|
||||
SERIAL_ECHOPGM("Joystick");
|
||||
#if HAS_JOY_ADC_X
|
||||
SERIAL_ECHOPAIR_P(SP_X_STR, JOY_X(x.raw));
|
||||
SERIAL_ECHOPGM_P(SP_X_STR, JOY_X(x.raw));
|
||||
#endif
|
||||
#if HAS_JOY_ADC_Y
|
||||
SERIAL_ECHOPAIR_P(SP_Y_STR, JOY_Y(y.raw));
|
||||
SERIAL_ECHOPGM_P(SP_Y_STR, JOY_Y(y.raw));
|
||||
#endif
|
||||
#if HAS_JOY_ADC_Z
|
||||
SERIAL_ECHOPAIR_P(SP_Z_STR, JOY_Z(z.raw));
|
||||
SERIAL_ECHOPGM_P(SP_Z_STR, JOY_Z(z.raw));
|
||||
#endif
|
||||
#if HAS_JOY_ADC_EN
|
||||
SERIAL_ECHO_TERNARY(READ(JOY_EN_PIN), " EN=", "HIGH (dis", "LOW (en", "abled)");
|
||||
|
@ -130,7 +130,7 @@ void Max7219::error(const char * const func, const int32_t v1, const int32_t v2/
|
||||
SERIAL_ECHOPGM_P(func);
|
||||
SERIAL_CHAR('(');
|
||||
SERIAL_ECHO(v1);
|
||||
if (v2 > 0) SERIAL_ECHOPAIR(", ", v2);
|
||||
if (v2 > 0) SERIAL_ECHOPGM(", ", v2);
|
||||
SERIAL_CHAR(')');
|
||||
SERIAL_EOL();
|
||||
#else
|
||||
|
@ -140,7 +140,7 @@ void MeatPack::handle_output_char(const uint8_t c) {
|
||||
#if ENABLED(MP_DEBUG)
|
||||
if (chars_decoded < 1024) {
|
||||
++chars_decoded;
|
||||
DEBUG_ECHOLNPAIR("RB: ", AS_CHAR(c));
|
||||
DEBUG_ECHOLNPGM("RB: ", AS_CHAR(c));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -154,11 +154,11 @@ void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*=
|
||||
cmax = _MAX(cmax, v);
|
||||
csum += v;
|
||||
}
|
||||
//SERIAL_ECHOPAIR("Mixer::refresh_collector(", proportion, ", ", t, ") cmax=", cmax, " csum=", csum, " color");
|
||||
//SERIAL_ECHOPGM("Mixer::refresh_collector(", proportion, ", ", t, ") cmax=", cmax, " csum=", csum, " color");
|
||||
const float inv_prop = proportion / csum;
|
||||
MIXER_STEPPER_LOOP(i) {
|
||||
c[i] = color[t][i] * inv_prop;
|
||||
//SERIAL_ECHOPAIR(" [", t, "][", i, "] = ", color[t][i], " (", c[i], ") ");
|
||||
//SERIAL_ECHOPGM(" [", t, "][", i, "] = ", color[t][i], " (", c[i], ") ");
|
||||
}
|
||||
//SERIAL_EOL();
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ class Mixer {
|
||||
MIXER_STEPPER_LOOP(i) mix[i] = mixer_perc_t(100.0f * color[j][i] / ctot);
|
||||
|
||||
#ifdef MIXER_NORMALIZER_DEBUG
|
||||
SERIAL_ECHOPAIR("V-tool ", j, " [ ");
|
||||
SERIAL_ECHOPGM("V-tool ", j, " [ ");
|
||||
SERIAL_ECHOLIST_N(MIXING_STEPPERS, color[j][0], color[j][1], color[j][2], color[j][3], color[j][4], color[j][5]);
|
||||
SERIAL_ECHOPGM(" ] to Mix [ ");
|
||||
SERIAL_ECHOLIST_N(MIXING_STEPPERS, mix[0], mix[1], mix[2], mix[3], mix[4], mix[5]);
|
||||
|
@ -169,7 +169,7 @@ void MMU2::mmu_loop() {
|
||||
if (rx_ok()) {
|
||||
sscanf(rx_buffer, "%huok\n", &version);
|
||||
|
||||
DEBUG_ECHOLNPAIR("MMU => ", version, "\nMMU <= 'S2'");
|
||||
DEBUG_ECHOLNPGM("MMU => ", version, "\nMMU <= 'S2'");
|
||||
|
||||
MMU2_COMMAND("S2"); // Read Build Number
|
||||
state = -3;
|
||||
@ -180,7 +180,7 @@ void MMU2::mmu_loop() {
|
||||
if (rx_ok()) {
|
||||
sscanf(rx_buffer, "%huok\n", &buildnr);
|
||||
|
||||
DEBUG_ECHOLNPAIR("MMU => ", buildnr);
|
||||
DEBUG_ECHOLNPGM("MMU => ", buildnr);
|
||||
|
||||
check_version();
|
||||
|
||||
@ -217,7 +217,7 @@ void MMU2::mmu_loop() {
|
||||
if (rx_ok()) {
|
||||
sscanf(rx_buffer, "%hhuok\n", &finda);
|
||||
|
||||
DEBUG_ECHOLNPAIR("MMU => ", finda, "\nMMU - ENABLED");
|
||||
DEBUG_ECHOLNPGM("MMU => ", finda, "\nMMU - ENABLED");
|
||||
|
||||
_enabled = true;
|
||||
state = 1;
|
||||
@ -230,7 +230,7 @@ void MMU2::mmu_loop() {
|
||||
if (WITHIN(cmd, MMU_CMD_T0, MMU_CMD_T0 + EXTRUDERS - 1)) {
|
||||
// tool change
|
||||
int filament = cmd - MMU_CMD_T0;
|
||||
DEBUG_ECHOLNPAIR("MMU <= T", filament);
|
||||
DEBUG_ECHOLNPGM("MMU <= T", filament);
|
||||
tx_printf_P(PSTR("T%d\n"), filament);
|
||||
TERN_(MMU_EXTRUDER_SENSOR, mmu_idl_sens = 1); // enable idler sensor, if any
|
||||
state = 3; // wait for response
|
||||
@ -238,7 +238,7 @@ void MMU2::mmu_loop() {
|
||||
else if (WITHIN(cmd, MMU_CMD_L0, MMU_CMD_L0 + EXTRUDERS - 1)) {
|
||||
// load
|
||||
int filament = cmd - MMU_CMD_L0;
|
||||
DEBUG_ECHOLNPAIR("MMU <= L", filament);
|
||||
DEBUG_ECHOLNPGM("MMU <= L", filament);
|
||||
tx_printf_P(PSTR("L%d\n"), filament);
|
||||
state = 3; // wait for response
|
||||
}
|
||||
@ -258,7 +258,7 @@ void MMU2::mmu_loop() {
|
||||
else if (WITHIN(cmd, MMU_CMD_E0, MMU_CMD_E0 + EXTRUDERS - 1)) {
|
||||
// eject filament
|
||||
int filament = cmd - MMU_CMD_E0;
|
||||
DEBUG_ECHOLNPAIR("MMU <= E", filament);
|
||||
DEBUG_ECHOLNPGM("MMU <= E", filament);
|
||||
tx_printf_P(PSTR("E%d\n"), filament);
|
||||
state = 3; // wait for response
|
||||
}
|
||||
@ -271,7 +271,7 @@ void MMU2::mmu_loop() {
|
||||
else if (WITHIN(cmd, MMU_CMD_F0, MMU_CMD_F0 + EXTRUDERS - 1)) {
|
||||
// filament type
|
||||
int filament = cmd - MMU_CMD_F0;
|
||||
DEBUG_ECHOLNPAIR("MMU <= F", filament, " ", cmd_arg);
|
||||
DEBUG_ECHOLNPGM("MMU <= F", filament, " ", cmd_arg);
|
||||
tx_printf_P(PSTR("F%d %d\n"), filament, cmd_arg);
|
||||
state = 3; // wait for response
|
||||
}
|
||||
@ -647,7 +647,7 @@ static void mmu2_not_responding() {
|
||||
|
||||
void MMU2::mmu_continue_loading() {
|
||||
for (uint8_t i = 0; i < MMU_LOADING_ATTEMPTS_NR; i++) {
|
||||
DEBUG_ECHOLNPAIR("Additional load attempt #", i);
|
||||
DEBUG_ECHOLNPGM("Additional load attempt #", i);
|
||||
if (FILAMENT_PRESENT()) break;
|
||||
command(MMU_CMD_C0);
|
||||
manage_response(true, true);
|
||||
@ -1025,7 +1025,7 @@ void MMU2::execute_extruder_sequence(const E_Step * sequence, int steps) {
|
||||
const feedRate_t fr_mm_m = pgm_read_float(&(step->feedRate));
|
||||
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPAIR("E step ", es, "/", fr_mm_m);
|
||||
DEBUG_ECHOLNPGM("E step ", es, "/", fr_mm_m);
|
||||
|
||||
current_position.e += es;
|
||||
line_to_current_position(MMM_TO_MMS(fr_mm_m));
|
||||
|
@ -132,7 +132,7 @@ fil_change_settings_t fc_settings[EXTRUDERS];
|
||||
*/
|
||||
static bool ensure_safe_temperature(const bool wait=true, const PauseMode mode=PAUSE_MODE_SAME) {
|
||||
DEBUG_SECTION(est, "ensure_safe_temperature", true);
|
||||
DEBUG_ECHOLNPAIR("... wait:", wait, " mode:", mode);
|
||||
DEBUG_ECHOLNPGM("... wait:", wait, " mode:", mode);
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
if (!DEBUGGING(DRYRUN) && thermalManager.targetTooColdToExtrude(active_extruder))
|
||||
@ -178,7 +178,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
|
||||
DXC_ARGS
|
||||
) {
|
||||
DEBUG_SECTION(lf, "load_filament", true);
|
||||
DEBUG_ECHOLNPAIR("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " showlcd:", show_lcd, " pauseforuser:", pause_for_user, " pausemode:", mode DXC_SAY);
|
||||
DEBUG_ECHOLNPGM("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " showlcd:", show_lcd, " pauseforuser:", pause_for_user, " pausemode:", mode DXC_SAY);
|
||||
|
||||
if (!ensure_safe_temperature(false, mode)) {
|
||||
if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_STATUS, mode);
|
||||
@ -315,7 +315,7 @@ bool unload_filament(const_float_t unload_length, const bool show_lcd/*=false*/,
|
||||
#endif
|
||||
) {
|
||||
DEBUG_SECTION(uf, "unload_filament", true);
|
||||
DEBUG_ECHOLNPAIR("... unloadlen:", unload_length, " showlcd:", show_lcd, " mode:", mode
|
||||
DEBUG_ECHOLNPGM("... unloadlen:", unload_length, " showlcd:", show_lcd, " mode:", mode
|
||||
#if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
|
||||
, " mixmult:", mix_multiplier
|
||||
#endif
|
||||
@ -379,7 +379,7 @@ uint8_t did_pause_print = 0;
|
||||
|
||||
bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool show_lcd/*=false*/, const_float_t unload_length/*=0*/ DXC_ARGS) {
|
||||
DEBUG_SECTION(pp, "pause_print", true);
|
||||
DEBUG_ECHOLNPAIR("... park.x:", park_point.x, " y:", park_point.y, " z:", park_point.z, " unloadlen:", unload_length, " showlcd:", show_lcd DXC_SAY);
|
||||
DEBUG_ECHOLNPGM("... park.x:", park_point.x, " y:", park_point.y, " z:", park_point.z, " unloadlen:", unload_length, " showlcd:", show_lcd DXC_SAY);
|
||||
|
||||
UNUSED(show_lcd);
|
||||
|
||||
@ -430,7 +430,7 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
|
||||
|
||||
// Initial retract before move to filament change position
|
||||
if (retract && thermalManager.hotEnoughToExtrude(active_extruder)) {
|
||||
DEBUG_ECHOLNPAIR("... retract:", retract);
|
||||
DEBUG_ECHOLNPGM("... retract:", retract);
|
||||
unscaled_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
|
||||
}
|
||||
|
||||
@ -472,7 +472,7 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
|
||||
|
||||
void show_continue_prompt(const bool is_reload) {
|
||||
DEBUG_SECTION(scp, "pause_print", true);
|
||||
DEBUG_ECHOLNPAIR("... is_reload:", is_reload);
|
||||
DEBUG_ECHOLNPGM("... is_reload:", is_reload);
|
||||
|
||||
ui.pause_show_message(is_reload ? PAUSE_MESSAGE_INSERT : PAUSE_MESSAGE_WAITING);
|
||||
SERIAL_ECHO_START();
|
||||
@ -481,7 +481,7 @@ void show_continue_prompt(const bool is_reload) {
|
||||
|
||||
void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep_count/*=0*/ DXC_ARGS) {
|
||||
DEBUG_SECTION(wfc, "wait_for_confirmation", true);
|
||||
DEBUG_ECHOLNPAIR("... is_reload:", is_reload, " maxbeep:", max_beep_count DXC_SAY);
|
||||
DEBUG_ECHOLNPGM("... is_reload:", is_reload, " maxbeep:", max_beep_count DXC_SAY);
|
||||
|
||||
bool nozzle_timed_out = false;
|
||||
|
||||
@ -584,10 +584,10 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
|
||||
*/
|
||||
void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_length/*=0*/, const_float_t purge_length/*=ADVANCED_PAUSE_PURGE_LENGTH*/, const int8_t max_beep_count/*=0*/, const celsius_t targetTemp/*=0*/ DXC_ARGS) {
|
||||
DEBUG_SECTION(rp, "resume_print", true);
|
||||
DEBUG_ECHOLNPAIR("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " targetTemp:", targetTemp DXC_SAY);
|
||||
DEBUG_ECHOLNPGM("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " targetTemp:", targetTemp DXC_SAY);
|
||||
|
||||
/*
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
"start of resume_print()\ndual_x_carriage_mode:", dual_x_carriage_mode,
|
||||
"\nextruder_duplication_enabled:", extruder_duplication_enabled,
|
||||
"\nactive_extruder:", active_extruder,
|
||||
|
@ -577,7 +577,7 @@ void PrintJobRecovery::resume() {
|
||||
|
||||
void PrintJobRecovery::debug(PGM_P const prefix) {
|
||||
DEBUG_ECHOPGM_P(prefix);
|
||||
DEBUG_ECHOLNPAIR(" Job Recovery Info...\nvalid_head:", info.valid_head, " valid_foot:", info.valid_foot);
|
||||
DEBUG_ECHOLNPGM(" Job Recovery Info...\nvalid_head:", info.valid_head, " valid_foot:", info.valid_foot);
|
||||
if (info.valid_head) {
|
||||
if (info.valid_head == info.valid_foot) {
|
||||
DEBUG_ECHOPGM("current_position: ");
|
||||
@ -587,14 +587,14 @@ void PrintJobRecovery::resume() {
|
||||
}
|
||||
DEBUG_EOL();
|
||||
|
||||
DEBUG_ECHOLNPAIR("feedrate: ", info.feedrate);
|
||||
DEBUG_ECHOLNPGM("feedrate: ", info.feedrate);
|
||||
|
||||
DEBUG_ECHOLNPAIR("zraise: ", info.zraise, " ", info.flag.raised ? "(before)" : "");
|
||||
DEBUG_ECHOLNPGM("zraise: ", info.zraise, " ", info.flag.raised ? "(before)" : "");
|
||||
|
||||
#if ENABLED(GCODE_REPEAT_MARKERS)
|
||||
DEBUG_ECHOLNPAIR("repeat index: ", info.stored_repeat.index);
|
||||
DEBUG_ECHOLNPGM("repeat index: ", info.stored_repeat.index);
|
||||
LOOP_L_N(i, info.stored_repeat.index)
|
||||
DEBUG_ECHOLNPAIR("..... sdpos: ", info.stored_repeat.marker.sdpos, " count: ", info.stored_repeat.marker.counter);
|
||||
DEBUG_ECHOLNPGM("..... sdpos: ", info.stored_repeat.marker.sdpos, " count: ", info.stored_repeat.marker.counter);
|
||||
#endif
|
||||
|
||||
#if HAS_HOME_OFFSET
|
||||
@ -616,12 +616,12 @@ void PrintJobRecovery::resume() {
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_EXTRUDER
|
||||
DEBUG_ECHOLNPAIR("active_extruder: ", info.active_extruder);
|
||||
DEBUG_ECHOLNPGM("active_extruder: ", info.active_extruder);
|
||||
#endif
|
||||
|
||||
#if DISABLED(NO_VOLUMETRICS)
|
||||
DEBUG_ECHOPGM("filament_size:");
|
||||
LOOP_L_N(i, EXTRUDERS) DEBUG_ECHOLNPAIR(" ", info.filament_size[i]);
|
||||
LOOP_L_N(i, EXTRUDERS) DEBUG_ECHOLNPGM(" ", info.filament_size[i]);
|
||||
DEBUG_EOL();
|
||||
#endif
|
||||
|
||||
@ -635,7 +635,7 @@ void PrintJobRecovery::resume() {
|
||||
#endif
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
DEBUG_ECHOLNPAIR("target_temperature_bed: ", info.target_temperature_bed);
|
||||
DEBUG_ECHOLNPGM("target_temperature_bed: ", info.target_temperature_bed);
|
||||
#endif
|
||||
|
||||
#if HAS_FAN
|
||||
@ -648,7 +648,7 @@ void PrintJobRecovery::resume() {
|
||||
#endif
|
||||
|
||||
#if HAS_LEVELING
|
||||
DEBUG_ECHOLNPAIR("leveling: ", info.flag.leveling ? "ON" : "OFF", " fade: ", info.fade);
|
||||
DEBUG_ECHOLNPGM("leveling: ", info.flag.leveling ? "ON" : "OFF", " fade: ", info.fade);
|
||||
#endif
|
||||
|
||||
#if ENABLED(FWRETRACT)
|
||||
@ -658,17 +658,17 @@ void PrintJobRecovery::resume() {
|
||||
if (e < EXTRUDERS - 1) DEBUG_CHAR(',');
|
||||
}
|
||||
DEBUG_EOL();
|
||||
DEBUG_ECHOLNPAIR("retract_hop: ", info.retract_hop);
|
||||
DEBUG_ECHOLNPGM("retract_hop: ", info.retract_hop);
|
||||
#endif
|
||||
|
||||
// Mixing extruder and gradient
|
||||
#if BOTH(MIXING_EXTRUDER, GRADIENT_MIX)
|
||||
DEBUG_ECHOLNPAIR("gradient: ", info.gradient.enabled ? "ON" : "OFF");
|
||||
DEBUG_ECHOLNPGM("gradient: ", info.gradient.enabled ? "ON" : "OFF");
|
||||
#endif
|
||||
|
||||
DEBUG_ECHOLNPAIR("sd_filename: ", info.sd_filename);
|
||||
DEBUG_ECHOLNPAIR("sdpos: ", info.sdpos);
|
||||
DEBUG_ECHOLNPAIR("print_job_elapsed: ", info.print_job_elapsed);
|
||||
DEBUG_ECHOLNPGM("sd_filename: ", info.sd_filename);
|
||||
DEBUG_ECHOLNPGM("sdpos: ", info.sdpos);
|
||||
DEBUG_ECHOLNPGM("print_job_elapsed: ", info.print_job_elapsed);
|
||||
|
||||
DEBUG_ECHOPGM("axis_relative:");
|
||||
if (TEST(info.axis_relative, REL_X)) DEBUG_ECHOPGM(" REL_X");
|
||||
@ -679,9 +679,9 @@ void PrintJobRecovery::resume() {
|
||||
if (TEST(info.axis_relative, E_MODE_REL)) DEBUG_ECHOPGM(" E_MODE_REL");
|
||||
DEBUG_EOL();
|
||||
|
||||
DEBUG_ECHOLNPAIR("flag.dryrun: ", AS_DIGIT(info.flag.dryrun));
|
||||
DEBUG_ECHOLNPAIR("flag.allow_cold_extrusion: ", AS_DIGIT(info.flag.allow_cold_extrusion));
|
||||
DEBUG_ECHOLNPAIR("flag.volumetric_enabled: ", AS_DIGIT(info.flag.volumetric_enabled));
|
||||
DEBUG_ECHOLNPGM("flag.dryrun: ", AS_DIGIT(info.flag.dryrun));
|
||||
DEBUG_ECHOLNPGM("flag.allow_cold_extrusion: ", AS_DIGIT(info.flag.allow_cold_extrusion));
|
||||
DEBUG_ECHOLNPGM("flag.volumetric_enabled: ", AS_DIGIT(info.flag.volumetric_enabled));
|
||||
}
|
||||
else
|
||||
DEBUG_ECHOLNPGM("INVALID DATA");
|
||||
|
@ -75,7 +75,7 @@ void ProbeTempComp::print_offsets() {
|
||||
#endif
|
||||
PSTR("Probe")
|
||||
);
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
" temp: ", temp,
|
||||
"C; Offset: ", i < 0 ? 0.0f : sensor_z_offsets[s][i], " um"
|
||||
);
|
||||
@ -117,7 +117,7 @@ bool ProbeTempComp::finish_calibration(const TempSensorID tsi) {
|
||||
// Extrapolate
|
||||
float k, d;
|
||||
if (calib_idx < measurements) {
|
||||
SERIAL_ECHOLNPAIR("Got ", calib_idx, " measurements. ");
|
||||
SERIAL_ECHOLNPGM("Got ", calib_idx, " measurements. ");
|
||||
if (linear_regression(tsi, k, d)) {
|
||||
SERIAL_ECHOPGM("Applying linear extrapolation");
|
||||
calib_idx--;
|
||||
|
@ -43,7 +43,7 @@ void Repeat::add_marker(const uint32_t sdpos, const uint16_t count) {
|
||||
marker[index].sdpos = sdpos;
|
||||
marker[index].counter = count ?: -1;
|
||||
index++;
|
||||
DEBUG_ECHOLNPAIR("Add Marker ", index, " at ", sdpos, " (", count, ")");
|
||||
DEBUG_ECHOLNPGM("Add Marker ", index, " at ", sdpos, " (", count, ")");
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,14 +53,14 @@ void Repeat::loop() {
|
||||
else {
|
||||
const uint8_t ind = index - 1; // Active marker's index
|
||||
if (!marker[ind].counter) { // Did its counter run out?
|
||||
DEBUG_ECHOLNPAIR("Pass Marker ", index);
|
||||
DEBUG_ECHOLNPGM("Pass Marker ", index);
|
||||
index--; // Carry on. Previous marker on the next 'M808'.
|
||||
}
|
||||
else {
|
||||
card.setIndex(marker[ind].sdpos); // Loop back to the marker.
|
||||
if (marker[ind].counter > 0) // Ignore a negative (or zero) counter.
|
||||
--marker[ind].counter; // Decrement the counter. If zero this 'M808' will be skipped next time.
|
||||
DEBUG_ECHOLNPAIR("Goto Marker ", index, " at ", marker[ind].sdpos, " (", marker[ind].counter, ")");
|
||||
DEBUG_ECHOLNPGM("Goto Marker ", index, " at ", marker[ind].sdpos, " (", marker[ind].counter, ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -69,7 +69,7 @@ void Repeat::cancel() { LOOP_L_N(i, index) marker[i].counter = 0; }
|
||||
|
||||
void Repeat::early_parse_M808(char * const cmd) {
|
||||
if (is_command_M808(cmd)) {
|
||||
DEBUG_ECHOLNPAIR("Parsing \"", cmd, "\"");
|
||||
DEBUG_ECHOLNPGM("Parsing \"", cmd, "\"");
|
||||
parser.parse(cmd);
|
||||
if (parser.seen('L'))
|
||||
add_marker(card.getIndex(), parser.value_ushort());
|
||||
|
@ -132,7 +132,7 @@ void event_filament_runout(const uint8_t extruder) {
|
||||
char script[strlen(FILAMENT_RUNOUT_SCRIPT) + 1];
|
||||
sprintf_P(script, PSTR(FILAMENT_RUNOUT_SCRIPT), tool);
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
SERIAL_ECHOLNPAIR("Runout Command: ", script);
|
||||
SERIAL_ECHOLNPGM("Runout Command: ", script);
|
||||
#endif
|
||||
queue.inject(script);
|
||||
#else
|
||||
|
@ -145,7 +145,7 @@ class TFilamentMonitor : public FilamentMonitorBase {
|
||||
if (runout_flags) {
|
||||
SERIAL_ECHOPGM("Runout Sensors: ");
|
||||
LOOP_L_N(i, 8) SERIAL_ECHO('0' + TEST(runout_flags, i));
|
||||
SERIAL_ECHOPAIR(" -> ", extruder);
|
||||
SERIAL_ECHOPGM(" -> ", extruder);
|
||||
if (ran_out) SERIAL_ECHOPGM(" RUN OUT");
|
||||
SERIAL_EOL();
|
||||
}
|
||||
@ -317,7 +317,7 @@ class FilamentSensorBase {
|
||||
static uint8_t was_out; // = 0
|
||||
if (out != TEST(was_out, s)) {
|
||||
TBI(was_out, s);
|
||||
SERIAL_ECHOLNPAIR_P(PSTR("Filament Sensor "), '0' + s, out ? PSTR(" OUT") : PSTR(" IN"));
|
||||
SERIAL_ECHOLNPGM_P(PSTR("Filament Sensor "), '0' + s, out ? PSTR(" OUT") : PSTR(" IN"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -352,7 +352,7 @@ class FilamentSensorBase {
|
||||
if (ELAPSED(ms, t)) {
|
||||
t = millis() + 1000UL;
|
||||
LOOP_L_N(i, NUM_RUNOUT_SENSORS)
|
||||
SERIAL_ECHOPAIR_P(i ? PSTR(", ") : PSTR("Remaining mm: "), runout_mm_countdown[i]);
|
||||
SERIAL_ECHOPGM_P(i ? PSTR(", ") : PSTR("Remaining mm: "), runout_mm_countdown[i]);
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif
|
||||
|
@ -226,7 +226,7 @@
|
||||
SERIAL_ECHO(timestamp);
|
||||
SERIAL_ECHOPGM(": ");
|
||||
st.printLabel();
|
||||
SERIAL_ECHOLNPAIR(" driver overtemperature warning! (", st.getMilliamps(), "mA)");
|
||||
SERIAL_ECHOLNPGM(" driver overtemperature warning! (", st.getMilliamps(), "mA)");
|
||||
}
|
||||
|
||||
template<typename TMC>
|
||||
@ -271,7 +271,7 @@
|
||||
st.rms_current(I_rms);
|
||||
#if ENABLED(REPORT_CURRENT_CHANGE)
|
||||
st.printLabel();
|
||||
SERIAL_ECHOLNPAIR(" current decreased to ", I_rms);
|
||||
SERIAL_ECHOLNPGM(" current decreased to ", I_rms);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ class TMCMarlin<TMC2660Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC266
|
||||
template<typename TMC>
|
||||
void tmc_print_current(TMC &st) {
|
||||
st.printLabel();
|
||||
SERIAL_ECHOLNPAIR(" driver current: ", st.getMilliamps());
|
||||
SERIAL_ECHOLNPGM(" driver current: ", st.getMilliamps());
|
||||
}
|
||||
|
||||
#if ENABLED(MONITOR_DRIVER_STATUS)
|
||||
@ -322,7 +322,7 @@ void tmc_print_current(TMC &st) {
|
||||
template<typename TMC>
|
||||
void tmc_print_pwmthrs(TMC &st) {
|
||||
st.printLabel();
|
||||
SERIAL_ECHOLNPAIR(" stealthChop max speed: ", st.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM(" stealthChop max speed: ", st.get_pwm_thrs());
|
||||
}
|
||||
#endif
|
||||
#if USE_SENSORLESS
|
||||
|
@ -84,7 +84,7 @@ void TWIBus::send() {
|
||||
void TWIBus::echoprefix(uint8_t bytes, const char pref[], uint8_t adr) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM_P(pref);
|
||||
SERIAL_ECHOPAIR(": from:", adr, " bytes:", bytes, " data:");
|
||||
SERIAL_ECHOPGM(": from:", adr, " bytes:", bytes, " data:");
|
||||
}
|
||||
|
||||
// static
|
||||
|
Reference in New Issue
Block a user