Browse Source

Merge pull request #947 from Dim3nsioneer/Marlin_v1

Add feature 'switch unused feeder(s) off'
nothinman 10 years ago
parent
commit
c8d0ca9337
2 changed files with 17 additions and 4 deletions
  1. 1
    0
      Marlin/Configuration.h
  2. 16
    4
      Marlin/planner.cpp

+ 1
- 0
Marlin/Configuration.h View File

@@ -305,6 +305,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
305 305
 #define DISABLE_Y false
306 306
 #define DISABLE_Z false
307 307
 #define DISABLE_E false // For all extruders
308
+#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
308 309
 
309 310
 #define INVERT_X_DIR true    // for Mendel set to false, for Orca set to true
310 311
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false

+ 16
- 4
Marlin/planner.cpp View File

@@ -657,12 +657,24 @@ block->steps_y = labs((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-positi
657 657
   if(block->steps_z != 0) enable_z();
658 658
 #endif
659 659
 
660
-  // Enable all
660
+  // Enable extruder(s)
661 661
   if(block->steps_e != 0)
662 662
   {
663
-    enable_e0();
664
-    enable_e1();
665
-    enable_e2(); 
663
+    if (DISABLE_INACTIVE_EXTRUDER) //enable only selected extruder
664
+    {
665
+      switch(extruder)
666
+      {
667
+        case 0: enable_e0(); disable_e1(); disable_e2(); break;
668
+        case 1: disable_e0(); enable_e1(); disable_e2(); break;
669
+        case 2: disable_e0(); disable_e1(); enable_e2(); break;
670
+      }
671
+    }
672
+    else //enable all
673
+    {
674
+      enable_e0();
675
+      enable_e1();
676
+      enable_e2(); 
677
+    }
666 678
   }
667 679
 
668 680
   if (block->steps_e == 0)

Loading…
Cancel
Save