|
|
@ -201,6 +201,10 @@ void Endstops::M119() {
|
|
|
|
SERIAL_PROTOCOLPGM(MSG_Z_MIN);
|
|
|
|
SERIAL_PROTOCOLPGM(MSG_Z_MIN);
|
|
|
|
SERIAL_PROTOCOLLN(((READ(Z_MIN_PIN)^Z_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
|
|
|
|
SERIAL_PROTOCOLLN(((READ(Z_MIN_PIN)^Z_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAS_Z2_MIN
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLPGM(MSG_Z2_MIN);
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLLN(((READ(Z2_MIN_PIN)^Z2_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#if HAS_Z_MAX
|
|
|
|
#if HAS_Z_MAX
|
|
|
|
SERIAL_PROTOCOLPGM(MSG_Z_MAX);
|
|
|
|
SERIAL_PROTOCOLPGM(MSG_Z_MAX);
|
|
|
|
SERIAL_PROTOCOLLN(((READ(Z_MAX_PIN)^Z_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
|
|
|
|
SERIAL_PROTOCOLLN(((READ(Z_MAX_PIN)^Z_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
|
|
|
@ -218,7 +222,7 @@ void Endstops::M119() {
|
|
|
|
#if ENABLED(Z_DUAL_ENDSTOPS)
|
|
|
|
#if ENABLED(Z_DUAL_ENDSTOPS)
|
|
|
|
|
|
|
|
|
|
|
|
// Pass the result of the endstop test
|
|
|
|
// Pass the result of the endstop test
|
|
|
|
void Endstops::test_dual_z_endstops(EndstopEnum es1, EndstopEnum es2) {
|
|
|
|
void Endstops::test_dual_z_endstops(const EndstopEnum es1, const EndstopEnum es2) {
|
|
|
|
byte z_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Z, bit 1 for Z2
|
|
|
|
byte z_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Z, bit 1 for Z2
|
|
|
|
if (z_test && stepper.current_block->steps[Z_AXIS] > 0) {
|
|
|
|
if (z_test && stepper.current_block->steps[Z_AXIS] > 0) {
|
|
|
|
SBI(endstop_hit_bits, Z_MIN);
|
|
|
|
SBI(endstop_hit_bits, Z_MIN);
|
|
|
|