🩹 Prevent Z error with UBL + Park unscaled E move (#23568)
This commit is contained in:
parent
f5046a41cd
commit
a23ecf0d2f
|
@ -39,6 +39,10 @@
|
||||||
#include "../module/printcounter.h"
|
#include "../module/printcounter.h"
|
||||||
#include "../module/temperature.h"
|
#include "../module/temperature.h"
|
||||||
|
|
||||||
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||||
|
#include "bedlevel/bedlevel.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(FWRETRACT)
|
#if ENABLED(FWRETRACT)
|
||||||
#include "fwretract.h"
|
#include "fwretract.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -440,7 +444,15 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
|
||||||
// Initial retract before move to filament change position
|
// Initial retract before move to filament change position
|
||||||
if (retract && thermalManager.hotEnoughToExtrude(active_extruder)) {
|
if (retract && thermalManager.hotEnoughToExtrude(active_extruder)) {
|
||||||
DEBUG_ECHOLNPGM("... retract:", retract);
|
DEBUG_ECHOLNPGM("... retract:", retract);
|
||||||
|
|
||||||
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||||
|
const bool leveling_was_enabled = planner.leveling_active; // save leveling state
|
||||||
|
set_bed_leveling_enabled(false); // turn off leveling
|
||||||
|
#endif
|
||||||
|
|
||||||
unscaled_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
|
unscaled_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
|
||||||
|
|
||||||
|
TERN_(AUTO_BED_LEVELING_UBL, set_bed_leveling_enabled(leveling_was_enabled)); // restore leveling
|
||||||
}
|
}
|
||||||
|
|
||||||
// If axes don't need to home then the nozzle can park
|
// If axes don't need to home then the nozzle can park
|
||||||
|
@ -640,9 +652,16 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_
|
||||||
prepare_internal_move_to_destination(NOZZLE_PARK_Z_FEEDRATE);
|
prepare_internal_move_to_destination(NOZZLE_PARK_Z_FEEDRATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||||
|
const bool leveling_was_enabled = planner.leveling_active; // save leveling state
|
||||||
|
set_bed_leveling_enabled(false); // turn off leveling
|
||||||
|
#endif
|
||||||
|
|
||||||
// Unretract
|
// Unretract
|
||||||
unscaled_e_move(PAUSE_PARK_RETRACT_LENGTH, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
|
unscaled_e_move(PAUSE_PARK_RETRACT_LENGTH, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
|
||||||
|
|
||||||
|
TERN_(AUTO_BED_LEVELING_UBL, set_bed_leveling_enabled(leveling_was_enabled)); // restore leveling
|
||||||
|
|
||||||
// Intelligent resuming
|
// Intelligent resuming
|
||||||
#if ENABLED(FWRETRACT)
|
#if ENABLED(FWRETRACT)
|
||||||
// If retracted before goto pause
|
// If retracted before goto pause
|
||||||
|
|
Loading…
Reference in a new issue