Browse Source

Remove obsolete LULZBOT_TOUCH_UI code (#15284)

Marcio Teixeira 5 years ago
parent
commit
4c00ddae56

+ 2
- 25
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_status_screen.cpp View File

@@ -36,10 +36,6 @@
36 36
 
37 37
 #define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0]))
38 38
 
39
-#if ENABLED(SDSUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
40
-  #include "../../../../sd/cardreader.h"
41
-#endif
42
-
43 39
 const uint8_t shadow_depth = 5;
44 40
 
45 41
 using namespace FTDI;
@@ -214,20 +210,12 @@ void StatusScreen::draw_buttons(draw_mode_t) {
214 210
 
215 211
   cmd.font(font_medium)
216 212
      .colors(normal_btn)
217
-    #if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
218
-      .enabled(!Sd2Card::ready() || has_media)
219
-    #else
220
-      .enabled(has_media)
221
-    #endif
213
+     .enabled(has_media)
222 214
      .colors(has_media ? action_btn : normal_btn)
223 215
      .tag(9).button(BTN_POS(1,9), BTN_SIZE(1,1),
224 216
         isPrintingFromMedia() ?
225 217
           GET_TEXTF(PRINTING) :
226
-        #ifdef LULZBOT_MANUAL_USB_STARTUP
227
-          (Sd2Card::ready() ? GET_TEXTF(MEDIA) : GET_TEXTF(ENABLE_MEDIA))
228
-        #else
229 218
           GET_TEXTF(MEDIA)
230
-        #endif
231 219
       );
232 220
 
233 221
   cmd.colors(!has_media ? action_btn : normal_btn).tag(10).button(BTN_POS(2,9), BTN_SIZE(1,1), GET_TEXTF(MENU));
@@ -276,18 +264,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
276 264
         injectCommands_P(PSTR("M17"));
277 265
       }
278 266
       break;
279
-    case 9:
280
-      #if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
281
-      if (!Sd2Card::ready()) {
282
-        StatusScreen::setStatusMessage(GET_TEXTF(INSERT_MEDIA));
283
-        Sd2Card::usbStartup();
284
-      } else {
285
-        GOTO_SCREEN(FilesScreen);
286
-      }
287
-      #else
288
-        GOTO_SCREEN(FilesScreen);
289
-      #endif
290
-      break;
267
+    case 9:  GOTO_SCREEN(FilesScreen); break;
291 268
     case 10: GOTO_SCREEN(MainMenu); break;
292 269
     case 13: SpinnerDialogBox::enqueueAndWait_P(F("G112"));  break;
293 270
     case 14: SpinnerDialogBox::enqueueAndWait_P(F("G28 Z")); break;

+ 3
- 0
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/media_player_screen.cpp View File

@@ -163,6 +163,9 @@ void MediaPlayerScreen::playStream(void *obj, media_streamer_func_t *data_stream
163 163
       DLCache::init();
164 164
       StatusScreen::loadBitmaps();
165 165
     }
166
+  #else
167
+    UNUSED(obj);
168
+    UNUSED(data_stream);
166 169
   #endif // FTDI_API_LEVEL >= 810
167 170
 }
168 171
 

+ 10
- 33
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/status_screen.cpp View File

@@ -29,10 +29,6 @@
29 29
 
30 30
 #include "../archim2-flash/flash_storage.h"
31 31
 
32
-#if BOTH(SDSUPPORT, LULZBOT_MANUAL_USB_STARTUP)
33
-  #include "../../../../../sd/cardreader.h"
34
-#endif
35
-
36 32
 using namespace FTDI;
37 33
 using namespace Theme;
38 34
 
@@ -283,24 +279,16 @@ void StatusScreen::draw_interaction_buttons(draw_mode_t what) {
283 279
     CommandProcessor cmd;
284 280
     cmd.colors(normal_btn)
285 281
        .font(Theme::font_medium)
286
-    #if BOTH(SDSUPPORT, LULZBOT_MANUAL_USB_STARTUP)
287
-      .enabled(!Sd2Card::ready() || has_media)
288
-    #else
289
-      .enabled(has_media)
290
-    #endif
282
+       .enabled(has_media)
291 283
        .colors(has_media ? action_btn : normal_btn)
292
-      #ifdef TOUCH_UI_PORTRAIT
293
-         .tag(3).button( BTN_POS(1,8), BTN_SIZE(2,1),
294
-      #else
295
-         .tag(3).button( BTN_POS(1,7), BTN_SIZE(2,2),
296
-      #endif
297
-      isPrintingFromMedia() ? GET_TEXTF(PRINTING) :
298
-      #if BOTH(SDSUPPORT, LULZBOT_MANUAL_USB_STARTUP)
299
-      (!Sd2Card::ready() ? GET_TEXTF(ENABLE_MEDIA) :
300
-      #else
301
-      GET_TEXTF(MEDIA))
302
-      #endif
303
-      .colors(!has_media ? action_btn : normal_btn)
284
+       .tag(3).button(
285
+          #ifdef TOUCH_UI_PORTRAIT
286
+            BTN_POS(1,8), BTN_SIZE(2,1),
287
+          #else
288
+            BTN_POS(1,7), BTN_SIZE(2,2),
289
+          #endif
290
+          isPrintingFromMedia() ? GET_TEXTF(PRINTING) : GET_TEXTF(MEDIA)
291
+        ).colors(!has_media ? action_btn : normal_btn)
304 292
       #ifdef TOUCH_UI_PORTRAIT
305 293
        .tag(4).button( BTN_POS(3,8), BTN_SIZE(2,1), GET_TEXTF(MENU));
306 294
       #else
@@ -407,18 +395,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
407 395
   using namespace ExtUI;
408 396
 
409 397
   switch (tag) {
410
-    case 3:
411
-      #if BOTH(SDSUPPORT, LULZBOT_MANUAL_USB_STARTUP)
412
-      if (!Sd2Card::ready()) {
413
-        StatusScreen::setStatusMessage(GET_TEXTF(INSERT_MEDIA));
414
-        Sd2Card::usbStartup();
415
-      } else {
416
-        GOTO_SCREEN(FilesScreen);
417
-      }
418
-      #else
419
-        GOTO_SCREEN(FilesScreen);
420
-      #endif
421
-      break;
398
+    case 3: GOTO_SCREEN(FilesScreen); break;
422 399
     case 4:
423 400
       if (isPrinting()) {
424 401
         GOTO_SCREEN(TuneMenu);

+ 6
- 0
Marlin/src/lcd/extensible_ui/ui_api.cpp View File

@@ -529,12 +529,18 @@ namespace ExtUI {
529 529
       switch (axis) {
530 530
         #if X_SENSORLESS && AXIS_HAS_STALLGUARD(X)
531 531
           case X: stepperX.homing_threshold(value); break;
532
+        #else
533
+          UNUSED(value);
532 534
         #endif
533 535
         #if Y_SENSORLESS && AXIS_HAS_STALLGUARD(Y)
534 536
           case Y: stepperY.homing_threshold(value); break;
537
+        #else
538
+          UNUSED(value);
535 539
         #endif
536 540
         #if Z_SENSORLESS && AXIS_HAS_STALLGUARD(Z)
537 541
           case Z: stepperZ.homing_threshold(value); break;
542
+        #else
543
+          UNUSED(value);
538 544
         #endif
539 545
         default: break;
540 546
       }

Loading…
Cancel
Save