Browse Source

Simplify G26 user_canceled

Scott Lahteine 7 years ago
parent
commit
90cf6a06be
1 changed files with 3 additions and 12 deletions
  1. 3
    12
      Marlin/src/gcode/bedlevel/G26.cpp

+ 3
- 12
Marlin/src/gcode/bedlevel/G26.cpp View File

159
 #if ENABLED(NEWPANEL)
159
 #if ENABLED(NEWPANEL)
160
 
160
 
161
   /**
161
   /**
162
-   * Detect is_lcd_clicked, debounce it, and return true for cancel
162
+   * If the LCD is clicked, cancel, wait for release, return true
163
    */
163
    */
164
   bool user_canceled() {
164
   bool user_canceled() {
165
     if (!is_lcd_clicked()) return false; // Return if the button isn't pressed
165
     if (!is_lcd_clicked()) return false; // Return if the button isn't pressed
166
-
167
-    #if ENABLED(ULTRA_LCD)
168
-      lcd_setstatusPGM(PSTR("Mesh Validation Stopped."), 99);
166
+    lcd_setstatusPGM(PSTR("Mesh Validation Stopped."), 99);
167
+    #if ENABLED(ULTIPANEL)
169
       lcd_quick_feedback();
168
       lcd_quick_feedback();
170
     #endif
169
     #endif
171
-
172
-    safe_delay(10);                      // Wait for click to settle
173
-    while (!is_lcd_clicked()) idle();    // Wait for button press again?
174
-
175
-    // If the button is suddenly pressed again,
176
-    // ask the user to resolve the issue
177
-    lcd_setstatusPGM(PSTR("Release button"), 99); // will never appear...
178
     wait_for_release();
170
     wait_for_release();
179
-    lcd_reset_status();
180
     return true;
171
     return true;
181
   }
172
   }
182
 
173
 

Loading…
Cancel
Save