From a9802c95b32eac41b35b520db299fabf7a88e205 Mon Sep 17 00:00:00 2001
From: Chris Roadfeldt <chris@roadfeldt.com>
Date: Sun, 29 Mar 2015 04:18:37 -0500
Subject: [PATCH] Ensure Z_PROBE_PIN is defined if Z_PROBE_AND_ENDSTOP is.

---
 Marlin/SanityCheck.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h
index 11d4d84645..1427da2127 100644
--- a/Marlin/SanityCheck.h
+++ b/Marlin/SanityCheck.h
@@ -103,8 +103,11 @@
      * Require a Z Probe Pin if Z_PROBE_AND_ENDSTOP is enabled.
      */
     #if defined(Z_PROBE_AND_ENDSTOP)
+      #ifndef Z_PROBE_PIN
+        #error You must have a Z_PROBE_PIN defined in your pins_XXXX.h file if you enable Z_PROBE_AND_ENDSTOP
+      #endif
       #if Z_PROBE_PIN == -1
-        #error You must have a Z_PROBE_PIN defined if you enable Z_PROBE_AND_ENDSTOP
+        #error You must set Z_PROBE_PIN to a valid pin if you enable Z_PROBE_AND_ENDSTOP
       #endif
       #ifndef NUM_SERVOS
         #error You must have NUM_SERVOS defined and there must be at least 1 configured to use Z_PROBE_AND_ENDSTOP
-- 
GitLab