Optimize some serial strings

This commit is contained in:
Scott Lahteine 2018-01-23 19:09:40 -06:00
parent 9644fe1839
commit 1dcfe193ac
6 changed files with 13 additions and 13 deletions

View File

@ -116,7 +116,7 @@ void I2CPositionEncoder::update() {
SERIAL_ECHOPGM("New position reads as ");
SERIAL_ECHO(get_position());
SERIAL_ECHOPGM("(");
SERIAL_CHAR('(');
SERIAL_ECHO(mm_from_count(get_position()));
SERIAL_ECHOLNPGM(")");
#endif

View File

@ -1732,7 +1732,7 @@
d = t + normal.z * z1;
SERIAL_ECHOPGM("D from 1st point: ");
SERIAL_ECHO_F(d, 6);
SERIAL_ECHO(" Z error: ");
SERIAL_ECHOPGM(" Z error: ");
SERIAL_ECHO_F(normal.z*z1-get_z_correction(UBL_PROBE_PT_1_X, UBL_PROBE_PT_1_Y),6);
SERIAL_EOL();
@ -1741,7 +1741,7 @@
SERIAL_EOL();
SERIAL_ECHOPGM("D from 2nd point: ");
SERIAL_ECHO_F(d, 6);
SERIAL_ECHO(" Z error: ");
SERIAL_ECHOPGM(" Z error: ");
SERIAL_ECHO_F(normal.z*z2-get_z_correction(UBL_PROBE_PT_2_X, UBL_PROBE_PT_2_Y),6);
SERIAL_EOL();
@ -1749,7 +1749,7 @@
d = t + normal.z * z3;
SERIAL_ECHOPGM("D from 3rd point: ");
SERIAL_ECHO_F(d, 6);
SERIAL_ECHO(" Z error: ");
SERIAL_ECHOPGM(" Z error: ");
SERIAL_ECHO_F(normal.z*z3-get_z_correction(UBL_PROBE_PT_3_X, UBL_PROBE_PT_3_Y),6);
SERIAL_EOL();
@ -1766,7 +1766,7 @@
SERIAL_ECHOPAIR(" Z error: (", Z_SAFE_HOMING_X_POINT );
SERIAL_ECHOPAIR(",", Z_SAFE_HOMING_Y_POINT );
SERIAL_ECHO(") = ");
SERIAL_ECHOPGM(") = ");
SERIAL_ECHO_F( get_z_correction(Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT),6);
SERIAL_EOL();
*/

View File

@ -93,7 +93,7 @@ void GcodeSuite::M852() {
if (!ijk) {
SERIAL_ECHO_START();
SERIAL_ECHO(MSG_SKEW_FACTOR " XY: ");
SERIAL_ECHOPGM(MSG_SKEW_FACTOR " XY: ");
SERIAL_ECHO_F(planner.xy_skew_factor, 6);
SERIAL_EOL();
#if ENABLED(SKEW_CORRECTION_FOR_Z)

View File

@ -286,13 +286,13 @@ void GCodeParser::unknown_command_error() {
SERIAL_ECHO(codenum);
SERIAL_ECHOLNPGM(")");
#if ENABLED(FASTER_GCODE_PARSER)
SERIAL_ECHO(" args: \"");
SERIAL_ECHOPGM(" args: \"");
for (char c = 'A'; c <= 'Z'; ++c)
if (seen(c)) { SERIAL_CHAR(c); SERIAL_CHAR(' '); }
#else
SERIAL_ECHOPAIR(" args: \"", command_args);
#endif
SERIAL_ECHOPGM("\"");
SERIAL_CHAR('"');
if (string_arg) {
SERIAL_ECHOPGM(" string: \"");
SERIAL_ECHO(string_arg);

View File

@ -2266,7 +2266,7 @@ void MarlinSettings::reset(
}
CONFIG_ECHO_START;
#if ENABLED(SKEW_CORRECTION_FOR_Z)
SERIAL_ECHO_P(port, " M852 I");
SERIAL_ECHOPGM_P(port, " M852 I");
SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.xy_skew_factor), 6);
SERIAL_ECHOPGM_P(port, " J");
SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.xz_skew_factor), 6);
@ -2274,7 +2274,7 @@ void MarlinSettings::reset(
SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.yz_skew_factor), 6);
SERIAL_EOL_P(port);
#else
SERIAL_ECHO_P(port, " M852 S");
SERIAL_ECHOPGM_P(port, " M852 S");
SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.xy_skew_factor), 6);
SERIAL_EOL_P(port);
#endif
@ -2289,7 +2289,7 @@ void MarlinSettings::reset(
SERIAL_ECHOLNPGM_P(port, "Stepper driver current:");
}
CONFIG_ECHO_START;
SERIAL_ECHO_P(port, " M906");
SERIAL_ECHOPGM_P(port, " M906");
#if ENABLED(X_IS_TMC2130) || ENABLED(X_IS_TMC2208)
SERIAL_ECHOPAIR_P(port, " X ", stepperX.getCurrent());
#endif
@ -2335,7 +2335,7 @@ void MarlinSettings::reset(
SERIAL_ECHOLNPGM_P(port, "Sensorless homing threshold:");
}
CONFIG_ECHO_START;
SERIAL_ECHO_P(port, " M914");
SERIAL_ECHOPGM_P(port, " M914");
#if ENABLED(X_IS_TMC2130)
SERIAL_ECHOPAIR_P(port, " X", stepperX.sgt());
#endif

View File

@ -144,7 +144,7 @@ void PrintCounter::showStats() {
SERIAL_ECHOPGM("Filament used: ");
SERIAL_ECHO(this->data.filamentUsed / 1000);
SERIAL_ECHOPGM("m");
SERIAL_CHAR('m');
SERIAL_EOL();
}