Browse Source

Fixed merge conflicts

Erik van der Zalm 11 years ago
parent
commit
457d8a0acb
3 changed files with 54 additions and 2 deletions
  1. 15
    0
      Marlin/Configuration_adv.h
  2. 7
    2
      Marlin/Marlin.h
  3. 32
    0
      Marlin/stepper.cpp

+ 15
- 0
Marlin/Configuration_adv.h View File

150
   #define EXTRUDERS 1
150
   #define EXTRUDERS 1
151
 #endif
151
 #endif
152
 
152
 
153
+// Same again but for Y Axis.
154
+//#define Y_DUAL_STEPPER_DRIVERS
155
+
156
+// Define if the two Y drives need to rotate in opposite directions
157
+#define INVERT_Y2_VS_Y_DIR true
158
+
159
+#ifdef Y_DUAL_STEPPER_DRIVERS
160
+  #undef EXTRUDERS
161
+  #define EXTRUDERS 1
162
+#endif
163
+
164
+#ifdef Z_DUAL_STEPPER_DRIVERS && Y_DUAL_STEPPER_DRIVERS
165
+  #error "You cannot have dual drivers for both Y and Z"
166
+#endif 
167
+
153
 // Enable this for dual x-carriage printers. 
168
 // Enable this for dual x-carriage printers. 
154
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
169
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
155
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
170
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 7
- 2
Marlin/Marlin.h View File

109
 #endif
109
 #endif
110
 
110
 
111
 #if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
111
 #if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
112
-  #define  enable_y() WRITE(Y_ENABLE_PIN, Y_ENABLE_ON)
113
-  #define disable_y() WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON)
112
+  #ifdef Y_DUAL_STEPPER_DRIVERS
113
+    #define  enable_y() { WRITE(Y_ENABLE_PIN, Y_ENABLE_ON); WRITE(Y2_ENABLE_PIN,  Y_ENABLE_ON); }
114
+    #define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); WRITE(Y2_ENABLE_PIN, !Y_ENABLE_ON); }
115
+  #else
116
+    #define  enable_y() WRITE(Y_ENABLE_PIN, Y_ENABLE_ON)
117
+    #define disable_y() WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON)
118
+  #endif
114
 #else
119
 #else
115
   #define enable_y() ;
120
   #define enable_y() ;
116
   #define disable_y() ;
121
   #define disable_y() ;

+ 32
- 0
Marlin/stepper.cpp View File

383
     }
383
     }
384
     if((out_bits & (1<<Y_AXIS))!=0){
384
     if((out_bits & (1<<Y_AXIS))!=0){
385
       WRITE(Y_DIR_PIN, INVERT_Y_DIR);
385
       WRITE(Y_DIR_PIN, INVERT_Y_DIR);
386
+	  
387
+	  #ifdef Y_DUAL_STEPPER_DRIVERS
388
+	    WRITE(Y2_DIR_PIN, !(INVERT_Y_DIR == INVERT_Y2_VS_Y_DIR));
389
+	  #endif
390
+	  
386
       count_direction[Y_AXIS]=-1;
391
       count_direction[Y_AXIS]=-1;
387
     }
392
     }
388
     else{
393
     else{
389
       WRITE(Y_DIR_PIN, !INVERT_Y_DIR);
394
       WRITE(Y_DIR_PIN, !INVERT_Y_DIR);
395
+	  
396
+	  #ifdef Y_DUAL_STEPPER_DRIVERS
397
+	    WRITE(Y2_DIR_PIN, (INVERT_Y_DIR == INVERT_Y2_VS_Y_DIR));
398
+	  #endif
399
+	  
390
       count_direction[Y_AXIS]=1;
400
       count_direction[Y_AXIS]=1;
391
     }
401
     }
392
 
402
 
582
         counter_y += current_block->steps_y;
592
         counter_y += current_block->steps_y;
583
         if (counter_y > 0) {
593
         if (counter_y > 0) {
584
           WRITE(Y_STEP_PIN, !INVERT_Y_STEP_PIN);
594
           WRITE(Y_STEP_PIN, !INVERT_Y_STEP_PIN);
595
+		  
596
+		  #ifdef Y_DUAL_STEPPER_DRIVERS
597
+			WRITE(Y2_STEP_PIN, !INVERT_Y_STEP_PIN);
598
+		  #endif
599
+		  
585
           counter_y -= current_block->step_event_count;
600
           counter_y -= current_block->step_event_count;
586
           count_position[Y_AXIS]+=count_direction[Y_AXIS];
601
           count_position[Y_AXIS]+=count_direction[Y_AXIS];
587
           WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN);
602
           WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN);
603
+		  
604
+		  #ifdef Y_DUAL_STEPPER_DRIVERS
605
+			WRITE(Y2_STEP_PIN, INVERT_Y_STEP_PIN);
606
+		  #endif
588
         }
607
         }
589
 
608
 
590
       counter_z += current_block->steps_z;
609
       counter_z += current_block->steps_z;
756
   #endif
775
   #endif
757
   #if defined(Y_DIR_PIN) && Y_DIR_PIN > -1
776
   #if defined(Y_DIR_PIN) && Y_DIR_PIN > -1
758
     SET_OUTPUT(Y_DIR_PIN);
777
     SET_OUTPUT(Y_DIR_PIN);
778
+		
779
+	#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_DIR_PIN) && (Y2_DIR_PIN > -1)
780
+	  SET_OUTPUT(Y2_DIR_PIN);
781
+	#endif
759
   #endif
782
   #endif
760
   #if defined(Z_DIR_PIN) && Z_DIR_PIN > -1
783
   #if defined(Z_DIR_PIN) && Z_DIR_PIN > -1
761
     SET_OUTPUT(Z_DIR_PIN);
784
     SET_OUTPUT(Z_DIR_PIN);
787
   #if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
810
   #if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
788
     SET_OUTPUT(Y_ENABLE_PIN);
811
     SET_OUTPUT(Y_ENABLE_PIN);
789
     if(!Y_ENABLE_ON) WRITE(Y_ENABLE_PIN,HIGH);
812
     if(!Y_ENABLE_ON) WRITE(Y_ENABLE_PIN,HIGH);
813
+	
814
+	#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_ENABLE_PIN) && (Y2_ENABLE_PIN > -1)
815
+	  SET_OUTPUT(Y2_ENABLE_PIN);
816
+	  if(!Y_ENABLE_ON) WRITE(Y2_ENABLE_PIN,HIGH);
817
+	#endif
790
   #endif
818
   #endif
791
   #if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
819
   #if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
792
     SET_OUTPUT(Z_ENABLE_PIN);
820
     SET_OUTPUT(Z_ENABLE_PIN);
869
   #if defined(Y_STEP_PIN) && (Y_STEP_PIN > -1)
897
   #if defined(Y_STEP_PIN) && (Y_STEP_PIN > -1)
870
     SET_OUTPUT(Y_STEP_PIN);
898
     SET_OUTPUT(Y_STEP_PIN);
871
     WRITE(Y_STEP_PIN,INVERT_Y_STEP_PIN);
899
     WRITE(Y_STEP_PIN,INVERT_Y_STEP_PIN);
900
+    #if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_STEP_PIN) && (Y2_STEP_PIN > -1)
901
+      SET_OUTPUT(Y2_STEP_PIN);
902
+      WRITE(Y2_STEP_PIN,INVERT_Y_STEP_PIN);
903
+    #endif
872
     disable_y();
904
     disable_y();
873
   #endif
905
   #endif
874
   #if defined(Z_STEP_PIN) && (Z_STEP_PIN > -1)
906
   #if defined(Z_STEP_PIN) && (Z_STEP_PIN > -1)

Loading…
Cancel
Save