From e38abef720c419262b89b21467857565aa10ebdf Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 24 Nov 2020 18:29:11 -0600 Subject: [PATCH] Update TOUCH_UI_LULZBOT_BIO wrappers --- .../screens/advanced_settings_menu.cpp | 5 +-- .../screens/bio_advanced_settings.cpp | 4 +-- .../screens/bio_confirm_home_e.cpp | 5 +-- .../screens/bio_confirm_home_xyz.cpp | 5 +-- .../screens/bio_main_menu.cpp | 4 +-- .../screens/bio_printing_dialog_box.cpp | 10 ++---- .../screens/bio_tune_menu.cpp | 4 +-- .../ftdi_eve_touch_ui/screens/main_menu.cpp | 32 ++++--------------- .../ftdi_eve_touch_ui/screens/tune_menu.cpp | 2 +- 9 files changed, 25 insertions(+), 46 deletions(-) diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp index 1b7d04331..3ffc88c38 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp @@ -22,7 +22,7 @@ #include "../config.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && !defined(TOUCH_UI_LULZBOT_BIO) +#if ENABLED(TOUCH_UI_FTDI_EVE) && DISABLED(TOUCH_UI_LULZBOT_BIO) #include "screens.h" @@ -152,4 +152,5 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { } return true; } -#endif // TOUCH_UI_FTDI_EVE + +#endif // TOUCH_UI_FTDI_EVE && !TOUCH_UI_LULZBOT_BIO diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp index b2611be25..196f26fe2 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp @@ -22,7 +22,7 @@ #include "../config.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && defined(TOUCH_UI_LULZBOT_BIO) +#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO) #include "screens.h" @@ -134,4 +134,4 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp index 85885fb38..3f6b4116f 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp @@ -22,7 +22,7 @@ #include "../config.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && defined(TOUCH_UI_LULZBOT_BIO) +#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO) #include "screens.h" @@ -53,4 +53,5 @@ bool BioConfirmHomeE::onTouchEnd(uint8_t tag) { } return true; } -#endif // TOUCH_UI_FTDI_EVE + +#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp index 102631f18..f712fdfff 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp @@ -22,7 +22,7 @@ #include "../config.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && defined(TOUCH_UI_LULZBOT_BIO) +#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO) #include "screens.h" @@ -52,4 +52,5 @@ bool BioConfirmHomeXYZ::onTouchEnd(uint8_t tag) { } return true; } -#endif // TOUCH_UI_FTDI_EVE + +#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp index 5ddc2d02a..dacbaf686 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp @@ -22,7 +22,7 @@ #include "../config.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && defined(TOUCH_UI_LULZBOT_BIO) +#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO) #include "screens.h" @@ -85,4 +85,4 @@ bool MainMenu::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp index fc6dc5ee5..384263770 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp @@ -22,7 +22,7 @@ #include "../config.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && defined(TOUCH_UI_LULZBOT_BIO) +#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO) #include "screens.h" @@ -78,11 +78,7 @@ void BioPrintingDialogBox::draw_interaction_buttons(draw_mode_t what) { .font(font_medium) .colors(isPrinting() ? action_btn : normal_btn) .tag(2).button(BTN_POS(1,9), BTN_SIZE(1,1), F("Menu")) - #if ENABLED(SDSUPPORT) - .enabled(isPrinting() ? isPrintingFromMedia() : 1) - #else - .enabled(isPrinting() ? 0 : 1) - #endif + .enabled(isPrinting() ? TERN0(SDSUPPORT, isPrintingFromMedia()) : 1) .tag(3) .colors(isPrinting() ? normal_btn : action_btn) .button( BTN_POS(2,9), BTN_SIZE(1,1), isPrinting() ? F("Cancel") : F("Back")); @@ -152,4 +148,4 @@ void BioPrintingDialogBox::show() { GOTO_SCREEN(BioPrintingDialogBox); } -#endif // TOUCH_UI_FTDI_EVE +#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.cpp index 9723abba0..ceea3742b 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.cpp @@ -22,7 +22,7 @@ #include "../config.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && defined(TOUCH_UI_LULZBOT_BIO) +#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO) #include "screens.h" @@ -76,4 +76,4 @@ bool TuneMenu::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp index 17e15afc5..85006566b 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp @@ -23,7 +23,7 @@ #include "../config.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && !defined(TOUCH_UI_LULZBOT_BIO) +#if ENABLED(TOUCH_UI_FTDI_EVE) && DISABLED(TOUCH_UI_LULZBOT_BIO) #include "screens.h" @@ -75,34 +75,14 @@ void MainMenu::onRedraw(draw_mode_t what) { 1 #endif ) - .tag(3).button( CLEAN_NOZZLE_POS, GET_TEXT_F( - #if ENABLED(TOUCH_UI_COCOA_PRESS) - MSG_PREHEAT_1 - #else - MSG_CLEAN_NOZZLE - #endif - )) + .tag(3).button( CLEAN_NOZZLE_POS, GET_TEXT_F(TERN(TOUCH_UI_COCOA_PRESS, MSG_PREHEAT_1, MSG_CLEAN_NOZZLE))) .tag(4).button( MOVE_AXIS_POS, GET_TEXT_F(MSG_MOVE_AXIS)) .tag(5).button( DISABLE_STEPPERS_POS, GET_TEXT_F(MSG_DISABLE_STEPPERS)) .tag(6).button( TEMPERATURE_POS, GET_TEXT_F(MSG_TEMPERATURE)) - .enabled( - #if DISABLED(TOUCH_UI_LULZBOT_BIO) - 1 - #endif - ) - .tag(7).button( FILAMENTCHANGE_POS, GET_TEXT_F( - #if ENABLED(TOUCH_UI_COCOA_PRESS) - MSG_CASE_LIGHT - #else - MSG_FILAMENTCHANGE - #endif - )) + .enabled(IF_DISABLED(TOUCH_UI_LULZBOT_BIO, 1)) + .tag(7).button( FILAMENTCHANGE_POS, GET_TEXT_F(TERN(TOUCH_UI_COCOA_PRESS, MSG_CASE_LIGHT, MSG_FILAMENTCHANGE)) .tag(8).button( ADVANCED_SETTINGS_POS, GET_TEXT_F(MSG_ADVANCED_SETTINGS)) - .enabled( - #ifdef HAS_LEVELING - 1 - #endif - ) + .enabled(TERN_(HAS_LEVELING, 1)) .tag(9).button( LEVELING_POS, GET_TEXT_F(MSG_LEVELING)) .tag(10).button( ABOUT_PRINTER_POS, GET_TEXT_F(MSG_INFO_MENU)) .colors(action_btn) @@ -140,4 +120,4 @@ bool MainMenu::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // TOUCH_UI_FTDI_EVE && !TOUCH_UI_LULZBOT_BIO diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/tune_menu.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/tune_menu.cpp index 894b238ae..10cbb8af5 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/tune_menu.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/tune_menu.cpp @@ -22,7 +22,7 @@ #include "../config.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && !defined(TOUCH_UI_LULZBOT_BIO) +#if ENABLED(TOUCH_UI_FTDI_EVE) && DISABLED(TOUCH_UI_LULZBOT_BIO) #include "screens.h"