Browse Source

Filling in more places where Z_PROBE_PIN and Z_PROBE_AND_ENDSTOP need to

be.
Added Sanity Check for it.
Added hook so it's enabled.
Chris Roadfeldt 10 years ago
parent
commit
8b81f20c61
3 changed files with 12 additions and 6 deletions
  1. 5
    0
      Marlin/Marlin_main.cpp
  2. 6
    5
      Marlin/SanityCheck.h
  3. 1
    1
      Marlin/pins.h

+ 5
- 0
Marlin/Marlin_main.cpp View File

@@ -1290,8 +1290,13 @@ static void engage_z_probe() {
1290 1290
     
1291 1291
     st_synchronize();
1292 1292
     
1293
+    #if defined(Z_PROBE_AND_ENDSTOP)
1294
+    bool z_probe_endstop = (READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
1295
+    if (z_probe_endstop)
1296
+    #else
1293 1297
     bool z_min_endstop = (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING);
1294 1298
     if (z_min_endstop)
1299
+    #endif
1295 1300
     {
1296 1301
         if (!Stopped)
1297 1302
         {

+ 6
- 5
Marlin/SanityCheck.h View File

@@ -90,13 +90,14 @@
90 90
      * Require a Z Min pin
91 91
      */
92 92
     #if Z_MIN_PIN == -1
93
-      #ifdef Z_PROBE_REPEATABILITY_TEST
94
-        #error You must have a Z_MIN endstop to enable Z_PROBE_REPEATABILITY_TEST.
95
-      #else
96
-        #error ENABLE_AUTO_BED_LEVELING requires a Z_MIN endstop. Z_MIN_PIN must point to a valid hardware pin.
93
+      #if Z_PROBE_PIN == -1
94
+        #ifdef Z_PROBE_REPEATABILITY_TEST
95
+          #error You must have a Z_MIN endstop to enable Z_PROBE_REPEATABILITY_TEST.
96
+        #else
97
+          #error ENABLE_AUTO_BED_LEVELING requires a Z_MIN or Z_PROBE endstop. Z_MIN_PIN or Z_PROBE_PIN must point to a valid hardware pin.
98
+        #endif
97 99
       #endif
98 100
     #endif
99
-
100 101
     /**
101 102
      * Check if Probe_Offset * Grid Points is greater than Probing Range
102 103
      */

+ 1
- 1
Marlin/pins.h View File

@@ -211,7 +211,7 @@
211 211
   #define Z_MIN_PIN          -1
212 212
 #endif
213 213
 
214
-#define SENSITIVE_PINS { 0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, PS_ON_PIN, \
214
+#define SENSITIVE_PINS { 0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_PROBE_PIN, PS_ON_PIN, \
215 215
                         HEATER_BED_PIN, FAN_PIN, \
216 216
                         _E0_PINS _E1_PINS _E2_PINS _E3_PINS \
217 217
                         analogInputToDigitalPin(TEMP_BED_PIN) \

Loading…
Cancel
Save