|
@@ -674,6 +674,15 @@ void Endstops::update() {
|
674
|
674
|
} \
|
675
|
675
|
}while(0)
|
676
|
676
|
|
|
677
|
+ // Core Sensorless Homing needs to test an Extra Pin
|
|
678
|
+ #define CORE_DIAG(QQ,A,MM) (CORE_IS_##QQ && A##_SENSORLESS && !A##_SPI_SENSORLESS && HAS_##A##_##MM)
|
|
679
|
+ #define PROCESS_CORE_ENDSTOP(A1,M1,A2,M2) do { \
|
|
680
|
+ if (TEST_ENDSTOP(_ENDSTOP(A1,M1))) { \
|
|
681
|
+ _ENDSTOP_HIT(A2,M2); \
|
|
682
|
+ planner.endstop_triggered(_AXIS(A2)); \
|
|
683
|
+ } \
|
|
684
|
+ }while(0)
|
|
685
|
+
|
677
|
686
|
// Call the endstop triggered routine for dual endstops
|
678
|
687
|
#define PROCESS_DUAL_ENDSTOP(A, MINMAX) do { \
|
679
|
688
|
const byte dual_hit = TEST_ENDSTOP(_ENDSTOP(A, MINMAX)) | (TEST_ENDSTOP(_ENDSTOP(A##2, MINMAX)) << 1); \
|
|
@@ -748,11 +757,29 @@ void Endstops::update() {
|
748
|
757
|
if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction
|
749
|
758
|
#if HAS_X_MIN || (X_SPI_SENSORLESS && X_HOME_DIR < 0)
|
750
|
759
|
PROCESS_ENDSTOP_X(MIN);
|
|
760
|
+ #if CORE_DIAG(XY, Y, MIN)
|
|
761
|
+ PROCESS_CORE_ENDSTOP(Y,MIN,X,MIN);
|
|
762
|
+ #elif CORE_DIAG(XY, Y, MAX)
|
|
763
|
+ PROCESS_CORE_ENDSTOP(Y,MAX,X,MIN);
|
|
764
|
+ #elif CORE_DIAG(XZ, Z, MIN)
|
|
765
|
+ PROCESS_CORE_ENDSTOP(Z,MIN,X,MIN);
|
|
766
|
+ #elif CORE_DIAG(XZ, Z, MAX)
|
|
767
|
+ PROCESS_CORE_ENDSTOP(Z,MAX,X,MIN);
|
|
768
|
+ #endif
|
751
|
769
|
#endif
|
752
|
770
|
}
|
753
|
771
|
else { // +direction
|
754
|
772
|
#if HAS_X_MAX || (X_SPI_SENSORLESS && X_HOME_DIR > 0)
|
755
|
773
|
PROCESS_ENDSTOP_X(MAX);
|
|
774
|
+ #if CORE_DIAG(XY, Y, MIN)
|
|
775
|
+ PROCESS_CORE_ENDSTOP(Y,MIN,X,MAX);
|
|
776
|
+ #elif CORE_DIAG(XY, Y, MAX)
|
|
777
|
+ PROCESS_CORE_ENDSTOP(Y,MAX,X,MAX);
|
|
778
|
+ #elif CORE_DIAG(XZ, Z, MIN)
|
|
779
|
+ PROCESS_CORE_ENDSTOP(Z,MIN,X,MAX);
|
|
780
|
+ #elif CORE_DIAG(XZ, Z, MAX)
|
|
781
|
+ PROCESS_CORE_ENDSTOP(Z,MAX,X,MAX);
|
|
782
|
+ #endif
|
756
|
783
|
#endif
|
757
|
784
|
}
|
758
|
785
|
}
|
|
@@ -761,11 +788,29 @@ void Endstops::update() {
|
761
|
788
|
if (stepper.motor_direction(Y_AXIS_HEAD)) { // -direction
|
762
|
789
|
#if HAS_Y_MIN || (Y_SPI_SENSORLESS && Y_HOME_DIR < 0)
|
763
|
790
|
PROCESS_ENDSTOP_Y(MIN);
|
|
791
|
+ #if CORE_DIAG(XY, X, MIN)
|
|
792
|
+ PROCESS_CORE_ENDSTOP(X,MIN,Y,MIN);
|
|
793
|
+ #elif CORE_DIAG(XY, X, MAX)
|
|
794
|
+ PROCESS_CORE_ENDSTOP(X,MAX,Y,MIN);
|
|
795
|
+ #elif CORE_DIAG(YZ, Z, MIN)
|
|
796
|
+ PROCESS_CORE_ENDSTOP(Z,MIN,Y,MIN);
|
|
797
|
+ #elif CORE_DIAG(YZ, Z, MAX)
|
|
798
|
+ PROCESS_CORE_ENDSTOP(Z,MAX,Y,MIN);
|
|
799
|
+ #endif
|
764
|
800
|
#endif
|
765
|
801
|
}
|
766
|
802
|
else { // +direction
|
767
|
803
|
#if HAS_Y_MAX || (Y_SPI_SENSORLESS && Y_HOME_DIR > 0)
|
768
|
804
|
PROCESS_ENDSTOP_Y(MAX);
|
|
805
|
+ #if CORE_DIAG(XY, X, MIN)
|
|
806
|
+ PROCESS_CORE_ENDSTOP(X,MIN,Y,MAX);
|
|
807
|
+ #elif CORE_DIAG(XY, X, MAX)
|
|
808
|
+ PROCESS_CORE_ENDSTOP(X,MAX,Y,MAX);
|
|
809
|
+ #elif CORE_DIAG(YZ, Z, MIN)
|
|
810
|
+ PROCESS_CORE_ENDSTOP(Z,MIN,Y,MAX);
|
|
811
|
+ #elif CORE_DIAG(YZ, Z, MAX)
|
|
812
|
+ PROCESS_CORE_ENDSTOP(Z,MAX,Y,MAX);
|
|
813
|
+ #endif
|
769
|
814
|
#endif
|
770
|
815
|
}
|
771
|
816
|
}
|
|
@@ -777,6 +822,15 @@ void Endstops::update() {
|
777
|
822
|
if ( TERN1(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, z_probe_enabled)
|
778
|
823
|
&& TERN1(HAS_CUSTOM_PROBE_PIN, !z_probe_enabled)
|
779
|
824
|
) PROCESS_ENDSTOP_Z(MIN);
|
|
825
|
+ #if CORE_DIAG(XZ, X, MIN)
|
|
826
|
+ PROCESS_CORE_ENDSTOP(X,MIN,Z,MIN);
|
|
827
|
+ #elif CORE_DIAG(XZ, X, MAX)
|
|
828
|
+ PROCESS_CORE_ENDSTOP(X,MAX,Z,MIN);
|
|
829
|
+ #elif CORE_DIAG(YZ, Y, MIN)
|
|
830
|
+ PROCESS_CORE_ENDSTOP(Y,MIN,Z,MIN);
|
|
831
|
+ #elif CORE_DIAG(YZ, Y, MAX)
|
|
832
|
+ PROCESS_CORE_ENDSTOP(Y,MAX,Z,MIN);
|
|
833
|
+ #endif
|
780
|
834
|
#endif
|
781
|
835
|
|
782
|
836
|
// When closing the gap check the enabled probe
|
|
@@ -791,6 +845,15 @@ void Endstops::update() {
|
791
|
845
|
#elif !HAS_CUSTOM_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN // No probe or probe is Z_MIN || Probe is not Z_MAX
|
792
|
846
|
PROCESS_ENDSTOP(Z, MAX);
|
793
|
847
|
#endif
|
|
848
|
+ #if CORE_DIAG(XZ, X, MIN)
|
|
849
|
+ PROCESS_CORE_ENDSTOP(X,MIN,Z,MAX);
|
|
850
|
+ #elif CORE_DIAG(XZ, X, MAX)
|
|
851
|
+ PROCESS_CORE_ENDSTOP(X,MAX,Z,MAX);
|
|
852
|
+ #elif CORE_DIAG(YZ, Y, MIN)
|
|
853
|
+ PROCESS_CORE_ENDSTOP(Y,MIN,Z,MAX);
|
|
854
|
+ #elif CORE_DIAG(YZ, Y, MAX)
|
|
855
|
+ PROCESS_CORE_ENDSTOP(Y,MAX,Z,MAX);
|
|
856
|
+ #endif
|
794
|
857
|
#endif
|
795
|
858
|
}
|
796
|
859
|
}
|