Skip to content

Commit

Permalink
autretract fix
Browse files Browse the repository at this point in the history
I made these changes previously, but I can’t find the commit now. This
reapplies the changes to get auto retract working again.

Conflicts:
	Marlin/Configuration_adv.h
	Marlin/Marlin_main.cpp
  • Loading branch information
whosawhatsis committed Feb 24, 2014
1 parent d3fcc28 commit 77df0d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1135,9 +1135,9 @@ void process_commands()
get_coordinates(); // For X Y Z E F
#ifdef FWRETRACT
if(autoretract_enabled)
if( !(code_seen(X_AXIS) || code_seen(Y_AXIS) || code_seen(Z_AXIS)) && code_seen(E_AXIS)) {
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 attract or recover
if((echange<-MIN_RETRACT && !retracted) || (echange>MIN_RETRACT && retracted)) { //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);
Expand Down

0 comments on commit 77df0d6

Please sign in to comment.