Keep FWRETRACT values in terms of millimeters when using M200 for volumetric E units

This commit is contained in:
whosawhatsis 2014-02-11 18:50:11 -08:00
parent 28aca76c4d
commit 3f6d44d40b

View File

@ -137,7 +137,7 @@
// M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2 also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate // M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2 also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate
// M205 - advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk // M205 - advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
// M206 - set additional homeing offset // M206 - set additional homeing offset
// M207 - set retract length S[positive mm] F[feedrate mm/sec] Z[additional zlift/hop] // M207 - set retract length S[positive mm] F[feedrate mm/sec] Z[additional zlift/hop], stays in mm regardless of M200 setting
// M208 - set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/sec] // M208 - set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/sec]
// M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction. // M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
// M218 - set hotend offset (in mm): T<extruder_number> X<offset_on_X> Y<offset_on_Y> // M218 - set hotend offset (in mm): T<extruder_number> X<offset_on_X> Y<offset_on_Y>
@ -1109,11 +1109,13 @@ void process_commands()
destination[X_AXIS]=current_position[X_AXIS]; destination[X_AXIS]=current_position[X_AXIS];
destination[Y_AXIS]=current_position[Y_AXIS]; destination[Y_AXIS]=current_position[Y_AXIS];
destination[Z_AXIS]=current_position[Z_AXIS]; destination[Z_AXIS]=current_position[Z_AXIS];
current_position[Z_AXIS]+=-retract_zlift; current_position[Z_AXIS]-=retract_zlift;
destination[E_AXIS]=current_position[E_AXIS]-retract_length; destination[E_AXIS]=current_position[E_AXIS]-retract_length/volumetric_multiplier[active_extruder];
float oldFeedrate = feedrate;
feedrate=retract_feedrate; feedrate=retract_feedrate;
retracted=true; retracted=true;
prepare_move(); prepare_move();
feedrate = oldFeedrate;
} }
break; break;
@ -1124,10 +1126,12 @@ void process_commands()
destination[Y_AXIS]=current_position[Y_AXIS]; destination[Y_AXIS]=current_position[Y_AXIS];
destination[Z_AXIS]=current_position[Z_AXIS]; destination[Z_AXIS]=current_position[Z_AXIS];
current_position[Z_AXIS]+=retract_zlift; current_position[Z_AXIS]+=retract_zlift;
destination[E_AXIS]=current_position[E_AXIS]+retract_length+retract_recover_length; destination[E_AXIS]=current_position[E_AXIS]+(retract_length+retract_recover_length)/volumetric_multiplier[active_extruder];
float oldFeedrate = feedrate;
feedrate=retract_recover_feedrate; feedrate=retract_recover_feedrate;
retracted=false; retracted=false;
prepare_move(); prepare_move();
feedrate = oldFeedrate;
} }
break; break;
#endif //FWRETRACT #endif //FWRETRACT