From 5ad7118aeaa9c277df8efc5ad3a8a1d0c8e2b99c Mon Sep 17 00:00:00 2001 From: Marcio T Date: Tue, 30 Mar 2021 20:23:43 -0600 Subject: [PATCH] FTDI Touch UI fix and reorganize (#21487) --- .../{extras => extended}/adjuster_widget.cpp | 49 ++++---- .../{extras => extended}/adjuster_widget.h | 31 ++--- .../extended/circular_progress.cpp | 108 ++++++++++++++++++ .../ftdi_eve_lib/extended/circular_progress.h | 27 +++++ .../ftdi_eve_lib/extended/ftdi_extended.h | 3 + .../{extras => extended}/poly_ui.h | 0 .../ftdi_eve_lib/extras/circular_progress.h | 105 ----------------- .../{extras => scripts}/bitmap2cpp.py | 0 .../{extras => scripts}/svg2cpp.py | 0 .../screens/bed_mesh_screen.cpp | 2 - .../screens/bio_printing_dialog_box.cpp | 2 - .../screens/bio_status_screen.cpp | 2 - .../ftdi_eve_touch_ui/screens/boot_screen.cpp | 1 - .../screens/cocoa_press_load_chocolate.cpp | 2 - .../screens/cocoa_press_preheat_screen.cpp | 2 - .../screens/cocoa_press_status_screen.cpp | 2 - .../lib/ftdi_eve_touch_ui/screens/screens.h | 4 + 17 files changed, 184 insertions(+), 156 deletions(-) rename Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/{extras => extended}/adjuster_widget.cpp (59%) rename Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/{extras => extended}/adjuster_widget.h (74%) create mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.cpp create mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.h rename Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/{extras => extended}/poly_ui.h (100%) delete mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/circular_progress.h rename Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/{extras => scripts}/bitmap2cpp.py (100%) rename Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/{extras => scripts}/svg2cpp.py (100%) diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/adjuster_widget.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.cpp similarity index 59% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/adjuster_widget.cpp rename to Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.cpp index ef3cb565d2..26be9f4e59 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/adjuster_widget.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.cpp @@ -19,10 +19,9 @@ * location: . * ****************************************************************************/ -#include "../ftdi_eve_lib.h" -#include "../extended/grid_layout.h" +#include "ftdi_extended.h" -#include "adjuster_widget.h" +#if ENABLED(FTDI_EXTENDED) #define SUB_COLS 9 #define SUB_ROWS 1 @@ -30,28 +29,32 @@ #define INC_POS SUB_POS(6,1), SUB_SIZE(2,1) #define DEC_POS SUB_POS(8,1), SUB_SIZE(2,1) -void draw_adjuster_value(CommandProcessor& cmd, int16_t x, int16_t y, int16_t w, int16_t h, float value, progmem_str units, int8_t width, uint8_t precision) { - char str[width + precision + 10 + (units ? strlen_P((const char*) units) : 0)]; - if (isnan(value)) - strcpy_P(str, PSTR("-")); - else - dtostrf(value, width, precision, str); +namespace FTDI { + void draw_adjuster_value(CommandProcessor& cmd, int16_t x, int16_t y, int16_t w, int16_t h, float value, progmem_str units, int8_t width, uint8_t precision) { + char str[width + precision + 10 + (units ? strlen_P((const char*) units) : 0)]; + if (isnan(value)) + strcpy_P(str, PSTR("-")); + else + dtostrf(value, width, precision, str); - if (units) { - strcat_P(str, PSTR(" ")); - strcat_P(str, (const char*) units); + if (units) { + strcat_P(str, PSTR(" ")); + strcat_P(str, (const char*) units); + } + + cmd.text(VAL_POS, str); } - cmd.text(VAL_POS, str); -} + void draw_adjuster(CommandProcessor& cmd, int16_t x, int16_t y, int16_t w, int16_t h, uint8_t tag, float value, progmem_str units, int8_t width, uint8_t precision, draw_mode_t what) { + if (what & BACKGROUND) + cmd.tag(0).button(VAL_POS, F(""), FTDI::OPT_FLAT); -void draw_adjuster(CommandProcessor& cmd, int16_t x, int16_t y, int16_t w, int16_t h, uint8_t tag, float value, progmem_str units, int8_t width, uint8_t precision, draw_mode_t what) { - if (what & BACKGROUND) - cmd.tag(0).button(VAL_POS, F(""), FTDI::OPT_FLAT); - - if (what & FOREGROUND) { - draw_adjuster_value(cmd, x, y, w, h, value, units, width, precision); - cmd.tag(tag ).button(INC_POS, F("-")) - .tag(tag+1).button(DEC_POS, F("+")); + if (what & FOREGROUND) { + draw_adjuster_value(cmd, x, y, w, h, value, units, width, precision); + cmd.tag(tag ).button(INC_POS, F("-")) + .tag(tag+1).button(DEC_POS, F("+")); + } } -} +} // namespace FTDI + +#endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/adjuster_widget.h b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.h similarity index 74% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/adjuster_widget.h rename to Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.h index 9b5cab0dfb..71f7398694 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/adjuster_widget.h +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.h @@ -20,20 +20,21 @@ ****************************************************************************/ #pragma once -#include "../extended/screen_types.h" -void draw_adjuster_value( - CommandProcessor& cmd, - int16_t x, int16_t y, int16_t w, int16_t h, - float value, progmem_str units = nullptr, - int8_t width = 5, uint8_t precision = 1 -); +namespace FTDI { + void draw_adjuster_value( + CommandProcessor& cmd, + int16_t x, int16_t y, int16_t w, int16_t h, + float value, progmem_str units = nullptr, + int8_t width = 5, uint8_t precision = 1 + ); -void draw_adjuster( - CommandProcessor& cmd, - int16_t x, int16_t y, int16_t w, int16_t h, - uint8_t tag, - float value, progmem_str units = nullptr, - int8_t width = 5, uint8_t precision = 1, - draw_mode_t what = BOTH -); + void draw_adjuster( + CommandProcessor& cmd, + int16_t x, int16_t y, int16_t w, int16_t h, + uint8_t tag, + float value, progmem_str units = nullptr, + int8_t width = 5, uint8_t precision = 1, + draw_mode_t what = BOTH + ); +} diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.cpp new file mode 100644 index 0000000000..32cc37d2e2 --- /dev/null +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.cpp @@ -0,0 +1,108 @@ +/************************* + * circular_progress.cpp * + *************************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "ftdi_extended.h" + +#if ENABLED(FTDI_EXTENDED) + +/* This function draws a circular progress "ring" */ +namespace FTDI { + void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, char *text, uint32_t bgcolor, uint32_t fgcolor) { + const float rim = 0.3; + const float a = percent/100.0*2.0*PI; + const float a1 = min(PI/2, a); + const float a2 = min(PI/2, a-a1); + const float a3 = min(PI/2, a-a1-a2); + const float a4 = min(PI/2, a-a1-a2-a3); + + const int ro = min(w,h) * 8; + const int rr = ro * rim; + const int cx = x * 16 + w * 8; + const int cy = y * 16 + h * 8; + + // Load a rim shape into stencil buffer + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(TAG_MASK(0)); + cmd.cmd(CLEAR(0,1,0)); + cmd.cmd(COLOR_MASK(0,0,0,0)); + cmd.cmd(STENCIL_OP(STENCIL_OP_KEEP, STENCIL_OP_INVERT)); + cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_ALWAYS, 255, 255)); + cmd.cmd(BEGIN(POINTS)); + cmd.cmd(POINT_SIZE(ro)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(POINT_SIZE(ro - rr)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(RESTORE_CONTEXT()); + + // Mask further drawing by stencil buffer + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_NOTEQUAL, 0, 255)); + + // Fill the background + cmd.cmd(COLOR_RGB(bgcolor)); + cmd.cmd(BEGIN(POINTS)); + cmd.cmd(POINT_SIZE(ro)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(COLOR_RGB(fgcolor)); + + // Paint upper-right quadrant + cmd.cmd(BEGIN(EDGE_STRIP_A)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(VERTEX2F(cx + ro*sin(a1) + 16,cy - ro*cos(a1) + 8)); + + // Paint lower-right quadrant + if (a > PI/2) { + cmd.cmd(BEGIN(EDGE_STRIP_R)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(VERTEX2F(cx + ro*cos(a2),cy + ro*sin(a2) + 16)); + } + + // Paint lower-left quadrant + if (a > PI) { + cmd.cmd(BEGIN(EDGE_STRIP_B)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(VERTEX2F(cx - ro*sin(a3) - 8,cy + ro*cos(a3))); + } + + // Paint upper-left quadrant + if (a > 1.5*PI) { + cmd.cmd(BEGIN(EDGE_STRIP_L)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(VERTEX2F(cx - ro*cos(a4),cy - ro*sin(a4))); + } + cmd.cmd(RESTORE_CONTEXT()); + + // Draw the text + + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(COLOR_RGB(fgcolor)); + cmd.text(x,y,w,h,text, OPT_CENTERX | OPT_CENTERY); + cmd.cmd(RESTORE_CONTEXT()); + } + + void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, uint32_t bgcolor, uint32_t fgcolor) { + char str[5]; + sprintf(str,"%d\%%",int(percent)); + draw_circular_progress(cmd, x, y, w, h, percent, str, bgcolor, fgcolor); + } +} // namespace FTDI + +#endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.h b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.h new file mode 100644 index 0000000000..68fc06b4d9 --- /dev/null +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.h @@ -0,0 +1,27 @@ +/*********************** + * circular_progress.h * + ***********************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +namespace FTDI { + void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, char *text, uint32_t bgcolor, uint32_t fgcolor); + void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, uint32_t bgcolor, uint32_t fgcolor); +} diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h index fd84c795f1..bf9858f6eb 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h @@ -47,6 +47,9 @@ #include "sound_player.h" #include "sound_list.h" #include "polygon.h" + #include "poly_ui.h" #include "text_box.h" #include "text_ellipsis.h" + #include "adjuster_widget.h" + #include "circular_progress.h" #endif diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/poly_ui.h b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/poly_ui.h rename to Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/circular_progress.h b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/circular_progress.h deleted file mode 100644 index 6695134046..0000000000 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/circular_progress.h +++ /dev/null @@ -1,105 +0,0 @@ -/*********************** - * circular_progress.h * - ***********************/ - -/**************************************************************************** - * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -#pragma once - -/* This function draws a circular progress "ring" */ - -void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, char *text, uint32_t bgcolor, uint32_t fgcolor) { - using namespace FTDI; - - const float rim = 0.3; - const float a = percent/100.0*2.0*PI; - const float a1 = min(PI/2, a); - const float a2 = min(PI/2, a-a1); - const float a3 = min(PI/2, a-a1-a2); - const float a4 = min(PI/2, a-a1-a2-a3); - - const int ro = min(w,h) * 8; - const int rr = ro * rim; - const int cx = x * 16 + w * 8; - const int cy = y * 16 + h * 8; - - // Load a rim shape into stencil buffer - cmd.cmd(SAVE_CONTEXT()); - cmd.cmd(TAG_MASK(0)); - cmd.cmd(CLEAR(0,1,0)); - cmd.cmd(COLOR_MASK(0,0,0,0)); - cmd.cmd(STENCIL_OP(STENCIL_OP_KEEP, STENCIL_OP_INVERT)); - cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_ALWAYS, 255, 255)); - cmd.cmd(BEGIN(POINTS)); - cmd.cmd(POINT_SIZE(ro)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(POINT_SIZE(ro - rr)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(RESTORE_CONTEXT()); - - // Mask further drawing by stencil buffer - cmd.cmd(SAVE_CONTEXT()); - cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_NOTEQUAL, 0, 255)); - - // Fill the background - cmd.cmd(COLOR_RGB(bgcolor)); - cmd.cmd(BEGIN(POINTS)); - cmd.cmd(POINT_SIZE(ro)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(COLOR_RGB(fgcolor)); - - // Paint upper-right quadrant - cmd.cmd(BEGIN(EDGE_STRIP_A)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(VERTEX2F(cx + ro*sin(a1) + 16,cy - ro*cos(a1) + 8)); - - // Paint lower-right quadrant - if (a > PI/2) { - cmd.cmd(BEGIN(EDGE_STRIP_R)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(VERTEX2F(cx + ro*cos(a2),cy + ro*sin(a2) + 16)); - } - - // Paint lower-left quadrant - if (a > PI) { - cmd.cmd(BEGIN(EDGE_STRIP_B)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(VERTEX2F(cx - ro*sin(a3) - 8,cy + ro*cos(a3))); - } - - // Paint upper-left quadrant - if (a > 1.5*PI) { - cmd.cmd(BEGIN(EDGE_STRIP_L)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(VERTEX2F(cx - ro*cos(a4),cy - ro*sin(a4))); - } - cmd.cmd(RESTORE_CONTEXT()); - - // Draw the text - - cmd.cmd(SAVE_CONTEXT()); - cmd.cmd(COLOR_RGB(fgcolor)); - cmd.text(x,y,w,h,text, OPT_CENTERX | OPT_CENTERY); - cmd.cmd(RESTORE_CONTEXT()); -} - -void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, uint32_t bgcolor, uint32_t fgcolor) { - char str[5]; - sprintf(str,"%d\%%",int(percent)); - draw_circular_progress(cmd, x, y, w, h, percent, str, bgcolor, fgcolor); -} diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/bitmap2cpp.py b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/bitmap2cpp.py similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/bitmap2cpp.py rename to Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/bitmap2cpp.py diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/svg2cpp.py b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/svg2cpp.py rename to Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp index 053f4ebd72..f8b4b5b5d1 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp @@ -25,8 +25,6 @@ #ifdef FTDI_BED_MESH_SCREEN -#include "../ftdi_eve_lib/extras/adjuster_widget.h" - using namespace FTDI; using namespace Theme; using namespace ExtUI; 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 a812f0f3d0..10ed6eb14a 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 @@ -25,8 +25,6 @@ #ifdef FTDI_BIO_PRINTING_DIALOG_BOX -#include "../ftdi_eve_lib/extras/circular_progress.h" - using namespace FTDI; using namespace ExtUI; using namespace Theme; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.cpp index f2bb5f3d3c..c66e4d94d8 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.cpp @@ -26,8 +26,6 @@ #ifdef FTDI_BIO_STATUS_SCREEN -#include "../ftdi_eve_lib/extras/poly_ui.h" - #if ENABLED(TOUCH_UI_PORTRAIT) #include "bio_printer_ui_portrait.h" #else diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/boot_screen.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/boot_screen.cpp index 236830dbc4..c8c7cdb5a5 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/boot_screen.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/boot_screen.cpp @@ -26,7 +26,6 @@ #ifdef FTDI_BOOT_SCREEN -#include "../ftdi_eve_lib/extras/poly_ui.h" #include "../archim2-flash/flash_storage.h" #if ENABLED(SHOW_CUSTOM_BOOTSCREEN) diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp index d9c01366b9..ac49df0916 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp @@ -27,8 +27,6 @@ #ifdef FTDI_COCOA_LOAD_CHOCOLATE_SCREEN -#include "../ftdi_eve_lib/extras/poly_ui.h" - #include "cocoa_press_ui.h" #define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0])) diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_screen.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_screen.cpp index 66256ab46f..a8a172b3da 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_screen.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_screen.cpp @@ -25,8 +25,6 @@ #ifdef FTDI_COCOA_PREHEAT_SCREEN -#include "../ftdi_eve_lib/extras/circular_progress.h" - using namespace FTDI; using namespace ExtUI; using namespace Theme; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp index 5a0fe485f8..a0c8914589 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp @@ -26,8 +26,6 @@ #ifdef FTDI_COCOA_STATUS_SCREEN -#include "../ftdi_eve_lib/extras/poly_ui.h" - #include "cocoa_press_ui.h" #define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0])) diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h index 3e69a3ad2f..7aca5800e1 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h @@ -22,6 +22,8 @@ #pragma once +#if ENABLED(TOUCH_UI_FTDI_EVE) + #include "../ftdi_eve_lib/ftdi_eve_lib.h" #include "../language/language.h" #include "../theme/theme.h" @@ -260,3 +262,5 @@ enum { #if NUM_LANGUAGES > 1 #include "language_menu.h" #endif + +#endif // TOUCH_UI_FTDI_EVE