Browse Source

CoreXY sensorless homing (#17972)

Scott Lahteine 4 years ago
parent
commit
6ae7a40f99
No account linked to committer's email address

+ 9
- 0
Marlin/src/inc/Conditionals_post.h View File

@@ -1587,6 +1587,15 @@
1587 1587
 #if _HAS_STOP(Z,MAX)
1588 1588
   #define HAS_Z_MAX 1
1589 1589
 #endif
1590
+#if _HAS_STOP(X,STOP)
1591
+  #define HAS_X_STOP 1
1592
+#endif
1593
+#if _HAS_STOP(Y,STOP)
1594
+  #define HAS_Y_STOP 1
1595
+#endif
1596
+#if _HAS_STOP(Z,STOP)
1597
+  #define HAS_Z_STOP 1
1598
+#endif
1590 1599
 #if PIN_EXISTS(X2_MIN)
1591 1600
   #define HAS_X2_MIN 1
1592 1601
 #endif

+ 23
- 4
Marlin/src/module/endstops.cpp View File

@@ -742,7 +742,8 @@ void Endstops::update() {
742 742
     }
743 743
   #endif
744 744
 
745
-  // Now, we must signal, after validation, if an endstop limit is pressed or not
745
+  // Signal, after validation, if an endstop limit is pressed or not
746
+
746 747
   if (stepper.axis_is_moving(X_AXIS)) {
747 748
     if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction
748 749
       #if HAS_X_MIN || (X_SPI_SENSORLESS && X_HOME_DIR < 0)
@@ -804,19 +805,37 @@ void Endstops::update() {
804 805
   bool Endstops::tmc_spi_homing_check() {
805 806
     bool hit = false;
806 807
     #if X_SPI_SENSORLESS
807
-      if (tmc_spi_homing.x && stepperX.test_stall_status()) {
808
+      if (tmc_spi_homing.x && (stepperX.test_stall_status()
809
+        #if CORE_IS_XY && Y_SPI_SENSORLESS
810
+          || stepperY.test_stall_status()
811
+        #elif CORE_IS_XZ && Z_SPI_SENSORLESS
812
+          || stepperZ.test_stall_status()
813
+        #endif
814
+      )) {
808 815
         SBI(live_state, X_STOP);
809 816
         hit = true;
810 817
       }
811 818
     #endif
812 819
     #if Y_SPI_SENSORLESS
813
-      if (tmc_spi_homing.y && stepperY.test_stall_status()) {
820
+      if (tmc_spi_homing.y && (stepperY.test_stall_status()
821
+        #if CORE_IS_XY && X_SPI_SENSORLESS
822
+          || stepperX.test_stall_status()
823
+        #elif CORE_IS_YZ && Z_SPI_SENSORLESS
824
+          || stepperZ.test_stall_status()
825
+        #endif
826
+      )) {
814 827
         SBI(live_state, Y_STOP);
815 828
         hit = true;
816 829
       }
817 830
     #endif
818 831
     #if Z_SPI_SENSORLESS
819
-      if (tmc_spi_homing.z && stepperZ.test_stall_status()) {
832
+      if (tmc_spi_homing.z && (stepperZ.test_stall_status()
833
+        #if CORE_IS_XZ && X_SPI_SENSORLESS
834
+          || stepperX.test_stall_status()
835
+        #elif CORE_IS_YZ && Y_SPI_SENSORLESS
836
+          || stepperY.test_stall_status()
837
+        #endif
838
+      )) {
820 839
         SBI(live_state, Z_STOP);
821 840
         hit = true;
822 841
       }

+ 3
- 2
buildroot/share/tests/teensy35-tests View File

@@ -83,13 +83,14 @@ exec_test $1 $2 "Mixing Extruder"
83 83
 # opt_set NUM_SERVOS 1
84 84
 # opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
85 85
 # exec_test $1 $2 "SWITCHING_EXTRUDER"
86
+
86 87
 #
87 88
 # Enable COREXY
88 89
 #
89 90
 restore_configs
90 91
 opt_set MOTHERBOARD BOARD_TEENSY35_36
91 92
 opt_enable COREXY
92
-exec_test $1 $2 "COREXY"
93
+exec_test $1 $2 "Teensy 3.5/3.6 COREXY"
93 94
 
94 95
 #
95 96
 # Enable COREXZ
@@ -97,7 +98,7 @@ exec_test $1 $2 "COREXY"
97 98
 restore_configs
98 99
 opt_set MOTHERBOARD BOARD_TEENSY35_36
99 100
 opt_enable COREXZ
100
-exec_test $1 $2 "COREXZ"
101
+exec_test $1 $2 "Teensy 3.5/3.6 COREXZ"
101 102
 
102 103
 #
103 104
 # Enable Dual Z with Dual Z endstops

Loading…
Cancel
Save