Browse Source

Move probe pin sanity checks out of ABL block

Scott Lahteine 9 years ago
parent
commit
f1be87a85c
1 changed files with 9 additions and 12 deletions
  1. 9
    12
      Marlin/SanityCheck.h

+ 9
- 12
Marlin/SanityCheck.h View File

270
   #endif
270
   #endif
271
 
271
 
272
   /**
272
   /**
273
-   * Z_MIN_PIN and Z_MIN_PROBE_PIN can't co-exist when Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
273
+   * Require a Z min pin
274
    */
274
    */
275
-  #if HAS_Z_MIN && HAS_Z_MIN_PROBE_PIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
276
-    #error "A probe cannot have more than one pin! Use Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN or Z_MIN_PROBE_PIN."
275
+  #if HAS_Z_MIN
276
+     // Z_MIN_PIN and Z_MIN_PROBE_PIN can't co-exist when Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
277
+    #if HAS_Z_MIN_PROBE_PIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
278
+      #error "A probe cannot have more than one pin! Use Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN or Z_MIN_PROBE_PIN."
279
+    #endif
280
+  #elif !HAS_Z_MIN_PROBE_PIN || (DISABLED(Z_MIN_PROBE_ENDSTOP) || ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP))
281
+    // A pin was set for the Z probe, but not enabled.
282
+    #error "A probe requires a Z_MIN or Z_PROBE pin. Z_MIN_PIN or Z_MIN_PROBE_PIN must point to a valid hardware pin."
277
   #endif
283
   #endif
278
 
284
 
279
   /**
285
   /**
385
   #endif
391
   #endif
386
 
392
 
387
   /**
393
   /**
388
-   * Require a Z min pin
389
-   */
390
-  #if !PIN_EXISTS(Z_MIN)
391
-    #if !PIN_EXISTS(Z_MIN_PROBE) || (DISABLED(Z_MIN_PROBE_ENDSTOP) || ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)) // It's possible for someone to set a pin for the Z probe, but not enable it.
392
-      #error "AUTO_BED_LEVELING_FEATURE requires a Z_MIN or Z_PROBE endstop. Z_MIN_PIN or Z_MIN_PROBE_PIN must point to a valid hardware pin."
393
-    #endif
394
-  #endif
395
-
396
-  /**
397
    * Check if Probe_Offset * Grid Points is greater than Probing Range
394
    * Check if Probe_Offset * Grid Points is greater than Probing Range
398
    */
395
    */
399
   #if ENABLED(AUTO_BED_LEVELING_GRID)
396
   #if ENABLED(AUTO_BED_LEVELING_GRID)

Loading…
Cancel
Save