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
  * will be converted to firmware-based retract/recover moves.
863
  * will be converted to firmware-based retract/recover moves.
864
  *
864
  *
865
  * Note: Be sure to turn off auto-retract during filament change.
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
  * Note that M207 / M208 / M209 settings are saved to EEPROM.
868
  * Note that M207 / M208 / M209 settings are saved to EEPROM.
869
  *
869
  *

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

53
       FWRetract::retract_recover_feedrate_mm_s,      // M208 F - G11 Recover feedrate
53
       FWRetract::retract_recover_feedrate_mm_s,      // M208 F - G11 Recover feedrate
54
       FWRetract::swap_retract_length,                // M207 W - G10 Swap Retract length
54
       FWRetract::swap_retract_length,                // M207 W - G10 Swap Retract length
55
       FWRetract::swap_retract_recover_length,        // M208 W - G11 Swap Recover length
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
 void FWRetract::reset() {
59
 void FWRetract::reset() {
59
   autoretract_enabled = false;
60
   autoretract_enabled = false;
65
   swap_retract_length = RETRACT_LENGTH_SWAP;
66
   swap_retract_length = RETRACT_LENGTH_SWAP;
66
   swap_retract_recover_length = RETRACT_RECOVER_LENGTH_SWAP;
67
   swap_retract_recover_length = RETRACT_RECOVER_LENGTH_SWAP;
67
   swap_retract_recover_feedrate_mm_s = RETRACT_RECOVER_FEEDRATE_SWAP;
68
   swap_retract_recover_feedrate_mm_s = RETRACT_RECOVER_FEEDRATE_SWAP;
69
+  hop_amount = 0.0;
68
 
70
 
69
   for (uint8_t i = 0; i < EXTRUDERS; ++i) {
71
   for (uint8_t i = 0; i < EXTRUDERS; ++i) {
70
     retracted[i] = false;
72
     retracted[i] = false;

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

45
                retract_recover_feedrate_mm_s,      // M208 F - G11 Recover feedrate
45
                retract_recover_feedrate_mm_s,      // M208 F - G11 Recover feedrate
46
                swap_retract_length,                // M207 W - G10 Swap Retract length
46
                swap_retract_length,                // M207 W - G10 Swap Retract length
47
                swap_retract_recover_length,        // M208 W - G11 Swap Recover length
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
   FWRetract() { reset(); }
51
   FWRetract() { reset(); }
51
 
52
 

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

1305
     if (axis == Z_AXIS && STOW_PROBE()) return;
1305
     if (axis == Z_AXIS && STOW_PROBE()) return;
1306
   #endif
1306
   #endif
1307
 
1307
 
1308
-  // Clear retracted status if homing the Z axis
1308
+  // Clear z_lift if homing the Z axis
1309
   #if ENABLED(FWRETRACT)
1309
   #if ENABLED(FWRETRACT)
1310
     if (axis == Z_AXIS)
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
   #endif
1312
   #endif
1313
 
1313
 
1314
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1314
   #if ENABLED(DEBUG_LEVELING_FEATURE)

Loading…
Cancel
Save