FWRETRACT in mm/s
Firmware retraction now stores the retract and recover speeds in mm/s instead of mm/min. This makes it match the units of the maximum feedrate, and fixes problems with modifying the value via LCD control panel. From gcode, the values are still taken in mm/min to match the units of G1 and similar, and they are converted to mm/s before they are stored. I also lowered the default retract feedrate to make it less likely to cause problems for geared extruders when the user hasn’t bothered to set a reasonable maximum feedrate, though users should be setting both of these values to suit their hardware.
This commit is contained in:
@ -1093,7 +1093,7 @@ static void homeaxis(int axis) {
|
||||
current_position[E_AXIS]+=retract_length/volumetric_multiplier[active_extruder];
|
||||
plan_set_e_position(current_position[E_AXIS]);
|
||||
float oldFeedrate = feedrate;
|
||||
feedrate=retract_feedrate;
|
||||
feedrate=retract_feedrate*60;
|
||||
retracted=true;
|
||||
prepare_move();
|
||||
current_position[Z_AXIS]-=retract_zlift;
|
||||
@ -1111,7 +1111,7 @@ static void homeaxis(int axis) {
|
||||
current_position[E_AXIS]-=(retract_length+retract_recover_length)/volumetric_multiplier[active_extruder];
|
||||
plan_set_e_position(current_position[E_AXIS]);
|
||||
float oldFeedrate = feedrate;
|
||||
feedrate=retract_recover_feedrate;
|
||||
feedrate=retract_recover_feedrate*60;
|
||||
retracted=false;
|
||||
prepare_move();
|
||||
feedrate = oldFeedrate;
|
||||
@ -2291,7 +2291,7 @@ void process_commands()
|
||||
break;
|
||||
#endif
|
||||
#ifdef FWRETRACT
|
||||
case 207: //M207 - set retract length S[positive mm] F[feedrate mm/sec] Z[additional zlift/hop]
|
||||
case 207: //M207 - set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop]
|
||||
{
|
||||
if(code_seen('S'))
|
||||
{
|
||||
@ -2299,14 +2299,14 @@ void process_commands()
|
||||
}
|
||||
if(code_seen('F'))
|
||||
{
|
||||
retract_feedrate = code_value() ;
|
||||
retract_feedrate = code_value()/60 ;
|
||||
}
|
||||
if(code_seen('Z'))
|
||||
{
|
||||
retract_zlift = code_value() ;
|
||||
}
|
||||
}break;
|
||||
case 208: // M208 - set retract recover length S[positive mm surplus to the M207 S*] F[feedrate mm/sec]
|
||||
case 208: // M208 - set retract recover length S[positive mm surplus to the M207 S*] F[feedrate mm/min]
|
||||
{
|
||||
if(code_seen('S'))
|
||||
{
|
||||
@ -2314,7 +2314,7 @@ void process_commands()
|
||||
}
|
||||
if(code_seen('F'))
|
||||
{
|
||||
retract_recover_feedrate = code_value() ;
|
||||
retract_recover_feedrate = code_value()/60 ;
|
||||
}
|
||||
}break;
|
||||
case 209: // 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.
|
||||
|
Reference in New Issue
Block a user