Przeglądaj źródła

Simplify G26 user_canceled

Scott Lahteine 7 lat temu
rodzic
commit
90cf6a06be
1 zmienionych plików z 3 dodań i 12 usunięć
  1. 3
    12
      Marlin/src/gcode/bedlevel/G26.cpp

+ 3
- 12
Marlin/src/gcode/bedlevel/G26.cpp Wyświetl plik

@@ -159,24 +159,15 @@ int8_t g26_prime_flag;
159 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 164
   bool user_canceled() {
165 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 168
       lcd_quick_feedback();
170 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 170
     wait_for_release();
179
-    lcd_reset_status();
180 171
     return true;
181 172
   }
182 173
 

Ładowanie…
Anuluj
Zapisz