From cf0604da07a9fec0066924cc5c81baebd87a118d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 8 Dec 2017 23:29:57 -0600 Subject: [PATCH] Use MB() for Megatronics 3.1 --- Marlin/pins.h | 5 +---- Marlin/pins_MEGATRONICS_3.h | 14 +++++--------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Marlin/pins.h b/Marlin/pins.h index e3b1034f9..5ad5b9938 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -152,10 +152,7 @@ #include "pins_MEGATRONICS.h" // ATmega2560 #elif MB(MEGATRONICS_2) #include "pins_MEGATRONICS_2.h" // ATmega2560 -#elif MB(MEGATRONICS_3) - #include "pins_MEGATRONICS_3.h" // ATmega2560 -#elif MB(MEGATRONICS_31) - #define MEGATRONICS_31 +#elif MB(MEGATRONICS_3) || MB(MEGATRONICS_31) #include "pins_MEGATRONICS_3.h" // ATmega2560 #elif MB(RAMBO) #include "pins_RAMBO.h" // ATmega2560 diff --git a/Marlin/pins_MEGATRONICS_3.h b/Marlin/pins_MEGATRONICS_3.h index 5bb6b84c4..7b66361d3 100644 --- a/Marlin/pins_MEGATRONICS_3.h +++ b/Marlin/pins_MEGATRONICS_3.h @@ -21,19 +21,17 @@ */ /** - * MegaTronics v3.0 pin assignments + * MegaTronics v3.0 / v3.1 pin assignments */ #ifndef __AVR_ATmega2560__ #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #endif -#define MEGATRONICS_31 - -#if ENABLED(MEGATRONICS_31) - #define BOARD_NAME "Megatronics v3.1" +#if MB(MEGATRONICS_31) + #define BOARD_NAME "Megatronics v3.1" #else - #define BOARD_NAME "Megatronics v3.0" + #define BOARD_NAME "Megatronics v3.0" #endif // @@ -161,10 +159,8 @@ #define SHIFT_OUT 34 #define SHIFT_EN 44 - #if ENABLED(MEGATRONICS_31) + #if MB(MEGATRONICS_31) #define SD_DETECT_PIN 56 - #else - #define SD_DETECT_PIN -1 #endif #endif