1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #ifndef FWRETRACT_H
- #define FWRETRACT_H
- #include "MarlinConfig.h"
- class FWRetract {
- public:
- static bool autoretract_enabled,
- retracted[EXTRUDERS];
- #if EXTRUDERS > 1
- static bool retracted_swap[EXTRUDERS];
- #endif
- static float retract_length,
- retract_feedrate_mm_s,
- retract_zlift,
- retract_recover_length,
- retract_recover_feedrate_mm_s,
- swap_retract_length,
- swap_retract_recover_length,
- swap_retract_recover_feedrate_mm_s,
- hop_amount;
- FWRetract() { reset(); }
- static void reset();
- static void refresh_autoretract() {
- for (uint8_t i = 0; i < EXTRUDERS; i++) retracted[i] = false;
- }
- static void enable_autoretract(const bool enable) {
- autoretract_enabled = enable;
- refresh_autoretract();
- }
- static void retract(const bool retracting
- #if EXTRUDERS > 1
- , bool swapping = false
- #endif
- );
- };
- extern FWRetract fwretract;
- #endif
|