|
@@ -211,10 +211,6 @@ void GcodeSuite::G28() {
|
211
|
211
|
|
212
|
212
|
TERN_(LASER_MOVE_G28_OFF, cutter.set_inline_enabled(false)); // turn off laser
|
213
|
213
|
|
214
|
|
- TERN_(DWIN_CREALITY_LCD, HMI_flag.home_flag = true);
|
215
|
|
-
|
216
|
|
- TERN_(EXTENSIBLE_UI, ExtUI::onHomingStart());
|
217
|
|
-
|
218
|
214
|
#if ENABLED(DUAL_X_CARRIAGE)
|
219
|
215
|
bool IDEX_saved_duplication_state = extruder_duplication_enabled;
|
220
|
216
|
DualXMode IDEX_saved_mode = dual_x_carriage_mode;
|
|
@@ -236,17 +232,17 @@ void GcodeSuite::G28() {
|
236
|
232
|
return;
|
237
|
233
|
}
|
238
|
234
|
|
|
235
|
+ TERN_(DWIN_CREALITY_LCD, DWIN_StartHoming());
|
|
236
|
+ TERN_(EXTENSIBLE_UI, ExtUI::onHomingStart());
|
|
237
|
+
|
239
|
238
|
planner.synchronize(); // Wait for planner moves to finish!
|
240
|
239
|
|
241
|
240
|
SET_SOFT_ENDSTOP_LOOSE(false); // Reset a leftover 'loose' motion state
|
242
|
241
|
|
243
|
242
|
// Disable the leveling matrix before homing
|
244
|
243
|
#if HAS_LEVELING
|
245
|
|
-
|
246
|
|
- // Cancel the active G29 session
|
247
|
|
- TERN_(PROBE_MANUALLY, g29_in_progress = false);
|
248
|
|
-
|
249
|
244
|
TERN_(RESTORE_LEVELING_AFTER_G28, const bool leveling_was_active = planner.leveling_active);
|
|
245
|
+ TERN_(PROBE_MANUALLY, g29_in_progress = false); // Cancel the active G29 session
|
250
|
246
|
set_bed_leveling_enabled(false);
|
251
|
247
|
#endif
|
252
|
248
|
|
|
@@ -439,8 +435,6 @@ void GcodeSuite::G28() {
|
439
|
435
|
do_blocking_move_to_z(delta_clip_start_height);
|
440
|
436
|
#endif
|
441
|
437
|
|
442
|
|
- TERN_(RESTORE_LEVELING_AFTER_G28, set_bed_leveling_enabled(leveling_was_active));
|
443
|
|
-
|
444
|
438
|
restore_feedrate_and_scaling();
|
445
|
439
|
|
446
|
440
|
// Restore the active tool after homing
|
|
@@ -464,10 +458,11 @@ void GcodeSuite::G28() {
|
464
|
458
|
#endif
|
465
|
459
|
#endif
|
466
|
460
|
|
|
461
|
+ TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_restore_state));
|
|
462
|
+
|
467
|
463
|
ui.refresh();
|
468
|
464
|
|
469
|
465
|
TERN_(DWIN_CREALITY_LCD, DWIN_CompletedHoming());
|
470
|
|
-
|
471
|
466
|
TERN_(EXTENSIBLE_UI, ExtUI::onHomingComplete());
|
472
|
467
|
|
473
|
468
|
report_current_position();
|