From ec93383ec8a5bc11b081d035b618b7412f27cdca Mon Sep 17 00:00:00 2001
From: Scott Lahteine <sourcetree@thinkyhead.com>
Date: Thu, 11 Jun 2015 22:21:35 -0700
Subject: [PATCH] Add SanityCheck for bed probe position settings (PR#2282)

---
 Marlin/SanityCheck.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h
index e52eea62a2..08df38928f 100644
--- a/Marlin/SanityCheck.h
+++ b/Marlin/SanityCheck.h
@@ -153,6 +153,12 @@
      */
     #ifdef AUTO_BED_LEVELING_GRID
       #ifndef DELTA_PROBABLE_RADIUS
+        // Be sure points are in the right order
+        #if LEFT_PROBE_BED_POSITION > RIGHT_PROBE_BED_POSITION
+          #error LEFT_PROBE_BED_POSITION must be less than RIGHT_PROBE_BED_POSITION.
+        #elif FRONT_PROBE_BED_POSITION > BACK_PROBE_BED_POSITION
+          #error BACK_PROBE_BED_POSITION must be less than FRONT_PROBE_BED_POSITION.
+        #endif
         // Make sure probing points are reachable
         #if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
           #error "The given LEFT_PROBE_BED_POSITION can't be reached by the probe."