Squish microstep_readings

This commit is contained in:
Scott Lahteine 2020-05-12 02:11:16 -05:00
parent ac6a58010d
commit 219812e3bb

View file

@ -3420,95 +3420,76 @@ void Stepper::report_positions() {
} }
void Stepper::microstep_readings() { void Stepper::microstep_readings() {
SERIAL_ECHOLNPGM("MS1|MS2|MS3 Pins"); #define PIN_CHAR(P) SERIAL_CHAR('0' + READ(P##_PIN))
#define MS_LINE(A) do{ SERIAL_ECHOPGM(" " STRINGIFY(A) ":"); PIN_CHAR(A##_MS1); PIN_CHAR(A##_MS2); }while(0)
SERIAL_ECHOPGM("MS1|2|3 Pins");
#if HAS_X_MS_PINS #if HAS_X_MS_PINS
SERIAL_ECHOPGM("X: "); MS_LINE(X);
SERIAL_CHAR('0' + READ(X_MS1_PIN), '0' + READ(X_MS2_PIN) #if PIN_EXISTS(X_MS3)
#if PIN_EXISTS(X_MS3) PIN_CHAR(X_MS3);
, '0' + READ(X_MS3_PIN) #endif
#endif
);
#endif #endif
#if HAS_Y_MS_PINS #if HAS_Y_MS_PINS
SERIAL_ECHOPGM("Y: "); MS_LINE(Y);
SERIAL_CHAR('0' + READ(Y_MS1_PIN), '0' + READ(Y_MS2_PIN) #if PIN_EXISTS(Y_MS3)
#if PIN_EXISTS(Y_MS3) PIN_CHAR(Y_MS3);
, '0' + READ(Y_MS3_PIN) #endif
#endif
);
#endif #endif
#if HAS_Z_MS_PINS #if HAS_Z_MS_PINS
SERIAL_ECHOPGM("Z: "); MS_LINE(Z);
SERIAL_CHAR('0' + READ(Z_MS1_PIN), '0' + READ(Z_MS2_PIN) #if PIN_EXISTS(Z_MS3)
#if PIN_EXISTS(Z_MS3) PIN_CHAR(Z_MS3);
, '0' + READ(Z_MS3_PIN) #endif
#endif
);
#endif #endif
#if HAS_E0_MS_PINS #if HAS_E0_MS_PINS
SERIAL_ECHOPGM("E0: "); MS_LINE(E0);
SERIAL_CHAR('0' + READ(E0_MS1_PIN), '0' + READ(E0_MS2_PIN) #if PIN_EXISTS(E0_MS3)
#if PIN_EXISTS(E0_MS3) PIN_CHAR(E0_MS3);
, '0' + READ(E0_MS3_PIN) #endif
#endif
);
#endif #endif
#if HAS_E1_MS_PINS #if HAS_E1_MS_PINS
SERIAL_ECHOPGM("E1: "); MS_LINE(E1);
SERIAL_CHAR('0' + READ(E1_MS1_PIN), '0' + READ(E1_MS2_PIN) #if PIN_EXISTS(E1_MS3)
#if PIN_EXISTS(E1_MS3) PIN_CHAR(E1_MS3);
, '0' + READ(E1_MS3_PIN) #endif
#endif
);
#endif #endif
#if HAS_E2_MS_PINS #if HAS_E2_MS_PINS
SERIAL_ECHOPGM("E2: "); MS_LINE(E2);
SERIAL_CHAR('0' + READ(E2_MS1_PIN), '0' + READ(E2_MS2_PIN) #if PIN_EXISTS(E2_MS3)
#if PIN_EXISTS(E2_MS3) PIN_CHAR(E2_MS3);
, '0' + READ(E2_MS3_PIN) #endif
#endif
);
#endif #endif
#if HAS_E3_MS_PINS #if HAS_E3_MS_PINS
SERIAL_ECHOPGM("E3: "); MS_LINE(E3);
SERIAL_CHAR('0' + READ(E3_MS1_PIN), '0' + READ(E3_MS2_PIN) #if PIN_EXISTS(E3_MS3)
#if PIN_EXISTS(E3_MS3) PIN_CHAR(E3_MS3);
, '0' + READ(E3_MS3_PIN) #endif
#endif
);
#endif #endif
#if HAS_E4_MS_PINS #if HAS_E4_MS_PINS
SERIAL_ECHOPGM("E4: "); MS_LINE(E4);
SERIAL_CHAR('0' + READ(E4_MS1_PIN), '0' + READ(E4_MS2_PIN) #if PIN_EXISTS(E4_MS3)
#if PIN_EXISTS(E4_MS3) PIN_CHAR(E4_MS3);
, '0' + READ(E4_MS3_PIN) #endif
#endif
);
#endif #endif
#if HAS_E5_MS_PINS #if HAS_E5_MS_PINS
SERIAL_ECHOPGM("E5: "); MS_LINE(E5);
SERIAL_CHAR('0' + READ(E5_MS1_PIN), '0' + READ(E5_MS2_PIN) #if PIN_EXISTS(E5_MS3)
#if PIN_EXISTS(E5_MS3) PIN_CHAR(E5_MS3);
, '0' + READ(E5_MS3_PIN) #endif
#endif
);
#endif #endif
#if HAS_E6_MS_PINS #if HAS_E6_MS_PINS
SERIAL_ECHOPGM("E6: "); MS_LINE(E6);
SERIAL_CHAR('0' + READ(E6_MS1_PIN), '0' + READ(E6_MS2_PIN) #if PIN_EXISTS(E6_MS3)
#if PIN_EXISTS(E6_MS3) PIN_CHAR(E6_MS3);
, '0' + READ(E6_MS3_PIN) #endif
#endif
);
#endif #endif
#if HAS_E7_MS_PINS #if HAS_E7_MS_PINS
SERIAL_ECHOPGM("E7: "); MS_LINE(E7);
SERIAL_CHAR('0' + READ(E7_MS1_PIN), '0' + READ(E7_MS2_PIN) #if PIN_EXISTS(E7_MS3)
#if PIN_EXISTS(E7_MS3) PIN_CHAR(E7_MS3);
, '0' + READ(E7_MS3_PIN) #endif
#endif
);
#endif #endif
SERIAL_EOL();
} }
#endif // HAS_MICROSTEPS #endif // HAS_MICROSTEPS