Fix autoretract

Autoretract was broken, looks like it was overlooked when the retracted flag was updated for multi extruders.
This commit is contained in:
OhmEye 2015-03-04 20:28:08 -10:00
parent f3f04e9fd6
commit f90a947e65

View file

@ -1428,10 +1428,10 @@ void process_commands()
if(autoretract_enabled)
if( !(code_seen('X') || code_seen('Y') || code_seen('Z')) && code_seen('E')) {
float echange=destination[E_AXIS]-current_position[E_AXIS];
if((echange<-MIN_RETRACT && !retracted) || (echange>MIN_RETRACT && retracted)) { //move appears to be an attempt to retract or recover
if((echange<-MIN_RETRACT && !retracted[active_extruder]) || (echange>MIN_RETRACT && retracted[active_extruder])) { //move appears to be an attempt to retract or recover
current_position[E_AXIS] = destination[E_AXIS]; //hide the slicer-generated retract/recover from calculations
plan_set_e_position(current_position[E_AXIS]); //AND from the planner
retract(!retracted);
retract(!retracted[active_extruder]);
return;
}
}