From f6627c03520bb9edff11b241da37c07a295e7a2f Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Sat, 12 Dec 2020 17:44:03 -0500 Subject: [PATCH] Touchup mesh point updates and M600 fix --- Marlin/src/lcd/extui/dgus_creality_lcd.cpp | 10 +++------ .../lib/dgus_creality/DGUSScreenHandler.cpp | 7 ------- .../creality_touch/PageHandlers.cpp | 21 +++++++++++++------ 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Marlin/src/lcd/extui/dgus_creality_lcd.cpp b/Marlin/src/lcd/extui/dgus_creality_lcd.cpp index 31b50939ef..3125e6f3bb 100644 --- a/Marlin/src/lcd/extui/dgus_creality_lcd.cpp +++ b/Marlin/src/lcd/extui/dgus_creality_lcd.cpp @@ -182,16 +182,10 @@ bool hasPrintTimer = false; } void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) { - } - - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) { - } - - void onMeshCallback(const int8_t xpos, const int8_t ypos, const float zval) { ScreenHandler.OnMeshLevelingUpdate(xpos, ypos); } - void onMeshCallback(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) { + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) { // Only called for UBL if (state == MESH_START) { ScreenHandler.OnMeshLevelingStart(); @@ -199,6 +193,8 @@ bool hasPrintTimer = false; ScreenHandler.OnMeshLevelingUpdate(xpos, ypos); } + + #endif #if ENABLED(POWER_LOSS_RECOVERY) diff --git a/Marlin/src/lcd/extui/lib/dgus_creality/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/lib/dgus_creality/DGUSScreenHandler.cpp index 48266de4d3..2f87967ea2 100644 --- a/Marlin/src/lcd/extui/lib/dgus_creality/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/lib/dgus_creality/DGUSScreenHandler.cpp @@ -453,13 +453,6 @@ bool DGUSScreenHandler::HandlePendingUserConfirmation() { return false; } - // Switch to the resume screen - ScreenHandler.GotoScreen(DGUSLCD_SCREEN_PRINT_RUNNING); - while (!ScreenHandler.loop()); // Wait while anything is left to be sent - - // Give DWIN a chance to catch up - delay(250); - // We might be re-entrant here ExtUI::setUserConfirmed(); diff --git a/Marlin/src/lcd/extui/lib/dgus_creality/creality_touch/PageHandlers.cpp b/Marlin/src/lcd/extui/lib/dgus_creality/creality_touch/PageHandlers.cpp index e4886de07e..a540778b9e 100644 --- a/Marlin/src/lcd/extui/lib/dgus_creality/creality_touch/PageHandlers.cpp +++ b/Marlin/src/lcd/extui/lib/dgus_creality/creality_touch/PageHandlers.cpp @@ -163,13 +163,22 @@ void PrintRunningMenuHandler(DGUS_VP_Variable &var, unsigned short buttonValue) void PrintPausedMenuHandler(DGUS_VP_Variable &var, unsigned short buttonValue) { switch (var.VP) { case VP_BUTTON_RESUMEPRINTKEY: -#if ENABLED(FILAMENT_RUNOUT_SENSOR) + //SERIAL_ECHOLN("Handling VP_BUTTON_RESUMEPRINTKEY"); + #if ENABLED(FILAMENT_RUNOUT_SENSOR) runout.reset(); -#endif - - if (!ScreenHandler.HandlePendingUserConfirmation()) { - ExtUI::resumePrint(); - ScreenHandler.GotoScreen(DGUSLCD_SCREEN_PRINT_RUNNING); + //SERIAL_ECHOLN("Runout Reset"); + #endif + if(ExtUI::isWaitingOnUser()) { + ScreenHandler.HandlePendingUserConfirmation(); + //SERIAL_ECHOLN("User Confirmed"); + } + else if(ExtUI::isPrintingFromMediaPaused()) { + //SERIAL_ECHOLN("SD Resume"); + ExtUI::resumePrint(); + } + //SERIAL_ECHOLN("Reasons handled"); + if(!ExtUI::isMoving()) { + ScreenHandler.GotoScreen(DGUSLCD_SCREEN_PRINT_RUNNING); } break; }