|
@@ -315,7 +315,7 @@ void Endstops::update() {
|
315
|
315
|
#else
|
316
|
316
|
if (stepper.motor_direction(Z_AXIS))
|
317
|
317
|
#endif
|
318
|
|
- { // z -direction
|
|
318
|
+ { // Z -direction. Gantry down, bed up.
|
319
|
319
|
#if HAS_Z_MIN
|
320
|
320
|
|
321
|
321
|
#if ENABLED(Z_DUAL_ENDSTOPS)
|
|
@@ -341,6 +341,7 @@ void Endstops::update() {
|
341
|
341
|
|
342
|
342
|
#endif // HAS_Z_MIN
|
343
|
343
|
|
|
344
|
+ // When closing the gap check the enabled probe
|
344
|
345
|
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
|
345
|
346
|
if (z_probe_enabled) {
|
346
|
347
|
UPDATE_ENDSTOP(Z, MIN_PROBE);
|
|
@@ -348,9 +349,10 @@ void Endstops::update() {
|
348
|
349
|
}
|
349
|
350
|
#endif
|
350
|
351
|
}
|
351
|
|
- else { // z +direction
|
|
352
|
+ else { // Z +direction. Gantry up, bed down.
|
352
|
353
|
#if HAS_Z_MAX
|
353
|
354
|
|
|
355
|
+ // Check both Z dual endstops
|
354
|
356
|
#if ENABLED(Z_DUAL_ENDSTOPS)
|
355
|
357
|
|
356
|
358
|
UPDATE_ENDSTOP_BIT(Z, MAX);
|
|
@@ -362,11 +364,13 @@ void Endstops::update() {
|
362
|
364
|
|
363
|
365
|
test_dual_z_endstops(Z_MAX, Z2_MAX);
|
364
|
366
|
|
365
|
|
- #else // !Z_DUAL_ENDSTOPS
|
|
367
|
+ // If this pin is not hijacked for the bed probe
|
|
368
|
+ // then it belongs to the Z endstop
|
|
369
|
+ #elif DISABLED(Z_MIN_PROBE_ENDSTOP) || Z_MAX_PIN != Z_MIN_PROBE_PIN
|
366
|
370
|
|
367
|
371
|
UPDATE_ENDSTOP(Z, MAX);
|
368
|
372
|
|
369
|
|
- #endif // !Z_DUAL_ENDSTOPS
|
|
373
|
+ #endif // !Z_MIN_PROBE_PIN...
|
370
|
374
|
#endif // Z_MAX_PIN
|
371
|
375
|
}
|
372
|
376
|
#if ENABLED(COREXZ)
|