From 1951d3a37af65f3cc8293e1f28caa4fd73844dfb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 6 Dec 2017 21:58:49 -0600 Subject: [PATCH] Simplify G26 user_canceled --- Marlin/G26_Mesh_Validation_Tool.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Marlin/G26_Mesh_Validation_Tool.cpp b/Marlin/G26_Mesh_Validation_Tool.cpp index 8018cb741..1abe88e60 100644 --- a/Marlin/G26_Mesh_Validation_Tool.cpp +++ b/Marlin/G26_Mesh_Validation_Tool.cpp @@ -166,24 +166,15 @@ #if ENABLED(NEWPANEL) /** - * Detect is_lcd_clicked, debounce it, and return true for cancel + * If the LCD is clicked, cancel, wait for release, return true */ bool user_canceled() { if (!is_lcd_clicked()) return false; // Return if the button isn't pressed - - #if ENABLED(ULTRA_LCD) - lcd_setstatusPGM(PSTR("Mesh Validation Stopped."), 99); + lcd_setstatusPGM(PSTR("Mesh Validation Stopped."), 99); + #if ENABLED(ULTIPANEL) lcd_quick_feedback(); #endif - - safe_delay(10); // Wait for click to settle - while (!is_lcd_clicked()) idle(); // Wait for button press again? - - // If the button is suddenly pressed again, - // ask the user to resolve the issue - lcd_setstatusPGM(PSTR("Release button"), 99); // will never appear... wait_for_release(); - lcd_reset_status(); return true; }