瀏覽代碼

Simplify G26 user_canceled

Scott Lahteine 7 年之前
父節點
當前提交
1951d3a37a
共有 1 個檔案被更改,包括 3 行新增12 行删除
  1. 3
    12
      Marlin/G26_Mesh_Validation_Tool.cpp

+ 3
- 12
Marlin/G26_Mesh_Validation_Tool.cpp 查看文件

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

Loading…
取消
儲存