@@ -1682,7 +1682,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
1682
1682
* Allen Key
1683
1683
* Deploying the Allen Key probe uses big moves in z direction. Too dangerous for an unhomed z-axis.
1684
1684
*/
1685
- #if BOTH( Z_PROBE_ALLEN_KEY, Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && Z_HOME_DIR < 0
1685
+ #if ALL(Z_HOME_TO_MIN, Z_PROBE_ALLEN_KEY, Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
1686
1686
#error "You can't home to a Z min endstop with a Z_PROBE_ALLEN_KEY."
1687
1687
#endif
1688
1688
@@ -1700,7 +1700,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
1700
1700
#error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop."
1701
1701
#elif !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS)
1702
1702
#error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS."
1703
- #elif X_HOME_DIR != -1 || X2_HOME_DIR != 1
1703
+ #elif X_HOME_TO_MAX || X2_HOME_TO_MIN
1704
1704
#error "DUAL_X_CARRIAGE requires X_HOME_DIR -1 and X2_HOME_DIR 1."
1705
1705
#endif
1706
1706
#endif
@@ -2089,25 +2089,25 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
2089
2089
2090
2090
// Delta and Cartesian use 3 homing endstops
2091
2091
#if NONE(IS_SCARA, SPI_ENDSTOPS)
2092
- #if X_HOME_DIR < 0 && DISABLED(USE_XMIN_PLUG)
2092
+ #if X_HOME_TO_MIN && DISABLED(USE_XMIN_PLUG)
2093
2093
#error "Enable USE_XMIN_PLUG when homing X to MIN."
2094
- #elif X_HOME_DIR > 0 && DISABLED(USE_XMAX_PLUG)
2094
+ #elif X_HOME_TO_MAX && DISABLED(USE_XMAX_PLUG)
2095
2095
#error "Enable USE_XMAX_PLUG when homing X to MAX."
2096
- #elif Y_HOME_DIR < 0 && DISABLED(USE_YMIN_PLUG)
2096
+ #elif Y_HOME_TO_MIN && DISABLED(USE_YMIN_PLUG)
2097
2097
#error "Enable USE_YMIN_PLUG when homing Y to MIN."
2098
- #elif Y_HOME_DIR > 0 && DISABLED(USE_YMAX_PLUG)
2098
+ #elif Y_HOME_TO_MAX && DISABLED(USE_YMAX_PLUG)
2099
2099
#error "Enable USE_YMAX_PLUG when homing Y to MAX."
2100
2100
#endif
2101
2101
#endif
2102
2102
2103
2103
// Z homing direction and plug usage flags
2104
- #if Z_HOME_DIR < 0 && NONE(USE_ZMIN_PLUG, HOMING_Z_WITH_PROBE)
2104
+ #if Z_HOME_TO_MIN && NONE(USE_ZMIN_PLUG, HOMING_Z_WITH_PROBE)
2105
2105
#error "Enable USE_ZMIN_PLUG when homing Z to MIN."
2106
- #elif Z_HOME_DIR > 0 && ENABLED(USE_PROBE_FOR_Z_HOMING)
2106
+ #elif Z_HOME_TO_MAX && ENABLED(USE_PROBE_FOR_Z_HOMING)
2107
2107
#error "Z_HOME_DIR must be -1 when homing Z with the probe."
2108
2108
#elif BOTH(HOMING_Z_WITH_PROBE, Z_MULTI_ENDSTOPS)
2109
2109
#error "Z_MULTI_ENDSTOPS is incompatible with USE_PROBE_FOR_Z_HOMING."
2110
- #elif Z_HOME_DIR > 0 && DISABLED(USE_ZMAX_PLUG)
2110
+ #elif Z_HOME_TO_MAX && DISABLED(USE_ZMAX_PLUG)
2111
2111
#error "Enable USE_ZMAX_PLUG when homing Z to MAX."
2112
2112
#endif
2113
2113
#endif
@@ -2630,17 +2630,17 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
2630
2630
#define Z_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(Z,TMC2209)
2631
2631
2632
2632
#if NONE(SPI_ENDSTOPS, ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS)
2633
- #if X_SENSORLESS && X_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUP_XMIN)
2633
+ #if X_SENSORLESS && X_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_XMIN)
2634
2634
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMIN (or ENDSTOPPULLUPS) when homing to X_MIN."
2635
- #elif X_SENSORLESS && X_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUP_XMAX)
2635
+ #elif X_SENSORLESS && X_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_XMAX)
2636
2636
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMAX (or ENDSTOPPULLUPS) when homing to X_MAX."
2637
- #elif Y_SENSORLESS && Y_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUP_YMIN)
2637
+ #elif Y_SENSORLESS && Y_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_YMIN)
2638
2638
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMIN (or ENDSTOPPULLUPS) when homing to Y_MIN."
2639
- #elif Y_SENSORLESS && Y_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUP_YMAX)
2639
+ #elif Y_SENSORLESS && Y_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_YMAX)
2640
2640
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMAX (or ENDSTOPPULLUPS) when homing to Y_MAX."
2641
- #elif Z_SENSORLESS && Z_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUP_ZMIN)
2641
+ #elif Z_SENSORLESS && Z_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_ZMIN)
2642
2642
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMIN (or ENDSTOPPULLUPS) when homing to Z_MIN."
2643
- #elif Z_SENSORLESS && Z_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUP_ZMAX)
2643
+ #elif Z_SENSORLESS && Z_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_ZMAX)
2644
2644
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMAX (or ENDSTOPPULLUPS) when homing to Z_MAX."
2645
2645
#endif
2646
2646
#endif
@@ -2650,37 +2650,37 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
2650
2650
#warning "SPI_ENDSTOPS may be unreliable with QUICK_HOME. Adjust back-offs for better results."
2651
2651
#endif
2652
2652
#else
2653
- #if X_SENSORLESS && X_HOME_DIR < 0 && X_MIN_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING
2653
+ #if X_SENSORLESS && X_HOME_TO_MIN && X_MIN_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING
2654
2654
#if X_ENDSTOP_INVERTING
2655
2655
#error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = true when homing to X_MIN."
2656
2656
#else
2657
2657
#error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to X_MIN."
2658
2658
#endif
2659
- #elif X_SENSORLESS && X_HOME_DIR > 0 && X_MAX_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING
2659
+ #elif X_SENSORLESS && X_HOME_TO_MAX && X_MAX_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING
2660
2660
#if X_ENDSTOP_INVERTING
2661
2661
#error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = true when homing to X_MAX."
2662
2662
#else
2663
2663
#error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to X_MAX."
2664
2664
#endif
2665
- #elif Y_SENSORLESS && Y_HOME_DIR < 0 && Y_MIN_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING
2665
+ #elif Y_SENSORLESS && Y_HOME_TO_MIN && Y_MIN_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING
2666
2666
#if Y_ENDSTOP_INVERTING
2667
2667
#error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = true when homing to Y_MIN."
2668
2668
#else
2669
2669
#error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MIN."
2670
2670
#endif
2671
- #elif Y_SENSORLESS && Y_HOME_DIR > 0 && Y_MAX_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING
2671
+ #elif Y_SENSORLESS && Y_HOME_TO_MAX && Y_MAX_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING
2672
2672
#if Y_ENDSTOP_INVERTING
2673
2673
#error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = true when homing to Y_MAX."
2674
2674
#else
2675
2675
#error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MAX."
2676
2676
#endif
2677
- #elif Z_SENSORLESS && Z_HOME_DIR < 0 && Z_MIN_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING
2677
+ #elif Z_SENSORLESS && Z_HOME_TO_MIN && Z_MIN_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING
2678
2678
#if Z_ENDSTOP_INVERTING
2679
2679
#error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = true when homing to Z_MIN."
2680
2680
#else
2681
2681
#error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MIN."
2682
2682
#endif
2683
- #elif Z_SENSORLESS && Z_HOME_DIR > 0 && Z_MAX_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING
2683
+ #elif Z_SENSORLESS && Z_HOME_TO_MAX && Z_MAX_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING
2684
2684
#if Z_ENDSTOP_INVERTING
2685
2685
#error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = true when homing to Z_MAX."
2686
2686
#else
@@ -2918,9 +2918,9 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
2918
2918
#error "POWER_LOSS_RECOVER_ZHOME cannot be used with Z_SAFE_HOMING."
2919
2919
#elif BOTH(POWER_LOSS_PULLUP, POWER_LOSS_PULLDOWN)
2920
2920
#error "You can't enable POWER_LOSS_PULLUP and POWER_LOSS_PULLDOWN at the same time."
2921
- #elif ENABLED(POWER_LOSS_RECOVER_ZHOME) && Z_HOME_DIR > 0
2921
+ #elif ENABLED(POWER_LOSS_RECOVER_ZHOME) && Z_HOME_TO_MAX
2922
2922
#error "POWER_LOSS_RECOVER_ZHOME is not needed on a machine that homes to ZMAX."
2923
- #elif BOTH(IS_CARTESIAN, POWER_LOSS_RECOVER_ZHOME) && Z_HOME_DIR < 0 && !defined(POWER_LOSS_ZHOME_POS)
2923
+ #elif BOTH(IS_CARTESIAN, POWER_LOSS_RECOVER_ZHOME) && Z_HOME_TO_MIN && !defined(POWER_LOSS_ZHOME_POS)
2924
2924
#error "POWER_LOSS_RECOVER_ZHOME requires POWER_LOSS_ZHOME_POS for a Cartesian that homes to ZMIN."
2925
2925
#endif
2926
2926
#endif
0 commit comments