From bdac2eb13aea7a96c535010dfb0d88a845d33f29 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 30 Jul 2016 02:01:46 -0700 Subject: [PATCH 1/7] Don't set non-existent SLED_PIN --- Marlin/Marlin_main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index c77a830963..47cf0ac6e9 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -939,7 +939,7 @@ void setup() { dac_init(); #endif - #if ENABLED(Z_PROBE_SLED) + #if ENABLED(Z_PROBE_SLED) && PIN_EXISTS(SLED) pinMode(SLED_PIN, OUTPUT); digitalWrite(SLED_PIN, LOW); // turn it off #endif // Z_PROBE_SLED @@ -1856,8 +1856,10 @@ static void clean_up_after_endstop_or_probe_move() { // Dock sled a bit closer to ensure proper capturing do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET - ((stow) ? 1 : 0)); - digitalWrite(SLED_PIN, !stow); // switch solenoid + #if PIN_EXISTS(SLED) + digitalWrite(SLED_PIN, !stow); // switch solenoid + #endif } #endif // Z_PROBE_SLED From 38658432835948b11ffeaf45187f505e82775590 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 29 Jul 2016 16:13:19 -0700 Subject: [PATCH 2/7] Consolidate setting of RAMPS High Voltage PWM outputs --- Marlin/pins_AZTEEG_X3.h | 6 ++- Marlin/pins_BAM_DICE_DUE.h | 6 ++- Marlin/pins_FELIX2.h | 9 +++-- Marlin/pins_MKS_13.h | 9 +++-- Marlin/pins_MKS_BASE.h | 9 +++-- Marlin/pins_RAMPS_14.h | 76 ++++++++++++++++++++++++------------ Marlin/pins_SAINSMART_2IN1.h | 22 +++++------ 7 files changed, 88 insertions(+), 49 deletions(-) diff --git a/Marlin/pins_AZTEEG_X3.h b/Marlin/pins_AZTEEG_X3.h index f16eee3103..ed8f4a5ebb 100644 --- a/Marlin/pins_AZTEEG_X3.h +++ b/Marlin/pins_AZTEEG_X3.h @@ -24,9 +24,13 @@ * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments */ +#if HOTENDS > 2 + #error "Azteeg X3 supports up to 2 hotends. Comment this line to keep going." +#endif + #define BOARD_NAME "Azteeg X3" -#include "pins_RAMPS_14_EFB.h" +#include "pins_RAMPS_14.h" #if ENABLED(VIKI2) || ENABLED(miniVIKI) diff --git a/Marlin/pins_BAM_DICE_DUE.h b/Marlin/pins_BAM_DICE_DUE.h index a8e76a7eff..f75a6c4421 100644 --- a/Marlin/pins_BAM_DICE_DUE.h +++ b/Marlin/pins_BAM_DICE_DUE.h @@ -24,9 +24,13 @@ * BAM&DICE Due (Arduino Mega) pin assignments */ +#if HOTENDS > 2 + #error "2PrintBeta Due supports up to 2 hotends. Comment this line to keep going." +#endif + #define BOARD_NAME "2PrintBeta Due" -#include "pins_RAMPS_14_EFB.h" +#include "pins_RAMPS_14.h" #undef TEMP_0_PIN #undef TEMP_1_PIN diff --git a/Marlin/pins_FELIX2.h b/Marlin/pins_FELIX2.h index 7bb724bf53..16ad9f4f7f 100644 --- a/Marlin/pins_FELIX2.h +++ b/Marlin/pins_FELIX2.h @@ -24,12 +24,15 @@ * FELIXprinters v2.0/3.0 (RAMPS v1.4) pin assignments */ +#if HOTENDS > 2 + #error "Felix 2.0+ supports up to 2 hotends. Comment this line to keep going." +#endif + #define BOARD_NAME "Felix 2.0+" -#include "pins_RAMPS_14_EFB.h" +#define HI_VOLT_PIN_D 7 -#undef HEATER_1_PIN -#define HEATER_1_PIN 7 // EXTRUDER 2 +#include "pins_RAMPS_14_EFB.h" #undef SDPOWER #define SDPOWER 1 diff --git a/Marlin/pins_MKS_13.h b/Marlin/pins_MKS_13.h index 00da206445..e536d870b0 100644 --- a/Marlin/pins_MKS_13.h +++ b/Marlin/pins_MKS_13.h @@ -29,12 +29,15 @@ * MKS v1.4 (Extruder, Extruder, Fan, Bed) */ +#if HOTENDS > 2 + #error "MKS 1.3/1.4 supports up to 2 hotends. Comment this line to keep going." +#endif + #define BOARD_NAME "MKS > v1.3" -#include "pins_RAMPS_14_EFB.h" +#define HI_VOLT_PIN_D 7 -#undef HEATER_1_PIN -#define HEATER_1_PIN 7 // EXTRUDER 2 (-1 on RAMPS 1.4) +#include "pins_RAMPS_14_EFB.h" #if ENABLED(VIKI2) || ENABLED(miniVIKI) /** diff --git a/Marlin/pins_MKS_BASE.h b/Marlin/pins_MKS_BASE.h index 3c721f5ff8..583f82b1dc 100644 --- a/Marlin/pins_MKS_BASE.h +++ b/Marlin/pins_MKS_BASE.h @@ -24,9 +24,12 @@ * MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments */ +#if HOTENDS > 2 + #error "MKS BASE 1.0 supports up to 2 hotends. Comment this line to keep going." +#endif + #define BOARD_NAME "MKS BASE 1.0" -#include "pins_RAMPS_14_EFB.h" +#define HI_VOLT_PIN_D 7 -#undef HEATER_1_PIN -#define HEATER_1_PIN 7 +#include "pins_RAMPS_14_EFB.h" \ No newline at end of file diff --git a/Marlin/pins_RAMPS_14.h b/Marlin/pins_RAMPS_14.h index 9f10dd65cf..a8c9d3eb7b 100644 --- a/Marlin/pins_RAMPS_14.h +++ b/Marlin/pins_RAMPS_14.h @@ -105,32 +105,7 @@ // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector #define FIL_RUNOUT_PIN 4 -#if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF) || ENABLED(IS_RAMPS_EFB) - #define FAN_PIN 9 // (Sprinter config) - #if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF) - #define CONTROLLERFAN_PIN -1 // Pin used for the fan to cool controller - #endif -#elif MB(RAMPS_14_EEF) || MB(RAMPS_14_SF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF) - #define FAN_PIN 8 -#else - #define FAN_PIN 4 // IO pin. Buffer needed -#endif - #define PS_ON_PIN 12 - -#if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF) - #define HEATER_0_PIN 8 -#else - #define HEATER_0_PIN 10 // EXTRUDER 1 - #if !MB(RAMPS_14_EEF) && !MB(RAMPS_13_EEF) && !MB(RAMPS_14_SF) && !MB(RAMPS_13_SF) - #define HEATER_BED_PIN 8 // BED - #endif -#endif - -#if !MB(RAMPS_14_SF) && !MB(RAMPS_13_SF) && !ENABLED(IS_RAMPS_EFB) - #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter) -#endif - #define TEMP_0_PIN 13 // ANALOG NUMBERING #define TEMP_1_PIN 15 // ANALOG NUMBERING #define TEMP_BED_PIN 14 // ANALOG NUMBERING @@ -139,6 +114,56 @@ #define SLED_PIN -1 #endif + +/** + * Hi Voltage PWM Pin Assignments + */ + +#ifndef HI_VOLT_PIN_D + #define HI_VOLT_PIN_D -1 +#endif +#ifndef HI_VOLT_PIN_C + #define HI_VOLT_PIN_C 8 +#endif +#ifndef HI_VOLT_PIN_B + #define HI_VOLT_PIN_B 9 +#endif +#ifndef HI_VOLT_PIN_A + #define HI_VOLT_PIN_A 10 +#endif + +#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed + #define HEATER_0_PIN HI_VOLT_PIN_A + #define FAN_PIN HI_VOLT_PIN_B + #define HEATER_BED_PIN HI_VOLT_PIN_C + #if EXTRUDERS == 1 + #define FAN1_PIN HI_VOLT_PIN_D + #else + #define HEATER_1_PIN HI_VOLT_PIN_D + #endif +#elif MB(RAMPS_13_EEF) || MB(RAMPS_14_EEF) // Hotend, Hotend, Fan + #define HEATER_0_PIN HI_VOLT_PIN_A + #define HEATER_1_PIN HI_VOLT_PIN_B + #define FAN_PIN HI_VOLT_PIN_C +#elif MB(RAMPS_13_EEB) || MB(RAMPS_14_EEB) // Hotend, Hotend, Bed + #define HEATER_0_PIN HI_VOLT_PIN_A + #define HEATER_1_PIN HI_VOLT_PIN_B + #define HEATER_BED_PIN HI_VOLT_PIN_C + #define FAN_PIN 4 // IO pin. Buffer needed +#elif MB(RAMPS_13_EFF) || MB(RAMPS_14_EFF) // Hotend, Fan, Fan (EFF is reversed?) + #define HEATER_0_PIN HI_VOLT_PIN_C + #define FAN_PIN HI_VOLT_PIN_B + #define FAN1_PIN HI_VOLT_PIN_A + #define CONTROLLERFAN_PIN -1 +#elif MB(RAMPS_13_SF) || MB(RAMPS_14_SF) // Spindle, Fan + #define FAN_PIN HI_VOLT_PIN_C +#endif + + +/** + * LCD Controller Pin Assignments + */ + #if ENABLED(ULTRA_LCD) #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) @@ -301,4 +326,3 @@ #else #define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present #endif - diff --git a/Marlin/pins_SAINSMART_2IN1.h b/Marlin/pins_SAINSMART_2IN1.h index 3664fbd3a4..cc74c910a3 100644 --- a/Marlin/pins_SAINSMART_2IN1.h +++ b/Marlin/pins_SAINSMART_2IN1.h @@ -24,16 +24,14 @@ * Sainsmart 2-in-1 pin assignments */ +#if HOTENDS > 2 + #error "Sainsmart 2-in-1 supports up to 2 hotends. Comment this line to keep going." +#endif + +#define BOARD_NAME "Sainsmart" + +#define HI_VOLT_PIN_A 9 +#define HI_VOLT_PIN_B 7 // PART FAN in front of board next to Extruder heat +#define HI_VOLT_PIN_D 10 + #include "pins_RAMPS_14_EFB.h" - -#undef BOARD_NAME -#define BOARD_NAME "Sainsmart" - -#undef FAN_PIN -#define FAN_PIN 7 // PART FAN in front of board next to Extruder heat - -#undef HEATER_0_PIN -#define HEATER_0_PIN 9 // EXTRUDER 1 - -#undef HEATER_1_PIN -#define HEATER_1_PIN 10 // EXTRUDER 2 From 223b7e473ffa554eb52e4d52ec537bd8a4b470f9 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 30 Jul 2016 03:02:03 -0700 Subject: [PATCH 3/7] RAMPS assignment for derivatives --- Marlin/pins_RAMPS_14.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Marlin/pins_RAMPS_14.h b/Marlin/pins_RAMPS_14.h index a8c9d3eb7b..2077438220 100644 --- a/Marlin/pins_RAMPS_14.h +++ b/Marlin/pins_RAMPS_14.h @@ -114,6 +114,25 @@ #define SLED_PIN -1 #endif +/* + +// Augmentation for auto-assigning RAMPS plugs + +#if DISABLED(IS_RAMPS_EEB) && DISABLED(IS_RAMPS_EEF) && DISABLED(IS_RAMPS_EFB) && DISABLED(IS_RAMPS_EFF) && DISABLED(IS_RAMPS_SF) + #if HOTENDS > 1 + #if TEMP_SENSOR_BED + #define IS_RAMPS_EEB + #else + #define IS_RAMPS_EEF + #endif + #elif TEMP_SENSOR_BED + #define IS_RAMPS_EFB + #else + #define IS_RAMPS_EFF + #endif +#endif + +*/ /** * Hi Voltage PWM Pin Assignments @@ -157,6 +176,15 @@ #define CONTROLLERFAN_PIN -1 #elif MB(RAMPS_13_SF) || MB(RAMPS_14_SF) // Spindle, Fan #define FAN_PIN HI_VOLT_PIN_C +#else // Non-specific are "EFB" by legacy + #define HEATER_0_PIN HI_VOLT_PIN_A + #define FAN_PIN HI_VOLT_PIN_B + #define HEATER_BED_PIN HI_VOLT_PIN_C + #if HOTENDS == 1 + #define FAN1_PIN HI_VOLT_PIN_D + #else + #define HEATER_1_PIN HI_VOLT_PIN_D + #endif #endif From d3b713cebcf302896ca388470a76463450d7297d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 30 Jul 2016 03:07:20 -0700 Subject: [PATCH 4/7] Set flags for RAMPS "type" in pins.h --- Marlin/pins.h | 30 ++++++++++++++++++++++++++---- Marlin/pins_FELIX2.h | 2 +- Marlin/pins_MKS_13.h | 2 +- Marlin/pins_MKS_BASE.h | 2 +- Marlin/pins_RAMPS_13_EFB.h | 32 -------------------------------- Marlin/pins_RAMPS_14.h | 15 +++++---------- Marlin/pins_RAMPS_14_EFB.h | 34 ---------------------------------- Marlin/pins_SAINSMART_2IN1.h | 9 +++++---- 8 files changed, 39 insertions(+), 87 deletions(-) delete mode 100644 Marlin/pins_RAMPS_13_EFB.h delete mode 100644 Marlin/pins_RAMPS_14_EFB.h diff --git a/Marlin/pins.h b/Marlin/pins.h index 8133f4db5b..548d44fdf7 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -42,12 +42,34 @@ #elif MB(RAMPS_OLD) #include "pins_RAMPS_OLD.h" #elif MB(RAMPS_13_EFB) - #include "pins_RAMPS_13_EFB.h" -#elif MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF) + #define IS_RAMPS_EFB + #include "pins_RAMPS_13.h" +#elif MB(RAMPS_13_EEB) + #define IS_RAMPS_EEB + #include "pins_RAMPS_13.h" +#elif MB(RAMPS_13_EFF) + #define IS_RAMPS_EFF + #include "pins_RAMPS_13.h" +#elif MB(RAMPS_13_EEF) + #define IS_RAMPS_EEF + #include "pins_RAMPS_13.h" +#elif MB(RAMPS_13_SF) + #define IS_RAMPS_SF #include "pins_RAMPS_13.h" #elif MB(RAMPS_14_EFB) - #include "pins_RAMPS_14_EFB.h" -#elif MB(RAMPS_14_EEB) || MB(RAMPS_14_EFF) || MB(RAMPS_14_EEF) || MB(RAMPS_14_SF) + #define IS_RAMPS_EFB + #include "pins_RAMPS_14.h" +#elif MB(RAMPS_14_EEB) + #define IS_RAMPS_EEB + #include "pins_RAMPS_14.h" +#elif MB(RAMPS_14_EFF) + #define IS_RAMPS_EFF + #include "pins_RAMPS_14.h" +#elif MB(RAMPS_14_EEF) + #define IS_RAMPS_EEF + #include "pins_RAMPS_14.h" +#elif MB(RAMPS_14_SF) + #define IS_RAMPS_SF #include "pins_RAMPS_14.h" #elif MB(GEN6) #include "pins_GEN6.h" diff --git a/Marlin/pins_FELIX2.h b/Marlin/pins_FELIX2.h index 16ad9f4f7f..d164f99c7c 100644 --- a/Marlin/pins_FELIX2.h +++ b/Marlin/pins_FELIX2.h @@ -32,7 +32,7 @@ #define HI_VOLT_PIN_D 7 -#include "pins_RAMPS_14_EFB.h" +#include "pins_RAMPS_14.h" #undef SDPOWER #define SDPOWER 1 diff --git a/Marlin/pins_MKS_13.h b/Marlin/pins_MKS_13.h index e536d870b0..eee34dd6f3 100644 --- a/Marlin/pins_MKS_13.h +++ b/Marlin/pins_MKS_13.h @@ -37,7 +37,7 @@ #define HI_VOLT_PIN_D 7 -#include "pins_RAMPS_14_EFB.h" +#include "pins_RAMPS_14.h" #if ENABLED(VIKI2) || ENABLED(miniVIKI) /** diff --git a/Marlin/pins_MKS_BASE.h b/Marlin/pins_MKS_BASE.h index 583f82b1dc..92895b1d73 100644 --- a/Marlin/pins_MKS_BASE.h +++ b/Marlin/pins_MKS_BASE.h @@ -32,4 +32,4 @@ #define HI_VOLT_PIN_D 7 -#include "pins_RAMPS_14_EFB.h" \ No newline at end of file +#include "pins_RAMPS_14.h" \ No newline at end of file diff --git a/Marlin/pins_RAMPS_13_EFB.h b/Marlin/pins_RAMPS_13_EFB.h deleted file mode 100644 index 80e2927293..0000000000 --- a/Marlin/pins_RAMPS_13_EFB.h +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino Mega with RAMPS v1.3 pin assignments - * - * RAMPS_13_EFB (Extruder, Fan, Bed) - */ - -#define BOARD_NAME "RAMPS 1.3 EFB" - -#define IS_RAMPS_13 -#include "pins_RAMPS_14_EFB.h" diff --git a/Marlin/pins_RAMPS_14.h b/Marlin/pins_RAMPS_14.h index 2077438220..7cb89e9962 100644 --- a/Marlin/pins_RAMPS_14.h +++ b/Marlin/pins_RAMPS_14.h @@ -151,30 +151,25 @@ #define HI_VOLT_PIN_A 10 #endif -#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed +#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed #define HEATER_0_PIN HI_VOLT_PIN_A #define FAN_PIN HI_VOLT_PIN_B #define HEATER_BED_PIN HI_VOLT_PIN_C - #if EXTRUDERS == 1 - #define FAN1_PIN HI_VOLT_PIN_D - #else - #define HEATER_1_PIN HI_VOLT_PIN_D - #endif -#elif MB(RAMPS_13_EEF) || MB(RAMPS_14_EEF) // Hotend, Hotend, Fan +#elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan #define HEATER_0_PIN HI_VOLT_PIN_A #define HEATER_1_PIN HI_VOLT_PIN_B #define FAN_PIN HI_VOLT_PIN_C -#elif MB(RAMPS_13_EEB) || MB(RAMPS_14_EEB) // Hotend, Hotend, Bed +#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed #define HEATER_0_PIN HI_VOLT_PIN_A #define HEATER_1_PIN HI_VOLT_PIN_B #define HEATER_BED_PIN HI_VOLT_PIN_C #define FAN_PIN 4 // IO pin. Buffer needed -#elif MB(RAMPS_13_EFF) || MB(RAMPS_14_EFF) // Hotend, Fan, Fan (EFF is reversed?) +#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan (EFF is reversed?) #define HEATER_0_PIN HI_VOLT_PIN_C #define FAN_PIN HI_VOLT_PIN_B #define FAN1_PIN HI_VOLT_PIN_A #define CONTROLLERFAN_PIN -1 -#elif MB(RAMPS_13_SF) || MB(RAMPS_14_SF) // Spindle, Fan +#elif ENABLED(IS_RAMPS_SF) // Spindle, Fan #define FAN_PIN HI_VOLT_PIN_C #else // Non-specific are "EFB" by legacy #define HEATER_0_PIN HI_VOLT_PIN_A diff --git a/Marlin/pins_RAMPS_14_EFB.h b/Marlin/pins_RAMPS_14_EFB.h deleted file mode 100644 index b7282ea561..0000000000 --- a/Marlin/pins_RAMPS_14_EFB.h +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino Mega with RAMPS v1.4 pin assignments - * - * RAMPS_14_EFB (Extruder, Fan, Bed) - */ - -#ifndef BOARD_NAME - #define BOARD_NAME "RAMPS 1.4 EFB" -#endif - -#define IS_RAMPS_EFB -#include "pins_RAMPS_14.h" diff --git a/Marlin/pins_SAINSMART_2IN1.h b/Marlin/pins_SAINSMART_2IN1.h index cc74c910a3..c032d4d6fe 100644 --- a/Marlin/pins_SAINSMART_2IN1.h +++ b/Marlin/pins_SAINSMART_2IN1.h @@ -30,8 +30,9 @@ #define BOARD_NAME "Sainsmart" -#define HI_VOLT_PIN_A 9 -#define HI_VOLT_PIN_B 7 // PART FAN in front of board next to Extruder heat -#define HI_VOLT_PIN_D 10 +#define HI_VOLT_PIN_A 9 // E +#define HI_VOLT_PIN_B 7 // F PART FAN in front of board next to Extruder heat + // HI_VOLT_PIN_C 8 // B +#define HI_VOLT_PIN_D 10 // F / E -#include "pins_RAMPS_14_EFB.h" +#include "pins_RAMPS_14.h" From 49f75b7891423728c27c7bc0871defdaa0b3b64d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 30 Jul 2016 03:10:30 -0700 Subject: [PATCH 5/7] pins_RAMPS_14.h => pins_RAMPS.h --- .travis.yml | 6 +++--- Marlin/pins.h | 12 ++++++------ Marlin/pins_3DRAG.h | 2 +- Marlin/pins_AZTEEG_X3.h | 2 +- Marlin/pins_AZTEEG_X3_PRO.h | 2 +- Marlin/pins_BAM_DICE_DUE.h | 2 +- Marlin/pins_FELIX2.h | 2 +- Marlin/pins_MKS_13.h | 2 +- Marlin/pins_MKS_BASE.h | 2 +- Marlin/{pins_RAMPS_14.h => pins_RAMPS.h} | 0 Marlin/pins_RAMPS_13.h | 2 +- Marlin/pins_RIGIDBOARD.h | 2 +- Marlin/pins_SAINSMART_2IN1.h | 2 +- 13 files changed, 19 insertions(+), 19 deletions(-) rename Marlin/{pins_RAMPS_14.h => pins_RAMPS.h} (100%) diff --git a/.travis.yml b/.travis.yml index 75dc169261..23d673f4b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,11 +56,11 @@ before_script: # script: # - # Backup Configuration.h, Configuration_adv.h, and pins_RAMPS_14.h + # Backup Configuration.h, Configuration_adv.h, and pins_RAMPS.h # - cp Marlin/Configuration.h Marlin/Configuration.h.backup - cp Marlin/Configuration_adv.h Marlin/Configuration_adv.h.backup - - cp Marlin/pins_RAMPS_14.h Marlin/pins_RAMPS_14.h.backup + - cp Marlin/pins_RAMPS.h Marlin/pins_RAMPS.h.backup # # Build with the default configurations # @@ -221,7 +221,7 @@ script: # - restore_configs - opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS - - pins_set RAMPS_14 X_MAX_PIN -1 + - pins_set RAMPS X_MAX_PIN -1 - opt_set_adv Z2_MAX_PIN 2 - build_marlin # diff --git a/Marlin/pins.h b/Marlin/pins.h index 548d44fdf7..3657675db5 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -58,19 +58,19 @@ #include "pins_RAMPS_13.h" #elif MB(RAMPS_14_EFB) #define IS_RAMPS_EFB - #include "pins_RAMPS_14.h" + #include "pins_RAMPS.h" #elif MB(RAMPS_14_EEB) #define IS_RAMPS_EEB - #include "pins_RAMPS_14.h" + #include "pins_RAMPS.h" #elif MB(RAMPS_14_EFF) #define IS_RAMPS_EFF - #include "pins_RAMPS_14.h" + #include "pins_RAMPS.h" #elif MB(RAMPS_14_EEF) #define IS_RAMPS_EEF - #include "pins_RAMPS_14.h" + #include "pins_RAMPS.h" #elif MB(RAMPS_14_SF) #define IS_RAMPS_SF - #include "pins_RAMPS_14.h" + #include "pins_RAMPS.h" #elif MB(GEN6) #include "pins_GEN6.h" #elif MB(GEN6_DELUXE) @@ -146,7 +146,7 @@ #elif MB(LEAPFROG) #include "pins_LEAPFROG.h" #elif MB(BAM_DICE) - #include "pins_RAMPS_14.h" + #include "pins_RAMPS.h" #elif MB(BAM_DICE_DUE) #include "pins_BAM_DICE_DUE.h" #elif MB(FELIX2) diff --git a/Marlin/pins_3DRAG.h b/Marlin/pins_3DRAG.h index db19e5df2c..a3a6169028 100644 --- a/Marlin/pins_3DRAG.h +++ b/Marlin/pins_3DRAG.h @@ -36,7 +36,7 @@ #define DEFAULT_SOURCE_CODE_URL "http://3dprint.elettronicain.it/" #endif -#include "pins_RAMPS_14.h" +#include "pins_RAMPS.h" #undef Z_ENABLE_PIN #define Z_ENABLE_PIN 63 diff --git a/Marlin/pins_AZTEEG_X3.h b/Marlin/pins_AZTEEG_X3.h index ed8f4a5ebb..05a5a269fd 100644 --- a/Marlin/pins_AZTEEG_X3.h +++ b/Marlin/pins_AZTEEG_X3.h @@ -30,7 +30,7 @@ #define BOARD_NAME "Azteeg X3" -#include "pins_RAMPS_14.h" +#include "pins_RAMPS.h" #if ENABLED(VIKI2) || ENABLED(miniVIKI) diff --git a/Marlin/pins_AZTEEG_X3_PRO.h b/Marlin/pins_AZTEEG_X3_PRO.h index 3331a299a0..b531ec30d0 100644 --- a/Marlin/pins_AZTEEG_X3_PRO.h +++ b/Marlin/pins_AZTEEG_X3_PRO.h @@ -26,7 +26,7 @@ #define BOARD_NAME "Azteeg X3 Pro" -#include "pins_RAMPS_14.h" +#include "pins_RAMPS.h" #undef FAN_PIN #define FAN_PIN 6 //Part Cooling System diff --git a/Marlin/pins_BAM_DICE_DUE.h b/Marlin/pins_BAM_DICE_DUE.h index f75a6c4421..0c5914f2b9 100644 --- a/Marlin/pins_BAM_DICE_DUE.h +++ b/Marlin/pins_BAM_DICE_DUE.h @@ -30,7 +30,7 @@ #define BOARD_NAME "2PrintBeta Due" -#include "pins_RAMPS_14.h" +#include "pins_RAMPS.h" #undef TEMP_0_PIN #undef TEMP_1_PIN diff --git a/Marlin/pins_FELIX2.h b/Marlin/pins_FELIX2.h index d164f99c7c..31c67ad193 100644 --- a/Marlin/pins_FELIX2.h +++ b/Marlin/pins_FELIX2.h @@ -32,7 +32,7 @@ #define HI_VOLT_PIN_D 7 -#include "pins_RAMPS_14.h" +#include "pins_RAMPS.h" #undef SDPOWER #define SDPOWER 1 diff --git a/Marlin/pins_MKS_13.h b/Marlin/pins_MKS_13.h index eee34dd6f3..065a0f2aa0 100644 --- a/Marlin/pins_MKS_13.h +++ b/Marlin/pins_MKS_13.h @@ -37,7 +37,7 @@ #define HI_VOLT_PIN_D 7 -#include "pins_RAMPS_14.h" +#include "pins_RAMPS.h" #if ENABLED(VIKI2) || ENABLED(miniVIKI) /** diff --git a/Marlin/pins_MKS_BASE.h b/Marlin/pins_MKS_BASE.h index 92895b1d73..fc7a7f1fe9 100644 --- a/Marlin/pins_MKS_BASE.h +++ b/Marlin/pins_MKS_BASE.h @@ -32,4 +32,4 @@ #define HI_VOLT_PIN_D 7 -#include "pins_RAMPS_14.h" \ No newline at end of file +#include "pins_RAMPS.h" \ No newline at end of file diff --git a/Marlin/pins_RAMPS_14.h b/Marlin/pins_RAMPS.h similarity index 100% rename from Marlin/pins_RAMPS_14.h rename to Marlin/pins_RAMPS.h diff --git a/Marlin/pins_RAMPS_13.h b/Marlin/pins_RAMPS_13.h index e3a854b117..effce90706 100644 --- a/Marlin/pins_RAMPS_13.h +++ b/Marlin/pins_RAMPS_13.h @@ -38,4 +38,4 @@ #endif #define IS_RAMPS_13 -#include "pins_RAMPS_14.h" +#include "pins_RAMPS.h" diff --git a/Marlin/pins_RIGIDBOARD.h b/Marlin/pins_RIGIDBOARD.h index 7fdc1ae304..6b7645205d 100644 --- a/Marlin/pins_RIGIDBOARD.h +++ b/Marlin/pins_RIGIDBOARD.h @@ -24,7 +24,7 @@ * RIGIDBOARD Arduino Mega with RAMPS v1.4 pin assignments */ -#include "pins_RAMPS_14.h" +#include "pins_RAMPS.h" #undef BOARD_NAME #define BOARD_NAME "RigidBoard" diff --git a/Marlin/pins_SAINSMART_2IN1.h b/Marlin/pins_SAINSMART_2IN1.h index c032d4d6fe..848b10d449 100644 --- a/Marlin/pins_SAINSMART_2IN1.h +++ b/Marlin/pins_SAINSMART_2IN1.h @@ -35,4 +35,4 @@ // HI_VOLT_PIN_C 8 // B #define HI_VOLT_PIN_D 10 // F / E -#include "pins_RAMPS_14.h" +#include "pins_RAMPS.h" From de951c64f1fbb9e0aa275b98d1a881c563825307 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 30 Jul 2016 04:03:45 -0700 Subject: [PATCH 6/7] Make pins for EFF a consistent order --- Marlin/pins_RAMPS.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Marlin/pins_RAMPS.h b/Marlin/pins_RAMPS.h index 7cb89e9962..9aa45e5f66 100644 --- a/Marlin/pins_RAMPS.h +++ b/Marlin/pins_RAMPS.h @@ -151,28 +151,27 @@ #define HI_VOLT_PIN_A 10 #endif +#define HEATER_0_PIN HI_VOLT_PIN_A + #if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed - #define HEATER_0_PIN HI_VOLT_PIN_A #define FAN_PIN HI_VOLT_PIN_B #define HEATER_BED_PIN HI_VOLT_PIN_C + #define FAN1_PIN 4 // IO pin. Buffer needed #elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan - #define HEATER_0_PIN HI_VOLT_PIN_A #define HEATER_1_PIN HI_VOLT_PIN_B #define FAN_PIN HI_VOLT_PIN_C + #define FAN1_PIN 4 // IO pin. Buffer needed #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed - #define HEATER_0_PIN HI_VOLT_PIN_A #define HEATER_1_PIN HI_VOLT_PIN_B #define HEATER_BED_PIN HI_VOLT_PIN_C - #define FAN_PIN 4 // IO pin. Buffer needed -#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan (EFF is reversed?) - #define HEATER_0_PIN HI_VOLT_PIN_C + #define FAN_PIN 4 // IO pin. Buffer needed +#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan #define FAN_PIN HI_VOLT_PIN_B - #define FAN1_PIN HI_VOLT_PIN_A + #define FAN1_PIN HI_VOLT_PIN_C #define CONTROLLERFAN_PIN -1 #elif ENABLED(IS_RAMPS_SF) // Spindle, Fan #define FAN_PIN HI_VOLT_PIN_C #else // Non-specific are "EFB" by legacy - #define HEATER_0_PIN HI_VOLT_PIN_A #define FAN_PIN HI_VOLT_PIN_B #define HEATER_BED_PIN HI_VOLT_PIN_C #if HOTENDS == 1 From 49997e2e223df53d1b991e46e39b2bc6fdb8a9f8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 30 Jul 2016 05:32:00 -0700 Subject: [PATCH 7/7] HI_VOLT_PIN => "RAMPS_Dn_PIN" --- Marlin/pins_FELIX2.h | 2 +- Marlin/pins_MKS_13.h | 2 +- Marlin/pins_MKS_BASE.h | 2 +- Marlin/pins_RAMPS.h | 50 ++++++++++++++++++------------------ Marlin/pins_SAINSMART_2IN1.h | 8 +++--- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Marlin/pins_FELIX2.h b/Marlin/pins_FELIX2.h index 31c67ad193..83ce47bf5b 100644 --- a/Marlin/pins_FELIX2.h +++ b/Marlin/pins_FELIX2.h @@ -30,7 +30,7 @@ #define BOARD_NAME "Felix 2.0+" -#define HI_VOLT_PIN_D 7 +#define MOSFET_D_PIN 7 #include "pins_RAMPS.h" diff --git a/Marlin/pins_MKS_13.h b/Marlin/pins_MKS_13.h index 065a0f2aa0..36fc0f7b8e 100644 --- a/Marlin/pins_MKS_13.h +++ b/Marlin/pins_MKS_13.h @@ -35,7 +35,7 @@ #define BOARD_NAME "MKS > v1.3" -#define HI_VOLT_PIN_D 7 +#define MOSFET_D_PIN 7 #include "pins_RAMPS.h" diff --git a/Marlin/pins_MKS_BASE.h b/Marlin/pins_MKS_BASE.h index fc7a7f1fe9..fdaff06891 100644 --- a/Marlin/pins_MKS_BASE.h +++ b/Marlin/pins_MKS_BASE.h @@ -30,6 +30,6 @@ #define BOARD_NAME "MKS BASE 1.0" -#define HI_VOLT_PIN_D 7 +#define MOSFET_D_PIN 7 #include "pins_RAMPS.h" \ No newline at end of file diff --git a/Marlin/pins_RAMPS.h b/Marlin/pins_RAMPS.h index 9aa45e5f66..fb378e07fc 100644 --- a/Marlin/pins_RAMPS.h +++ b/Marlin/pins_RAMPS.h @@ -138,49 +138,49 @@ * Hi Voltage PWM Pin Assignments */ -#ifndef HI_VOLT_PIN_D - #define HI_VOLT_PIN_D -1 +#ifndef MOSFET_D_PIN + #define MOSFET_D_PIN -1 #endif -#ifndef HI_VOLT_PIN_C - #define HI_VOLT_PIN_C 8 +#ifndef RAMPS_D8_PIN + #define RAMPS_D8_PIN 8 #endif -#ifndef HI_VOLT_PIN_B - #define HI_VOLT_PIN_B 9 +#ifndef RAMPS_D9_PIN + #define RAMPS_D9_PIN 9 #endif -#ifndef HI_VOLT_PIN_A - #define HI_VOLT_PIN_A 10 +#ifndef RAMPS_D10_PIN + #define RAMPS_D10_PIN 10 #endif -#define HEATER_0_PIN HI_VOLT_PIN_A +#define HEATER_0_PIN RAMPS_D10_PIN #if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed - #define FAN_PIN HI_VOLT_PIN_B - #define HEATER_BED_PIN HI_VOLT_PIN_C - #define FAN1_PIN 4 // IO pin. Buffer needed + #define FAN_PIN RAMPS_D9_PIN + #define HEATER_BED_PIN RAMPS_D8_PIN #elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan - #define HEATER_1_PIN HI_VOLT_PIN_B - #define FAN_PIN HI_VOLT_PIN_C - #define FAN1_PIN 4 // IO pin. Buffer needed + #define HEATER_1_PIN RAMPS_D9_PIN + #define FAN_PIN RAMPS_D8_PIN #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed - #define HEATER_1_PIN HI_VOLT_PIN_B - #define HEATER_BED_PIN HI_VOLT_PIN_C - #define FAN_PIN 4 // IO pin. Buffer needed + #define HEATER_1_PIN RAMPS_D9_PIN + #define HEATER_BED_PIN RAMPS_D8_PIN #elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan - #define FAN_PIN HI_VOLT_PIN_B - #define FAN1_PIN HI_VOLT_PIN_C + #define FAN_PIN RAMPS_D9_PIN + #define FAN1_PIN RAMPS_D8_PIN #define CONTROLLERFAN_PIN -1 #elif ENABLED(IS_RAMPS_SF) // Spindle, Fan - #define FAN_PIN HI_VOLT_PIN_C + #define FAN_PIN RAMPS_D8_PIN #else // Non-specific are "EFB" by legacy - #define FAN_PIN HI_VOLT_PIN_B - #define HEATER_BED_PIN HI_VOLT_PIN_C + #define FAN_PIN RAMPS_D9_PIN + #define HEATER_BED_PIN RAMPS_D8_PIN #if HOTENDS == 1 - #define FAN1_PIN HI_VOLT_PIN_D + #define FAN1_PIN MOSFET_D_PIN #else - #define HEATER_1_PIN HI_VOLT_PIN_D + #define HEATER_1_PIN MOSFET_D_PIN #endif #endif +#ifndef FAN_PIN + #define FAN_PIN 4 // IO pin. Buffer needed +#endif /** * LCD Controller Pin Assignments diff --git a/Marlin/pins_SAINSMART_2IN1.h b/Marlin/pins_SAINSMART_2IN1.h index 848b10d449..8d272ada4a 100644 --- a/Marlin/pins_SAINSMART_2IN1.h +++ b/Marlin/pins_SAINSMART_2IN1.h @@ -30,9 +30,9 @@ #define BOARD_NAME "Sainsmart" -#define HI_VOLT_PIN_A 9 // E -#define HI_VOLT_PIN_B 7 // F PART FAN in front of board next to Extruder heat - // HI_VOLT_PIN_C 8 // B -#define HI_VOLT_PIN_D 10 // F / E +#define RAMPS_D10_PIN 9 // E +#define RAMPS_D9_PIN 7 // F PART FAN in front of board next to Extruder heat + // RAMPS_D8_PIN 8 // B +#define MOSFET_D_PIN 10 // F / E #include "pins_RAMPS.h"