Serial refactor. Default 8-bit ECHO to int, not char (#20985)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
X-Ryl669
2021-02-08 07:37:24 +01:00
committed by GitHub
parent 1e726fe405
commit e7c711996b
72 changed files with 379 additions and 337 deletions

View File

@ -537,7 +537,7 @@ void GcodeSuite::G26() {
if (bedtemp) {
if (!WITHIN(bedtemp, 40, BED_MAX_TARGET)) {
SERIAL_ECHOLNPAIR("?Specified bed temperature not plausible (40-", int(BED_MAX_TARGET), "C).");
SERIAL_ECHOLNPAIR("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C).");
return;
}
g26_bed_temp = bedtemp;

View File

@ -104,7 +104,7 @@ void GcodeSuite::G35() {
const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[i], PROBE_PT_RAISE, 0, true);
if (isnan(z_probed_height)) {
SERIAL_ECHOPAIR("G35 failed at point ", int(i), " (");
SERIAL_ECHOPAIR("G35 failed at point ", i, " (");
SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
SERIAL_CHAR(')');
SERIAL_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y);
@ -113,7 +113,7 @@ void GcodeSuite::G35() {
}
if (DEBUGGING(LEVELING)) {
DEBUG_ECHOPAIR("Probing point ", int(i), " (");
DEBUG_ECHOPAIR("Probing point ", i, " (");
DEBUG_PRINT_P((char *)pgm_read_ptr(&tramming_point_name[i]));
DEBUG_CHAR(')');
DEBUG_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y, SP_Z_STR, z_probed_height);

View File

@ -637,7 +637,7 @@ G29_TYPE GcodeSuite::G29() {
// Avoid probing outside the round or hexagonal area
if (TERN0(IS_KINEMATIC, !probe.can_reach(probePos))) continue;
if (verbose_level) SERIAL_ECHOLNPAIR("Probing mesh point ", int(pt_index), "/", abl_points, ".");
if (verbose_level) SERIAL_ECHOLNPAIR("Probing mesh point ", pt_index, "/", abl_points, ".");
TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), int(pt_index), int(abl_points)));
measured_z = faux ? 0.001f * random(-100, 101) : probe.probe_at_point(probePos, raise_after, verbose_level);
@ -682,7 +682,7 @@ G29_TYPE GcodeSuite::G29() {
// Probe at 3 arbitrary points
LOOP_L_N(i, 3) {
if (verbose_level) SERIAL_ECHOLNPAIR("Probing point ", int(i + 1), "/3.");
if (verbose_level) SERIAL_ECHOLNPAIR("Probing point ", i + 1, "/3.");
TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_MESH), int(i + 1)));
// Retain the last probe position

View File

@ -142,7 +142,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-", int(GRID_MAX_POINTS_X - 1), ")");
SERIAL_ECHOLNPAIR("I out of range (0-", GRID_MAX_POINTS_X - 1, ")");
return;
}
}
@ -152,7 +152,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-", int(GRID_MAX_POINTS_Y - 1), ")");
SERIAL_ECHOLNPAIR("J out of range (0-", GRID_MAX_POINTS_Y - 1, ")");
return;
}
}
@ -181,7 +181,7 @@ void GcodeSuite::G29() {
} // switch(state)
if (state == MeshNext)
SERIAL_ECHOLNPAIR("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", int(GRID_MAX_POINTS));
SERIAL_ECHOLNPAIR("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS);
report_current_position();
}