|
@@ -39,6 +39,10 @@
|
39
|
39
|
#include "../module/printcounter.h"
|
40
|
40
|
#include "../module/temperature.h"
|
41
|
41
|
|
|
42
|
+#if ENABLED(AUTO_BED_LEVELING_UBL)
|
|
43
|
+ #include "bedlevel/bedlevel.h"
|
|
44
|
+#endif
|
|
45
|
+
|
42
|
46
|
#if ENABLED(FWRETRACT)
|
43
|
47
|
#include "fwretract.h"
|
44
|
48
|
#endif
|
|
@@ -440,7 +444,15 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
|
440
|
444
|
// Initial retract before move to filament change position
|
441
|
445
|
if (retract && thermalManager.hotEnoughToExtrude(active_extruder)) {
|
442
|
446
|
DEBUG_ECHOLNPGM("... retract:", retract);
|
|
447
|
+
|
|
448
|
+ #if ENABLED(AUTO_BED_LEVELING_UBL)
|
|
449
|
+ const bool leveling_was_enabled = planner.leveling_active; // save leveling state
|
|
450
|
+ set_bed_leveling_enabled(false); // turn off leveling
|
|
451
|
+ #endif
|
|
452
|
+
|
443
|
453
|
unscaled_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
|
|
454
|
+
|
|
455
|
+ TERN_(AUTO_BED_LEVELING_UBL, set_bed_leveling_enabled(leveling_was_enabled)); // restore leveling
|
444
|
456
|
}
|
445
|
457
|
|
446
|
458
|
// 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_
|
640
|
652
|
prepare_internal_move_to_destination(NOZZLE_PARK_Z_FEEDRATE);
|
641
|
653
|
}
|
642
|
654
|
|
|
655
|
+ #if ENABLED(AUTO_BED_LEVELING_UBL)
|
|
656
|
+ const bool leveling_was_enabled = planner.leveling_active; // save leveling state
|
|
657
|
+ set_bed_leveling_enabled(false); // turn off leveling
|
|
658
|
+ #endif
|
|
659
|
+
|
643
|
660
|
// Unretract
|
644
|
661
|
unscaled_e_move(PAUSE_PARK_RETRACT_LENGTH, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
|
645
|
662
|
|
|
663
|
+ TERN_(AUTO_BED_LEVELING_UBL, set_bed_leveling_enabled(leveling_was_enabled)); // restore leveling
|
|
664
|
+
|
646
|
665
|
// Intelligent resuming
|
647
|
666
|
#if ENABLED(FWRETRACT)
|
648
|
667
|
// If retracted before goto pause
|