Browse Source

Fix some serial echos of pin states

pull/1/head
Scott Lahteine 6 years ago
parent
commit
6cf8d40f41
  1. 54
      Marlin/src/module/stepper.cpp
  2. 8
      Marlin/src/pins/pinsDebug.h

54
Marlin/src/module/stepper.cpp

@ -2820,74 +2820,74 @@ void Stepper::report_positions() {
void Stepper::microstep_readings() { void Stepper::microstep_readings() {
SERIAL_ECHOPGM("MS1,MS2,MS3 Pins\nX: "); SERIAL_ECHOPGM("MS1,MS2,MS3 Pins\nX: ");
#if HAS_X_MICROSTEPS #if HAS_X_MICROSTEPS
SERIAL_ECHO(READ(X_MS1_PIN)); SERIAL_CHAR('0' + READ(X_MS1_PIN));
SERIAL_ECHO(READ(X_MS2_PIN)); SERIAL_CHAR('0' + READ(X_MS2_PIN));
#if PIN_EXISTS(X_MS3) #if PIN_EXISTS(X_MS3)
SERIAL_ECHOLN(READ(X_MS3_PIN)); SERIAL_ECHOLN((int)READ(X_MS3_PIN));
#endif #endif
#endif #endif
#if HAS_Y_MICROSTEPS #if HAS_Y_MICROSTEPS
SERIAL_ECHOPGM("Y: "); SERIAL_ECHOPGM("Y: ");
SERIAL_ECHO(READ(Y_MS1_PIN)); SERIAL_CHAR('0' + READ(Y_MS1_PIN));
SERIAL_ECHO(READ(Y_MS2_PIN)); SERIAL_CHAR('0' + READ(Y_MS2_PIN));
#if PIN_EXISTS(Y_MS3) #if PIN_EXISTS(Y_MS3)
SERIAL_ECHOLN(READ(Y_MS3_PIN)); SERIAL_ECHOLN((int)READ(Y_MS3_PIN));
#endif #endif
#endif #endif
#if HAS_Z_MICROSTEPS #if HAS_Z_MICROSTEPS
SERIAL_ECHOPGM("Z: "); SERIAL_ECHOPGM("Z: ");
SERIAL_ECHO(READ(Z_MS1_PIN)); SERIAL_CHAR('0' + READ(Z_MS1_PIN));
SERIAL_ECHO(READ(Z_MS2_PIN)); SERIAL_CHAR('0' + READ(Z_MS2_PIN));
#if PIN_EXISTS(Z_MS3) #if PIN_EXISTS(Z_MS3)
SERIAL_ECHOLN(READ(Z_MS3_PIN)); SERIAL_ECHOLN((int)READ(Z_MS3_PIN));
#endif #endif
#endif #endif
#if HAS_E0_MICROSTEPS #if HAS_E0_MICROSTEPS
SERIAL_ECHOPGM("E0: "); SERIAL_ECHOPGM("E0: ");
SERIAL_ECHO(READ(E0_MS1_PIN)); SERIAL_CHAR('0' + READ(E0_MS1_PIN));
SERIAL_ECHO(READ(E0_MS2_PIN)); SERIAL_CHAR('0' + READ(E0_MS2_PIN));
#if PIN_EXISTS(E0_MS3) #if PIN_EXISTS(E0_MS3)
SERIAL_ECHOLN(READ(E0_MS3_PIN)); SERIAL_ECHOLN((int)READ(E0_MS3_PIN));
#endif #endif
#endif #endif
#if HAS_E1_MICROSTEPS #if HAS_E1_MICROSTEPS
SERIAL_ECHOPGM("E1: "); SERIAL_ECHOPGM("E1: ");
SERIAL_ECHO(READ(E1_MS1_PIN)); SERIAL_CHAR('0' + READ(E1_MS1_PIN));
SERIAL_ECHO(READ(E1_MS2_PIN)); SERIAL_CHAR('0' + READ(E1_MS2_PIN));
#if PIN_EXISTS(E1_MS3) #if PIN_EXISTS(E1_MS3)
SERIAL_ECHOLN(READ(E1_MS3_PIN)); SERIAL_ECHOLN((int)READ(E1_MS3_PIN));
#endif #endif
#endif #endif
#if HAS_E2_MICROSTEPS #if HAS_E2_MICROSTEPS
SERIAL_ECHOPGM("E2: "); SERIAL_ECHOPGM("E2: ");
SERIAL_ECHO(READ(E2_MS1_PIN)); SERIAL_CHAR('0' + READ(E2_MS1_PIN));
SERIAL_ECHO(READ(E2_MS2_PIN)); SERIAL_CHAR('0' + READ(E2_MS2_PIN));
#if PIN_EXISTS(E2_MS3) #if PIN_EXISTS(E2_MS3)
SERIAL_ECHOLN(READ(E2_MS3_PIN)); SERIAL_ECHOLN((int)READ(E2_MS3_PIN));
#endif #endif
#endif #endif
#if HAS_E3_MICROSTEPS #if HAS_E3_MICROSTEPS
SERIAL_ECHOPGM("E3: "); SERIAL_ECHOPGM("E3: ");
SERIAL_ECHO(READ(E3_MS1_PIN)); SERIAL_CHAR('0' + READ(E3_MS1_PIN));
SERIAL_ECHO(READ(E3_MS2_PIN)); SERIAL_CHAR('0' + READ(E3_MS2_PIN));
#if PIN_EXISTS(E3_MS3) #if PIN_EXISTS(E3_MS3)
SERIAL_ECHOLN(READ(E3_MS3_PIN)); SERIAL_ECHOLN((int)READ(E3_MS3_PIN));
#endif #endif
#endif #endif
#if HAS_E4_MICROSTEPS #if HAS_E4_MICROSTEPS
SERIAL_ECHOPGM("E4: "); SERIAL_ECHOPGM("E4: ");
SERIAL_ECHO(READ(E4_MS1_PIN)); SERIAL_CHAR('0' + READ(E4_MS1_PIN));
SERIAL_ECHO(READ(E4_MS2_PIN)); SERIAL_CHAR('0' + READ(E4_MS2_PIN));
#if PIN_EXISTS(E4_MS3) #if PIN_EXISTS(E4_MS3)
SERIAL_ECHOLN(READ(E4_MS3_PIN)); SERIAL_ECHOLN((int)READ(E4_MS3_PIN));
#endif #endif
#endif #endif
#if HAS_E5_MICROSTEPS #if HAS_E5_MICROSTEPS
SERIAL_ECHOPGM("E5: "); SERIAL_ECHOPGM("E5: ");
SERIAL_ECHO(READ(E5_MS1_PIN)); SERIAL_CHAR('0' + READ(E5_MS1_PIN));
SERIAL_ECHOLN(READ(E5_MS2_PIN)); SERIAL_ECHOLN((int)READ(E5_MS2_PIN));
#if PIN_EXISTS(E5_MS3) #if PIN_EXISTS(E5_MS3)
SERIAL_ECHOLN(READ(E5_MS3_PIN)); SERIAL_ECHOLN((int)READ(E5_MS3_PIN));
#endif #endif
#endif #endif
} }

8
Marlin/src/pins/pinsDebug.h

@ -140,11 +140,11 @@ inline void report_pin_state_extended(pin_t pin, bool ignore, bool extended = fa
if (pin == 46 || pin == 47) { if (pin == 46 || pin == 47) {
if (pin == 46) { if (pin == 46) {
print_input_or_output(GET_OUTPUT(46)); print_input_or_output(GET_OUTPUT(46));
SERIAL_ECHO(READ(46)); SERIAL_CHAR('0' + READ(46));
} }
else if (pin == 47) { else if (pin == 47) {
print_input_or_output(GET_OUTPUT(47)); print_input_or_output(GET_OUTPUT(47));
SERIAL_ECHO(READ(47)); SERIAL_CHAR('0' + READ(47));
} }
} }
else else
@ -196,11 +196,11 @@ inline void report_pin_state_extended(pin_t pin, bool ignore, bool extended = fa
SERIAL_ECHO_SP(12); SERIAL_ECHO_SP(12);
if (pin == 46) { if (pin == 46) {
print_input_or_output(GET_OUTPUT(46)); print_input_or_output(GET_OUTPUT(46));
SERIAL_ECHO(READ(46)); SERIAL_CHAR('0' + READ(46));
} }
else { else {
print_input_or_output(GET_OUTPUT(47)); print_input_or_output(GET_OUTPUT(47));
SERIAL_ECHO(READ(47)); SERIAL_CHAR('0' + READ(47));
} }
} }
else else

Loading…
Cancel
Save