Browse Source

Add HOMING_Z_WITH_PROBE conditional

Scott Lahteine 8 years ago
parent
commit
7e20448a2d
2 changed files with 4 additions and 2 deletions
  1. 2
    0
      Marlin/Conditionals_post.h
  2. 2
    2
      Marlin/Marlin_main.cpp

+ 2
- 0
Marlin/Conditionals_post.h View File

127
    */
127
    */
128
   #define HAS_PROBING_PROCEDURE (ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
128
   #define HAS_PROBING_PROCEDURE (ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
129
 
129
 
130
+  #define HOMING_Z_WITH_PROBE (HAS_BED_PROBE && Z_HOME_DIR < 0 && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN))
131
+
130
   // Boundaries for probing based on set limits
132
   // Boundaries for probing based on set limits
131
   #define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
133
   #define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
132
   #define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
134
   #define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))

+ 2
- 2
Marlin/Marlin_main.cpp View File

1586
 
1586
 
1587
     if (axis == Z_AXIS) {
1587
     if (axis == Z_AXIS) {
1588
       #if HAS_BED_PROBE && Z_HOME_DIR < 0
1588
       #if HAS_BED_PROBE && Z_HOME_DIR < 0
1589
-        #if DISABLED(Z_MIN_PROBE_ENDSTOP)
1589
+        #if HOMING_Z_WITH_PROBE
1590
           current_position[Z_AXIS] -= zprobe_zoffset;
1590
           current_position[Z_AXIS] -= zprobe_zoffset;
1591
           #if ENABLED(DEBUG_LEVELING_FEATURE)
1591
           #if ENABLED(DEBUG_LEVELING_FEATURE)
1592
             if (DEBUGGING(LEVELING)) {
1592
             if (DEBUGGING(LEVELING)) {
2449
     home_dir(axis);
2449
     home_dir(axis);
2450
 
2450
 
2451
   // Homing Z towards the bed? Deploy the Z probe or endstop.
2451
   // Homing Z towards the bed? Deploy the Z probe or endstop.
2452
-  #if HAS_BED_PROBE && Z_HOME_DIR < 0 && DISABLED(Z_MIN_PROBE_ENDSTOP)
2452
+  #if HOMING_Z_WITH_PROBE
2453
     if (axis == Z_AXIS) {
2453
     if (axis == Z_AXIS) {
2454
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2454
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2455
         if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> ");
2455
         if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> ");

Loading…
Cancel
Save