|
@ -3350,6 +3350,7 @@ inline void gcode_G0_G1( |
|
|
gcode_get_destination(); // For X Y Z E F
|
|
|
gcode_get_destination(); // For X Y Z E F
|
|
|
|
|
|
|
|
|
#if ENABLED(FWRETRACT) |
|
|
#if ENABLED(FWRETRACT) |
|
|
|
|
|
if (MIN_AUTORETRACT <= MAX_AUTORETRACT) { |
|
|
// When M209 Autoretract is enabled, convert E-only moves to firmware retract/recover moves
|
|
|
// When M209 Autoretract is enabled, convert E-only moves to firmware retract/recover moves
|
|
|
if (autoretract_enabled && parser.seen('E') && !(parser.seen('X') || parser.seen('Y') || parser.seen('Z'))) { |
|
|
if (autoretract_enabled && parser.seen('E') && !(parser.seen('X') || parser.seen('Y') || parser.seen('Z'))) { |
|
|
const float echange = destination[E_AXIS] - current_position[E_AXIS]; |
|
|
const float echange = destination[E_AXIS] - current_position[E_AXIS]; |
|
@ -3360,6 +3361,7 @@ inline void gcode_G0_G1( |
|
|
return retract(echange < 0.0); // Firmware-based retract/recover (double-retract ignored)
|
|
|
return retract(echange < 0.0); // Firmware-based retract/recover (double-retract ignored)
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
#endif // FWRETRACT
|
|
|
#endif // FWRETRACT
|
|
|
|
|
|
|
|
|
#if IS_SCARA |
|
|
#if IS_SCARA |
|
@ -8584,9 +8586,11 @@ inline void gcode_M205() { |
|
|
* moves will be classified as retraction. |
|
|
* moves will be classified as retraction. |
|
|
*/ |
|
|
*/ |
|
|
inline void gcode_M209() { |
|
|
inline void gcode_M209() { |
|
|
|
|
|
if (MIN_AUTORETRACT <= MAX_AUTORETRACT) { |
|
|
if (parser.seen('S')) { |
|
|
if (parser.seen('S')) { |
|
|
autoretract_enabled = parser.value_bool(); |
|
|
autoretract_enabled = parser.value_bool(); |
|
|
for (int i = 0; i < EXTRUDERS; i++) retracted[i] = false; |
|
|
for (uint8_t i = 0; i < EXTRUDERS; i++) retracted[i] = false; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -11051,7 +11055,7 @@ void process_next_command() { |
|
|
gcode_M208(); |
|
|
gcode_M208(); |
|
|
break; |
|
|
break; |
|
|
case 209: // M209: Turn Automatic Retract Detection on/off
|
|
|
case 209: // M209: Turn Automatic Retract Detection on/off
|
|
|
gcode_M209(); |
|
|
if (MIN_AUTORETRACT <= MAX_AUTORETRACT) gcode_M209(); |
|
|
break; |
|
|
break; |
|
|
#endif // FWRETRACT
|
|
|
#endif // FWRETRACT
|
|
|
|
|
|
|
|
|