🧑‍💻 Add ExtUI::onLevelingDone, match DWIN to ExtUI

This commit is contained in:
Scott Lahteine
2022-03-12 15:58:28 -06:00
committed by Scott Lahteine
parent 16271377e2
commit 4817efcf81
19 changed files with 94 additions and 71 deletions

View File

@ -419,12 +419,13 @@ G29_TYPE GcodeSuite::G29() {
planner.synchronize();
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
#if ENABLED(AUTO_BED_LEVELING_3POINT)
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling");
points[0].z = points[1].z = points[2].z = 0; // Probe at 3 arbitrary points
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart());
TERN_(DWIN_LCD_PROUI, DWIN_MeshLevelingStart());
TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_LevelingStart());
#endif
if (!faux) {
@ -577,6 +578,7 @@ G29_TYPE GcodeSuite::G29() {
SERIAL_ECHOLNPGM("Grid probing done.");
// Re-enable software endstops, if needed
SET_SOFT_ENDSTOP_LOOSE(false);
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
}
#elif ENABLED(AUTO_BED_LEVELING_3POINT)
@ -606,6 +608,8 @@ G29_TYPE GcodeSuite::G29() {
abl.reenable = false;
}
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
}
#endif // AUTO_BED_LEVELING_3POINT
@ -899,7 +903,7 @@ G29_TYPE GcodeSuite::G29() {
process_subcommands_now(F(Z_PROBE_END_SCRIPT));
#endif
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_CompletedLeveling());
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_LevelingDone());
TERN_(HAS_MULTI_HOTEND, if (abl.tool_index != 0) tool_change(abl.tool_index));

View File

@ -104,8 +104,8 @@ void GcodeSuite::G29() {
mbl_probe_index = 0;
if (!ui.wait_for_move) {
queue.inject(parser.seen_test('N') ? F("G28" TERN(CAN_SET_LEVELING_AFTER_G28, "L0", "") "\nG29S2") : F("G29S2"));
TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart());
TERN_(DWIN_LCD_PROUI, DWIN_MeshLevelingStart());
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart());
return;
}
state = MeshNext;
@ -168,6 +168,7 @@ void GcodeSuite::G29() {
#endif
TERN_(LCD_BED_LEVELING, ui.wait_for_move = false);
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
}
break;

View File

@ -239,7 +239,7 @@ void GcodeSuite::G28() {
set_and_report_grblstate(M_HOMING);
#endif
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_StartHoming());
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_HomingStart());
TERN_(EXTENSIBLE_UI, ExtUI::onHomingStart());
planner.synchronize(); // Wait for planner moves to finish!
@ -552,8 +552,8 @@ void GcodeSuite::G28() {
ui.refresh();
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_CompletedHoming());
TERN_(EXTENSIBLE_UI, ExtUI::onHomingComplete());
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_HomingDone());
TERN_(EXTENSIBLE_UI, ExtUI::onHomingDone());
report_current_position();

View File

@ -108,7 +108,7 @@ void GcodeSuite::M1001() {
process_subcommands_now(F(SD_FINISHED_RELEASECOMMAND));
#endif
TERN_(EXTENSIBLE_UI, ExtUI::onPrintFinished());
TERN_(EXTENSIBLE_UI, ExtUI::onPrintDone());
TERN_(DWIN_LCD_PROUI, DWIN_Print_Finished());
// Re-select the last printed file in the UI