Browse Source

SKR 1.3 sensorless endstops hack (#16659)

ellensp 5 years ago
parent
commit
0949c0f326
1 changed files with 14 additions and 15 deletions
  1. 14
    15
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h

+ 14
- 15
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h View File

25
 
25
 
26
 /**
26
 /**
27
  * Limit Switches
27
  * Limit Switches
28
- *
29
- * For Stallguard homing to max swap the min / max pins so
30
- * the MAX physical connectors can be used for other things.
31
  */
28
  */
32
-#if X_HOME_DIR == -1 || !X_STALL_SENSITIVITY
29
+#if X_HOME_DIR > 0 && X_STALL_SENSITIVITY && !defined(USE_XMAX_PLUG)
30
+  // For StallGuard homing to MAX swap the MIN / MAX pins
31
+  // so the MAX physical connectors may be used for other things.
32
+  #define X_MIN_PIN          P1_28   // X_MAX (free)
33
+  #define X_MAX_PIN          P1_29   // X_MIN
34
+#else                                // else, non-endstop is free and appears in M43 output
33
   #define X_MIN_PIN          P1_29   // X_MIN
35
   #define X_MIN_PIN          P1_29   // X_MIN
34
   #define X_MAX_PIN          P1_28   // X_MAX
36
   #define X_MAX_PIN          P1_28   // X_MAX
35
-#else
36
-  #define X_MIN_PIN          P1_28   // X_MAX
37
-  #define X_MAX_PIN          P1_29   // X_MIN
38
 #endif
37
 #endif
39
 
38
 
40
-#if Y_HOME_DIR == -1 || !Y_STALL_SENSITIVITY
39
+#if Y_HOME_DIR > 0 && Y_STALL_SENSITIVITY && !defined(USE_YMAX_PLUG)
40
+  #define Y_MIN_PIN          P1_26   // Y_MAX (free)
41
+  #define Y_MAX_PIN          P1_27   // Y_MIN
42
+#else
41
   #define Y_MIN_PIN          P1_27   // Y_MIN
43
   #define Y_MIN_PIN          P1_27   // Y_MIN
42
   #define Y_MAX_PIN          P1_26   // Y_MAX
44
   #define Y_MAX_PIN          P1_26   // Y_MAX
43
-#else
44
-  #define Y_MIN_PIN          P1_26   // Y_MAX
45
-  #define Y_MAX_PIN          P1_27   // Y_MIN
46
 #endif
45
 #endif
47
 
46
 
48
-#if Z_HOME_DIR == -1 || !Z_STALL_SENSITIVITY
47
+#if Z_HOME_DIR > 0 && Z_STALL_SENSITIVITY && !defined(USE_ZMAX_PLUG)
48
+  #define Z_MIN_PIN          P1_24   // Z_MAX (free)
49
+  #define Z_MAX_PIN          P1_25   // Z_MIN
50
+#else
49
   #define Z_MIN_PIN          P1_25   // Z_MIN
51
   #define Z_MIN_PIN          P1_25   // Z_MIN
50
   #define Z_MAX_PIN          P1_24   // Z_MAX
52
   #define Z_MAX_PIN          P1_24   // Z_MAX
51
-#else
52
-  #define Z_MIN_PIN          P1_24   // Z_MAX
53
-  #define Z_MAX_PIN          P1_25   // Z_MIN
54
 #endif
53
 #endif
55
 
54
 
56
 #define ONBOARD_ENDSTOPPULLUPS     // Board has built-in pullups
55
 #define ONBOARD_ENDSTOPPULLUPS     // Board has built-in pullups

Loading…
Cancel
Save