Browse Source

Automatically set X2 stepper pins

Scott Lahteine 8 years ago
parent
commit
07c9a11c3c

+ 1
- 1
.travis.yml View File

107
   # Test DUAL_X_CARRIAGE
107
   # Test DUAL_X_CARRIAGE
108
   #
108
   #
109
   - restore_configs
109
   - restore_configs
110
-  - opt_set MOTHERBOARD BOARD_RAMPS_14_EEB
110
+  - opt_set MOTHERBOARD BOARD_RUMBA
111
   - opt_set EXTRUDERS 2
111
   - opt_set EXTRUDERS 2
112
   - opt_set TEMP_SENSOR_1 1
112
   - opt_set TEMP_SENSOR_1 1
113
   - opt_enable USE_XMAX_PLUG
113
   - opt_enable USE_XMAX_PLUG

+ 1
- 6
Marlin/Configuration_adv.h View File

227
 // Enable this for dual x-carriage printers.
227
 // Enable this for dual x-carriage printers.
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
230
-// allowing faster printing speeds.
230
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
231
 //#define DUAL_X_CARRIAGE
231
 //#define DUAL_X_CARRIAGE
232
 #if ENABLED(DUAL_X_CARRIAGE)
232
 #if ENABLED(DUAL_X_CARRIAGE)
233
   // Configuration for second X-carriage
233
   // Configuration for second X-carriage
242
       // without modifying the firmware (through the "M218 T1 X???" command).
242
       // without modifying the firmware (through the "M218 T1 X???" command).
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
244
 
244
 
245
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
246
-  #define X2_ENABLE_PIN 29
247
-  #define X2_STEP_PIN 25
248
-  #define X2_DIR_PIN 23
249
-
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
245
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
246
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //                           as long as it supports dual x-carriages. (M605 S0)
247
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/Felix/Configuration_adv.h View File

227
 // Enable this for dual x-carriage printers.
227
 // Enable this for dual x-carriage printers.
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
230
-// allowing faster printing speeds.
230
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
231
 //#define DUAL_X_CARRIAGE
231
 //#define DUAL_X_CARRIAGE
232
 #if ENABLED(DUAL_X_CARRIAGE)
232
 #if ENABLED(DUAL_X_CARRIAGE)
233
   // Configuration for second X-carriage
233
   // Configuration for second X-carriage
242
       // without modifying the firmware (through the "M218 T1 X???" command).
242
       // without modifying the firmware (through the "M218 T1 X???" command).
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
244
 
244
 
245
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
246
-  #define X2_ENABLE_PIN 29
247
-  #define X2_STEP_PIN 25
248
-  #define X2_DIR_PIN 23
249
-
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
245
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
246
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //                           as long as it supports dual x-carriages. (M605 S0)
247
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

227
 // Enable this for dual x-carriage printers.
227
 // Enable this for dual x-carriage printers.
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
230
-// allowing faster printing speeds.
230
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
231
 //#define DUAL_X_CARRIAGE
231
 //#define DUAL_X_CARRIAGE
232
 #if ENABLED(DUAL_X_CARRIAGE)
232
 #if ENABLED(DUAL_X_CARRIAGE)
233
   // Configuration for second X-carriage
233
   // Configuration for second X-carriage
242
       // without modifying the firmware (through the "M218 T1 X???" command).
242
       // without modifying the firmware (through the "M218 T1 X???" command).
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
244
 
244
 
245
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
246
-  #define X2_ENABLE_PIN 29
247
-  #define X2_STEP_PIN 25
248
-  #define X2_DIR_PIN 23
249
-
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
245
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
246
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //                           as long as it supports dual x-carriages. (M605 S0)
247
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

227
 // Enable this for dual x-carriage printers.
227
 // Enable this for dual x-carriage printers.
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
230
-// allowing faster printing speeds.
230
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
231
 //#define DUAL_X_CARRIAGE
231
 //#define DUAL_X_CARRIAGE
232
 #if ENABLED(DUAL_X_CARRIAGE)
232
 #if ENABLED(DUAL_X_CARRIAGE)
233
   // Configuration for second X-carriage
233
   // Configuration for second X-carriage
242
       // without modifying the firmware (through the "M218 T1 X???" command).
242
       // without modifying the firmware (through the "M218 T1 X???" command).
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
244
 
244
 
245
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
246
-  #define X2_ENABLE_PIN 29
247
-  #define X2_STEP_PIN 25
248
-  #define X2_DIR_PIN 23
249
-
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
245
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
246
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //                           as long as it supports dual x-carriages. (M605 S0)
247
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/K8200/Configuration_adv.h View File

233
 // Enable this for dual x-carriage printers.
233
 // Enable this for dual x-carriage printers.
234
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
234
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
235
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
235
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
236
-// allowing faster printing speeds.
236
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
237
 //#define DUAL_X_CARRIAGE
237
 //#define DUAL_X_CARRIAGE
238
 #if ENABLED(DUAL_X_CARRIAGE)
238
 #if ENABLED(DUAL_X_CARRIAGE)
239
   // Configuration for second X-carriage
239
   // Configuration for second X-carriage
248
       // without modifying the firmware (through the "M218 T1 X???" command).
248
       // without modifying the firmware (through the "M218 T1 X???" command).
249
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
249
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
250
 
250
 
251
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
252
-  #define X2_ENABLE_PIN 29
253
-  #define X2_STEP_PIN 25
254
-  #define X2_DIR_PIN 23
255
-
256
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
257
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
258
   //                           as long as it supports dual x-carriages. (M605 S0)
253
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

227
 // Enable this for dual x-carriage printers.
227
 // Enable this for dual x-carriage printers.
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
230
-// allowing faster printing speeds.
230
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
231
 //#define DUAL_X_CARRIAGE
231
 //#define DUAL_X_CARRIAGE
232
 #if ENABLED(DUAL_X_CARRIAGE)
232
 #if ENABLED(DUAL_X_CARRIAGE)
233
   // Configuration for second X-carriage
233
   // Configuration for second X-carriage
242
       // without modifying the firmware (through the "M218 T1 X???" command).
242
       // without modifying the firmware (through the "M218 T1 X???" command).
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
244
 
244
 
245
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
246
-  #define X2_ENABLE_PIN 29
247
-  #define X2_STEP_PIN 25
248
-  #define X2_DIR_PIN 23
249
-
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
245
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
246
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //                           as long as it supports dual x-carriages. (M605 S0)
247
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/SCARA/Configuration_adv.h View File

227
 // Enable this for dual x-carriage printers.
227
 // Enable this for dual x-carriage printers.
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
230
-// allowing faster printing speeds.
230
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
231
 //#define DUAL_X_CARRIAGE
231
 //#define DUAL_X_CARRIAGE
232
 #if ENABLED(DUAL_X_CARRIAGE)
232
 #if ENABLED(DUAL_X_CARRIAGE)
233
   // Configuration for second X-carriage
233
   // Configuration for second X-carriage
242
       // without modifying the firmware (through the "M218 T1 X???" command).
242
       // without modifying the firmware (through the "M218 T1 X???" command).
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
244
 
244
 
245
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
246
-  #define X2_ENABLE_PIN 29
247
-  #define X2_STEP_PIN 25
248
-  #define X2_DIR_PIN 23
249
-
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
245
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
246
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //                           as long as it supports dual x-carriages. (M605 S0)
247
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

235
 // Enable this for dual x-carriage printers.
235
 // Enable this for dual x-carriage printers.
236
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
236
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
237
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
237
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
238
-// allowing faster printing speeds.
238
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
239
 //#define DUAL_X_CARRIAGE
239
 //#define DUAL_X_CARRIAGE
240
 #if ENABLED(DUAL_X_CARRIAGE)
240
 #if ENABLED(DUAL_X_CARRIAGE)
241
   // Configuration for second X-carriage
241
   // Configuration for second X-carriage
250
       // without modifying the firmware (through the "M218 T1 X???" command).
250
       // without modifying the firmware (through the "M218 T1 X???" command).
251
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
251
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
252
 
252
 
253
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
254
-  #define X2_ENABLE_PIN 29
255
-  #define X2_STEP_PIN 25
256
-  #define X2_DIR_PIN 23
257
-
258
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
253
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
259
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
254
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
260
   //                           as long as it supports dual x-carriages. (M605 S0)
255
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

227
 // Enable this for dual x-carriage printers.
227
 // Enable this for dual x-carriage printers.
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
230
-// allowing faster printing speeds.
230
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
231
 //#define DUAL_X_CARRIAGE
231
 //#define DUAL_X_CARRIAGE
232
 #if ENABLED(DUAL_X_CARRIAGE)
232
 #if ENABLED(DUAL_X_CARRIAGE)
233
   // Configuration for second X-carriage
233
   // Configuration for second X-carriage
242
       // without modifying the firmware (through the "M218 T1 X???" command).
242
       // without modifying the firmware (through the "M218 T1 X???" command).
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
244
 
244
 
245
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
246
-  #define X2_ENABLE_PIN 29
247
-  #define X2_STEP_PIN 25
248
-  #define X2_DIR_PIN 23
249
-
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
245
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
246
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //                           as long as it supports dual x-carriages. (M605 S0)
247
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h View File

227
 // Enable this for dual x-carriage printers.
227
 // Enable this for dual x-carriage printers.
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
230
-// allowing faster printing speeds.
230
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
231
 //#define DUAL_X_CARRIAGE
231
 //#define DUAL_X_CARRIAGE
232
 #if ENABLED(DUAL_X_CARRIAGE)
232
 #if ENABLED(DUAL_X_CARRIAGE)
233
   // Configuration for second X-carriage
233
   // Configuration for second X-carriage
242
       // without modifying the firmware (through the "M218 T1 X???" command).
242
       // without modifying the firmware (through the "M218 T1 X???" command).
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
244
 
244
 
245
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
246
-  #define X2_ENABLE_PIN 29
247
-  #define X2_STEP_PIN 25
248
-  #define X2_DIR_PIN 23
249
-
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
245
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
246
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //                           as long as it supports dual x-carriages. (M605 S0)
247
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

227
 // Enable this for dual x-carriage printers.
227
 // Enable this for dual x-carriage printers.
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
230
-// allowing faster printing speeds.
230
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
231
 //#define DUAL_X_CARRIAGE
231
 //#define DUAL_X_CARRIAGE
232
 #if ENABLED(DUAL_X_CARRIAGE)
232
 #if ENABLED(DUAL_X_CARRIAGE)
233
   // Configuration for second X-carriage
233
   // Configuration for second X-carriage
242
       // without modifying the firmware (through the "M218 T1 X???" command).
242
       // without modifying the firmware (through the "M218 T1 X???" command).
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
244
 
244
 
245
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
246
-  #define X2_ENABLE_PIN 29
247
-  #define X2_STEP_PIN 25
248
-  #define X2_DIR_PIN 23
249
-
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
245
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
246
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //                           as long as it supports dual x-carriages. (M605 S0)
247
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

227
 // Enable this for dual x-carriage printers.
227
 // Enable this for dual x-carriage printers.
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
230
-// allowing faster printing speeds.
230
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
231
 //#define DUAL_X_CARRIAGE
231
 //#define DUAL_X_CARRIAGE
232
 #if ENABLED(DUAL_X_CARRIAGE)
232
 #if ENABLED(DUAL_X_CARRIAGE)
233
   // Configuration for second X-carriage
233
   // Configuration for second X-carriage
242
       // without modifying the firmware (through the "M218 T1 X???" command).
242
       // without modifying the firmware (through the "M218 T1 X???" command).
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
244
 
244
 
245
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
246
-  #define X2_ENABLE_PIN 29
247
-  #define X2_STEP_PIN 25
248
-  #define X2_DIR_PIN 23
249
-
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
245
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
246
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //                           as long as it supports dual x-carriages. (M605 S0)
247
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

232
 // Enable this for dual x-carriage printers.
232
 // Enable this for dual x-carriage printers.
233
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
233
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
234
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
234
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
235
-// allowing faster printing speeds.
235
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
236
 //#define DUAL_X_CARRIAGE
236
 //#define DUAL_X_CARRIAGE
237
 #if ENABLED(DUAL_X_CARRIAGE)
237
 #if ENABLED(DUAL_X_CARRIAGE)
238
   // Configuration for second X-carriage
238
   // Configuration for second X-carriage
247
       // without modifying the firmware (through the "M218 T1 X???" command).
247
       // without modifying the firmware (through the "M218 T1 X???" command).
248
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
248
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
249
 
249
 
250
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
251
-  #define X2_ENABLE_PIN 29
252
-  #define X2_STEP_PIN 25
253
-  #define X2_DIR_PIN 23
254
-
255
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
256
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
257
   //                           as long as it supports dual x-carriages. (M605 S0)
252
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

227
 // Enable this for dual x-carriage printers.
227
 // Enable this for dual x-carriage printers.
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
230
-// allowing faster printing speeds.
230
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
231
 //#define DUAL_X_CARRIAGE
231
 //#define DUAL_X_CARRIAGE
232
 #if ENABLED(DUAL_X_CARRIAGE)
232
 #if ENABLED(DUAL_X_CARRIAGE)
233
   // Configuration for second X-carriage
233
   // Configuration for second X-carriage
242
       // without modifying the firmware (through the "M218 T1 X???" command).
242
       // without modifying the firmware (through the "M218 T1 X???" command).
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
244
 
244
 
245
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
246
-  #define X2_ENABLE_PIN 29
247
-  #define X2_STEP_PIN 25
248
-  #define X2_DIR_PIN 23
249
-
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
245
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
246
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //                           as long as it supports dual x-carriages. (M605 S0)
247
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/makibox/Configuration_adv.h View File

227
 // Enable this for dual x-carriage printers.
227
 // Enable this for dual x-carriage printers.
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
230
-// allowing faster printing speeds.
230
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
231
 //#define DUAL_X_CARRIAGE
231
 //#define DUAL_X_CARRIAGE
232
 #if ENABLED(DUAL_X_CARRIAGE)
232
 #if ENABLED(DUAL_X_CARRIAGE)
233
   // Configuration for second X-carriage
233
   // Configuration for second X-carriage
242
       // without modifying the firmware (through the "M218 T1 X???" command).
242
       // without modifying the firmware (through the "M218 T1 X???" command).
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
244
 
244
 
245
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
246
-  #define X2_ENABLE_PIN 29
247
-  #define X2_STEP_PIN 25
248
-  #define X2_DIR_PIN 23
249
-
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
245
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
246
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //                           as long as it supports dual x-carriages. (M605 S0)
247
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 1
- 6
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

227
 // Enable this for dual x-carriage printers.
227
 // Enable this for dual x-carriage printers.
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
228
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
229
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
230
-// allowing faster printing speeds.
230
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
231
 //#define DUAL_X_CARRIAGE
231
 //#define DUAL_X_CARRIAGE
232
 #if ENABLED(DUAL_X_CARRIAGE)
232
 #if ENABLED(DUAL_X_CARRIAGE)
233
   // Configuration for second X-carriage
233
   // Configuration for second X-carriage
242
       // without modifying the firmware (through the "M218 T1 X???" command).
242
       // without modifying the firmware (through the "M218 T1 X???" command).
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
243
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
244
 
244
 
245
-  // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
246
-  #define X2_ENABLE_PIN 29
247
-  #define X2_STEP_PIN 25
248
-  #define X2_DIR_PIN 23
249
-
250
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
245
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
251
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
246
   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
252
   //                           as long as it supports dual x-carriages. (M605 S0)
247
   //                           as long as it supports dual x-carriages. (M605 S0)

+ 26
- 0
Marlin/macros.h View File

55
 #define NUMERIC_SIGNED(a) (NUMERIC(a) || (a) == '-')
55
 #define NUMERIC_SIGNED(a) (NUMERIC(a) || (a) == '-')
56
 #define COUNT(a) (sizeof(a)/sizeof(*a))
56
 #define COUNT(a) (sizeof(a)/sizeof(*a))
57
 
57
 
58
+// Macros for adding
59
+#define INC_0 1
60
+#define INC_1 2
61
+#define INC_2 3
62
+#define INC_3 4
63
+#define INC_4 5
64
+#define INC_5 6
65
+#define INC_6 7
66
+#define INC_7 8
67
+#define INC_8 9
68
+#define INCREMENT_(n) INC_ ##n
69
+#define INCREMENT(n) INCREMENT_(n)
70
+
71
+// Macros for subtracting
72
+#define DEC_1 0
73
+#define DEC_2 1
74
+#define DEC_3 2
75
+#define DEC_4 3
76
+#define DEC_5 4
77
+#define DEC_6 5
78
+#define DEC_7 6
79
+#define DEC_8 7
80
+#define DEC_9 8
81
+#define DECREMENT_(n) DEC_ ##n
82
+#define DECREMENT(n) DECREMENT_(n)
83
+
58
 #define PIN_EXISTS(PN) (defined(PN ##_PIN) && PN ##_PIN >= 0)
84
 #define PIN_EXISTS(PN) (defined(PN ##_PIN) && PN ##_PIN >= 0)
59
 
85
 
60
 #define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0)
86
 #define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0)

+ 32
- 13
Marlin/pins.h View File

259
       #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, HEATER_3_PIN, EXTRUDER_3_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_3_PIN),
259
       #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, HEATER_3_PIN, EXTRUDER_3_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_3_PIN),
260
     #endif
260
     #endif
261
   #endif
261
   #endif
262
-#elif ENABLED(Y_DUAL_STEPPER_DRIVERS) || ENABLED(Z_DUAL_STEPPER_DRIVERS)
263
-  #undef _E1_PINS
264
-  #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN,
265
 #endif
262
 #endif
266
 
263
 
267
 #define BED_PINS HEATER_BED_PIN, marlinAnalogInputToDigitalPin(TEMP_BED_PIN),
264
 #define BED_PINS HEATER_BED_PIN, marlinAnalogInputToDigitalPin(TEMP_BED_PIN),
338
 #endif
335
 #endif
339
 
336
 
340
 //
337
 //
341
-// Dual Y and Dual Z support
342
-// These options are mutually-exclusive
338
+// Dual X-carriage, Dual Y, Dual Z support
343
 //
339
 //
344
 
340
 
341
+#define _X2_PINS
342
+#define _Y2_PINS
343
+#define _Z2_PINS
344
+
345
 #define __EPIN(p,q) E##p##_##q##_PIN
345
 #define __EPIN(p,q) E##p##_##q##_PIN
346
 #define _EPIN(p,q) __EPIN(p,q)
346
 #define _EPIN(p,q) __EPIN(p,q)
347
 
347
 
348
+#if ENABLED(DUAL_X_CARRIAGE)
349
+  // The X2 axis, if any, should be the next open extruder port
350
+  #ifndef X2_STEP_PIN
351
+    #define X2_STEP_PIN   _EPIN(EXTRUDERS, STEP)
352
+    #define X2_DIR_PIN    _EPIN(EXTRUDERS, DIR)
353
+    #define X2_ENABLE_PIN _EPIN(EXTRUDERS, ENABLE)
354
+  #endif
355
+  #undef _X2_PINS
356
+  #define _X2_PINS X2_STEP_PIN, X2_DIR_PIN, X2_ENABLE_PIN,
357
+  #define Y2_Z2_E_INDEX INCREMENT(EXTRUDERS)
358
+#else
359
+  #define Y2_Z2_E_INDEX EXTRUDERS
360
+#endif
361
+
348
 // The Y2 axis, if any, should be the next open extruder port
362
 // The Y2 axis, if any, should be the next open extruder port
349
-#ifndef Y2_STEP_PIN
350
-  #define Y2_STEP_PIN   _EPIN(EXTRUDERS, STEP)
351
-  #define Y2_DIR_PIN    _EPIN(EXTRUDERS, DIR)
352
-  #define Y2_ENABLE_PIN _EPIN(EXTRUDERS, ENABLE)
363
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS) && !defined(Y2_STEP_PIN)
364
+  #define Y2_STEP_PIN   _EPIN(Y2_Z2_E_INDEX, STEP)
365
+  #define Y2_DIR_PIN    _EPIN(Y2_Z2_E_INDEX, DIR)
366
+  #define Y2_ENABLE_PIN _EPIN(Y2_Z2_E_INDEX, ENABLE)
367
+  #undef _Y2_PINS
368
+  #define _Y2_PINS Y2_STEP_PIN, Y2_DIR_PIN, Y2_ENABLE_PIN,
353
 #endif
369
 #endif
354
 
370
 
355
 // The Z2 axis, if any, should be the next open extruder port
371
 // The Z2 axis, if any, should be the next open extruder port
356
-#ifndef Z2_STEP_PIN
357
-  #define Z2_STEP_PIN   _EPIN(EXTRUDERS, STEP)
358
-  #define Z2_DIR_PIN    _EPIN(EXTRUDERS, DIR)
359
-  #define Z2_ENABLE_PIN _EPIN(EXTRUDERS, ENABLE)
372
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS) && !defined(Z2_STEP_PIN)
373
+  #define Z2_STEP_PIN   _EPIN(Y2_Z2_E_INDEX, STEP)
374
+  #define Z2_DIR_PIN    _EPIN(Y2_Z2_E_INDEX, DIR)
375
+  #define Z2_ENABLE_PIN _EPIN(Y2_Z2_E_INDEX, ENABLE)
376
+  #undef _Z2_PINS
377
+  #define _Z2_PINS Z2_STEP_PIN, Z2_DIR_PIN, Z2_ENABLE_PIN,
360
 #endif
378
 #endif
361
 
379
 
362
 #define SENSITIVE_PINS { 0, 1, \
380
 #define SENSITIVE_PINS { 0, 1, \
365
     Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MIN_PROBE_PIN, \
383
     Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MIN_PROBE_PIN, \
366
     PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, FAN1_PIN, FAN2_PIN, CONTROLLERFAN_PIN, \
384
     PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, FAN1_PIN, FAN2_PIN, CONTROLLERFAN_PIN, \
367
     _E0_PINS _E1_PINS _E2_PINS _E3_PINS BED_PINS \
385
     _E0_PINS _E1_PINS _E2_PINS _E3_PINS BED_PINS \
386
+    _X2_PINS _Y2_PINS _Z2_PINS \
368
     X_MS1_PIN, X_MS2_PIN, Y_MS1_PIN, Y_MS2_PIN, Z_MS1_PIN, Z_MS2_PIN \
387
     X_MS1_PIN, X_MS2_PIN, Y_MS1_PIN, Y_MS2_PIN, Z_MS1_PIN, Z_MS2_PIN \
369
   }
388
   }
370
 
389
 

+ 17
- 13
Marlin/stepper.cpp View File

491
   #if HAS_X_ENABLE
491
   #if HAS_X_ENABLE
492
     X_ENABLE_INIT;
492
     X_ENABLE_INIT;
493
     if (!X_ENABLE_ON) X_ENABLE_WRITE(HIGH);
493
     if (!X_ENABLE_ON) X_ENABLE_WRITE(HIGH);
494
+    #if ENABLED(DUAL_X_CARRIAGE) && HAS_X2_ENABLE
495
+      X2_ENABLE_INIT;
496
+      if (!X_ENABLE_ON) X2_ENABLE_WRITE(HIGH);
497
+    #endif
494
   #endif
498
   #endif
495
-  #if HAS_X2_ENABLE
496
-    X2_ENABLE_INIT;
497
-    if (!X_ENABLE_ON) X2_ENABLE_WRITE(HIGH);
498
-  #endif
499
+
499
   #if HAS_Y_ENABLE
500
   #if HAS_Y_ENABLE
500
     Y_ENABLE_INIT;
501
     Y_ENABLE_INIT;
501
     if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
502
     if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
502
-
503
-  #if ENABLED(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_ENABLE
504
-    Y2_ENABLE_INIT;
505
-    if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
506
-  #endif
503
+    #if ENABLED(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_ENABLE
504
+      Y2_ENABLE_INIT;
505
+      if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
506
+    #endif
507
   #endif
507
   #endif
508
+
508
   #if HAS_Z_ENABLE
509
   #if HAS_Z_ENABLE
509
     Z_ENABLE_INIT;
510
     Z_ENABLE_INIT;
510
     if (!Z_ENABLE_ON) Z_ENABLE_WRITE(HIGH);
511
     if (!Z_ENABLE_ON) Z_ENABLE_WRITE(HIGH);
511
-
512
     #if ENABLED(Z_DUAL_STEPPER_DRIVERS) && HAS_Z2_ENABLE
512
     #if ENABLED(Z_DUAL_STEPPER_DRIVERS) && HAS_Z2_ENABLE
513
       Z2_ENABLE_INIT;
513
       Z2_ENABLE_INIT;
514
       if (!Z_ENABLE_ON) Z2_ENABLE_WRITE(HIGH);
514
       if (!Z_ENABLE_ON) Z2_ENABLE_WRITE(HIGH);
515
     #endif
515
     #endif
516
   #endif
516
   #endif
517
+
517
   #if HAS_E0_ENABLE
518
   #if HAS_E0_ENABLE
518
     E0_ENABLE_INIT;
519
     E0_ENABLE_INIT;
519
     if (!E_ENABLE_ON) E0_ENABLE_WRITE(HIGH);
520
     if (!E_ENABLE_ON) E0_ENABLE_WRITE(HIGH);
550
   // Initialize Step Pins
551
   // Initialize Step Pins
551
   #if HAS_X_STEP
552
   #if HAS_X_STEP
552
     AXIS_INIT(x, X, X);
553
     AXIS_INIT(x, X, X);
554
+    #if ENABLED(DUAL_X_CARRIAGE) && HAS_X2_STEP
555
+      AXIS_INIT(x, X2, X);
556
+    #endif
553
   #endif
557
   #endif
554
-  #if HAS_X2_STEP
555
-    AXIS_INIT(x, X2, X);
556
-  #endif
558
+
557
   #if HAS_Y_STEP
559
   #if HAS_Y_STEP
558
     #if ENABLED(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_STEP
560
     #if ENABLED(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_STEP
559
       Y2_STEP_INIT;
561
       Y2_STEP_INIT;
561
     #endif
563
     #endif
562
     AXIS_INIT(y, Y, Y);
564
     AXIS_INIT(y, Y, Y);
563
   #endif
565
   #endif
566
+
564
   #if HAS_Z_STEP
567
   #if HAS_Z_STEP
565
     #if ENABLED(Z_DUAL_STEPPER_DRIVERS) && HAS_Z2_STEP
568
     #if ENABLED(Z_DUAL_STEPPER_DRIVERS) && HAS_Z2_STEP
566
       Z2_STEP_INIT;
569
       Z2_STEP_INIT;
568
     #endif
571
     #endif
569
     AXIS_INIT(z, Z, Z);
572
     AXIS_INIT(z, Z, Z);
570
   #endif
573
   #endif
574
+
571
   #if HAS_E0_STEP
575
   #if HAS_E0_STEP
572
     E_AXIS_INIT(0);
576
     E_AXIS_INIT(0);
573
   #endif
577
   #endif

+ 35
- 29
Marlin/stepper_indirection.h View File

60
 #define X_ENABLE_READ READ(X_ENABLE_PIN)
60
 #define X_ENABLE_READ READ(X_ENABLE_PIN)
61
 
61
 
62
 // X2 motor
62
 // X2 motor
63
-#define X2_STEP_INIT SET_OUTPUT(X2_STEP_PIN)
64
-#define X2_STEP_WRITE(STATE) WRITE(X2_STEP_PIN,STATE)
65
-#define X2_STEP_READ READ(X2_STEP_PIN)
63
+#if ENABLED(DUAL_X_CARRIAGE)
64
+  #define X2_STEP_INIT SET_OUTPUT(X2_STEP_PIN)
65
+  #define X2_STEP_WRITE(STATE) WRITE(X2_STEP_PIN,STATE)
66
+  #define X2_STEP_READ READ(X2_STEP_PIN)
66
 
67
 
67
-#define X2_DIR_INIT SET_OUTPUT(X2_DIR_PIN)
68
-#define X2_DIR_WRITE(STATE) WRITE(X2_DIR_PIN,STATE)
69
-#define X2_DIR_READ READ(X_DIR_PIN)
68
+  #define X2_DIR_INIT SET_OUTPUT(X2_DIR_PIN)
69
+  #define X2_DIR_WRITE(STATE) WRITE(X2_DIR_PIN,STATE)
70
+  #define X2_DIR_READ READ(X_DIR_PIN)
70
 
71
 
71
-#define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN)
72
-#define X2_ENABLE_WRITE(STATE) WRITE(X2_ENABLE_PIN,STATE)
73
-#define X2_ENABLE_READ READ(X_ENABLE_PIN)
72
+  #define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN)
73
+  #define X2_ENABLE_WRITE(STATE) WRITE(X2_ENABLE_PIN,STATE)
74
+  #define X2_ENABLE_READ READ(X_ENABLE_PIN)
75
+#endif // DUAL_X_CARRIAGE
74
 
76
 
75
 // Y motor
77
 // Y motor
76
 #define Y_STEP_INIT SET_OUTPUT(Y_STEP_PIN)
78
 #define Y_STEP_INIT SET_OUTPUT(Y_STEP_PIN)
86
 #define Y_ENABLE_READ READ(Y_ENABLE_PIN)
88
 #define Y_ENABLE_READ READ(Y_ENABLE_PIN)
87
 
89
 
88
 // Y2 motor
90
 // Y2 motor
89
-#define Y2_STEP_INIT SET_OUTPUT(Y2_STEP_PIN)
90
-#define Y2_STEP_WRITE(STATE) WRITE(Y2_STEP_PIN,STATE)
91
-#define Y2_STEP_READ READ(Y2_STEP_PIN)
91
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
92
+  #define Y2_STEP_INIT SET_OUTPUT(Y2_STEP_PIN)
93
+  #define Y2_STEP_WRITE(STATE) WRITE(Y2_STEP_PIN,STATE)
94
+  #define Y2_STEP_READ READ(Y2_STEP_PIN)
92
 
95
 
93
-#define Y2_DIR_INIT SET_OUTPUT(Y2_DIR_PIN)
94
-#define Y2_DIR_WRITE(STATE) WRITE(Y2_DIR_PIN,STATE)
95
-#define Y2_DIR_READ READ(Y2_DIR_PIN)
96
+  #define Y2_DIR_INIT SET_OUTPUT(Y2_DIR_PIN)
97
+  #define Y2_DIR_WRITE(STATE) WRITE(Y2_DIR_PIN,STATE)
98
+  #define Y2_DIR_READ READ(Y2_DIR_PIN)
96
 
99
 
97
-#define Y2_ENABLE_INIT SET_OUTPUT(Y2_ENABLE_PIN)
98
-#define Y2_ENABLE_WRITE(STATE) WRITE(Y2_ENABLE_PIN,STATE)
99
-#define Y2_ENABLE_READ READ(Y2_ENABLE_PIN)
100
+  #define Y2_ENABLE_INIT SET_OUTPUT(Y2_ENABLE_PIN)
101
+  #define Y2_ENABLE_WRITE(STATE) WRITE(Y2_ENABLE_PIN,STATE)
102
+  #define Y2_ENABLE_READ READ(Y2_ENABLE_PIN)
103
+#endif // Y_DUAL_STEPPER_DRIVERS
100
 
104
 
101
 // Z motor
105
 // Z motor
102
 #define Z_STEP_INIT SET_OUTPUT(Z_STEP_PIN)
106
 #define Z_STEP_INIT SET_OUTPUT(Z_STEP_PIN)
112
 #define Z_ENABLE_READ READ(Z_ENABLE_PIN)
116
 #define Z_ENABLE_READ READ(Z_ENABLE_PIN)
113
 
117
 
114
 // Z2 motor
118
 // Z2 motor
115
-#define Z2_STEP_INIT SET_OUTPUT(Z2_STEP_PIN)
116
-#define Z2_STEP_WRITE(STATE) WRITE(Z2_STEP_PIN,STATE)
117
-#define Z2_STEP_READ READ(Z2_STEP_PIN)
118
-
119
-#define Z2_DIR_INIT SET_OUTPUT(Z2_DIR_PIN)
120
-#define Z2_DIR_WRITE(STATE) WRITE(Z2_DIR_PIN,STATE)
121
-#define Z2_DIR_READ READ(Z2_DIR_PIN)
122
-
123
-#define Z2_ENABLE_INIT SET_OUTPUT(Z2_ENABLE_PIN)
124
-#define Z2_ENABLE_WRITE(STATE) WRITE(Z2_ENABLE_PIN,STATE)
125
-#define Z2_ENABLE_READ READ(Z2_ENABLE_PIN)
119
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
120
+  #define Z2_STEP_INIT SET_OUTPUT(Z2_STEP_PIN)
121
+  #define Z2_STEP_WRITE(STATE) WRITE(Z2_STEP_PIN,STATE)
122
+  #define Z2_STEP_READ READ(Z2_STEP_PIN)
123
+
124
+  #define Z2_DIR_INIT SET_OUTPUT(Z2_DIR_PIN)
125
+  #define Z2_DIR_WRITE(STATE) WRITE(Z2_DIR_PIN,STATE)
126
+  #define Z2_DIR_READ READ(Z2_DIR_PIN)
127
+
128
+  #define Z2_ENABLE_INIT SET_OUTPUT(Z2_ENABLE_PIN)
129
+  #define Z2_ENABLE_WRITE(STATE) WRITE(Z2_ENABLE_PIN,STATE)
130
+  #define Z2_ENABLE_READ READ(Z2_ENABLE_PIN)
131
+#endif // Z_DUAL_STEPPER_DRIVERS
126
 
132
 
127
 // E0 motor
133
 // E0 motor
128
 #define E0_STEP_INIT SET_OUTPUT(E0_STEP_PIN)
134
 #define E0_STEP_INIT SET_OUTPUT(E0_STEP_PIN)

Loading…
Cancel
Save