From 29e7639933e29feaf58bc657e80c47e88716b02b Mon Sep 17 00:00:00 2001 From: Dim3nsioneer Date: Mon, 2 Jun 2014 08:13:09 +0200 Subject: [PATCH 1/2] Add switch unused feeder(s) off Having the non-active feeder motors powered on all the time is not necessary. A feature to deactivate the unused feeder motors has been implemented. The feature is enabled on default but can be switched off in the configuration. --- Marlin/Configuration.h | 1 + Marlin/planner.cpp | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 537ff7a29..5ee06d710 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -305,6 +305,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define DISABLE_Y false #define DISABLE_Z false #define DISABLE_E false // For all extruders +#define DISABLE_UNSELECTED_E true //disable only not selected extruders and keep selected extruder active #define INVERT_X_DIR true // for Mendel set to false, for Orca set to true #define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index bfc71323f..db53a02cb 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -657,12 +657,24 @@ block->steps_y = labs((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-positi if(block->steps_z != 0) enable_z(); #endif - // Enable all + // Enable extruder(s) if(block->steps_e != 0) { - enable_e0(); - enable_e1(); - enable_e2(); + if (DISABLE_UNSELECTED_E) //enable only selected extruder + { + switch(extruder) + { + case 0: enable_e0(); disable_e1(); disable_e2(); break; + case 1: disable_e0(); enable_e1(); disable_e2(); break; + case 2: disable_e0(); disable_e1(); enable_e2(); break; + } + } + else //enable all + { + enable_e0(); + enable_e1(); + enable_e2(); + } } if (block->steps_e == 0) From 8a32c5395bb51e06819716d02d3e57c44655f917 Mon Sep 17 00:00:00 2001 From: Dim3nsioneer Date: Mon, 2 Jun 2014 14:07:02 +0200 Subject: [PATCH 2/2] renaming the disable inactive extruder feature --- Marlin/Configuration.h | 2 +- Marlin/planner.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 5ee06d710..1355a7ab9 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -305,7 +305,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define DISABLE_Y false #define DISABLE_Z false #define DISABLE_E false // For all extruders -#define DISABLE_UNSELECTED_E true //disable only not selected extruders and keep selected extruder active +#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled #define INVERT_X_DIR true // for Mendel set to false, for Orca set to true #define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index db53a02cb..5b20f86f9 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -660,7 +660,7 @@ block->steps_y = labs((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-positi // Enable extruder(s) if(block->steps_e != 0) { - if (DISABLE_UNSELECTED_E) //enable only selected extruder + if (DISABLE_INACTIVE_EXTRUDER) //enable only selected extruder { switch(extruder) {