Browse Source

Fix autoretract

Autoretract was broken, looks like it was overlooked when the retracted flag was updated for multi extruders.
OhmEye 9 years ago
parent
commit
f90a947e65
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/Marlin_main.cpp

+ 2
- 2
Marlin/Marlin_main.cpp View File

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

Loading…
Cancel
Save