|
@@ -243,7 +243,7 @@ void Endstops::init() {
|
243
|
243
|
#endif
|
244
|
244
|
#endif
|
245
|
245
|
|
246
|
|
- #if USES_Z_MIN_PROBE_ENDSTOP
|
|
246
|
+ #if HAS_CUSTOM_PROBE_PIN
|
247
|
247
|
#if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE)
|
248
|
248
|
SET_INPUT_PULLUP(Z_MIN_PROBE_PIN);
|
249
|
249
|
#elif ENABLED(ENDSTOPPULLDOWN_ZMIN_PROBE)
|
|
@@ -366,7 +366,7 @@ void Endstops::event_handler() {
|
366
|
366
|
ENDSTOP_HIT_TEST_Y();
|
367
|
367
|
ENDSTOP_HIT_TEST_Z();
|
368
|
368
|
|
369
|
|
- #if USES_Z_MIN_PROBE_ENDSTOP
|
|
369
|
+ #if HAS_CUSTOM_PROBE_PIN
|
370
|
370
|
#define P_AXIS Z_AXIS
|
371
|
371
|
if (TEST(hit_state, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P');
|
372
|
372
|
#endif
|
|
@@ -443,7 +443,7 @@ void _O2 Endstops::M119() {
|
443
|
443
|
#if HAS_Z3_MAX
|
444
|
444
|
ES_REPORT(Z3_MAX);
|
445
|
445
|
#endif
|
446
|
|
- #if USES_Z_MIN_PROBE_ENDSTOP
|
|
446
|
+ #if HAS_CUSTOM_PROBE_PIN
|
447
|
447
|
print_es_state(READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING, PSTR(MSG_Z_PROBE));
|
448
|
448
|
#endif
|
449
|
449
|
#if HAS_FILAMENT_SENSOR
|
|
@@ -538,60 +538,52 @@ void Endstops::update() {
|
538
|
538
|
* Check and update endstops
|
539
|
539
|
*/
|
540
|
540
|
#if HAS_X_MIN && !X_SPI_SENSORLESS
|
|
541
|
+ UPDATE_ENDSTOP_BIT(X, MIN);
|
541
|
542
|
#if ENABLED(X_DUAL_ENDSTOPS)
|
542
|
|
- UPDATE_ENDSTOP_BIT(X, MIN);
|
543
|
543
|
#if HAS_X2_MIN
|
544
|
544
|
UPDATE_ENDSTOP_BIT(X2, MIN);
|
545
|
545
|
#else
|
546
|
546
|
COPY_LIVE_STATE(X_MIN, X2_MIN);
|
547
|
547
|
#endif
|
548
|
|
- #else
|
549
|
|
- UPDATE_ENDSTOP_BIT(X, MIN);
|
550
|
548
|
#endif
|
551
|
549
|
#endif
|
552
|
550
|
|
553
|
551
|
#if HAS_X_MAX && !X_SPI_SENSORLESS
|
|
552
|
+ UPDATE_ENDSTOP_BIT(X, MAX);
|
554
|
553
|
#if ENABLED(X_DUAL_ENDSTOPS)
|
555
|
|
- UPDATE_ENDSTOP_BIT(X, MAX);
|
556
|
554
|
#if HAS_X2_MAX
|
557
|
555
|
UPDATE_ENDSTOP_BIT(X2, MAX);
|
558
|
556
|
#else
|
559
|
557
|
COPY_LIVE_STATE(X_MAX, X2_MAX);
|
560
|
558
|
#endif
|
561
|
|
- #else
|
562
|
|
- UPDATE_ENDSTOP_BIT(X, MAX);
|
563
|
559
|
#endif
|
564
|
560
|
#endif
|
565
|
561
|
|
566
|
562
|
#if HAS_Y_MIN && !Y_SPI_SENSORLESS
|
|
563
|
+ UPDATE_ENDSTOP_BIT(Y, MIN);
|
567
|
564
|
#if ENABLED(Y_DUAL_ENDSTOPS)
|
568
|
|
- UPDATE_ENDSTOP_BIT(Y, MIN);
|
569
|
565
|
#if HAS_Y2_MIN
|
570
|
566
|
UPDATE_ENDSTOP_BIT(Y2, MIN);
|
571
|
567
|
#else
|
572
|
568
|
COPY_LIVE_STATE(Y_MIN, Y2_MIN);
|
573
|
569
|
#endif
|
574
|
|
- #else
|
575
|
|
- UPDATE_ENDSTOP_BIT(Y, MIN);
|
576
|
570
|
#endif
|
577
|
571
|
#endif
|
578
|
572
|
|
579
|
573
|
#if HAS_Y_MAX && !Y_SPI_SENSORLESS
|
|
574
|
+ UPDATE_ENDSTOP_BIT(Y, MAX);
|
580
|
575
|
#if ENABLED(Y_DUAL_ENDSTOPS)
|
581
|
|
- UPDATE_ENDSTOP_BIT(Y, MAX);
|
582
|
576
|
#if HAS_Y2_MAX
|
583
|
577
|
UPDATE_ENDSTOP_BIT(Y2, MAX);
|
584
|
578
|
#else
|
585
|
579
|
COPY_LIVE_STATE(Y_MAX, Y2_MAX);
|
586
|
580
|
#endif
|
587
|
|
- #else
|
588
|
|
- UPDATE_ENDSTOP_BIT(Y, MAX);
|
589
|
581
|
#endif
|
590
|
582
|
#endif
|
591
|
583
|
|
592
|
584
|
#if HAS_Z_MIN && !Z_SPI_SENSORLESS
|
|
585
|
+ UPDATE_ENDSTOP_BIT(Z, MIN);
|
593
|
586
|
#if Z_MULTI_ENDSTOPS
|
594
|
|
- UPDATE_ENDSTOP_BIT(Z, MIN);
|
595
|
587
|
#if HAS_Z2_MIN
|
596
|
588
|
UPDATE_ENDSTOP_BIT(Z2, MIN);
|
597
|
589
|
#else
|
|
@@ -604,15 +596,11 @@ void Endstops::update() {
|
604
|
596
|
COPY_LIVE_STATE(Z_MIN, Z3_MIN);
|
605
|
597
|
#endif
|
606
|
598
|
#endif
|
607
|
|
- #elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
608
|
|
- UPDATE_ENDSTOP_BIT(Z, MIN);
|
609
|
|
- #elif Z_HOME_DIR < 0
|
610
|
|
- UPDATE_ENDSTOP_BIT(Z, MIN);
|
611
|
599
|
#endif
|
612
|
600
|
#endif
|
613
|
601
|
|
614
|
602
|
// When closing the gap check the enabled probe
|
615
|
|
- #if USES_Z_MIN_PROBE_ENDSTOP
|
|
603
|
+ #if HAS_CUSTOM_PROBE_PIN
|
616
|
604
|
UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
|
617
|
605
|
#endif
|
618
|
606
|
|
|
@@ -632,7 +620,7 @@ void Endstops::update() {
|
632
|
620
|
COPY_LIVE_STATE(Z_MAX, Z3_MAX);
|
633
|
621
|
#endif
|
634
|
622
|
#endif
|
635
|
|
- #elif !USES_Z_MIN_PROBE_ENDSTOP || Z_MAX_PIN != Z_MIN_PROBE_PIN
|
|
623
|
+ #elif !HAS_CUSTOM_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN
|
636
|
624
|
// If this pin isn't the bed probe it's the Z endstop
|
637
|
625
|
UPDATE_ENDSTOP_BIT(Z, MAX);
|
638
|
626
|
#endif
|
|
@@ -765,7 +753,7 @@ void Endstops::update() {
|
765
|
753
|
#else
|
766
|
754
|
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
767
|
755
|
if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN);
|
768
|
|
- #elif USES_Z_MIN_PROBE_ENDSTOP
|
|
756
|
+ #elif HAS_CUSTOM_PROBE_PIN
|
769
|
757
|
if (!z_probe_enabled) PROCESS_ENDSTOP(Z, MIN);
|
770
|
758
|
#else
|
771
|
759
|
PROCESS_ENDSTOP(Z, MIN);
|
|
@@ -774,7 +762,7 @@ void Endstops::update() {
|
774
|
762
|
#endif
|
775
|
763
|
|
776
|
764
|
// When closing the gap check the enabled probe
|
777
|
|
- #if USES_Z_MIN_PROBE_ENDSTOP
|
|
765
|
+ #if HAS_CUSTOM_PROBE_PIN
|
778
|
766
|
if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN_PROBE);
|
779
|
767
|
#endif
|
780
|
768
|
}
|
|
@@ -784,7 +772,7 @@ void Endstops::update() {
|
784
|
772
|
PROCESS_TRIPLE_ENDSTOP(Z, Z2, Z3, MAX);
|
785
|
773
|
#elif ENABLED(Z_DUAL_ENDSTOPS)
|
786
|
774
|
PROCESS_DUAL_ENDSTOP(Z, Z2, MAX);
|
787
|
|
- #elif !USES_Z_MIN_PROBE_ENDSTOP || Z_MAX_PIN != Z_MIN_PROBE_PIN
|
|
775
|
+ #elif !HAS_CUSTOM_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN
|
788
|
776
|
// If this pin is not hijacked for the bed probe
|
789
|
777
|
// then it belongs to the Z endstop
|
790
|
778
|
PROCESS_ENDSTOP(Z, MAX);
|