🎨 Fewer serial macros
This commit is contained in:
committed by
Scott Lahteine
parent
6d96c221bd
commit
b661795ae5
@ -539,7 +539,7 @@ void GcodeSuite::G26() {
|
||||
|
||||
if (bedtemp) {
|
||||
if (!WITHIN(bedtemp, 40, BED_MAX_TARGET)) {
|
||||
SERIAL_ECHOLNPAIR("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C).");
|
||||
SERIAL_ECHOLNPGM("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C).");
|
||||
return;
|
||||
}
|
||||
g26.bed_temp = bedtemp;
|
||||
|
@ -106,19 +106,19 @@ void GcodeSuite::G35() {
|
||||
const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE, 0, true);
|
||||
|
||||
if (isnan(z_probed_height)) {
|
||||
SERIAL_ECHOPAIR("G35 failed at point ", i + 1, " (");
|
||||
SERIAL_ECHOPGM("G35 failed at point ", i + 1, " (");
|
||||
SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
|
||||
SERIAL_CHAR(')');
|
||||
SERIAL_ECHOLNPAIR_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y);
|
||||
SERIAL_ECHOLNPGM_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y);
|
||||
err_break = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("Probing point ", i + 1, " (");
|
||||
DEBUG_ECHOPGM("Probing point ", i + 1, " (");
|
||||
DEBUG_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
|
||||
DEBUG_CHAR(')');
|
||||
DEBUG_ECHOLNPAIR_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y, SP_Z_STR, z_probed_height);
|
||||
DEBUG_ECHOLNPGM_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y, SP_Z_STR, z_probed_height);
|
||||
}
|
||||
|
||||
z_measured[i] = z_probed_height;
|
||||
@ -138,9 +138,9 @@ void GcodeSuite::G35() {
|
||||
|
||||
SERIAL_ECHOPGM("Turn ");
|
||||
SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
|
||||
SERIAL_ECHOPAIR(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", ABS(full_turns), " turns");
|
||||
if (minutes) SERIAL_ECHOPAIR(" and ", ABS(minutes), " minutes");
|
||||
if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPAIR(" (", -diff, "mm)");
|
||||
SERIAL_ECHOPGM(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", ABS(full_turns), " turns");
|
||||
if (minutes) SERIAL_ECHOPGM(" and ", ABS(minutes), " minutes");
|
||||
if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPGM(" (", -diff, "mm)");
|
||||
SERIAL_EOL();
|
||||
}
|
||||
}
|
||||
|
@ -76,9 +76,9 @@ void GcodeSuite::M420() {
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, Z_VALUES(x, y)));
|
||||
}
|
||||
SERIAL_ECHOPGM("Simulated " STRINGIFY(GRID_MAX_POINTS_X) "x" STRINGIFY(GRID_MAX_POINTS_Y) " mesh ");
|
||||
SERIAL_ECHOPAIR(" (", x_min);
|
||||
SERIAL_ECHOPGM(" (", x_min);
|
||||
SERIAL_CHAR(','); SERIAL_ECHO(y_min);
|
||||
SERIAL_ECHOPAIR(")-(", x_max);
|
||||
SERIAL_ECHOPGM(")-(", x_max);
|
||||
SERIAL_CHAR(','); SERIAL_ECHO(y_max);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
}
|
||||
@ -108,7 +108,7 @@ void GcodeSuite::M420() {
|
||||
|
||||
if (!WITHIN(storage_slot, 0, a - 1)) {
|
||||
SERIAL_ECHOLNPGM("?Invalid storage slot.");
|
||||
SERIAL_ECHOLNPAIR("?Use 0 to ", a - 1);
|
||||
SERIAL_ECHOLNPGM("?Use 0 to ", a - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ void GcodeSuite::M420() {
|
||||
ubl.display_map(parser.byteval('T'));
|
||||
SERIAL_ECHOPGM("Mesh is ");
|
||||
if (!ubl.mesh_is_valid()) SERIAL_ECHOPGM("in");
|
||||
SERIAL_ECHOLNPAIR("valid\nStorage slot: ", ubl.storage_slot);
|
||||
SERIAL_ECHOLNPGM("valid\nStorage slot: ", ubl.storage_slot);
|
||||
}
|
||||
|
||||
#endif // AUTO_BED_LEVELING_UBL
|
||||
@ -246,7 +246,7 @@ void GcodeSuite::M420_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(
|
||||
TERN(MESH_BED_LEVELING, "Mesh Bed Leveling", TERN(AUTO_BED_LEVELING_UBL, "Unified Bed Leveling", "Auto Bed Leveling"))
|
||||
));
|
||||
SERIAL_ECHOPAIR_P(
|
||||
SERIAL_ECHOPGM_P(
|
||||
PSTR(" M420 S"), planner.leveling_active
|
||||
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
||||
, SP_Z_STR, LINEAR_UNIT(planner.z_fade_height)
|
||||
|
@ -379,7 +379,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
|
||||
if (!probe.good_bounds(abl.probe_position_lf, abl.probe_position_rb)) {
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOLNPAIR("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x,
|
||||
DEBUG_ECHOLNPGM("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x,
|
||||
" F", abl.probe_position_lf.y, " B", abl.probe_position_rb.y);
|
||||
}
|
||||
SERIAL_ECHOLNPGM("? (L,R,F,B) out of bounds.");
|
||||
@ -470,7 +470,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
if (abl.verbose_level || seenQ) {
|
||||
SERIAL_ECHOPGM("Manual G29 ");
|
||||
if (g29_in_progress)
|
||||
SERIAL_ECHOLNPAIR("point ", _MIN(abl.abl_probe_index + 1, abl.abl_points), " of ", abl.abl_points);
|
||||
SERIAL_ECHOLNPGM("point ", _MIN(abl.abl_probe_index + 1, abl.abl_points), " of ", abl.abl_points);
|
||||
else
|
||||
SERIAL_ECHOLNPGM("idle");
|
||||
}
|
||||
@ -513,7 +513,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
z_values[abl.meshCount.x][abl.meshCount.y] = newz;
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(abl.meshCount, newz));
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR_P(PSTR("Save X"), abl.meshCount.x, SP_Y_STR, abl.meshCount.y, SP_Z_STR, abl.measured_z + abl.Z_offset);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM_P(PSTR("Save X"), abl.meshCount.x, SP_Y_STR, abl.meshCount.y, SP_Z_STR, abl.measured_z + abl.Z_offset);
|
||||
|
||||
#endif
|
||||
}
|
||||
@ -635,7 +635,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
// Avoid probing outside the round or hexagonal area
|
||||
if (TERN0(IS_KINEMATIC, !probe.can_reach(abl.probePos))) continue;
|
||||
|
||||
if (abl.verbose_level) SERIAL_ECHOLNPAIR("Probing mesh point ", pt_index, "/", abl.abl_points, ".");
|
||||
if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing mesh point ", pt_index, "/", abl.abl_points, ".");
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), int(pt_index), int(abl.abl_points)));
|
||||
|
||||
abl.measured_z = faux ? 0.001f * random(-100, 101) : probe.probe_at_point(abl.probePos, raise_after, abl.verbose_level);
|
||||
@ -680,7 +680,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
// Probe at 3 arbitrary points
|
||||
|
||||
LOOP_L_N(i, 3) {
|
||||
if (abl.verbose_level) SERIAL_ECHOLNPAIR("Probing point ", i + 1, "/3.");
|
||||
if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing point ", i + 1, "/3.");
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_POINT), int(i + 1)));
|
||||
|
||||
// Retain the last probe position
|
||||
@ -842,7 +842,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
&& NEAR(current_position.y, abl.probePos.y - probe.offset_xy.y)
|
||||
) {
|
||||
const float simple_z = current_position.z - abl.measured_z;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Probed Z", simple_z, " Matrix Z", converted.z, " Discrepancy ", simple_z - converted.z);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probed Z", simple_z, " Matrix Z", converted.z, " Discrepancy ", simple_z - converted.z);
|
||||
converted.z = simple_z;
|
||||
}
|
||||
|
||||
@ -855,14 +855,14 @@ G29_TYPE GcodeSuite::G29() {
|
||||
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
|
||||
if (!abl.dryrun) {
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("G29 uncorrected Z:", current_position.z);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("G29 uncorrected Z:", current_position.z);
|
||||
|
||||
// Unapply the offset because it is going to be immediately applied
|
||||
// and cause compensation movement in Z
|
||||
const float fade_scaling_factor = TERN(ENABLE_LEVELING_FADE_HEIGHT, planner.fade_scaling_factor_for_z(current_position.z), 1);
|
||||
current_position.z -= fade_scaling_factor * bilinear_z_offset(current_position);
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(" corrected Z:", current_position.z);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(" corrected Z:", current_position.z);
|
||||
}
|
||||
|
||||
#endif // ABL_PLANAR
|
||||
@ -880,7 +880,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
TERN_(HAS_BED_PROBE, probe.move_z_after_probing());
|
||||
|
||||
#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);
|
||||
planner.synchronize();
|
||||
process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT));
|
||||
#endif
|
||||
|
@ -173,7 +173,7 @@ void GcodeSuite::G29() {
|
||||
if (parser.seenval('I')) {
|
||||
ix = parser.value_int();
|
||||
if (!WITHIN(ix, 0, (GRID_MAX_POINTS_X) - 1)) {
|
||||
SERIAL_ECHOLNPAIR("I out of range (0-", (GRID_MAX_POINTS_X) - 1, ")");
|
||||
SERIAL_ECHOLNPGM("I out of range (0-", (GRID_MAX_POINTS_X) - 1, ")");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -183,7 +183,7 @@ void GcodeSuite::G29() {
|
||||
if (parser.seenval('J')) {
|
||||
iy = parser.value_int();
|
||||
if (!WITHIN(iy, 0, (GRID_MAX_POINTS_Y) - 1)) {
|
||||
SERIAL_ECHOLNPAIR("J out of range (0-", (GRID_MAX_POINTS_Y) - 1, ")");
|
||||
SERIAL_ECHOLNPGM("J out of range (0-", (GRID_MAX_POINTS_Y) - 1, ")");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -213,7 +213,7 @@ void GcodeSuite::G29() {
|
||||
} // switch(state)
|
||||
|
||||
if (state == MeshNext) {
|
||||
SERIAL_ECHOLNPAIR("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS);
|
||||
SERIAL_ECHOLNPGM("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS);
|
||||
if (mbl_probe_index > 0) TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), _MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS)));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user