Browse Source

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

pull/1/head
Studiodyne 7 years ago
committed by Scott Lahteine
parent
commit
e7a61de8af
  1. 2
      Marlin/Configuration_adv.h
  2. 4
      Marlin/src/feature/fwretract.cpp
  3. 3
      Marlin/src/feature/fwretract.h
  4. 4
      Marlin/src/module/motion.cpp

2
Marlin/Configuration_adv.h

@ -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.
*

4
Marlin/src/feature/fwretract.cpp

@ -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;

3
Marlin/src/feature/fwretract.h

@ -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(); }

4
Marlin/src/module/motion.cpp

@ -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)

Loading…
Cancel
Save