|
@@ -1941,7 +1941,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
|
1941
|
1941
|
#endif
|
1942
|
1942
|
|
1943
|
1943
|
// Delta and Cartesian use 3 homing endstops
|
1944
|
|
-#if !IS_SCARA
|
|
1944
|
+#if NONE(IS_SCARA, SPI_ENDSTOPS)
|
1945
|
1945
|
#if X_HOME_DIR < 0 && DISABLED(USE_XMIN_PLUG)
|
1946
|
1946
|
#error "Enable USE_XMIN_PLUG when homing X to MIN."
|
1947
|
1947
|
#elif X_HOME_DIR > 0 && DISABLED(USE_XMAX_PLUG)
|
|
@@ -2510,56 +2510,68 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
|
2510
|
2510
|
#define Y_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(Y,TMC2209)
|
2511
|
2511
|
#define Z_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(Z,TMC2209)
|
2512
|
2512
|
|
2513
|
|
- #if ENABLED(DELTA) && !BOTH(STEALTHCHOP_XY, STEALTHCHOP_Z)
|
2514
|
|
- #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP_XY and STEALTHCHOP_Z."
|
2515
|
|
- #elif X_SENSORLESS && X_HOME_DIR < 0 && NONE(ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS, ENDSTOPPULLUP_XMIN)
|
2516
|
|
- #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMIN (or ENDSTOPPULLUPS) when homing to X_MIN."
|
2517
|
|
- #elif X_SENSORLESS && X_HOME_DIR > 0 && NONE(ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS, ENDSTOPPULLUP_XMAX)
|
2518
|
|
- #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMAX (or ENDSTOPPULLUPS) when homing to X_MAX."
|
2519
|
|
- #elif Y_SENSORLESS && Y_HOME_DIR < 0 && NONE(ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS, ENDSTOPPULLUP_YMIN)
|
2520
|
|
- #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMIN (or ENDSTOPPULLUPS) when homing to Y_MIN."
|
2521
|
|
- #elif Y_SENSORLESS && Y_HOME_DIR > 0 && NONE(ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS, ENDSTOPPULLUP_YMAX)
|
2522
|
|
- #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMAX (or ENDSTOPPULLUPS) when homing to Y_MAX."
|
2523
|
|
- #elif Z_SENSORLESS && Z_HOME_DIR < 0 && NONE(ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMIN)
|
2524
|
|
- #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMIN (or ENDSTOPPULLUPS) when homing to Z_MIN."
|
2525
|
|
- #elif Z_SENSORLESS && Z_HOME_DIR > 0 && NONE(ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMAX)
|
2526
|
|
- #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMAX (or ENDSTOPPULLUPS) when homing to Z_MAX."
|
2527
|
|
- #elif X_SENSORLESS && X_HOME_DIR < 0 && X_MIN_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING
|
2528
|
|
- #if X_ENDSTOP_INVERTING
|
2529
|
|
- #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = true when homing to X_MIN."
|
2530
|
|
- #else
|
2531
|
|
- #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to X_MIN."
|
2532
|
|
- #endif
|
2533
|
|
- #elif X_SENSORLESS && X_HOME_DIR > 0 && X_MAX_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING
|
2534
|
|
- #if X_ENDSTOP_INVERTING
|
2535
|
|
- #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = true when homing to X_MAX."
|
2536
|
|
- #else
|
2537
|
|
- #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to X_MAX."
|
2538
|
|
- #endif
|
2539
|
|
- #elif Y_SENSORLESS && Y_HOME_DIR < 0 && Y_MIN_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING
|
2540
|
|
- #if Y_ENDSTOP_INVERTING
|
2541
|
|
- #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = true when homing to Y_MIN."
|
2542
|
|
- #else
|
2543
|
|
- #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MIN."
|
2544
|
|
- #endif
|
2545
|
|
- #elif Y_SENSORLESS && Y_HOME_DIR > 0 && Y_MAX_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING
|
2546
|
|
- #if Y_ENDSTOP_INVERTING
|
2547
|
|
- #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = true when homing to Y_MAX."
|
2548
|
|
- #else
|
2549
|
|
- #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MAX."
|
|
2513
|
+ #if NONE(SPI_ENDSTOPS, ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS)
|
|
2514
|
+ #if X_SENSORLESS && X_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUP_XMIN)
|
|
2515
|
+ #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMIN (or ENDSTOPPULLUPS) when homing to X_MIN."
|
|
2516
|
+ #elif X_SENSORLESS && X_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUP_XMAX)
|
|
2517
|
+ #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMAX (or ENDSTOPPULLUPS) when homing to X_MAX."
|
|
2518
|
+ #elif Y_SENSORLESS && Y_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUP_YMIN)
|
|
2519
|
+ #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMIN (or ENDSTOPPULLUPS) when homing to Y_MIN."
|
|
2520
|
+ #elif Y_SENSORLESS && Y_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUP_YMAX)
|
|
2521
|
+ #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMAX (or ENDSTOPPULLUPS) when homing to Y_MAX."
|
|
2522
|
+ #elif Z_SENSORLESS && Z_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUP_ZMIN)
|
|
2523
|
+ #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMIN (or ENDSTOPPULLUPS) when homing to Z_MIN."
|
|
2524
|
+ #elif Z_SENSORLESS && Z_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUP_ZMAX)
|
|
2525
|
+ #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMAX (or ENDSTOPPULLUPS) when homing to Z_MAX."
|
2550
|
2526
|
#endif
|
2551
|
|
- #elif Z_SENSORLESS && Z_HOME_DIR < 0 && Z_MIN_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING
|
2552
|
|
- #if Z_ENDSTOP_INVERTING
|
2553
|
|
- #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = true when homing to Z_MIN."
|
2554
|
|
- #else
|
2555
|
|
- #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MIN."
|
|
2527
|
+ #endif
|
|
2528
|
+
|
|
2529
|
+ #if ENABLED(SPI_ENDSTOPS)
|
|
2530
|
+ #if ENABLED(QUICK_HOME)
|
|
2531
|
+ #warning "SPI_ENDSTOPS may be unreliable with QUICK_HOME. Adjust back-offs for better results."
|
2556
|
2532
|
#endif
|
2557
|
|
- #elif Z_SENSORLESS && Z_HOME_DIR > 0 && Z_MAX_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING
|
2558
|
|
- #if Z_ENDSTOP_INVERTING
|
2559
|
|
- #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = true when homing to Z_MAX."
|
2560
|
|
- #else
|
2561
|
|
- #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MAX."
|
|
2533
|
+ #else
|
|
2534
|
+ #if X_SENSORLESS && X_HOME_DIR < 0 && X_MIN_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING
|
|
2535
|
+ #if X_ENDSTOP_INVERTING
|
|
2536
|
+ #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = true when homing to X_MIN."
|
|
2537
|
+ #else
|
|
2538
|
+ #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to X_MIN."
|
|
2539
|
+ #endif
|
|
2540
|
+ #elif X_SENSORLESS && X_HOME_DIR > 0 && X_MAX_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING
|
|
2541
|
+ #if X_ENDSTOP_INVERTING
|
|
2542
|
+ #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = true when homing to X_MAX."
|
|
2543
|
+ #else
|
|
2544
|
+ #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to X_MAX."
|
|
2545
|
+ #endif
|
|
2546
|
+ #elif Y_SENSORLESS && Y_HOME_DIR < 0 && Y_MIN_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING
|
|
2547
|
+ #if Y_ENDSTOP_INVERTING
|
|
2548
|
+ #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = true when homing to Y_MIN."
|
|
2549
|
+ #else
|
|
2550
|
+ #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MIN."
|
|
2551
|
+ #endif
|
|
2552
|
+ #elif Y_SENSORLESS && Y_HOME_DIR > 0 && Y_MAX_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING
|
|
2553
|
+ #if Y_ENDSTOP_INVERTING
|
|
2554
|
+ #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = true when homing to Y_MAX."
|
|
2555
|
+ #else
|
|
2556
|
+ #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MAX."
|
|
2557
|
+ #endif
|
|
2558
|
+ #elif Z_SENSORLESS && Z_HOME_DIR < 0 && Z_MIN_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING
|
|
2559
|
+ #if Z_ENDSTOP_INVERTING
|
|
2560
|
+ #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = true when homing to Z_MIN."
|
|
2561
|
+ #else
|
|
2562
|
+ #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MIN."
|
|
2563
|
+ #endif
|
|
2564
|
+ #elif Z_SENSORLESS && Z_HOME_DIR > 0 && Z_MAX_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING
|
|
2565
|
+ #if Z_ENDSTOP_INVERTING
|
|
2566
|
+ #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = true when homing to Z_MAX."
|
|
2567
|
+ #else
|
|
2568
|
+ #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MAX."
|
|
2569
|
+ #endif
|
2562
|
2570
|
#endif
|
|
2571
|
+ #endif
|
|
2572
|
+
|
|
2573
|
+ #if ENABLED(DELTA) && !BOTH(STEALTHCHOP_XY, STEALTHCHOP_Z)
|
|
2574
|
+ #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP_XY and STEALTHCHOP_Z."
|
2563
|
2575
|
#elif ENDSTOP_NOISE_THRESHOLD
|
2564
|
2576
|
#error "SENSORLESS_HOMING is incompatible with ENDSTOP_NOISE_THRESHOLD."
|
2565
|
2577
|
#elif !(X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS)
|