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
 #if _HAS_STOP(Z,MAX)
1587
 #if _HAS_STOP(Z,MAX)
1588
   #define HAS_Z_MAX 1
1588
   #define HAS_Z_MAX 1
1589
 #endif
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
 #if PIN_EXISTS(X2_MIN)
1599
 #if PIN_EXISTS(X2_MIN)
1591
   #define HAS_X2_MIN 1
1600
   #define HAS_X2_MIN 1
1592
 #endif
1601
 #endif

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

742
     }
742
     }
743
   #endif
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
   if (stepper.axis_is_moving(X_AXIS)) {
747
   if (stepper.axis_is_moving(X_AXIS)) {
747
     if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction
748
     if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction
748
       #if HAS_X_MIN || (X_SPI_SENSORLESS && X_HOME_DIR < 0)
749
       #if HAS_X_MIN || (X_SPI_SENSORLESS && X_HOME_DIR < 0)
804
   bool Endstops::tmc_spi_homing_check() {
805
   bool Endstops::tmc_spi_homing_check() {
805
     bool hit = false;
806
     bool hit = false;
806
     #if X_SPI_SENSORLESS
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
         SBI(live_state, X_STOP);
815
         SBI(live_state, X_STOP);
809
         hit = true;
816
         hit = true;
810
       }
817
       }
811
     #endif
818
     #endif
812
     #if Y_SPI_SENSORLESS
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
         SBI(live_state, Y_STOP);
827
         SBI(live_state, Y_STOP);
815
         hit = true;
828
         hit = true;
816
       }
829
       }
817
     #endif
830
     #endif
818
     #if Z_SPI_SENSORLESS
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
         SBI(live_state, Z_STOP);
839
         SBI(live_state, Z_STOP);
821
         hit = true;
840
         hit = true;
822
       }
841
       }

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

83
 # opt_set NUM_SERVOS 1
83
 # opt_set NUM_SERVOS 1
84
 # opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
84
 # opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
85
 # exec_test $1 $2 "SWITCHING_EXTRUDER"
85
 # exec_test $1 $2 "SWITCHING_EXTRUDER"
86
+
86
 #
87
 #
87
 # Enable COREXY
88
 # Enable COREXY
88
 #
89
 #
89
 restore_configs
90
 restore_configs
90
 opt_set MOTHERBOARD BOARD_TEENSY35_36
91
 opt_set MOTHERBOARD BOARD_TEENSY35_36
91
 opt_enable COREXY
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
 # Enable COREXZ
96
 # Enable COREXZ
97
 restore_configs
98
 restore_configs
98
 opt_set MOTHERBOARD BOARD_TEENSY35_36
99
 opt_set MOTHERBOARD BOARD_TEENSY35_36
99
 opt_enable COREXZ
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
 # Enable Dual Z with Dual Z endstops
104
 # Enable Dual Z with Dual Z endstops

Loading…
Cancel
Save