Remove obsolete LULZBOT_TOUCH_UI code (#15284)

This commit is contained in:
Marcio Teixeira 2019-09-16 18:45:05 -06:00 committed by Scott Lahteine
parent 6282655d77
commit 4c00ddae56
4 changed files with 21 additions and 58 deletions

View file

@ -36,10 +36,6 @@
#define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0])) #define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0]))
#if ENABLED(SDSUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
#include "../../../../sd/cardreader.h"
#endif
const uint8_t shadow_depth = 5; const uint8_t shadow_depth = 5;
using namespace FTDI; using namespace FTDI;
@ -214,20 +210,12 @@ void StatusScreen::draw_buttons(draw_mode_t) {
cmd.font(font_medium) cmd.font(font_medium)
.colors(normal_btn) .colors(normal_btn)
#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP) .enabled(has_media)
.enabled(!Sd2Card::ready() || has_media)
#else
.enabled(has_media)
#endif
.colors(has_media ? action_btn : normal_btn) .colors(has_media ? action_btn : normal_btn)
.tag(9).button(BTN_POS(1,9), BTN_SIZE(1,1), .tag(9).button(BTN_POS(1,9), BTN_SIZE(1,1),
isPrintingFromMedia() ? isPrintingFromMedia() ?
GET_TEXTF(PRINTING) : GET_TEXTF(PRINTING) :
#ifdef LULZBOT_MANUAL_USB_STARTUP
(Sd2Card::ready() ? GET_TEXTF(MEDIA) : GET_TEXTF(ENABLE_MEDIA))
#else
GET_TEXTF(MEDIA) GET_TEXTF(MEDIA)
#endif
); );
cmd.colors(!has_media ? action_btn : normal_btn).tag(10).button(BTN_POS(2,9), BTN_SIZE(1,1), GET_TEXTF(MENU)); 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) {
injectCommands_P(PSTR("M17")); injectCommands_P(PSTR("M17"));
} }
break; break;
case 9: case 9: GOTO_SCREEN(FilesScreen); break;
#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
if (!Sd2Card::ready()) {
StatusScreen::setStatusMessage(GET_TEXTF(INSERT_MEDIA));
Sd2Card::usbStartup();
} else {
GOTO_SCREEN(FilesScreen);
}
#else
GOTO_SCREEN(FilesScreen);
#endif
break;
case 10: GOTO_SCREEN(MainMenu); break; case 10: GOTO_SCREEN(MainMenu); break;
case 13: SpinnerDialogBox::enqueueAndWait_P(F("G112")); break; case 13: SpinnerDialogBox::enqueueAndWait_P(F("G112")); break;
case 14: SpinnerDialogBox::enqueueAndWait_P(F("G28 Z")); break; case 14: SpinnerDialogBox::enqueueAndWait_P(F("G28 Z")); break;

View file

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

View file

@ -29,10 +29,6 @@
#include "../archim2-flash/flash_storage.h" #include "../archim2-flash/flash_storage.h"
#if BOTH(SDSUPPORT, LULZBOT_MANUAL_USB_STARTUP)
#include "../../../../../sd/cardreader.h"
#endif
using namespace FTDI; using namespace FTDI;
using namespace Theme; using namespace Theme;
@ -283,24 +279,16 @@ void StatusScreen::draw_interaction_buttons(draw_mode_t what) {
CommandProcessor cmd; CommandProcessor cmd;
cmd.colors(normal_btn) cmd.colors(normal_btn)
.font(Theme::font_medium) .font(Theme::font_medium)
#if BOTH(SDSUPPORT, LULZBOT_MANUAL_USB_STARTUP) .enabled(has_media)
.enabled(!Sd2Card::ready() || has_media)
#else
.enabled(has_media)
#endif
.colors(has_media ? action_btn : normal_btn) .colors(has_media ? action_btn : normal_btn)
#ifdef TOUCH_UI_PORTRAIT .tag(3).button(
.tag(3).button( BTN_POS(1,8), BTN_SIZE(2,1), #ifdef TOUCH_UI_PORTRAIT
#else BTN_POS(1,8), BTN_SIZE(2,1),
.tag(3).button( BTN_POS(1,7), BTN_SIZE(2,2), #else
#endif BTN_POS(1,7), BTN_SIZE(2,2),
isPrintingFromMedia() ? GET_TEXTF(PRINTING) : #endif
#if BOTH(SDSUPPORT, LULZBOT_MANUAL_USB_STARTUP) isPrintingFromMedia() ? GET_TEXTF(PRINTING) : GET_TEXTF(MEDIA)
(!Sd2Card::ready() ? GET_TEXTF(ENABLE_MEDIA) : ).colors(!has_media ? action_btn : normal_btn)
#else
GET_TEXTF(MEDIA))
#endif
.colors(!has_media ? action_btn : normal_btn)
#ifdef TOUCH_UI_PORTRAIT #ifdef TOUCH_UI_PORTRAIT
.tag(4).button( BTN_POS(3,8), BTN_SIZE(2,1), GET_TEXTF(MENU)); .tag(4).button( BTN_POS(3,8), BTN_SIZE(2,1), GET_TEXTF(MENU));
#else #else
@ -407,18 +395,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
using namespace ExtUI; using namespace ExtUI;
switch (tag) { switch (tag) {
case 3: case 3: GOTO_SCREEN(FilesScreen); break;
#if BOTH(SDSUPPORT, LULZBOT_MANUAL_USB_STARTUP)
if (!Sd2Card::ready()) {
StatusScreen::setStatusMessage(GET_TEXTF(INSERT_MEDIA));
Sd2Card::usbStartup();
} else {
GOTO_SCREEN(FilesScreen);
}
#else
GOTO_SCREEN(FilesScreen);
#endif
break;
case 4: case 4:
if (isPrinting()) { if (isPrinting()) {
GOTO_SCREEN(TuneMenu); GOTO_SCREEN(TuneMenu);

View file

@ -529,12 +529,18 @@ namespace ExtUI {
switch (axis) { switch (axis) {
#if X_SENSORLESS && AXIS_HAS_STALLGUARD(X) #if X_SENSORLESS && AXIS_HAS_STALLGUARD(X)
case X: stepperX.homing_threshold(value); break; case X: stepperX.homing_threshold(value); break;
#else
UNUSED(value);
#endif #endif
#if Y_SENSORLESS && AXIS_HAS_STALLGUARD(Y) #if Y_SENSORLESS && AXIS_HAS_STALLGUARD(Y)
case Y: stepperY.homing_threshold(value); break; case Y: stepperY.homing_threshold(value); break;
#else
UNUSED(value);
#endif #endif
#if Z_SENSORLESS && AXIS_HAS_STALLGUARD(Z) #if Z_SENSORLESS && AXIS_HAS_STALLGUARD(Z)
case Z: stepperZ.homing_threshold(value); break; case Z: stepperZ.homing_threshold(value); break;
#else
UNUSED(value);
#endif #endif
default: break; default: break;
} }