From 0951bffcc00c09f5cef4c1b8399fd8cf5adb6d2c Mon Sep 17 00:00:00 2001
From: Scott Lahteine <sourcetree@thinkyhead.com>
Date: Thu, 22 Sep 2016 17:10:20 -0500
Subject: [PATCH] Sanity check homing bumps

---
 Marlin/Marlin_main.cpp | 2 +-
 Marlin/SanityCheck.h   | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp
index 1429cc6ba9..7152645ee1 100644
--- a/Marlin/Marlin_main.cpp
+++ b/Marlin/Marlin_main.cpp
@@ -9104,7 +9104,7 @@ void stop() {
  */
 void setup() {
 
-  #if ENABLED(DISABLE_JTAG)
+  #ifdef DISABLE_JTAG
     // Disable JTAG on AT90USB chips to free up pins for IO
     MCUCR = 0x80;
     MCUCR = 0x80;
diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h
index 73fb06386e..7c2526bfd2 100644
--- a/Marlin/SanityCheck.h
+++ b/Marlin/SanityCheck.h
@@ -48,7 +48,7 @@
   #error "You are using an old Configuration_adv.h file, update it before building Marlin."
 #endif
 
- /**
+/**
  * Warnings for old configurations
  */
 #if WATCH_TEMP_PERIOD > 500
@@ -450,6 +450,13 @@
 
 #endif
 
+/**
+ * Homing Bump
+ */
+#if X_HOME_BUMP_MM < 0 || Y_HOME_BUMP_MM < 0 || Z_HOME_BUMP_MM < 0
+  #error "[XYZ]_HOME_BUMP_MM must be greater than or equal to 0."
+#endif
+
 /**
  * Make sure Z_SAFE_HOMING point is reachable
  */
-- 
GitLab