Browse Source

Only protect the heater pins for the defined extruders.

Changed the way the extruder pins are defined so it doesn't create extra -1 entries in the list.
Daid 13 years ago
parent
commit
7d124478fa
1 changed files with 11 additions and 13 deletions
  1. 11
    13
      Marlin/pins.h

+ 11
- 13
Marlin/pins.h View File

@@ -942,22 +942,20 @@
942 942
 #endif
943 943
 
944 944
 //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
945
-#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN
946
-#if EXTRUDERS == 3
947
-  #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN
948
-  #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN
949
-#elif EXTRUDERS == 2
950
-  #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN
951
-  #define _E2_PINS -1
952
-#elif EXTRUDERS == 1
953
-  #define _E1_PINS -1 
954
-  #define _E2_PINS -1
945
+#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN, 
946
+#if EXTRUDERS > 1
947
+  #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
955 948
 #else
956
-  #error Unsupported number of extruders
949
+  #define _E1_PINS
957 950
 #endif
951
+#elif EXTRUDERS > 2
952
+  #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
953
+#else
954
+  #define _E2_PINS
955
+#endif
956
+
958 957
 #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, LED_PIN, PS_ON_PIN, \
959
-                        HEATER_0_PIN, HEATER_1_PIN, HEATER_2_PIN, \
960 958
                         HEATER_BED_PIN, FAN_PIN,                  \
961
-                        _E0_PINS, _E1_PINS, _E2_PINS,             \
959
+                        _E0_PINS _E1_PINS _E2_PINS             \
962 960
                         TEMP_0_PIN, TEMP_1_PIN, TEMP_2_PIN, TEMP_BED_PIN }
963 961
 #endif

Loading…
Cancel
Save