From 77df0d689a86ac985baa9e35117ad26d2c4ec6ea Mon Sep 17 00:00:00 2001 From: whosawhatsis Date: Mon, 24 Feb 2014 13:15:36 -0800 Subject: [PATCH] autretract fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Marlin/Marlin_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index fd5e6b5a7..9fe64119f 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -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);