diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index d7d35d2400..080462d25e 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -46,7 +46,7 @@ // 301 = Rambo #ifndef MOTHERBOARD -#define MOTHERBOARD 7 +#define MOTHERBOARD 34 #endif diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index b74f74ad81..7c770cfc1d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -71,7 +71,7 @@ //=========================================================================== // This defines the number of extruders -#define EXTRUDERS 1 +#define EXTRUDERS 2 #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 1dc4c2103d..e387de8d24 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1181,10 +1181,24 @@ void process_commands() if(code_seen('Z')) disable_z(); #if ((E0_ENABLE_PIN != X_ENABLE_PIN) && (E1_ENABLE_PIN != Y_ENABLE_PIN)) // Only enable on boards that have seperate ENABLE_PINS if(code_seen('E')) { - disable_e0(); - disable_e1(); - disable_e2(); - } + if(code_seen('T')) { + tmp_extruder = code_value(); + if(tmp_extruder >= EXTRUDERS) { + SERIAL_ECHO_START; + SERIAL_ECHOLN(MSG_INVALID_EXTRUDER); + } + else { + if(tmp_extruder == 0) disable_e0(); + else if(tmp_extruder == 1) disable_e1(); + else if(tmp_extruder == 2) disable_e2(); + } + } + else { + disable_e0(); + disable_e1(); + disable_e2(); + } + } #endif } } diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index 66809a10af..18256fc75d 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -437,7 +437,9 @@ void check_axes_activity() unsigned char x_active = 0; unsigned char y_active = 0; unsigned char z_active = 0; - unsigned char e_active = 0; + unsigned char e0_active = 0; + unsigned char e1_active = 0; + unsigned char e2_active = 0; unsigned char fan_speed = 0; unsigned char tail_fan_speed = 0; block_t *block; @@ -452,7 +454,11 @@ void check_axes_activity() if(block->steps_x != 0) x_active++; if(block->steps_y != 0) y_active++; if(block->steps_z != 0) z_active++; - if(block->steps_e != 0) e_active++; + if(block->steps_e != 0) { + if(block->active_extruder == 0) e0_active++; + if(block->active_extruder == 1) e1_active++; + if(block->active_extruder == 2) e2_active++; + } if(block->fan_speed != 0) fan_speed++; block_index = (block_index+1) & (BLOCK_BUFFER_SIZE - 1); } @@ -470,11 +476,10 @@ void check_axes_activity() if((DISABLE_X) && (x_active == 0)) disable_x(); if((DISABLE_Y) && (y_active == 0)) disable_y(); if((DISABLE_Z) && (z_active == 0)) disable_z(); - if((DISABLE_E) && (e_active == 0)) - { - disable_e0(); - disable_e1(); - disable_e2(); + if(DISABLE_E) { + if(e0_active == 0) disable_e0(); + if(e1_active == 0) disable_e1(); + if(e2_active == 0) disable_e2(); } #if FAN_PIN > -1 #ifndef FAN_SOFT_PWM @@ -597,9 +602,9 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa // Enable all if(block->steps_e != 0) { - enable_e0(); - enable_e1(); - enable_e2(); + if(extruder == 0) enable_e0(); + if(extruder == 1) enable_e1(); + if(extruder == 2) enable_e2(); } if (block->steps_e == 0)