Browse Source

Fix crash after home bug

Fixes a bug in the Extruder Runout Prevention feature that caused the
extruder to move back to “current_position” after a move if it was
activated while the move was in progress. For long home moves (which
are longer than the dimensions of the machine’s working area), this
would cause the machine to crash into the far end of its travel after
homing. This usually occurred on the Z axis, which could result in
damage to the machine if you don’t hit the reset button in time.
whosawhatsis 11 years ago
parent
commit
8a5eaa3c9b
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/Marlin_main.cpp

+ 2
- 2
Marlin/Marlin_main.cpp View File

3298
      enable_e0();
3298
      enable_e0();
3299
      float oldepos=current_position[E_AXIS];
3299
      float oldepos=current_position[E_AXIS];
3300
      float oldedes=destination[E_AXIS];
3300
      float oldedes=destination[E_AXIS];
3301
-     plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS],
3302
-                      current_position[E_AXIS]+EXTRUDER_RUNOUT_EXTRUDE*EXTRUDER_RUNOUT_ESTEPS/axis_steps_per_unit[E_AXIS],
3301
+     plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], 
3302
+                      destination[E_AXIS]+EXTRUDER_RUNOUT_EXTRUDE*EXTRUDER_RUNOUT_ESTEPS/axis_steps_per_unit[E_AXIS], 
3303
                       EXTRUDER_RUNOUT_SPEED/60.*EXTRUDER_RUNOUT_ESTEPS/axis_steps_per_unit[E_AXIS], active_extruder);
3303
                       EXTRUDER_RUNOUT_SPEED/60.*EXTRUDER_RUNOUT_ESTEPS/axis_steps_per_unit[E_AXIS], active_extruder);
3304
      current_position[E_AXIS]=oldepos;
3304
      current_position[E_AXIS]=oldepos;
3305
      destination[E_AXIS]=oldedes;
3305
      destination[E_AXIS]=oldedes;

Loading…
Cancel
Save