Reduce string duplication
This commit is contained in:
parent
0fad9535d1
commit
dc6d8357a6
9 changed files with 23 additions and 23 deletions
|
@ -216,6 +216,7 @@ PGMSTR(M24_STR, "M24");
|
|||
PGMSTR(SP_P_STR, " P"); PGMSTR(SP_T_STR, " T");
|
||||
PGMSTR(X_STR, "X"); PGMSTR(Y_STR, "Y"); PGMSTR(Z_STR, "Z"); PGMSTR(E_STR, "E");
|
||||
PGMSTR(X_LBL, "X:"); PGMSTR(Y_LBL, "Y:"); PGMSTR(Z_LBL, "Z:"); PGMSTR(E_LBL, "E:");
|
||||
PGMSTR(SP_A_STR, " A"); PGMSTR(SP_B_STR, " B"); PGMSTR(SP_C_STR, " C");
|
||||
PGMSTR(SP_X_STR, " X"); PGMSTR(SP_Y_STR, " Y"); PGMSTR(SP_Z_STR, " Z"); PGMSTR(SP_E_STR, " E");
|
||||
PGMSTR(SP_X_LBL, " X:"); PGMSTR(SP_Y_LBL, " Y:"); PGMSTR(SP_Z_LBL, " Z:"); PGMSTR(SP_E_LBL, " E:");
|
||||
|
||||
|
|
|
@ -120,5 +120,6 @@ void protected_pin_err();
|
|||
#endif
|
||||
|
||||
extern const char NUL_STR[], M112_KILL_STR[], G28_STR[], M21_STR[], M23_STR[], M24_STR[],
|
||||
SP_A_STR[], SP_B_STR[], SP_C_STR[],
|
||||
SP_P_STR[], SP_T_STR[], SP_X_STR[], SP_Y_STR[], SP_Z_STR[], SP_E_STR[],
|
||||
X_LBL[], Y_LBL[], Z_LBL[], E_LBL[], SP_X_LBL[], SP_Y_LBL[], SP_Z_LBL[], SP_E_LBL[];
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -336,7 +336,7 @@ namespace Language_en {
|
|||
PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Settings Stored");
|
||||
PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Media Update");
|
||||
PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Reset Printer");
|
||||
PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Refresh");
|
||||
PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Refresh");
|
||||
PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Info Screen");
|
||||
PROGMEM Language_Str MSG_PREPARE = _UxGT("Prepare");
|
||||
PROGMEM Language_Str MSG_TUNE = _UxGT("Tune");
|
||||
|
|
|
@ -3163,16 +3163,16 @@ void MarlinSettings::reset() {
|
|||
CONFIG_ECHO_HEADING("Material heatup parameters:");
|
||||
LOOP_L_N(i, PREHEAT_COUNT) {
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR(
|
||||
" M145 S", (int)i
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
PSTR(" M145 S"), (int)i
|
||||
#if HAS_HOTEND
|
||||
, " H", TEMP_UNIT(ui.material_preset[i].hotend_temp)
|
||||
, PSTR(" H"), TEMP_UNIT(ui.material_preset[i].hotend_temp)
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
, " B", TEMP_UNIT(ui.material_preset[i].bed_temp)
|
||||
, SP_B_STR, TEMP_UNIT(ui.material_preset[i].bed_temp)
|
||||
#endif
|
||||
#if HAS_FAN
|
||||
, " F", ui.material_preset[i].fan_speed
|
||||
, PSTR(" F"), ui.material_preset[i].fan_speed
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
@ -3198,7 +3198,7 @@ void MarlinSettings::reset() {
|
|||
, PSTR(" D"), unscalePID_d(PID_PARAM(Kd, e))
|
||||
);
|
||||
#if ENABLED(PID_EXTRUSION_SCALING)
|
||||
SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, e));
|
||||
SERIAL_ECHOPAIR_P(SP_C_STR, PID_PARAM(Kc, e));
|
||||
if (e == 0) SERIAL_ECHOPAIR(" L", thermalManager.lpq_len);
|
||||
#endif
|
||||
#if ENABLED(PID_FAN_SCALING)
|
||||
|
|
|
@ -122,7 +122,7 @@ 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("Delta A", delta.a, " B", delta.b, " C", delta.c); \
|
||||
SERIAL_ECHOLNPAIR_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) {
|
||||
|
|
|
@ -1281,8 +1281,8 @@ void Temperature::manage_heater() {
|
|||
|
||||
SERIAL_ECHOPAIR_F(" R", t.series_res, 1);
|
||||
SERIAL_ECHOPAIR_F_P(SP_T_STR, t.res_25, 1);
|
||||
SERIAL_ECHOPAIR_F(" B", t.beta, 1);
|
||||
SERIAL_ECHOPAIR_F(" C", t.sh_c_coeff, 9);
|
||||
SERIAL_ECHOPAIR_F_P(SP_B_STR, t.beta, 1);
|
||||
SERIAL_ECHOPAIR_F_P(SP_C_STR, t.sh_c_coeff, 9);
|
||||
SERIAL_ECHOPGM(" ; ");
|
||||
serialprintPGM(
|
||||
TERN_(HEATER_0_USER_THERMISTOR, t_index == CTI_HOTEND_0 ? PSTR("HOTEND 0") :)
|
||||
|
|
Reference in a new issue