From 4f24323817f82d0fb81f4007b61ddcb09da5868d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 2 Apr 2016 18:41:01 -0700 Subject: [PATCH 1/2] Split DEFAULT_MACHINE_NAME from DEFAULT_SOURCE_URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addressing #3325 – Avoid undefined symbol errors in the compiler. --- Marlin/language.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Marlin/language.h b/Marlin/language.h index 2c8d3cc72..ba2797179 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -73,22 +73,29 @@ #if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2) #define DEFAULT_MACHINE_NAME "Ultimaker" - #define DEFAULT_SOURCE_URL "https://github.com/Ultimaker/Marlin" #elif MB(RUMBA) #define DEFAULT_MACHINE_NAME "Rumba" #elif MB(3DRAG) #define DEFAULT_MACHINE_NAME "3Drag" - #define DEFAULT_SOURCE_URL "http://3dprint.elettronicain.it/" #elif MB(K8200) #define DEFAULT_MACHINE_NAME "K8200" - #define DEFAULT_SOURCE_URL "https://github.com/CONSULitAS/Marlin-K8200" #elif MB(5DPRINT) #define DEFAULT_MACHINE_NAME "Makibox" #elif MB(SAV_MKI) #define DEFAULT_MACHINE_NAME "SAV MkI" - #define DEFAULT_SOURCE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config" #else #define DEFAULT_MACHINE_NAME "3D Printer" +#endif + +#if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2) + #define DEFAULT_SOURCE_URL "https://github.com/Ultimaker/Marlin" +#elif MB(3DRAG) + #define DEFAULT_SOURCE_URL "http://3dprint.elettronicain.it/" +#elif MB(K8200) + #define DEFAULT_SOURCE_URL "https://github.com/CONSULitAS/Marlin-K8200" +#elif MB(SAV_MKI) + #define DEFAULT_SOURCE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config" +#else #define DEFAULT_SOURCE_URL "https://github.com/MarlinFirmware/Marlin" #endif From 2b016495337fb7ec831ee75eac0011f49118c0b8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 2 Apr 2016 18:53:05 -0700 Subject: [PATCH 2/2] Move default machine info to pins files --- Marlin/language.h | 30 +++++------------------------- Marlin/pins_3DRAG.h | 3 +++ Marlin/pins_5DPRINT.h | 2 ++ Marlin/pins_K8200.h | 6 ++++++ Marlin/pins_RUMBA.h | 2 ++ Marlin/pins_SAV_MKI.h | 3 +++ Marlin/pins_ULTIMAIN_2.h | 3 +++ Marlin/pins_ULTIMAKER.h | 3 +++ Marlin/pins_ULTIMAKER_OLD.h | 3 +++ 9 files changed, 30 insertions(+), 25 deletions(-) diff --git a/Marlin/language.h b/Marlin/language.h index ba2797179..5d8033e36 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -71,40 +71,20 @@ #define PROTOCOL_VERSION "1.0" -#if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2) - #define DEFAULT_MACHINE_NAME "Ultimaker" -#elif MB(RUMBA) - #define DEFAULT_MACHINE_NAME "Rumba" -#elif MB(3DRAG) - #define DEFAULT_MACHINE_NAME "3Drag" -#elif MB(K8200) - #define DEFAULT_MACHINE_NAME "K8200" -#elif MB(5DPRINT) - #define DEFAULT_MACHINE_NAME "Makibox" -#elif MB(SAV_MKI) - #define DEFAULT_MACHINE_NAME "SAV MkI" -#else +#ifndef DEFAULT_MACHINE_NAME #define DEFAULT_MACHINE_NAME "3D Printer" #endif -#if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2) - #define DEFAULT_SOURCE_URL "https://github.com/Ultimaker/Marlin" -#elif MB(3DRAG) - #define DEFAULT_SOURCE_URL "http://3dprint.elettronicain.it/" -#elif MB(K8200) - #define DEFAULT_SOURCE_URL "https://github.com/CONSULitAS/Marlin-K8200" -#elif MB(SAV_MKI) - #define DEFAULT_SOURCE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config" -#else - #define DEFAULT_SOURCE_URL "https://github.com/MarlinFirmware/Marlin" -#endif - #ifdef CUSTOM_MACHINE_NAME #define MACHINE_NAME CUSTOM_MACHINE_NAME #else #define MACHINE_NAME DEFAULT_MACHINE_NAME #endif +#ifndef DEFAULT_SOURCE_URL + #define DEFAULT_SOURCE_URL "https://github.com/MarlinFirmware/Marlin" +#endif + #ifndef SOURCE_CODE_URL #define SOURCE_CODE_URL DEFAULT_SOURCE_URL #endif diff --git a/Marlin/pins_3DRAG.h b/Marlin/pins_3DRAG.h index e3175a240..969f4055e 100644 --- a/Marlin/pins_3DRAG.h +++ b/Marlin/pins_3DRAG.h @@ -26,6 +26,9 @@ #include "pins_RAMPS_14.h" +#define DEFAULT_MACHINE_NAME "3Drag" +#define DEFAULT_SOURCE_URL "http://3dprint.elettronicain.it/" + #undef Z_ENABLE_PIN #define Z_ENABLE_PIN 63 diff --git a/Marlin/pins_5DPRINT.h b/Marlin/pins_5DPRINT.h index 14a5d4d7d..170717870 100644 --- a/Marlin/pins_5DPRINT.h +++ b/Marlin/pins_5DPRINT.h @@ -30,6 +30,8 @@ #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu. #endif +#define DEFAULT_MACHINE_NAME "Makibox" + #define LARGE_FLASH true #define X_STEP_PIN 0 diff --git a/Marlin/pins_K8200.h b/Marlin/pins_K8200.h index 6aab9caed..f02300dc8 100644 --- a/Marlin/pins_K8200.h +++ b/Marlin/pins_K8200.h @@ -26,3 +26,9 @@ */ #include "pins_3DRAG.h" + +#undef DEFAULT_MACHINE_NAME +#define DEFAULT_MACHINE_NAME "K8200" + +#undef DEFAULT_SOURCE_URL +#define DEFAULT_SOURCE_URL "https://github.com/CONSULitAS/Marlin-K8200" diff --git a/Marlin/pins_RUMBA.h b/Marlin/pins_RUMBA.h index e2d1e209f..8464190c7 100644 --- a/Marlin/pins_RUMBA.h +++ b/Marlin/pins_RUMBA.h @@ -32,6 +32,8 @@ #error RUMBA supports up to 3 extruders. Comment this line to keep going. #endif +#define DEFAULT_MACHINE_NAME "Rumba" + #define X_STEP_PIN 17 #define X_DIR_PIN 16 #define X_ENABLE_PIN 48 diff --git a/Marlin/pins_SAV_MKI.h b/Marlin/pins_SAV_MKI.h index 4c14fa6e2..eb033fb28 100644 --- a/Marlin/pins_SAV_MKI.h +++ b/Marlin/pins_SAV_MKI.h @@ -31,6 +31,9 @@ #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu. #endif +#define DEFAULT_MACHINE_NAME "SAV MkI" +#define DEFAULT_SOURCE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config" + #define LARGE_FLASH true #define X_STEP_PIN 0 diff --git a/Marlin/pins_ULTIMAIN_2.h b/Marlin/pins_ULTIMAIN_2.h index f4635b398..6da36661a 100644 --- a/Marlin/pins_ULTIMAIN_2.h +++ b/Marlin/pins_ULTIMAIN_2.h @@ -28,6 +28,9 @@ #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu. #endif +#define DEFAULT_MACHINE_NAME "Ultimaker" +#define DEFAULT_SOURCE_URL "https://github.com/Ultimaker/Marlin" + #define X_STEP_PIN 25 #define X_DIR_PIN 23 #define X_STOP_PIN 22 diff --git a/Marlin/pins_ULTIMAKER.h b/Marlin/pins_ULTIMAKER.h index 36feb6e02..b5a10057c 100644 --- a/Marlin/pins_ULTIMAKER.h +++ b/Marlin/pins_ULTIMAKER.h @@ -28,6 +28,9 @@ #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu. #endif +#define DEFAULT_MACHINE_NAME "Ultimaker" +#define DEFAULT_SOURCE_URL "https://github.com/Ultimaker/Marlin" + #define LARGE_FLASH true #define SERVO0_PIN 13 // untested diff --git a/Marlin/pins_ULTIMAKER_OLD.h b/Marlin/pins_ULTIMAKER_OLD.h index d08b5bd27..4f015f7e7 100644 --- a/Marlin/pins_ULTIMAKER_OLD.h +++ b/Marlin/pins_ULTIMAKER_OLD.h @@ -28,6 +28,9 @@ #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu. #endif +#define DEFAULT_MACHINE_NAME "Ultimaker" +#define DEFAULT_SOURCE_URL "https://github.com/Ultimaker/Marlin" + #define LARGE_FLASH true #define X_STEP_PIN 25