Use PSTR for common labels

This commit is contained in:
Scott Lahteine
2020-03-01 07:36:25 -06:00
parent f7d663c7db
commit 5e9a10dbae
9 changed files with 39 additions and 24 deletions

View File

@ -2628,21 +2628,24 @@ bool Planner::buffer_segment(const float &a, const float &b, const float &c, con
SERIAL_ECHOPAIR("->", target.a);
SERIAL_ECHOPAIR(") B:", b);
#else
SERIAL_ECHOPAIR(" X:", a);
SERIAL_ECHOPAIR_P(SP_X_LBL, a);
SERIAL_ECHOPAIR(" (", position.x);
SERIAL_ECHOPAIR("->", target.x);
SERIAL_ECHOPAIR(") Y:", b);
SERIAL_CHAR(')');
SERIAL_ECHOPAIR_P(SP_Y_LBL, b);
#endif
SERIAL_ECHOPAIR(" (", position.y);
SERIAL_ECHOPAIR("->", target.y);
#if ENABLED(DELTA)
SERIAL_ECHOPAIR(") C:", c);
#else
SERIAL_ECHOPAIR(") Z:", c);
SERIAL_CHAR(')');
SERIAL_ECHOPAIR_P(SP_Z_LBL, c);
#endif
SERIAL_ECHOPAIR(" (", position.z);
SERIAL_ECHOPAIR("->", target.z);
SERIAL_ECHOPAIR(") E:", e);
SERIAL_CHAR(')');
SERIAL_ECHOPAIR_P(SP_E_LBL, e);
SERIAL_ECHOPAIR(" (", position.e);
SERIAL_ECHOPAIR("->", target.e);
SERIAL_ECHOLNPGM(")");

View File

@ -53,11 +53,13 @@ void scara_set_axis_is_at_home(const AxisEnum axis) {
current_position[axis] = cartes[axis];
#else
// MP_SCARA uses a Cartesian XY home position
// SERIAL_ECHOLNPAIR("homeposition X:", homeposition.x, " Y:", homeposition.y);
// SERIAL_ECHOPGM("homeposition");
// SERIAL_ECHOLNPAIR_P(SP_X_LBL, homeposition.x, SP_Y_LBL, homeposition.y);
current_position[axis] = homeposition[axis];
#endif
// SERIAL_ECHOLNPAIR("Cartesian X:", current_position.x, " Y:", current_position.y);
// SERIAL_ECHOPGM("Cartesian");
// SERIAL_ECHOLNPAIR_P(SP_X_LBL, current_position.x, SP_Y_LBL, current_position.y);
update_software_endstops(axis);
}
}

View File

@ -2464,12 +2464,12 @@ void Stepper::report_positions() {
#if CORE_IS_XY || CORE_IS_XZ || ENABLED(DELTA) || IS_SCARA
SERIAL_ECHOPAIR(STR_COUNT_A, pos.x, " B:", pos.y);
#else
SERIAL_ECHOPAIR(STR_COUNT_X, pos.x, " Y:", pos.y);
SERIAL_ECHOPAIR_P(PSTR(STR_COUNT_X), pos.x, SP_Y_LBL, pos.y);
#endif
#if CORE_IS_XZ || CORE_IS_YZ || ENABLED(DELTA)
SERIAL_ECHOLNPAIR(" C:", pos.z);
#else
SERIAL_ECHOLNPAIR(" Z:", pos.z);
SERIAL_ECHOLNPAIR_P(SP_Z_LBL, pos.z);
#endif
}