From 8816ef1c6469684a5d592e2b54ad266a1073b4c8 Mon Sep 17 00:00:00 2001
From: Erik van der Zalm <erik@vdzalm.eu>
Date: Tue, 21 Feb 2012 20:36:43 +0100
Subject: [PATCH] Small fixes after merge

---
 Marlin/Configuration.h     |  7 -------
 Marlin/Configuration_adv.h |  6 ++++++
 Marlin/ultralcd.h          | 17 ++++++-----------
 3 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 2b561923e8..545b82b7a8 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -183,13 +183,6 @@ const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of t
 #define SDSUPPORT // Enable SD Card Support in Hardware Console
 
 //#define ULTIPANEL
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT 
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
-// be commented out otherwise
-#define SDCARDDETECTINVERTED 
-
-#define ULTIPANEL
 #ifdef ULTIPANEL
   #define NEWPANEL  //enable this if you have a click-encoder panel
   #define SDSUPPORT
diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h
index a19747d145..d73962cff2 100644
--- a/Marlin/Configuration_adv.h
+++ b/Marlin/Configuration_adv.h
@@ -148,6 +148,12 @@
 
 const int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
 
+// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
+// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT 
+// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
+// be commented out otherwise
+//#define SDCARDDETECTINVERTED 
+
 //===========================================================================
 //=============================Buffers           ============================
 //===========================================================================
diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h
index f7bf9c09d7..6cfdc74ad1 100644
--- a/Marlin/ultralcd.h
+++ b/Marlin/ultralcd.h
@@ -28,17 +28,12 @@
     #define CLICKED (buttons&EN_C)
     #define BLOCK {blocking=millis()+blocktime;}
     #if (SDCARDDETECT > -1)
-    {
-
-	#ifdef SDCARDDETECTINVERTED 
-		#define CARDINSERTED (READ(SDCARDDETECT)!=0)
-
-	#else
-		#define CARDINSERTED (READ(SDCARDDETECT)==0)
-    }
-    #endif
-
-	#endif  //SDCARDTETECTINVERTED
+      #ifdef SDCARDDETECTINVERTED 
+        #define CARDINSERTED (READ(SDCARDDETECT)!=0)
+      #else
+        #define CARDINSERTED (READ(SDCARDDETECT)==0)
+      #endif
+    #endif  //SDCARDTETECTINVERTED
 
   #else