From 374ae6c0994f5222022f9373c5a359f84eba7bae Mon Sep 17 00:00:00 2001
From: Scott Lahteine <sourcetree@thinkyhead.com>
Date: Mon, 1 Aug 2016 16:07:31 -0700
Subject: [PATCH] Fix pins for RAMBO plus VIKI

---
 Marlin/pins_RAMBO.h | 57 +++++++++++++++++++++++----------------------
 1 file changed, 29 insertions(+), 28 deletions(-)

diff --git a/Marlin/pins_RAMBO.h b/Marlin/pins_RAMBO.h
index e04fbc5294..d1bd48bdd3 100644
--- a/Marlin/pins_RAMBO.h
+++ b/Marlin/pins_RAMBO.h
@@ -114,9 +114,6 @@
 
   #if ENABLED(NEWPANEL)
 
-    // Beeper on AUX-4
-    #define BEEPER_PIN 79
-
     #define LCD_PINS_RS 70
     #define LCD_PINS_ENABLE 71
     #define LCD_PINS_D4 72
@@ -124,12 +121,36 @@
     #define LCD_PINS_D6 74
     #define LCD_PINS_D7 75
 
-    //buttons are directly attached using AUX-2
-    #define BTN_EN1 76
-    #define BTN_EN2 77
-    #define BTN_ENC 78
+    #if ENABLED(VIKI2) || ENABLED(miniVIKI)
+      #define BEEPER_PIN 44
 
-    #define SD_DETECT_PIN 81 // Ramps doesn't use this
+      #define DOGLCD_A0  70
+      #define DOGLCD_CS  71
+      #define LCD_SCREEN_ROT_180
+
+      #define BTN_EN1 85
+      #define BTN_EN2 84
+      #define BTN_ENC 83
+
+      #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board
+
+      #if ENABLED(TEMP_STAT_LEDS)
+        #define STAT_LED_RED      22
+        #define STAT_LED_BLUE     32
+      #endif
+
+    #else
+
+      #define BEEPER_PIN 79 // AUX-4
+
+      // AUX-2
+      #define BTN_EN1 76
+      #define BTN_EN2 77
+      #define BTN_ENC 78
+
+      #define SD_DETECT_PIN 81
+
+    #endif // VIKI2/miniVIKI
 
   #else //!NEWPANEL - old style panel with shift register
 
@@ -154,23 +175,3 @@
 
 #endif // ULTRA_LCD
 
-#if ENABLED(VIKI2) || ENABLED(miniVIKI)
-  #define BEEPER_PIN 44
-  // Pins for DOGM SPI LCD Support
-  #define DOGLCD_A0  70
-  #define DOGLCD_CS  71
-  #define LCD_SCREEN_ROT_180
-
-  //The encoder and click button
-  #define BTN_EN1 85
-  #define BTN_EN2 84
-  #define BTN_ENC 83
-
-  #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board
-
-  #if ENABLED(TEMP_STAT_LEDS)
-    #define STAT_LED_RED      22
-    #define STAT_LED_BLUE     32
-  #endif
-#endif // VIKI2/miniVIKI
-