|
@@ -36,9 +36,12 @@
|
36
|
36
|
#include "../../../module/probe.h"
|
37
|
37
|
#include "../../queue.h"
|
38
|
38
|
|
|
39
|
+#if EITHER(PROBE_TEMP_COMPENSATION, PREHEAT_BEFORE_LEVELING)
|
|
40
|
+ #include "../../../module/temperature.h"
|
|
41
|
+#endif
|
|
42
|
+
|
39
|
43
|
#if ENABLED(PROBE_TEMP_COMPENSATION)
|
40
|
44
|
#include "../../../feature/probe_temp_comp.h"
|
41
|
|
- #include "../../../module/temperature.h"
|
42
|
45
|
#endif
|
43
|
46
|
|
44
|
47
|
#if HAS_DISPLAY
|
|
@@ -403,6 +406,24 @@ G29_TYPE GcodeSuite::G29() {
|
403
|
406
|
|
404
|
407
|
if (!faux) remember_feedrate_scaling_off();
|
405
|
408
|
|
|
409
|
+ #if ENABLED(PREHEAT_BEFORE_LEVELING)
|
|
410
|
+ #ifndef LEVELING_NOZZLE_TEMP
|
|
411
|
+ #define LEVELING_NOZZLE_TEMP 0
|
|
412
|
+ #endif
|
|
413
|
+ #ifndef LEVELING_BED_TEMP
|
|
414
|
+ #define LEVELING_BED_TEMP 0
|
|
415
|
+ #endif
|
|
416
|
+ if (!dryrun && !faux) {
|
|
417
|
+ constexpr uint16_t hotendPreheat = LEVELING_NOZZLE_TEMP, bedPreheat = LEVELING_BED_TEMP;
|
|
418
|
+ if (DEBUGGING(LEVELING))
|
|
419
|
+ DEBUG_ECHOLNPAIR("Preheating hotend (", hotendPreheat, ") and bed (", bedPreheat, ")");
|
|
420
|
+ if (hotendPreheat) thermalManager.setTargetHotend(hotendPreheat, 0);
|
|
421
|
+ if (bedPreheat) thermalManager.setTargetBed(bedPreheat);
|
|
422
|
+ if (hotendPreheat) thermalManager.wait_for_hotend(0);
|
|
423
|
+ if (bedPreheat) thermalManager.wait_for_bed_heating();
|
|
424
|
+ }
|
|
425
|
+ #endif
|
|
426
|
+
|
406
|
427
|
// Disable auto bed leveling during G29.
|
407
|
428
|
// Be formal so G29 can be done successively without G28.
|
408
|
429
|
if (!no_action) set_bed_leveling_enabled(false);
|