Browse Source

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

Studiodyne 6 years ago
parent
commit
e7a61de8af

+ 1
- 1
Marlin/Configuration_adv.h View File

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

+ 3
- 1
Marlin/src/feature/fwretract.cpp View File

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

+ 2
- 1
Marlin/src/feature/fwretract.h View File

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

+ 2
- 2
Marlin/src/module/motion.cpp View File

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

Loading…
Cancel
Save