Reduce string duplication

This commit is contained in:
Scott Lahteine
2020-06-27 23:27:28 -05:00
parent 0fad9535d1
commit dc6d8357a6
9 changed files with 23 additions and 23 deletions

View File

@ -127,18 +127,16 @@ 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_ECHOLNPAIR("G35 failed at point ", int(i), " (", tramming_point_name[i], ")"
" X", screws_tilt_adjust_pos[i].x,
" Y", screws_tilt_adjust_pos[i].y);
SERIAL_ECHOPAIR("G35 failed at point ", int(i), " (", tramming_point_name[i], ")");
SERIAL_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y);
err_break = true;
break;
}
if (DEBUGGING(LEVELING))
DEBUG_ECHOLNPAIR("Probing point ", int(i), " (", tramming_point_name[i], ")"
" X", screws_tilt_adjust_pos[i].x,
" Y", screws_tilt_adjust_pos[i].y,
" Z", z_probed_height);
if (DEBUGGING(LEVELING)) {
DEBUG_ECHOPAIR("Probing point ", int(i), " (", tramming_point_name[i], ")");
SERIAL_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);
}
z_measured[i] = z_probed_height;
}

View File

@ -39,9 +39,9 @@ void M217_report(const bool eeprom=false) {
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
serialprintPGM(eeprom ? PSTR(" M217") : PSTR("Toolchange:"));
SERIAL_ECHOPAIR(" S", LINEAR_UNIT(toolchange_settings.swap_length),
" B", LINEAR_UNIT(toolchange_settings.extra_resume));
SERIAL_ECHOPAIR_P(SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime),
SERIAL_ECHOPAIR(" S", LINEAR_UNIT(toolchange_settings.swap_length));
SERIAL_ECHOPAIR_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume),
SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime),
SP_P_STR, LINEAR_UNIT(toolchange_settings.prime_speed));
SERIAL_ECHOPAIR(" R", LINEAR_UNIT(toolchange_settings.retract_speed),
" U", LINEAR_UNIT(toolchange_settings.unretract_speed),

View File

@ -289,8 +289,8 @@ void GCodeQueue::ok_to_send() {
while (NUMERIC_SIGNED(*p))
SERIAL_ECHO(*p++);
}
SERIAL_ECHOPAIR_P(SP_P_STR, int(planner.moves_free()));
SERIAL_ECHOPAIR(" B", int(BUFSIZE - length));
SERIAL_ECHOPAIR_P(SP_P_STR, int(planner.moves_free()),
SP_B_STR, int(BUFSIZE - length));
#endif
SERIAL_EOL();
}