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.
2.0.x
whosawhatsis 11 years ago
parent c724c762a2
commit 8a5eaa3c9b

@ -3298,8 +3298,8 @@ void manage_inactivity()
enable_e0(); enable_e0();
float oldepos=current_position[E_AXIS]; float oldepos=current_position[E_AXIS];
float oldedes=destination[E_AXIS]; float oldedes=destination[E_AXIS];
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS],
current_position[E_AXIS]+EXTRUDER_RUNOUT_EXTRUDE*EXTRUDER_RUNOUT_ESTEPS/axis_steps_per_unit[E_AXIS], destination[E_AXIS]+EXTRUDER_RUNOUT_EXTRUDE*EXTRUDER_RUNOUT_ESTEPS/axis_steps_per_unit[E_AXIS],
EXTRUDER_RUNOUT_SPEED/60.*EXTRUDER_RUNOUT_ESTEPS/axis_steps_per_unit[E_AXIS], active_extruder); EXTRUDER_RUNOUT_SPEED/60.*EXTRUDER_RUNOUT_ESTEPS/axis_steps_per_unit[E_AXIS], active_extruder);
current_position[E_AXIS]=oldepos; current_position[E_AXIS]=oldepos;
destination[E_AXIS]=oldedes; destination[E_AXIS]=oldedes;

Loading…
Cancel
Save