🔧 HAS_CUSTOM_PROBE_PIN => USES_Z_MIN_PROBE_PIN
This commit is contained in:
parent
381c5908b4
commit
80f8ec94aa
|
@ -146,7 +146,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
|
||||||
#error "Serial port pins (2) conflict with other pins!"
|
#error "Serial port pins (2) conflict with other pins!"
|
||||||
#elif Y_HOME_TO_MIN && IS_TX2(Y_STOP_PIN)
|
#elif Y_HOME_TO_MIN && IS_TX2(Y_STOP_PIN)
|
||||||
#error "Serial port pins (2) conflict with Y endstop pin!"
|
#error "Serial port pins (2) conflict with Y endstop pin!"
|
||||||
#elif HAS_CUSTOM_PROBE_PIN && IS_TX2(Z_MIN_PROBE_PIN)
|
#elif USES_Z_MIN_PROBE_PIN && IS_TX2(Z_MIN_PROBE_PIN)
|
||||||
#error "Serial port pins (2) conflict with probe pin!"
|
#error "Serial port pins (2) conflict with probe pin!"
|
||||||
#elif ANY_TX(2, X_ENABLE_PIN, Y_ENABLE_PIN) || ANY_RX(2, X_DIR_PIN, Y_DIR_PIN)
|
#elif ANY_TX(2, X_ENABLE_PIN, Y_ENABLE_PIN) || ANY_RX(2, X_DIR_PIN, Y_DIR_PIN)
|
||||||
#error "Serial port pins (2) conflict with X/Y stepper pins!"
|
#error "Serial port pins (2) conflict with X/Y stepper pins!"
|
||||||
|
@ -237,7 +237,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
|
||||||
#define PIN_IS_SCL2(P) (P##_PIN == P0_11)
|
#define PIN_IS_SCL2(P) (P##_PIN == P0_11)
|
||||||
#if PIN_IS_SDA2(Y_STOP)
|
#if PIN_IS_SDA2(Y_STOP)
|
||||||
#error "i2c SDA2 overlaps with Y endstop pin!"
|
#error "i2c SDA2 overlaps with Y endstop pin!"
|
||||||
#elif HAS_CUSTOM_PROBE_PIN && PIN_IS_SDA2(Z_MIN_PROBE)
|
#elif USES_Z_MIN_PROBE_PIN && PIN_IS_SDA2(Z_MIN_PROBE)
|
||||||
#error "i2c SDA2 overlaps with Z probe pin!"
|
#error "i2c SDA2 overlaps with Z probe pin!"
|
||||||
#elif PIN_IS_SDA2(X_ENABLE) || PIN_IS_SDA2(Y_ENABLE)
|
#elif PIN_IS_SDA2(X_ENABLE) || PIN_IS_SDA2(Y_ENABLE)
|
||||||
#error "i2c SDA2 overlaps with X/Y ENABLE pin!"
|
#error "i2c SDA2 overlaps with X/Y ENABLE pin!"
|
||||||
|
|
|
@ -911,9 +911,9 @@
|
||||||
#define HAS_PROBE_XY_OFFSET 1
|
#define HAS_PROBE_XY_OFFSET 1
|
||||||
#endif
|
#endif
|
||||||
#if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && !BOTH(DELTA, SENSORLESS_PROBING)
|
#if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && !BOTH(DELTA, SENSORLESS_PROBING)
|
||||||
#define HAS_CUSTOM_PROBE_PIN 1
|
#define USES_Z_MIN_PROBE_PIN 1
|
||||||
#endif
|
#endif
|
||||||
#if Z_HOME_TO_MIN && (!HAS_CUSTOM_PROBE_PIN || ENABLED(USE_PROBE_FOR_Z_HOMING))
|
#if Z_HOME_TO_MIN && (!USES_Z_MIN_PROBE_PIN || ENABLED(USE_PROBE_FOR_Z_HOMING))
|
||||||
#define HOMING_Z_WITH_PROBE 1
|
#define HOMING_Z_WITH_PROBE 1
|
||||||
#endif
|
#endif
|
||||||
#ifndef Z_PROBE_LOW_POINT
|
#ifndef Z_PROBE_LOW_POINT
|
||||||
|
|
|
@ -2459,7 +2459,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
// Is an endstop plug used for extra Z endstops or the probe?
|
// Is an endstop plug used for extra Z endstops or the probe?
|
||||||
#define IS_PROBE_PIN(A,M) (HAS_CUSTOM_PROBE_PIN && Z_MIN_PROBE_PIN == A##_##M##_PIN)
|
#define IS_PROBE_PIN(A,M) (USES_Z_MIN_PROBE_PIN && Z_MIN_PROBE_PIN == A##_##M##_PIN)
|
||||||
#define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_)
|
#define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_)
|
||||||
#define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_)
|
#define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_)
|
||||||
#define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_)
|
#define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_)
|
||||||
|
@ -2533,7 +2533,7 @@
|
||||||
#if PIN_EXISTS(Z4_MAX)
|
#if PIN_EXISTS(Z4_MAX)
|
||||||
#define HAS_Z4_MAX 1
|
#define HAS_Z4_MAX 1
|
||||||
#endif
|
#endif
|
||||||
#if BOTH(HAS_BED_PROBE, HAS_CUSTOM_PROBE_PIN) && PIN_EXISTS(Z_MIN_PROBE)
|
#if BOTH(HAS_BED_PROBE, USES_Z_MIN_PROBE_PIN) && PIN_EXISTS(Z_MIN_PROBE)
|
||||||
#define HAS_Z_MIN_PROBE_PIN 1
|
#define HAS_Z_MIN_PROBE_PIN 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -329,7 +329,7 @@ void Endstops::init() {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_CUSTOM_PROBE_PIN
|
#if USES_Z_MIN_PROBE_PIN
|
||||||
#if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE)
|
#if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE)
|
||||||
SET_INPUT_PULLUP(Z_MIN_PROBE_PIN);
|
SET_INPUT_PULLUP(Z_MIN_PROBE_PIN);
|
||||||
#elif ENABLED(ENDSTOPPULLDOWN_ZMIN_PROBE)
|
#elif ENABLED(ENDSTOPPULLDOWN_ZMIN_PROBE)
|
||||||
|
@ -453,7 +453,7 @@ void Endstops::event_handler() {
|
||||||
_ENDSTOP_HIT_TEST(K,'K')
|
_ENDSTOP_HIT_TEST(K,'K')
|
||||||
);
|
);
|
||||||
|
|
||||||
#if HAS_CUSTOM_PROBE_PIN
|
#if USES_Z_MIN_PROBE_PIN
|
||||||
#define P_AXIS Z_AXIS
|
#define P_AXIS Z_AXIS
|
||||||
if (TEST(hit_state, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P');
|
if (TEST(hit_state, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P');
|
||||||
#endif
|
#endif
|
||||||
|
@ -566,7 +566,7 @@ void _O2 Endstops::report_states() {
|
||||||
#if BOTH(MARLIN_DEV_MODE, PROBE_ACTIVATION_SWITCH)
|
#if BOTH(MARLIN_DEV_MODE, PROBE_ACTIVATION_SWITCH)
|
||||||
print_es_state(probe_switch_activated(), PSTR(STR_PROBE_EN));
|
print_es_state(probe_switch_activated(), PSTR(STR_PROBE_EN));
|
||||||
#endif
|
#endif
|
||||||
#if HAS_CUSTOM_PROBE_PIN
|
#if USES_Z_MIN_PROBE_PIN
|
||||||
print_es_state(PROBE_TRIGGERED(), PSTR(STR_Z_PROBE));
|
print_es_state(PROBE_TRIGGERED(), PSTR(STR_Z_PROBE));
|
||||||
#endif
|
#endif
|
||||||
#if MULTI_FILAMENT_SENSOR
|
#if MULTI_FILAMENT_SENSOR
|
||||||
|
@ -720,7 +720,7 @@ void Endstops::update() {
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
// When closing the gap check the enabled probe
|
// When closing the gap check the enabled probe
|
||||||
if (probe_switch_activated())
|
if (probe_switch_activated())
|
||||||
UPDATE_ENDSTOP_BIT(Z, TERN(HAS_CUSTOM_PROBE_PIN, MIN_PROBE, MIN));
|
UPDATE_ENDSTOP_BIT(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_Z_MAX && !Z_SPI_SENSORLESS
|
#if HAS_Z_MAX && !Z_SPI_SENSORLESS
|
||||||
|
@ -746,7 +746,7 @@ void Endstops::update() {
|
||||||
COPY_LIVE_STATE(Z_MAX, Z4_MAX);
|
COPY_LIVE_STATE(Z_MAX, Z4_MAX);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#elif !HAS_CUSTOM_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN
|
#elif !USES_Z_MIN_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN
|
||||||
// If this pin isn't the bed probe it's the Z endstop
|
// If this pin isn't the bed probe it's the Z endstop
|
||||||
UPDATE_ENDSTOP_BIT(Z, MAX);
|
UPDATE_ENDSTOP_BIT(Z, MAX);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1021,7 +1021,7 @@ void Endstops::update() {
|
||||||
|
|
||||||
#if HAS_Z_MIN || (Z_SPI_SENSORLESS && Z_HOME_TO_MIN)
|
#if HAS_Z_MIN || (Z_SPI_SENSORLESS && Z_HOME_TO_MIN)
|
||||||
if ( TERN1(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, z_probe_enabled)
|
if ( TERN1(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, z_probe_enabled)
|
||||||
&& TERN1(HAS_CUSTOM_PROBE_PIN, !z_probe_enabled)
|
&& TERN1(USES_Z_MIN_PROBE_PIN, !z_probe_enabled)
|
||||||
) PROCESS_ENDSTOP_Z(MIN);
|
) PROCESS_ENDSTOP_Z(MIN);
|
||||||
#if CORE_DIAG(XZ, X, MIN)
|
#if CORE_DIAG(XZ, X, MIN)
|
||||||
PROCESS_CORE_ENDSTOP(X,MIN,Z,MIN);
|
PROCESS_CORE_ENDSTOP(X,MIN,Z,MIN);
|
||||||
|
@ -1035,7 +1035,7 @@ void Endstops::update() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// When closing the gap check the enabled probe
|
// When closing the gap check the enabled probe
|
||||||
#if HAS_CUSTOM_PROBE_PIN
|
#if USES_Z_MIN_PROBE_PIN
|
||||||
if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN_PROBE);
|
if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN_PROBE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -1043,7 +1043,7 @@ void Endstops::update() {
|
||||||
#if HAS_Z_MAX || (Z_SPI_SENSORLESS && Z_HOME_TO_MAX)
|
#if HAS_Z_MAX || (Z_SPI_SENSORLESS && Z_HOME_TO_MAX)
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||||
PROCESS_ENDSTOP_Z(MAX);
|
PROCESS_ENDSTOP_Z(MAX);
|
||||||
#elif !HAS_CUSTOM_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN // No probe or probe is Z_MIN || Probe is not Z_MAX
|
#elif !USES_Z_MIN_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN // No probe or probe is Z_MIN || Probe is not Z_MAX
|
||||||
PROCESS_ENDSTOP(Z, MAX);
|
PROCESS_ENDSTOP(Z, MAX);
|
||||||
#endif
|
#endif
|
||||||
#if CORE_DIAG(XZ, X, MIN)
|
#if CORE_DIAG(XZ, X, MIN)
|
||||||
|
|
|
@ -69,7 +69,7 @@ enum EndstopEnum : char {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Bed Probe state is distinct or shared with Z_MIN (i.e., when the probe is the only Z endstop)
|
// Bed Probe state is distinct or shared with Z_MIN (i.e., when the probe is the only Z endstop)
|
||||||
_ES_ITEM(HAS_BED_PROBE, Z_MIN_PROBE IF_DISABLED(HAS_CUSTOM_PROBE_PIN, = Z_MIN))
|
_ES_ITEM(HAS_BED_PROBE, Z_MIN_PROBE IF_DISABLED(USES_Z_MIN_PROBE_PIN, = Z_MIN))
|
||||||
|
|
||||||
// The total number of states
|
// The total number of states
|
||||||
NUM_ENDSTOP_STATES
|
NUM_ENDSTOP_STATES
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_CUSTOM_PROBE_PIN
|
#if USES_Z_MIN_PROBE_PIN
|
||||||
#define PROBE_TRIGGERED() (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING)
|
#define PROBE_TRIGGERED() (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING)
|
||||||
#else
|
#else
|
||||||
#define PROBE_TRIGGERED() (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING)
|
#define PROBE_TRIGGERED() (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING)
|
||||||
|
|
|
@ -1134,7 +1134,7 @@
|
||||||
#define USE_ZMIN_PLUG
|
#define USE_ZMIN_PLUG
|
||||||
#endif
|
#endif
|
||||||
#undef _STOP_IN_USE
|
#undef _STOP_IN_USE
|
||||||
#if !HAS_CUSTOM_PROBE_PIN
|
#if !USES_Z_MIN_PROBE_PIN
|
||||||
#undef Z_MIN_PROBE_PIN
|
#undef Z_MIN_PROBE_PIN
|
||||||
#define Z_MIN_PROBE_PIN -1
|
#define Z_MIN_PROBE_PIN -1
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
//#define E3_MS2_PIN ?
|
//#define E3_MS2_PIN ?
|
||||||
//#define E3_MS3_PIN ?
|
//#define E3_MS3_PIN ?
|
||||||
|
|
||||||
#if HAS_CUSTOM_PROBE_PIN
|
#if USES_Z_MIN_PROBE_PIN
|
||||||
#define Z_MIN_PROBE_PIN 49
|
#define Z_MIN_PROBE_PIN 49
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
#define E2_CS_PIN 61
|
#define E2_CS_PIN 61
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_CUSTOM_PROBE_PIN
|
#if USES_Z_MIN_PROBE_PIN
|
||||||
#define Z_MIN_PROBE_PIN 49
|
#define Z_MIN_PROBE_PIN 49
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue