A single SERIAL_ECHO macro type (#12557)

This commit is contained in:
Scott Lahteine
2018-11-29 16:58:58 -06:00
committed by GitHub
parent 69d869c3d9
commit c986239837
86 changed files with 1016 additions and 1356 deletions

View File

@ -2218,25 +2218,25 @@ void Stepper::report_positions() {
if (was_enabled) ENABLE_STEPPER_DRIVER_INTERRUPT();
#if CORE_IS_XY || CORE_IS_XZ || ENABLED(DELTA) || IS_SCARA
SERIAL_PROTOCOLPGM(MSG_COUNT_A);
SERIAL_ECHOPGM(MSG_COUNT_A);
#else
SERIAL_PROTOCOLPGM(MSG_COUNT_X);
SERIAL_ECHOPGM(MSG_COUNT_X);
#endif
SERIAL_PROTOCOL(xpos);
SERIAL_ECHO(xpos);
#if CORE_IS_XY || CORE_IS_YZ || ENABLED(DELTA) || IS_SCARA
SERIAL_PROTOCOLPGM(" B:");
SERIAL_ECHOPGM(" B:");
#else
SERIAL_PROTOCOLPGM(" Y:");
SERIAL_ECHOPGM(" Y:");
#endif
SERIAL_PROTOCOL(ypos);
SERIAL_ECHO(ypos);
#if CORE_IS_XZ || CORE_IS_YZ || ENABLED(DELTA)
SERIAL_PROTOCOLPGM(" C:");
SERIAL_ECHOPGM(" C:");
#else
SERIAL_PROTOCOLPGM(" Z:");
SERIAL_ECHOPGM(" Z:");
#endif
SERIAL_PROTOCOL(zpos);
SERIAL_ECHO(zpos);
SERIAL_EOL();
}
@ -2813,82 +2813,81 @@ void Stepper::report_positions() {
case 128: microstep_ms(driver, MICROSTEP128); break;
#endif
default: SERIAL_ERROR_START(); SERIAL_ERRORLNPGM("Microsteps unavailable"); break;
default: SERIAL_ERROR_MSG("Microsteps unavailable"); break;
}
}
void Stepper::microstep_readings() {
SERIAL_PROTOCOLLNPGM("MS1,MS2,MS3 Pins");
SERIAL_PROTOCOLPGM("X: ");
SERIAL_ECHOPGM("MS1,MS2,MS3 Pins\nX: ");
#if HAS_X_MICROSTEPS
SERIAL_PROTOCOL(READ(X_MS1_PIN));
SERIAL_PROTOCOL(READ(X_MS2_PIN));
SERIAL_ECHO(READ(X_MS1_PIN));
SERIAL_ECHO(READ(X_MS2_PIN));
#if PIN_EXISTS(X_MS3)
SERIAL_PROTOCOLLN(READ(X_MS3_PIN));
SERIAL_ECHOLN(READ(X_MS3_PIN));
#endif
#endif
#if HAS_Y_MICROSTEPS
SERIAL_PROTOCOLPGM("Y: ");
SERIAL_PROTOCOL(READ(Y_MS1_PIN));
SERIAL_PROTOCOL(READ(Y_MS2_PIN));
SERIAL_ECHOPGM("Y: ");
SERIAL_ECHO(READ(Y_MS1_PIN));
SERIAL_ECHO(READ(Y_MS2_PIN));
#if PIN_EXISTS(Y_MS3)
SERIAL_PROTOCOLLN(READ(Y_MS3_PIN));
SERIAL_ECHOLN(READ(Y_MS3_PIN));
#endif
#endif
#if HAS_Z_MICROSTEPS
SERIAL_PROTOCOLPGM("Z: ");
SERIAL_PROTOCOL(READ(Z_MS1_PIN));
SERIAL_PROTOCOL(READ(Z_MS2_PIN));
SERIAL_ECHOPGM("Z: ");
SERIAL_ECHO(READ(Z_MS1_PIN));
SERIAL_ECHO(READ(Z_MS2_PIN));
#if PIN_EXISTS(Z_MS3)
SERIAL_PROTOCOLLN(READ(Z_MS3_PIN));
SERIAL_ECHOLN(READ(Z_MS3_PIN));
#endif
#endif
#if HAS_E0_MICROSTEPS
SERIAL_PROTOCOLPGM("E0: ");
SERIAL_PROTOCOL(READ(E0_MS1_PIN));
SERIAL_PROTOCOL(READ(E0_MS2_PIN));
SERIAL_ECHOPGM("E0: ");
SERIAL_ECHO(READ(E0_MS1_PIN));
SERIAL_ECHO(READ(E0_MS2_PIN));
#if PIN_EXISTS(E0_MS3)
SERIAL_PROTOCOLLN(READ(E0_MS3_PIN));
SERIAL_ECHOLN(READ(E0_MS3_PIN));
#endif
#endif
#if HAS_E1_MICROSTEPS
SERIAL_PROTOCOLPGM("E1: ");
SERIAL_PROTOCOL(READ(E1_MS1_PIN));
SERIAL_PROTOCOL(READ(E1_MS2_PIN));
SERIAL_ECHOPGM("E1: ");
SERIAL_ECHO(READ(E1_MS1_PIN));
SERIAL_ECHO(READ(E1_MS2_PIN));
#if PIN_EXISTS(E1_MS3)
SERIAL_PROTOCOLLN(READ(E1_MS3_PIN));
SERIAL_ECHOLN(READ(E1_MS3_PIN));
#endif
#endif
#if HAS_E2_MICROSTEPS
SERIAL_PROTOCOLPGM("E2: ");
SERIAL_PROTOCOL(READ(E2_MS1_PIN));
SERIAL_PROTOCOL(READ(E2_MS2_PIN));
SERIAL_ECHOPGM("E2: ");
SERIAL_ECHO(READ(E2_MS1_PIN));
SERIAL_ECHO(READ(E2_MS2_PIN));
#if PIN_EXISTS(E2_MS3)
SERIAL_PROTOCOLLN(READ(E2_MS3_PIN));
SERIAL_ECHOLN(READ(E2_MS3_PIN));
#endif
#endif
#if HAS_E3_MICROSTEPS
SERIAL_PROTOCOLPGM("E3: ");
SERIAL_PROTOCOL(READ(E3_MS1_PIN));
SERIAL_PROTOCOL(READ(E3_MS2_PIN));
SERIAL_ECHOPGM("E3: ");
SERIAL_ECHO(READ(E3_MS1_PIN));
SERIAL_ECHO(READ(E3_MS2_PIN));
#if PIN_EXISTS(E3_MS3)
SERIAL_PROTOCOLLN(READ(E3_MS3_PIN));
SERIAL_ECHOLN(READ(E3_MS3_PIN));
#endif
#endif
#if HAS_E4_MICROSTEPS
SERIAL_PROTOCOLPGM("E4: ");
SERIAL_PROTOCOL(READ(E4_MS1_PIN));
SERIAL_PROTOCOL(READ(E4_MS2_PIN));
SERIAL_ECHOPGM("E4: ");
SERIAL_ECHO(READ(E4_MS1_PIN));
SERIAL_ECHO(READ(E4_MS2_PIN));
#if PIN_EXISTS(E4_MS3)
SERIAL_PROTOCOLLN(READ(E4_MS3_PIN));
SERIAL_ECHOLN(READ(E4_MS3_PIN));
#endif
#endif
#if HAS_E5_MICROSTEPS
SERIAL_PROTOCOLPGM("E5: ");
SERIAL_PROTOCOL(READ(E5_MS1_PIN));
SERIAL_PROTOCOLLN(READ(E5_MS2_PIN));
SERIAL_ECHOPGM("E5: ");
SERIAL_ECHO(READ(E5_MS1_PIN));
SERIAL_ECHOLN(READ(E5_MS2_PIN));
#if PIN_EXISTS(E5_MS3)
SERIAL_PROTOCOLLN(READ(E5_MS3_PIN));
SERIAL_ECHOLN(READ(E5_MS3_PIN));
#endif
#endif
}