Преглед на файлове

Merge pull request #4463 from thinkyhead/rc_azteeg_x3_eeb

Wrangle RAMPS variants and derivatives
Scott Lahteine преди 9 години
родител
ревизия
4bf3526d00

+ 3
- 3
.travis.yml Целия файл

@@ -56,11 +56,11 @@ before_script:
56 56
   #
57 57
 script:
58 58
   #
59
-  # Backup Configuration.h, Configuration_adv.h, and pins_RAMPS_14.h
59
+  # Backup Configuration.h, Configuration_adv.h, and pins_RAMPS.h
60 60
   #
61 61
   - cp Marlin/Configuration.h Marlin/Configuration.h.backup
62 62
   - cp Marlin/Configuration_adv.h Marlin/Configuration_adv.h.backup
63
-  - cp Marlin/pins_RAMPS_14.h Marlin/pins_RAMPS_14.h.backup
63
+  - cp Marlin/pins_RAMPS.h Marlin/pins_RAMPS.h.backup
64 64
   #
65 65
   # Build with the default configurations
66 66
   #
@@ -221,7 +221,7 @@ script:
221 221
   #
222 222
   - restore_configs
223 223
   - opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS
224
-  - pins_set RAMPS_14 X_MAX_PIN -1
224
+  - pins_set RAMPS X_MAX_PIN -1
225 225
   - opt_set_adv Z2_MAX_PIN 2
226 226
   - build_marlin
227 227
   #

+ 4
- 2
Marlin/Marlin_main.cpp Целия файл

@@ -939,7 +939,7 @@ void setup() {
939 939
     dac_init();
940 940
   #endif
941 941
 
942
-  #if ENABLED(Z_PROBE_SLED)
942
+  #if ENABLED(Z_PROBE_SLED) && PIN_EXISTS(SLED)
943 943
     pinMode(SLED_PIN, OUTPUT);
944 944
     digitalWrite(SLED_PIN, LOW); // turn it off
945 945
   #endif // Z_PROBE_SLED
@@ -1856,8 +1856,10 @@ static void clean_up_after_endstop_or_probe_move() {
1856 1856
 
1857 1857
     // Dock sled a bit closer to ensure proper capturing
1858 1858
     do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET - ((stow) ? 1 : 0));
1859
-    digitalWrite(SLED_PIN, !stow); // switch solenoid
1860 1859
 
1860
+    #if PIN_EXISTS(SLED)
1861
+      digitalWrite(SLED_PIN, !stow); // switch solenoid
1862
+    #endif
1861 1863
   }
1862 1864
 
1863 1865
 #endif // Z_PROBE_SLED

+ 28
- 6
Marlin/pins.h Целия файл

@@ -42,13 +42,35 @@
42 42
 #elif MB(RAMPS_OLD)
43 43
   #include "pins_RAMPS_OLD.h"
44 44
 #elif MB(RAMPS_13_EFB)
45
-  #include "pins_RAMPS_13_EFB.h"
46
-#elif MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF)
45
+  #define IS_RAMPS_EFB
46
+  #include "pins_RAMPS_13.h"
47
+#elif MB(RAMPS_13_EEB)
48
+  #define IS_RAMPS_EEB
49
+  #include "pins_RAMPS_13.h"
50
+#elif MB(RAMPS_13_EFF)
51
+  #define IS_RAMPS_EFF
52
+  #include "pins_RAMPS_13.h"
53
+#elif MB(RAMPS_13_EEF)
54
+  #define IS_RAMPS_EEF
55
+  #include "pins_RAMPS_13.h"
56
+#elif MB(RAMPS_13_SF)
57
+  #define IS_RAMPS_SF
47 58
   #include "pins_RAMPS_13.h"
48 59
 #elif MB(RAMPS_14_EFB)
49
-  #include "pins_RAMPS_14_EFB.h"
50
-#elif MB(RAMPS_14_EEB) || MB(RAMPS_14_EFF) || MB(RAMPS_14_EEF) || MB(RAMPS_14_SF)
51
-  #include "pins_RAMPS_14.h"
60
+  #define IS_RAMPS_EFB
61
+  #include "pins_RAMPS.h"
62
+#elif MB(RAMPS_14_EEB)
63
+  #define IS_RAMPS_EEB
64
+  #include "pins_RAMPS.h"
65
+#elif MB(RAMPS_14_EFF)
66
+  #define IS_RAMPS_EFF
67
+  #include "pins_RAMPS.h"
68
+#elif MB(RAMPS_14_EEF)
69
+  #define IS_RAMPS_EEF
70
+  #include "pins_RAMPS.h"
71
+#elif MB(RAMPS_14_SF)
72
+  #define IS_RAMPS_SF
73
+  #include "pins_RAMPS.h"
52 74
 #elif MB(GEN6)
53 75
   #include "pins_GEN6.h"
54 76
 #elif MB(GEN6_DELUXE)
@@ -124,7 +146,7 @@
124 146
 #elif MB(LEAPFROG)
125 147
   #include "pins_LEAPFROG.h"
126 148
 #elif MB(BAM_DICE)
127
-  #include "pins_RAMPS_14.h"
149
+  #include "pins_RAMPS.h"
128 150
 #elif MB(BAM_DICE_DUE)
129 151
   #include "pins_BAM_DICE_DUE.h"
130 152
 #elif MB(FELIX2)

+ 1
- 1
Marlin/pins_3DRAG.h Целия файл

@@ -36,7 +36,7 @@
36 36
   #define DEFAULT_SOURCE_CODE_URL "http://3dprint.elettronicain.it/"
37 37
 #endif
38 38
 
39
-#include "pins_RAMPS_14.h"
39
+#include "pins_RAMPS.h"
40 40
 
41 41
 #undef Z_ENABLE_PIN
42 42
 #define Z_ENABLE_PIN       63

+ 5
- 1
Marlin/pins_AZTEEG_X3.h Целия файл

@@ -24,9 +24,13 @@
24 24
  * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments
25 25
  */
26 26
 
27
+#if HOTENDS > 2
28
+  #error "Azteeg X3 supports up to 2 hotends. Comment this line to keep going."
29
+#endif
30
+
27 31
 #define BOARD_NAME "Azteeg X3"
28 32
 
29
-#include "pins_RAMPS_14_EFB.h"
33
+#include "pins_RAMPS.h"
30 34
 
31 35
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
32 36
 

+ 1
- 1
Marlin/pins_AZTEEG_X3_PRO.h Целия файл

@@ -26,7 +26,7 @@
26 26
 
27 27
 #define BOARD_NAME "Azteeg X3 Pro"
28 28
 
29
-#include "pins_RAMPS_14.h"
29
+#include "pins_RAMPS.h"
30 30
 
31 31
 #undef FAN_PIN
32 32
 #define FAN_PIN             6 //Part Cooling System

+ 5
- 1
Marlin/pins_BAM_DICE_DUE.h Целия файл

@@ -24,9 +24,13 @@
24 24
  * BAM&DICE Due (Arduino Mega) pin assignments
25 25
  */
26 26
 
27
+#if HOTENDS > 2
28
+  #error "2PrintBeta Due supports up to 2 hotends. Comment this line to keep going."
29
+#endif
30
+
27 31
 #define BOARD_NAME "2PrintBeta Due"
28 32
 
29
-#include "pins_RAMPS_14_EFB.h"
33
+#include "pins_RAMPS.h"
30 34
 
31 35
 #undef TEMP_0_PIN
32 36
 #undef TEMP_1_PIN

+ 6
- 3
Marlin/pins_FELIX2.h Целия файл

@@ -24,12 +24,15 @@
24 24
  * FELIXprinters v2.0/3.0 (RAMPS v1.4) pin assignments
25 25
  */
26 26
 
27
+#if HOTENDS > 2
28
+  #error "Felix 2.0+ supports up to 2 hotends. Comment this line to keep going."
29
+#endif
30
+
27 31
 #define BOARD_NAME "Felix 2.0+"
28 32
 
29
-#include "pins_RAMPS_14_EFB.h"
33
+#define MOSFET_D_PIN 7
30 34
 
31
-#undef HEATER_1_PIN
32
-#define HEATER_1_PIN        7 // EXTRUDER 2
35
+#include "pins_RAMPS.h"
33 36
 
34 37
 #undef SDPOWER
35 38
 #define SDPOWER             1

+ 6
- 3
Marlin/pins_MKS_13.h Целия файл

@@ -29,12 +29,15 @@
29 29
  *  MKS v1.4  (Extruder, Extruder, Fan, Bed)
30 30
  */
31 31
 
32
+#if HOTENDS > 2
33
+  #error "MKS 1.3/1.4 supports up to 2 hotends. Comment this line to keep going."
34
+#endif
35
+
32 36
 #define BOARD_NAME "MKS > v1.3"
33 37
 
34
-#include "pins_RAMPS_14_EFB.h"
38
+#define MOSFET_D_PIN 7
35 39
 
36
-#undef HEATER_1_PIN
37
-#define HEATER_1_PIN        7 // EXTRUDER 2 (-1 on RAMPS 1.4)
40
+#include "pins_RAMPS.h"
38 41
 
39 42
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
40 43
   /**

+ 6
- 3
Marlin/pins_MKS_BASE.h Целия файл

@@ -24,9 +24,12 @@
24 24
  * MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments
25 25
  */
26 26
 
27
+#if HOTENDS > 2
28
+  #error "MKS BASE 1.0 supports up to 2 hotends. Comment this line to keep going."
29
+#endif
30
+
27 31
 #define BOARD_NAME "MKS BASE 1.0"
28 32
 
29
-#include "pins_RAMPS_14_EFB.h"
33
+#define MOSFET_D_PIN 7
30 34
 
31
-#undef HEATER_1_PIN
32
-#define HEATER_1_PIN        7
35
+#include "pins_RAMPS.h"

Marlin/pins_RAMPS_14.h → Marlin/pins_RAMPS.h Целия файл

@@ -105,40 +105,87 @@
105 105
 // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
106 106
 #define FIL_RUNOUT_PIN      4
107 107
 
108
-#if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF) || ENABLED(IS_RAMPS_EFB)
109
-  #define FAN_PIN           9 // (Sprinter config)
110
-  #if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF)
111
-    #define CONTROLLERFAN_PIN  -1 // Pin used for the fan to cool controller
112
-  #endif
113
-#elif MB(RAMPS_14_EEF) || MB(RAMPS_14_SF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF)
114
-  #define FAN_PIN           8
115
-#else
116
-  #define FAN_PIN           4 // IO pin. Buffer needed
108
+#define PS_ON_PIN          12
109
+#define TEMP_0_PIN         13   // ANALOG NUMBERING
110
+#define TEMP_1_PIN         15   // ANALOG NUMBERING
111
+#define TEMP_BED_PIN       14   // ANALOG NUMBERING
112
+
113
+#if ENABLED(Z_PROBE_SLED)
114
+  #define SLED_PIN           -1
117 115
 #endif
118 116
 
119
-#define PS_ON_PIN          12
117
+/*
120 118
 
121
-#if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF)
122
-  #define HEATER_0_PIN      8
123
-#else
124
-  #define HEATER_0_PIN     10   // EXTRUDER 1
125
-  #if !MB(RAMPS_14_EEF) && !MB(RAMPS_13_EEF) && !MB(RAMPS_14_SF) && !MB(RAMPS_13_SF)
126
-    #define HEATER_BED_PIN    8    // BED
119
+// Augmentation for auto-assigning RAMPS plugs
120
+
121
+#if DISABLED(IS_RAMPS_EEB) && DISABLED(IS_RAMPS_EEF) && DISABLED(IS_RAMPS_EFB) && DISABLED(IS_RAMPS_EFF) && DISABLED(IS_RAMPS_SF)
122
+  #if HOTENDS > 1
123
+    #if TEMP_SENSOR_BED
124
+      #define IS_RAMPS_EEB
125
+    #else
126
+      #define IS_RAMPS_EEF
127
+    #endif
128
+  #elif TEMP_SENSOR_BED
129
+    #define IS_RAMPS_EFB
130
+  #else
131
+    #define IS_RAMPS_EFF
127 132
   #endif
128 133
 #endif
129 134
 
130
-#if !MB(RAMPS_14_SF) && !MB(RAMPS_13_SF) && !ENABLED(IS_RAMPS_EFB)
131
-  #define HEATER_1_PIN      9   // EXTRUDER 2 (FAN On Sprinter)
135
+*/
136
+
137
+/**
138
+ * Hi Voltage PWM Pin Assignments
139
+ */
140
+
141
+#ifndef MOSFET_D_PIN
142
+  #define MOSFET_D_PIN  -1
143
+#endif
144
+#ifndef RAMPS_D8_PIN
145
+  #define RAMPS_D8_PIN   8
146
+#endif
147
+#ifndef RAMPS_D9_PIN
148
+  #define RAMPS_D9_PIN   9
149
+#endif
150
+#ifndef RAMPS_D10_PIN
151
+  #define RAMPS_D10_PIN 10
132 152
 #endif
133 153
 
134
-#define TEMP_0_PIN         13   // ANALOG NUMBERING
135
-#define TEMP_1_PIN         15   // ANALOG NUMBERING
136
-#define TEMP_BED_PIN       14   // ANALOG NUMBERING
154
+#define HEATER_0_PIN     RAMPS_D10_PIN
155
+
156
+#if ENABLED(IS_RAMPS_EFB)                      // Hotend, Fan, Bed
157
+  #define FAN_PIN        RAMPS_D9_PIN
158
+  #define HEATER_BED_PIN RAMPS_D8_PIN
159
+#elif ENABLED(IS_RAMPS_EEF)                    // Hotend, Hotend, Fan
160
+  #define HEATER_1_PIN   RAMPS_D9_PIN
161
+  #define FAN_PIN        RAMPS_D8_PIN
162
+#elif ENABLED(IS_RAMPS_EEB)                    // Hotend, Hotend, Bed
163
+  #define HEATER_1_PIN   RAMPS_D9_PIN
164
+  #define HEATER_BED_PIN RAMPS_D8_PIN
165
+#elif ENABLED(IS_RAMPS_EFF)                    // Hotend, Fan, Fan
166
+  #define FAN_PIN        RAMPS_D9_PIN
167
+  #define FAN1_PIN       RAMPS_D8_PIN
168
+  #define CONTROLLERFAN_PIN  -1
169
+#elif ENABLED(IS_RAMPS_SF)                     // Spindle, Fan
170
+  #define FAN_PIN        RAMPS_D8_PIN
171
+#else                                          // Non-specific are "EFB" by legacy
172
+  #define FAN_PIN        RAMPS_D9_PIN
173
+  #define HEATER_BED_PIN RAMPS_D8_PIN
174
+  #if HOTENDS == 1
175
+    #define FAN1_PIN     MOSFET_D_PIN
176
+  #else
177
+    #define HEATER_1_PIN MOSFET_D_PIN
178
+  #endif
179
+#endif
137 180
 
138
-#if ENABLED(Z_PROBE_SLED)
139
-  #define SLED_PIN           -1
181
+#ifndef FAN_PIN
182
+  #define FAN_PIN 4      // IO pin. Buffer needed
140 183
 #endif
141 184
 
185
+/**
186
+ * LCD Controller Pin Assignments
187
+ */
188
+
142 189
 #if ENABLED(ULTRA_LCD)
143 190
 
144 191
   #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
@@ -301,4 +348,3 @@
301 348
 #else
302 349
   #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
303 350
 #endif
304
-

+ 1
- 1
Marlin/pins_RAMPS_13.h Целия файл

@@ -38,4 +38,4 @@
38 38
 #endif
39 39
 
40 40
 #define IS_RAMPS_13
41
-#include "pins_RAMPS_14.h"
41
+#include "pins_RAMPS.h"

+ 0
- 32
Marlin/pins_RAMPS_13_EFB.h Целия файл

@@ -1,32 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Arduino Mega with RAMPS v1.3 pin assignments
25
- *
26
- *  RAMPS_13_EFB (Extruder, Fan, Bed)
27
- */
28
-
29
-#define BOARD_NAME "RAMPS 1.3 EFB"
30
-
31
-#define IS_RAMPS_13
32
-#include "pins_RAMPS_14_EFB.h"

+ 0
- 34
Marlin/pins_RAMPS_14_EFB.h Целия файл

@@ -1,34 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Arduino Mega with RAMPS v1.4 pin assignments
25
- *
26
- *  RAMPS_14_EFB (Extruder, Fan, Bed)
27
- */
28
-
29
-#ifndef BOARD_NAME
30
-  #define BOARD_NAME "RAMPS 1.4 EFB"
31
-#endif
32
-
33
-#define IS_RAMPS_EFB
34
-#include "pins_RAMPS_14.h"

+ 1
- 1
Marlin/pins_RIGIDBOARD.h Целия файл

@@ -24,7 +24,7 @@
24 24
  * RIGIDBOARD Arduino Mega with RAMPS v1.4 pin assignments
25 25
  */
26 26
 
27
-#include "pins_RAMPS_14.h"
27
+#include "pins_RAMPS.h"
28 28
 
29 29
 #undef BOARD_NAME
30 30
 #define BOARD_NAME "RigidBoard"

+ 9
- 10
Marlin/pins_SAINSMART_2IN1.h Целия файл

@@ -24,16 +24,15 @@
24 24
  *  Sainsmart 2-in-1 pin assignments
25 25
  */
26 26
 
27
-#include "pins_RAMPS_14_EFB.h"
27
+#if HOTENDS > 2
28
+  #error "Sainsmart 2-in-1 supports up to 2 hotends. Comment this line to keep going."
29
+#endif
28 30
 
29
-#undef BOARD_NAME
30
-#define BOARD_NAME          "Sainsmart"
31
+#define BOARD_NAME "Sainsmart"
31 32
 
32
-#undef FAN_PIN
33
-#define FAN_PIN             7 // PART FAN in front of board next to Extruder heat
33
+#define RAMPS_D10_PIN 9 // E
34
+#define RAMPS_D9_PIN  7 // F PART FAN in front of board next to Extruder heat
35
+     // RAMPS_D8_PIN  8 // B
36
+#define MOSFET_D_PIN 10 // F / E
34 37
 
35
-#undef HEATER_0_PIN
36
-#define HEATER_0_PIN        9   // EXTRUDER 1
37
-
38
-#undef HEATER_1_PIN
39
-#define HEATER_1_PIN       10   // EXTRUDER 2
38
+#include "pins_RAMPS.h"

Loading…
Отказ
Запис