[2.0] FWRetract Reset (Best way) (#10083)

This commit is contained in:
Studiodyne 2018-03-14 07:35:30 +01:00 committed by Scott Lahteine
parent f894209de2
commit e7a61de8af
4 changed files with 8 additions and 5 deletions

View file

@ -863,7 +863,7 @@
* will be converted to firmware-based retract/recover moves.
*
* Note: Be sure to turn off auto-retract during filament change.
* Note: Current status (Retract / Swap / Zlift) isn't reset by G28.
* Note: Current Zlift reset by G28 or G28 Z.
*
* Note that M207 / M208 / M209 settings are saved to EEPROM.
*

View file

@ -53,7 +53,8 @@ float FWRetract::retract_length, // M207 S - G10 Retract len
FWRetract::retract_recover_feedrate_mm_s, // M208 F - G11 Recover feedrate
FWRetract::swap_retract_length, // M207 W - G10 Swap Retract length
FWRetract::swap_retract_recover_length, // M208 W - G11 Swap Recover length
FWRetract::swap_retract_recover_feedrate_mm_s; // M208 R - G11 Swap Recover feedrate
FWRetract::swap_retract_recover_feedrate_mm_s, // M208 R - G11 Swap Recover feedrate
FWRetract::hop_amount;
void FWRetract::reset() {
autoretract_enabled = false;
@ -65,6 +66,7 @@ void FWRetract::reset() {
swap_retract_length = RETRACT_LENGTH_SWAP;
swap_retract_recover_length = RETRACT_RECOVER_LENGTH_SWAP;
swap_retract_recover_feedrate_mm_s = RETRACT_RECOVER_FEEDRATE_SWAP;
hop_amount = 0.0;
for (uint8_t i = 0; i < EXTRUDERS; ++i) {
retracted[i] = false;

View file

@ -45,7 +45,8 @@ public:
retract_recover_feedrate_mm_s, // M208 F - G11 Recover feedrate
swap_retract_length, // M207 W - G10 Swap Retract length
swap_retract_recover_length, // M208 W - G11 Swap Recover length
swap_retract_recover_feedrate_mm_s; // M208 R - G11 Swap Recover feedrate
swap_retract_recover_feedrate_mm_s, // M208 R - G11 Swap Recover feedrate
hop_amount;
FWRetract() { reset(); }

View file

@ -1305,10 +1305,10 @@ void homeaxis(const AxisEnum axis) {
if (axis == Z_AXIS && STOW_PROBE()) return;
#endif
// Clear retracted status if homing the Z axis
// Clear z_lift if homing the Z axis
#if ENABLED(FWRETRACT)
if (axis == Z_AXIS)
for (uint8_t i = 0; i < EXTRUDERS; i++) fwretract.retracted[i] = false;
fwretract.hop_amount = 0.0;
#endif
#if ENABLED(DEBUG_LEVELING_FEATURE)