Browse Source

Merge pull request #4505 from thinkyhead/rc_auto_select_dplugs

Auto-select power plugs for RAMPS derivatives
Scott Lahteine 9 years ago
parent
commit
7cceb15925

+ 38
- 0
Marlin/Conditionals_LCD.h View File

@@ -267,4 +267,42 @@
267 267
     #define BOOTSCREEN_TIMEOUT 2500
268 268
   #endif
269 269
 
270
+  /**
271
+   * Extruders have some combination of stepper motors and hotends
272
+   * so we separate these concepts into the defines:
273
+   *
274
+   *  EXTRUDERS    - Number of Selectable Tools
275
+   *  HOTENDS      - Number of hotends, whether connected or separate
276
+   *  E_STEPPERS   - Number of actual E stepper motors
277
+   *  TOOL_E_INDEX - Index to use when getting/setting the tool state
278
+   *  
279
+   */
280
+  #if ENABLED(SINGLENOZZLE)             // One hotend, multi-extruder
281
+    #define HOTENDS      1
282
+    #define E_STEPPERS   EXTRUDERS
283
+    #define E_MANUAL     EXTRUDERS
284
+    #define TOOL_E_INDEX current_block->active_extruder
285
+    #undef TEMP_SENSOR_1_AS_REDUNDANT
286
+    #undef HOTEND_OFFSET_X
287
+    #undef HOTEND_OFFSET_Y
288
+  #elif ENABLED(SWITCHING_EXTRUDER)     // One E stepper, unified E axis, two hotends
289
+    #define HOTENDS      EXTRUDERS
290
+    #define E_STEPPERS   1
291
+    #define E_MANUAL     1
292
+    #define TOOL_E_INDEX 0
293
+    #ifndef HOTEND_OFFSET_Z
294
+      #define HOTEND_OFFSET_Z { 0 }
295
+    #endif
296
+  #elif ENABLED(MIXING_EXTRUDER)        // Multi-stepper, unified E axis, one hotend
297
+    #define HOTENDS      1
298
+    #define E_STEPPERS   MIXING_STEPPERS
299
+    #define E_MANUAL     1
300
+    #define TOOL_E_INDEX 0
301
+  #else                                 // One stepper, E axis, and hotend per tool
302
+    #define HOTENDS      EXTRUDERS
303
+    #define E_STEPPERS   EXTRUDERS
304
+    #define E_MANUAL     EXTRUDERS
305
+    #define TOOL_E_INDEX current_block->active_extruder
306
+  #endif
307
+
270 308
 #endif //CONDITIONALS_LCD_H

+ 0
- 38
Marlin/Conditionals_post.h View File

@@ -326,44 +326,6 @@
326 326
   #define HAS_PID_FOR_BOTH (ENABLED(PIDTEMP) && ENABLED(PIDTEMPBED))
327 327
 
328 328
   /**
329
-   * Extruders have some combination of stepper motors and hotends
330
-   * so we separate these concepts into the defines:
331
-   *
332
-   *  EXTRUDERS    - Number of Selectable Tools
333
-   *  HOTENDS      - Number of hotends, whether connected or separate
334
-   *  E_STEPPERS   - Number of actual E stepper motors
335
-   *  TOOL_E_INDEX - Index to use when getting/setting the tool state
336
-   *  
337
-   */
338
-  #if ENABLED(SINGLENOZZLE)             // One hotend, multi-extruder
339
-    #define HOTENDS      1
340
-    #define E_STEPPERS   EXTRUDERS
341
-    #define E_MANUAL     EXTRUDERS
342
-    #define TOOL_E_INDEX current_block->active_extruder
343
-    #undef TEMP_SENSOR_1_AS_REDUNDANT
344
-    #undef HOTEND_OFFSET_X
345
-    #undef HOTEND_OFFSET_Y
346
-  #elif ENABLED(SWITCHING_EXTRUDER)     // One E stepper, unified E axis, two hotends
347
-    #define HOTENDS      EXTRUDERS
348
-    #define E_STEPPERS   1
349
-    #define E_MANUAL     1
350
-    #define TOOL_E_INDEX 0
351
-    #ifndef HOTEND_OFFSET_Z
352
-      #define HOTEND_OFFSET_Z { 0 }
353
-    #endif
354
-  #elif ENABLED(MIXING_EXTRUDER)        // Multi-stepper, unified E axis, one hotend
355
-    #define HOTENDS      1
356
-    #define E_STEPPERS   MIXING_STEPPERS
357
-    #define E_MANUAL     1
358
-    #define TOOL_E_INDEX 0
359
-  #else                                 // One stepper, E axis, and hotend per tool
360
-    #define HOTENDS      EXTRUDERS
361
-    #define E_STEPPERS   EXTRUDERS
362
-    #define E_MANUAL     EXTRUDERS
363
-    #define TOOL_E_INDEX current_block->active_extruder
364
-  #endif
365
-
366
-  /**
367 329
    * Default hotend offsets, if not defined
368 330
    */
369 331
   #if HOTENDS > 1

+ 1
- 0
Marlin/pins_FELIX2.h View File

@@ -30,6 +30,7 @@
30 30
 
31 31
 #define BOARD_NAME "Felix 2.0+"
32 32
 
33
+// Power outputs EFBF or EFBE
33 34
 #define MOSFET_D_PIN 7
34 35
 
35 36
 #include "pins_RAMPS.h"

+ 1
- 0
Marlin/pins_MKS_13.h View File

@@ -35,6 +35,7 @@
35 35
 
36 36
 #define BOARD_NAME "MKS > v1.3"
37 37
 
38
+// Power outputs EFBF or EFBE
38 39
 #define MOSFET_D_PIN 7
39 40
 
40 41
 #include "pins_RAMPS.h"

+ 1
- 0
Marlin/pins_MKS_BASE.h View File

@@ -30,6 +30,7 @@
30 30
 
31 31
 #define BOARD_NAME "MKS BASE 1.0"
32 32
 
33
+// Power outputs EFBF or EFBE
33 34
 #define MOSFET_D_PIN 7
34 35
 
35 36
 #include "pins_RAMPS.h"

+ 2
- 7
Marlin/pins_RAMPS.h View File

@@ -114,11 +114,8 @@
114 114
   #define SLED_PIN           -1
115 115
 #endif
116 116
 
117
-/*
118
-
119 117
 // 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)
118
+#if DISABLED(IS_RAMPS_EEB) && DISABLED(IS_RAMPS_EEF) && DISABLED(IS_RAMPS_EFB) && DISABLED(IS_RAMPS_EFF) && DISABLED(IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
122 119
   #if HOTENDS > 1
123 120
     #if TEMP_SENSOR_BED
124 121
       #define IS_RAMPS_EEB
@@ -132,8 +129,6 @@
132 129
   #endif
133 130
 #endif
134 131
 
135
-*/
136
-
137 132
 /**
138 133
  * Hi Voltage PWM Pin Assignments
139 134
  */
@@ -168,7 +163,7 @@
168 163
   #define CONTROLLERFAN_PIN  -1
169 164
 #elif ENABLED(IS_RAMPS_SF)                     // Spindle, Fan
170 165
   #define FAN_PIN        RAMPS_D8_PIN
171
-#else                                          // Non-specific are "EFB" by legacy
166
+#else                                          // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
172 167
   #define FAN_PIN        RAMPS_D9_PIN
173 168
   #define HEATER_BED_PIN RAMPS_D8_PIN
174 169
   #if HOTENDS == 1

Loading…
Cancel
Save