Parcourir la source

Add support for 4th extruder

#1405 includes some changes to pins.h for a 4th extruder. This commit
applies those changes. It also deals with a possible problem with
SENSITIVE_PINS.
Scott Lahteine il y a 10 ans
Parent
révision
8045e4d60d
1 fichiers modifiés avec 13 ajouts et 9 suppressions
  1. 13
    9
      Marlin/pins.h

+ 13
- 9
Marlin/pins.h Voir le fichier

@@ -19,6 +19,8 @@
19 19
 #define E1_MS1_PIN -1
20 20
 #define E1_MS2_PIN -1
21 21
 #define DIGIPOTSS_PIN -1
22
+#define HEATER_3_PIN -1
23
+#define TEMP_3_PIN -1
22 24
 
23 25
 #if MB(GEN7_CUSTOM)
24 26
   #include "pins_GEN7_CUSTOM.h"
@@ -108,20 +110,20 @@
108 110
   #error Unknown MOTHERBOARD value set in Configuration.h
109 111
 #endif
110 112
 
111
-//List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
112
-#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
113
+// List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
114
+#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN, analogInputToDigitalPin(TEMP_0_PIN),
113 115
 #if EXTRUDERS > 1
114
-  #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
116
+  #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN, analogInputToDigitalPin(TEMP_1_PIN),
115 117
 #else
116 118
   #define _E1_PINS
117 119
 #endif
118 120
 #if EXTRUDERS > 2
119
-  #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
121
+  #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN, analogInputToDigitalPin(TEMP_2_PIN),
120 122
 #else
121 123
   #define _E2_PINS
122 124
 #endif
123 125
 #if EXTRUDERS > 3
124
-  #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, HEATER_3_PIN,
126
+  #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, HEATER_3_PIN, analogInputToDigitalPin(TEMP_3_PIN),
125 127
 #else
126 128
   #define _E3_PINS
127 129
 #endif
@@ -168,8 +170,10 @@
168 170
   #define Z_MIN_PIN          -1
169 171
 #endif
170 172
 
171
-#define SENSITIVE_PINS {0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, PS_ON_PIN, \
172
-                        HEATER_BED_PIN, FAN_PIN,                  \
173
-                        _E0_PINS _E1_PINS _E2_PINS _E3_PINS           \
174
-                        analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_3_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
173
+#define SENSITIVE_PINS { 0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, PS_ON_PIN, \
174
+                        HEATER_BED_PIN, FAN_PIN, \
175
+                        _E0_PINS _E1_PINS _E2_PINS _E3_PINS \
176
+                        analogInputToDigitalPin(TEMP_BED_PIN) \
177
+                       }
178
+
175 179
 #endif //__PINS_H

Chargement…
Annuler
Enregistrer