From b5b3da41f5e13ce2a4cc975d76397c2d3fa1feb6 Mon Sep 17 00:00:00 2001 From: Knutwurst <36196269+knutwurst@users.noreply.github.com> Date: Wed, 7 Jun 2023 08:35:43 +0200 Subject: [PATCH] Disable software endstops when manual or auto leveling is activated, so the nozzle can be set to a lower point than the endstop. --- Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp b/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp index 1cd1ee5a..79828e83 100755 --- a/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp +++ b/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp @@ -356,6 +356,8 @@ || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_MENU_S)) != NULL) ) { MMLMenu = true; + SERIAL_ECHOLNPGM("Special Menu: Manual Med Leveling + disable soft endstops"); + setSoftEndstopState(false); } else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_START_L)) != NULL) || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_START_S)) != NULL) @@ -466,6 +468,8 @@ else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BACK_L)) != NULL) || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BACK_S)) != NULL) ) { + SERIAL_ECHOLNPGM("Special Menu: Exit Manual Med Leveling + enable soft endstops"); + setSoftEndstopState(true); MMLMenu = false; } else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_FLOWMENU_L)) != NULL) @@ -514,6 +518,7 @@ ) { SERIAL_ECHOLNPGM("Special Menu: Enter BLTouch Menu"); BLTouchMenu = true; + setSoftEndstopState(false); } else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_UP_L)) != NULL) || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_UP_S)) != NULL) @@ -531,6 +536,7 @@ || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_EXIT_S)) != NULL) ) { SERIAL_ECHOLNPGM("Special Menu: Exit BLTouch Menu & Save EEPROM"); + setSoftEndstopState(true); injectCommands(F("M500")); BUZZ(105, 1108); BUZZ(210, 1661); @@ -1521,7 +1527,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) { mediaPrintingState = AMPRINTSTATE_PROBING; } } else { - SENDLINE_DBG_PGM("J26", "TFT Serial Debug: Start auto leveling... J26"); + SENDLINE_DBG_PGM("J26", "TFT Serial Debug: Enable level menu... J26"); } break;