Browse Source

Refactor FTDI EVE Touch Screen (#20987)

Marcio Teixeira 3 years ago
parent
commit
ee66d9ccf9
100 changed files with 2153 additions and 312 deletions
  1. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp
  2. 8
    6
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h
  3. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/about_screen.cpp
  4. 33
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/about_screen.h
  5. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp
  6. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.h
  7. 8
    7
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/alert_dialog_box.cpp
  8. 39
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/alert_dialog_box.h
  9. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/backlash_compensation_screen.cpp
  10. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/backlash_compensation_screen.h
  11. 11
    10
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_numeric_adjustment_screen.cpp
  12. 87
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_numeric_adjustment_screen.h
  13. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_screen.cpp
  14. 43
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_screen.h
  15. 26
    25
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp
  16. 62
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.h
  17. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp
  18. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.h
  19. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp
  20. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.h
  21. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp
  22. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.h
  23. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp
  24. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.h
  25. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp
  26. 44
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.h
  27. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.cpp
  28. 56
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.h
  29. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.cpp
  30. 35
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.h
  31. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/boot_screen.cpp
  32. 35
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/boot_screen.h
  33. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/case_light_screen.cpp
  34. 31
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/case_light_screen.h
  35. 31
    30
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/change_filament_screen.cpp
  36. 51
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/change_filament_screen.h
  37. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_advanced_settings_menu.cpp
  38. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_advanced_settings_menu.h
  39. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp
  40. 34
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.h
  41. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_main_menu.cpp
  42. 33
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_main_menu.h
  43. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_e_screen.cpp
  44. 33
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_e_screen.h
  45. 5
    6
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_xyz_screen.cpp
  46. 33
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_xyz_screen.h
  47. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_menu.cpp
  48. 31
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_menu.h
  49. 7
    6
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_screen.cpp
  50. 46
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_screen.h
  51. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp
  52. 55
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.h
  53. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_unload_cartridge.cpp
  54. 34
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_unload_cartridge.h
  55. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_abort_print_dialog_box.cpp
  56. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_abort_print_dialog_box.h
  57. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_auto_calibration_dialog_box.cpp
  58. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_auto_calibration_dialog_box.h
  59. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_erase_flash_dialog_box.cpp
  60. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_erase_flash_dialog_box.h
  61. 7
    6
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_start_print_dialog_box.cpp
  62. 43
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_start_print_dialog_box.h
  63. 4
    5
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_user_request_alert_box.cpp
  64. 35
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_user_request_alert_box.h
  65. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.cpp
  66. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.h
  67. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/default_acceleration_screen.cpp
  68. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/default_acceleration_screen.h
  69. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/developer_menu.cpp
  70. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/developer_menu.h
  71. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/dialog_box_base_class.cpp
  72. 40
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/dialog_box_base_class.h
  73. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/display_tuning_screen.cpp
  74. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/display_tuning_screen.h
  75. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.cpp
  76. 35
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.h
  77. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/feedrate_percent_screen.cpp
  78. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/feedrate_percent_screen.h
  79. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_menu.cpp
  80. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_menu.h
  81. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_runout_screen.cpp
  82. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_runout_screen.h
  83. 35
    34
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp
  84. 75
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.h
  85. 12
    12
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp
  86. 67
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.h
  87. 7
    8
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.cpp
  88. 57
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.h
  89. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/jerk_screen.cpp
  90. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/jerk_screen.h
  91. 6
    7
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/junction_deviation_screen.cpp
  92. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/junction_deviation_screen.h
  93. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/kill_screen.cpp
  94. 33
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/kill_screen.h
  95. 4
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/language_menu.cpp
  96. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/language_menu.h
  97. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/leveling_menu.cpp
  98. 32
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/leveling_menu.h
  99. 3
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/linear_advance_screen.cpp
  100. 0
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/linear_advance_screen.h

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp View File

@@ -26,7 +26,7 @@
26 26
 /********************** VIRTUAL DISPATCH DATA TYPE  ******************************/
27 27
 
28 28
 uint8_t ScreenRef::lookupScreen(onRedraw_func_t onRedraw_ptr) {
29
-  for (uint8_t type = 0; type < functionTableSize; type++) {
29
+  for (uint8_t type = 0; type < tableSize(); type++) {
30 30
     if (GET_METHOD(type, onRedraw) == onRedraw_ptr) {
31 31
       return type;
32 32
     }
@@ -49,7 +49,7 @@ void ScreenRef::setScreen(onRedraw_func_t onRedraw_ptr) {
49 49
 }
50 50
 
51 51
 void ScreenRef::initializeAll() {
52
-  for (uint8_t type = 0; type < functionTableSize; type++)
52
+  for (uint8_t type = 0; type < tableSize(); type++)
53 53
     GET_METHOD(type, onStartup)();
54 54
 }
55 55
 

+ 8
- 6
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h View File

@@ -50,7 +50,11 @@ typedef enum {
50 50
 
51 51
 #define GET_METHOD(type, method) reinterpret_cast<method##_func_t*>(pgm_read_ptr_far(&functionTable[type].method##_ptr))
52 52
 #define SCREEN_TABLE             PROGMEM const ScreenRef::table_t ScreenRef::functionTable[] =
53
-#define SCREEN_TABLE_POST        const uint8_t ScreenRef::functionTableSize = sizeof(ScreenRef::functionTable)/sizeof(ScreenRef::functionTable[0]);
53
+#define SCREEN_TABLE_POST        size_t ScreenRef::tableSize() { \
54
+                                   constexpr size_t siz = sizeof(functionTable)/sizeof(functionTable[0]); \
55
+                                   static_assert(siz > 0, "The screen table is empty!"); \
56
+                                   return siz; \
57
+                                 }
54 58
 
55 59
 class ScreenRef {
56 60
   protected:
@@ -79,14 +83,12 @@ class ScreenRef {
79 83
 
80 84
     uint8_t type = 0;
81 85
     static PROGMEM const table_t functionTable[];
82
-    static const uint8_t functionTableSize;
83 86
 
84 87
   public:
85
-    uint8_t getType() {return type;}
88
+    static size_t tableSize();
86 89
 
87
-    void setType(uint8_t t) {
88
-      type = t;
89
-    }
90
+    uint8_t getType()       {return type;}
91
+    void setType(uint8_t t) {type = t;}
90 92
 
91 93
     uint8_t lookupScreen(onRedraw_func_t onRedraw_ptr);
92 94
 

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/about_screen.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_ABOUT_SCREEN
27
+
29 28
 #define GRID_COLS 4
30 29
 #define GRID_ROWS 7
31 30
 
@@ -113,4 +112,4 @@ bool AboutScreen::onTouchEnd(uint8_t tag) {
113 112
   return true;
114 113
 }
115 114
 
116
-#endif // TOUCH_UI_FTDI_EVE
115
+#endif // FTDI_ABOUT_SCREEN

+ 33
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/about_screen.h View File

@@ -0,0 +1,33 @@
1
+/******************
2
+ * about_screen.h *
3
+ ******************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_ABOUT_SCREEN
26
+#define FTDI_ABOUT_SCREEN_CLASS AboutScreen
27
+
28
+class AboutScreen : public BaseScreen, public UncachedScreen {
29
+  public:
30
+    static void onEntry();
31
+    static void onRedraw(draw_mode_t);
32
+    static bool onTouchEnd(uint8_t tag);
33
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE) && NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_ADVANCED_SETTINGS_MENU
27
+
29 28
 using namespace FTDI;
30 29
 using namespace ExtUI;
31 30
 using namespace Theme;
@@ -153,4 +152,4 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
153 152
   return true;
154 153
 }
155 154
 
156
-#endif // TOUCH_UI_FTDI_EVE && !TOUCH_UI_LULZBOT_BIO
155
+#endif // FTDI_ADVANCED_SETTINGS_MENU

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.h View File

@@ -0,0 +1,32 @@
1
+/***************************
2
+ * advance_settings_menu.h *
3
+ ***************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_ADVANCED_SETTINGS_MENU
26
+#define FTDI_ADVANCED_SETTINGS_MENU_CLASS AdvancedSettingsMenu
27
+
28
+class AdvancedSettingsMenu : public BaseScreen, public CachedScreen<ADVANCED_SETTINGS_SCREEN_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 8
- 7
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/alert_dialog_box.cpp View File

@@ -21,18 +21,19 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 #include "screen_data.h"
29 26
 
27
+#ifdef FTDI_ALERT_DIALOG_BOX
28
+
29
+constexpr static AlertDialogBoxData &mydata = screen_data.AlertDialogBox;
30
+
30 31
 using namespace FTDI;
31 32
 using namespace Theme;
32 33
 
33 34
 void AlertDialogBox::onEntry() {
34 35
   BaseScreen::onEntry();
35
-  sound.play(screen_data.AlertDialog.isError ? sad_trombone : twinkle, PLAY_ASYNCHRONOUS);
36
+  sound.play(mydata.isError ? sad_trombone : twinkle, PLAY_ASYNCHRONOUS);
36 37
 }
37 38
 
38 39
 void AlertDialogBox::onRedraw(draw_mode_t what) {
@@ -45,7 +46,7 @@ template<typename T>
45 46
 void AlertDialogBox::show(const T message) {
46 47
   drawMessage(message);
47 48
   storeBackground();
48
-  screen_data.AlertDialog.isError = false;
49
+  mydata.isError = false;
49 50
   GOTO_SCREEN(AlertDialogBox);
50 51
 }
51 52
 
@@ -53,7 +54,7 @@ template<typename T>
53 54
 void AlertDialogBox::showError(const T message) {
54 55
   drawMessage(message);
55 56
   storeBackground();
56
-  screen_data.AlertDialog.isError = true;
57
+  mydata.isError = true;
57 58
   GOTO_SCREEN(AlertDialogBox);
58 59
 }
59 60
 
@@ -67,4 +68,4 @@ template void AlertDialogBox::show(const progmem_str);
67 68
 template void AlertDialogBox::showError(const char *);
68 69
 template void AlertDialogBox::showError(const progmem_str);
69 70
 
70
-#endif // TOUCH_UI_FTDI_EVE
71
+#endif // FTDI_ALERT_DIALOG_BOX

+ 39
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/alert_dialog_box.h View File

@@ -0,0 +1,39 @@
1
+/**********************
2
+ * alert_dialog_box.h *
3
+ **********************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_ALERT_DIALOG_BOX
26
+#define FTDI_ALERT_DIALOG_BOX_CLASS AlertDialogBox
27
+
28
+struct AlertDialogBoxData {
29
+  bool isError;
30
+};
31
+
32
+class AlertDialogBox : public DialogBoxBaseClass, public CachedScreen<ALERT_BOX_CACHE,ALERT_BOX_DL_SIZE> {
33
+  public:
34
+    static void onEntry();
35
+    static void onRedraw(draw_mode_t);
36
+    template<typename T> static void show(T);
37
+    template<typename T> static void showError(T);
38
+    static void hide();
39
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/backlash_compensation_screen.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, BACKLASH_GCODE)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_BACKLASH_COMP_SCREEN
27
+
29 28
 using namespace FTDI;
30 29
 using namespace ExtUI;
31 30
 using namespace Theme;
@@ -73,4 +72,4 @@ bool BacklashCompensationScreen::onTouchHeld(uint8_t tag) {
73 72
   return true;
74 73
 }
75 74
 
76
-#endif // TOUCH_UI_FTDI_EVE
75
+#endif // FTDI_BACKLASH_COMP_SCREEN

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/backlash_compensation_screen.h View File

@@ -0,0 +1,32 @@
1
+/**********************************
2
+ * backlash_compensation_screen.h *
3
+ **********************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_BACKLASH_COMP_SCREEN
26
+#define FTDI_BACKLASH_COMP_SCREEN_CLASS BacklashCompensationScreen
27
+
28
+class BacklashCompensationScreen : public BaseNumericAdjustmentScreen, public CachedScreen<BACKLASH_COMPENSATION_SCREEN_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchHeld(uint8_t tag);
32
+};

+ 11
- 10
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_numeric_adjustment_screen.cpp View File

@@ -21,15 +21,16 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 #include "screen_data.h"
29 26
 
27
+#ifdef FTDI_BASE_NUMERIC_ADJ_SCREEN
28
+
30 29
 using namespace FTDI;
31 30
 using namespace Theme;
32 31
 
32
+constexpr static BaseNumericAdjustmentScreenData &mydata = screen_data.BaseNumericAdjustmentScreen;
33
+
33 34
 #if ENABLED(TOUCH_UI_PORTRAIT)
34 35
   #define GRID_COLS 13
35 36
   #define GRID_ROWS 10
@@ -116,8 +117,8 @@ void BaseNumericAdjustmentScreen::widgets_t::_button(CommandProcessor &cmd, uint
116 117
 
117 118
 BaseNumericAdjustmentScreen::widgets_t &BaseNumericAdjustmentScreen::widgets_t::precision(uint8_t decimals, precision_default_t initial) {
118 119
   _decimals = decimals;
119
-  if (screen_data.BaseNumericAdjustment.increment == 0) {
120
-    screen_data.BaseNumericAdjustment.increment = 243 + (initial - DEFAULT_LOWEST) - _decimals;
120
+  if (mydata.increment == 0) {
121
+    mydata.increment = 243 + (initial - DEFAULT_LOWEST) - _decimals;
121 122
   }
122 123
   return *this;
123 124
 }
@@ -154,7 +155,7 @@ void BaseNumericAdjustmentScreen::widgets_t::heading(progmem_str label) {
154 155
 void BaseNumericAdjustmentScreen::widgets_t::_draw_increment_btn(CommandProcessor &cmd, uint8_t, const uint8_t tag) {
155 156
   const char        *label = PSTR("?");
156 157
   uint8_t            pos;
157
-  uint8_t &          increment = screen_data.BaseNumericAdjustment.increment;
158
+  uint8_t &          increment = mydata.increment;
158 159
 
159 160
   if (increment == 0) {
160 161
     increment = tag; // Set the default value to be the first.
@@ -358,7 +359,7 @@ void BaseNumericAdjustmentScreen::widgets_t::home_buttons(uint8_t tag) {
358 359
 }
359 360
 
360 361
 void BaseNumericAdjustmentScreen::onEntry() {
361
-  screen_data.BaseNumericAdjustment.increment = 0; // This will force the increment to be picked while drawing.
362
+  mydata.increment = 0; // This will force the increment to be picked while drawing.
362 363
   BaseScreen::onEntry();
363 364
   CommandProcessor cmd;
364 365
   cmd.set_button_style_callback(nullptr);
@@ -367,14 +368,14 @@ void BaseNumericAdjustmentScreen::onEntry() {
367 368
 bool BaseNumericAdjustmentScreen::onTouchEnd(uint8_t tag) {
368 369
   switch (tag) {
369 370
     case 1:           GOTO_PREVIOUS(); return true;
370
-    case 240 ... 245: screen_data.BaseNumericAdjustment.increment = tag; break;
371
+    case 240 ... 245: mydata.increment = tag; break;
371 372
     default:          return current_screen.onTouchHeld(tag);
372 373
   }
373 374
   return true;
374 375
 }
375 376
 
376 377
 float BaseNumericAdjustmentScreen::getIncrement() {
377
-  switch (screen_data.BaseNumericAdjustment.increment) {
378
+  switch (mydata.increment) {
378 379
     case 240: return   0.001;
379 380
     case 241: return   0.01;
380 381
     case 242: return   0.1;
@@ -385,4 +386,4 @@ float BaseNumericAdjustmentScreen::getIncrement() {
385 386
   }
386 387
 }
387 388
 
388
-#endif // TOUCH_UI_FTDI_EVE
389
+#endif // FTDI_BASE_NUMERIC_ADJ_SCREEN

+ 87
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_numeric_adjustment_screen.h View File

@@ -0,0 +1,87 @@
1
+/************************************
2
+ * base_numeric_adjustment_screen.h *
3
+ ************************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_BASE_NUMERIC_ADJ_SCREEN
26
+#define FTDI_BASE_NUMERIC_ADJ_SCREEN_CLASS BaseNumericAdjustmentScreen
27
+
28
+struct BaseNumericAdjustmentScreenData {
29
+  uint8_t increment;
30
+};
31
+
32
+class BaseNumericAdjustmentScreen : public BaseScreen {
33
+  public:
34
+    enum precision_default_t {
35
+      DEFAULT_LOWEST,
36
+      DEFAULT_MIDRANGE,
37
+      DEFAULT_HIGHEST
38
+    };
39
+
40
+  protected:
41
+    class widgets_t {
42
+      private:
43
+        draw_mode_t _what;
44
+        uint8_t     _line;
45
+        uint32_t    _color;
46
+        uint8_t     _decimals;
47
+        progmem_str _units;
48
+        enum style_t {
49
+          BTN_NORMAL,
50
+          BTN_ACTION,
51
+          BTN_TOGGLE,
52
+          BTN_DISABLED,
53
+          TEXT_AREA,
54
+          TEXT_LABEL
55
+        } _style;
56
+
57
+      protected:
58
+        void _draw_increment_btn(CommandProcessor &, uint8_t line, const uint8_t tag);
59
+        void _button(CommandProcessor &, uint8_t tag, int16_t x, int16_t y, int16_t w, int16_t h, progmem_str, bool enabled = true, bool highlight = false);
60
+        void _button_style(CommandProcessor &cmd, style_t style);
61
+      public:
62
+        widgets_t(draw_mode_t);
63
+
64
+        widgets_t &color(uint32_t color)       {_color = color; return *this;}
65
+        widgets_t &units(progmem_str units)    {_units = units; return *this;}
66
+        widgets_t &draw_mode(draw_mode_t what) {_what  = what;  return *this;}
67
+        widgets_t &precision(uint8_t decimals, precision_default_t = DEFAULT_HIGHEST);
68
+
69
+        void heading           (progmem_str label);
70
+        void adjuster_sram_val (uint8_t tag,  progmem_str label, const char *value,  bool is_enabled = true);
71
+        void adjuster          (uint8_t tag,  progmem_str label, const char *value,  bool is_enabled = true);
72
+        void adjuster          (uint8_t tag,  progmem_str label, float value=0,      bool is_enabled = true);
73
+        void button            (uint8_t tag,  progmem_str label,                     bool is_enabled = true);
74
+        void text_field        (uint8_t tag,  progmem_str label, const char *value,  bool is_enabled = true);
75
+        void two_buttons       (uint8_t tag1, progmem_str label1,
76
+                                uint8_t tag2, progmem_str label2,                    bool is_enabled = true);
77
+        void toggle            (uint8_t tag,  progmem_str label,                     bool value, bool is_enabled = true);
78
+        void home_buttons      (uint8_t tag);
79
+        void increments        ();
80
+    };
81
+
82
+    static float getIncrement();
83
+
84
+  public:
85
+    static void onEntry();
86
+    static bool onTouchEnd(uint8_t tag);
87
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_screen.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_BASE_SCREEN
27
+
29 28
 using namespace FTDI;
30 29
 using namespace Theme;
31 30
 
@@ -87,4 +86,4 @@ void BaseScreen::reset_menu_timeout() {
87 86
   uint32_t BaseScreen::last_interaction;
88 87
 #endif
89 88
 
90
-#endif // TOUCH_UI_FTDI_EVE
89
+#endif // FTDI_BASE_SCREEN

+ 43
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_screen.h View File

@@ -0,0 +1,43 @@
1
+/*****************
2
+ * base_screen.h *
3
+ *****************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_BASE_SCREEN
26
+#define FTDI_BASE_SCREEN_CLASS BaseScreen
27
+
28
+class BaseScreen : public UIScreen {
29
+  protected:
30
+    #if LCD_TIMEOUT_TO_STATUS > 0
31
+      static uint32_t last_interaction;
32
+    #endif
33
+
34
+    static bool buttonIsPressed(uint8_t tag);
35
+
36
+  public:
37
+    static bool buttonStyleCallback(CommandProcessor &, uint8_t, uint8_t &, uint16_t &, bool);
38
+
39
+    static void reset_menu_timeout();
40
+
41
+    static void onEntry();
42
+    static void onIdle();
43
+};

+ 26
- 25
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp View File

@@ -20,16 +20,17 @@
20 20
  ****************************************************************************/
21 21
 
22 22
 #include "../config.h"
23
-
24
-#if BOTH(TOUCH_UI_FTDI_EVE, HAS_MESH)
25
-
26 23
 #include "screens.h"
27 24
 #include "screen_data.h"
28 25
 
26
+#ifdef FTDI_BED_MESH_SCREEN
27
+
29 28
 using namespace FTDI;
30 29
 using namespace Theme;
31 30
 using namespace ExtUI;
32 31
 
32
+constexpr static BedMeshScreenData &mydata = screen_data.BedMeshScreen;
33
+
33 34
 #if ENABLED(TOUCH_UI_PORTRAIT)
34 35
   #define GRID_COLS 2
35 36
   #define GRID_ROWS 10
@@ -196,7 +197,7 @@ void BedMeshScreen::drawMesh(int16_t x, int16_t y, int16_t w, int16_t h, ExtUI::
196 197
   }
197 198
 
198 199
   if (opts & USE_HIGHLIGHT) {
199
-    const uint8_t tag = screen_data.BedMesh.highlightedTag;
200
+    const uint8_t tag = mydata.highlightedTag;
200 201
     uint8_t x, y;
201 202
     if (tagToPoint(tag, x, y)) {
202 203
       cmd.cmd(COLOR_A(128))
@@ -221,16 +222,16 @@ bool BedMeshScreen::tagToPoint(uint8_t tag, uint8_t &x, uint8_t &y) {
221 222
 }
222 223
 
223 224
 void BedMeshScreen::onEntry() {
224
-  screen_data.BedMesh.highlightedTag = 0;
225
-  screen_data.BedMesh.count = GRID_MAX_POINTS;
226
-  screen_data.BedMesh.message = screen_data.BedMesh.MSG_NONE;
225
+  mydata.highlightedTag = 0;
226
+  mydata.count = GRID_MAX_POINTS;
227
+  mydata.message = mydata.MSG_NONE;
227 228
   BaseScreen::onEntry();
228 229
 }
229 230
 
230 231
 float BedMeshScreen::getHightlightedValue() {
231
-  if (screen_data.BedMesh.highlightedTag) {
232
+  if (mydata.highlightedTag) {
232 233
     xy_uint8_t pt;
233
-    tagToPoint(screen_data.BedMesh.highlightedTag, pt.x, pt.y);
234
+    tagToPoint(mydata.highlightedTag, pt.x, pt.y);
234 235
     return ExtUI::getMeshPoint(pt);
235 236
   }
236 237
   return NAN;
@@ -253,9 +254,9 @@ void BedMeshScreen::drawHighlightedPointValue() {
253 254
      .tag(1).button(OKAY_POS, GET_TEXT_F(MSG_BUTTON_OKAY))
254 255
      .tag(0);
255 256
 
256
-  switch (screen_data.BedMesh.message) {
257
-    case screen_data.BedMesh.MSG_MESH_COMPLETE:   cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_DONE)); break;
258
-    case screen_data.BedMesh.MSG_MESH_INCOMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_INCOMPLETE)); break;
257
+  switch (mydata.message) {
258
+    case mydata.MSG_MESH_COMPLETE:   cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_DONE)); break;
259
+    case mydata.MSG_MESH_INCOMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_INCOMPLETE)); break;
259 260
     default: break;
260 261
   }
261 262
 }
@@ -277,11 +278,11 @@ void BedMeshScreen::onRedraw(draw_mode_t what) {
277 278
 
278 279
   if (what & FOREGROUND) {
279 280
     constexpr float autoscale_max_amplitude = 0.03;
280
-    const bool gotAllPoints = screen_data.BedMesh.count >= GRID_MAX_POINTS;
281
+    const bool gotAllPoints = mydata.count >= GRID_MAX_POINTS;
281 282
     if (gotAllPoints) {
282 283
       drawHighlightedPointValue();
283 284
     }
284
-    const float levelingProgress = sq(float(screen_data.BedMesh.count) / GRID_MAX_POINTS);
285
+    const float levelingProgress = sq(float(mydata.count) / GRID_MAX_POINTS);
285 286
     BedMeshScreen::drawMesh(INSET_POS(MESH_POS), ExtUI::getMeshArray(),
286 287
       USE_POINTS | USE_HIGHLIGHT | USE_AUTOSCALE | (gotAllPoints ? USE_COLORS : 0),
287 288
       autoscale_max_amplitude * levelingProgress
@@ -290,7 +291,7 @@ void BedMeshScreen::onRedraw(draw_mode_t what) {
290 291
 }
291 292
 
292 293
 bool BedMeshScreen::onTouchStart(uint8_t tag) {
293
-  screen_data.BedMesh.highlightedTag = tag;
294
+  mydata.highlightedTag = tag;
294 295
   return true;
295 296
 }
296 297
 
@@ -312,21 +313,21 @@ void BedMeshScreen::onMeshUpdate(const int8_t, const int8_t, const float) {
312 313
 void BedMeshScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) {
313 314
   switch (state) {
314 315
     case ExtUI::MESH_START:
315
-      screen_data.BedMesh.count = 0;
316
-      screen_data.BedMesh.message = screen_data.BedMesh.MSG_NONE;
316
+      mydata.count = 0;
317
+      mydata.message = mydata.MSG_NONE;
317 318
       break;
318 319
     case ExtUI::MESH_FINISH:
319
-      if (screen_data.BedMesh.count == GRID_MAX_POINTS && ExtUI::getMeshValid())
320
-        screen_data.BedMesh.message = screen_data.BedMesh.MSG_MESH_COMPLETE;
320
+      if (mydata.count == GRID_MAX_POINTS && ExtUI::getMeshValid())
321
+        mydata.message = mydata.MSG_MESH_COMPLETE;
321 322
       else
322
-        screen_data.BedMesh.message = screen_data.BedMesh.MSG_MESH_INCOMPLETE;
323
-      screen_data.BedMesh.count = GRID_MAX_POINTS;
323
+        mydata.message = mydata.MSG_MESH_INCOMPLETE;
324
+      mydata.count = GRID_MAX_POINTS;
324 325
       break;
325 326
     case ExtUI::PROBE_START:
326
-      screen_data.BedMesh.highlightedTag = pointToTag(x, y);
327
+      mydata.highlightedTag = pointToTag(x, y);
327 328
       break;
328 329
     case ExtUI::PROBE_FINISH:
329
-      screen_data.BedMesh.count++;
330
+      mydata.count++;
330 331
       break;
331 332
   }
332 333
   BedMeshScreen::onMeshUpdate(x, y, 0);
@@ -334,8 +335,8 @@ void BedMeshScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::pr
334 335
 
335 336
 void BedMeshScreen::startMeshProbe() {
336 337
   GOTO_SCREEN(BedMeshScreen);
337
-  screen_data.BedMesh.count = 0;
338
+  mydata.count = 0;
338 339
   injectCommands_P(PSTR(BED_LEVELING_COMMANDS));
339 340
 }
340 341
 
341
-#endif // TOUCH_UI_FTDI_EVE && HAS_MESH
342
+#endif // FTDI_BED_MESH_SCREEN

+ 62
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.h View File

@@ -0,0 +1,62 @@
1
+/*********************
2
+ * bed_mesh_screen.h *
3
+ *********************/
4
+
5
+/****************************************************************************
6
+ *   Written By Marcio Teixeira 2020                                        *
7
+ *                                                                          *
8
+ *   This program is free software: you can redistribute it and/or modify   *
9
+ *   it under the terms of the GNU General Public License as published by   *
10
+ *   the Free Software Foundation, either version 3 of the License, or      *
11
+ *   (at your option) any later version.                                    *
12
+ *                                                                          *
13
+ *   This program is distributed in the hope that it will be useful,        *
14
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
15
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
16
+ *   GNU General Public License for more details.                           *
17
+ *                                                                          *
18
+ *   To view a copy of the GNU General Public License, go to the following  *
19
+ *   location: <https://www.gnu.org/licenses/>.                             *
20
+ ****************************************************************************/
21
+
22
+#pragma once
23
+
24
+#define FTDI_BED_MESH_SCREEN
25
+#define FTDI_BED_MESH_SCREEN_CLASS BedMeshScreen
26
+
27
+struct BedMeshScreenData {
28
+  enum : uint8_t {
29
+    MSG_NONE,
30
+    MSG_MESH_COMPLETE,
31
+    MSG_MESH_INCOMPLETE
32
+  } message;
33
+  uint8_t count;
34
+  uint8_t highlightedTag;
35
+};
36
+
37
+class BedMeshScreen : public BaseScreen, public CachedScreen<BED_MESH_SCREEN_CACHE> {
38
+  private:
39
+    enum MeshOpts {
40
+      USE_POINTS    = 0x01,
41
+      USE_COLORS    = 0x02,
42
+      USE_TAGS      = 0x04,
43
+      USE_HIGHLIGHT = 0x08,
44
+      USE_AUTOSCALE = 0x10
45
+    };
46
+
47
+    static uint8_t pointToTag(uint8_t x, uint8_t y);
48
+    static bool tagToPoint(uint8_t tag, uint8_t &x, uint8_t &y);
49
+    static float getHightlightedValue();
50
+    static void drawHighlightedPointValue();
51
+    static void drawMesh(int16_t x, int16_t y, int16_t w, int16_t h, ExtUI::bed_mesh_t data, uint8_t opts, float autoscale_max = 0.1);
52
+
53
+  public:
54
+    static void onMeshUpdate(const int8_t x, const int8_t y, const float val);
55
+    static void onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t);
56
+    static void onEntry();
57
+    static void onRedraw(draw_mode_t);
58
+    static bool onTouchStart(uint8_t tag);
59
+    static bool onTouchEnd(uint8_t tag);
60
+
61
+    static void startMeshProbe();
62
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_BIO_ADVANCED_SETTINGS_MENU
27
+
29 28
 using namespace FTDI;
30 29
 using namespace Theme;
31 30
 
@@ -134,4 +133,4 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
134 133
   return true;
135 134
 }
136 135
 
137
-#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO
136
+#endif // FTDI_BIO_ADVANCED_SETTINGS_MENU

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.h View File

@@ -0,0 +1,32 @@
1
+/***************************
2
+ * bio_advanced_settings.h *
3
+ ***************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_BIO_ADVANCED_SETTINGS_MENU
26
+#define FTDI_BIO_ADVANCED_SETTINGS_MENU_CLASS AdvancedSettingsMenu
27
+
28
+class AdvancedSettingsMenu : public BaseScreen, public CachedScreen<ADVANCED_SETTINGS_SCREEN_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_BIO_CONFIRM_HOME_E
27
+
29 28
 using namespace FTDI;
30 29
 
31 30
 void BioConfirmHomeE::onRedraw(draw_mode_t) {
@@ -54,4 +53,4 @@ bool BioConfirmHomeE::onTouchEnd(uint8_t tag) {
54 53
   return true;
55 54
 }
56 55
 
57
-#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO
56
+#endif // FTDI_BIO_CONFIRM_HOME_E

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.h View File

@@ -0,0 +1,32 @@
1
+/****************************
2
+ * bio_confirm_home_e.h *
3
+ ****************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_BIO_CONFIRM_HOME_E
26
+#define FTDI_BIO_CONFIRM_HOME_E_CLASS BioConfirmHomeE
27
+
28
+class BioConfirmHomeE : public DialogBoxBaseClass, public UncachedScreen {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_BIO_CONFIRM_HOME_XYZ
27
+
29 28
 using namespace FTDI;
30 29
 
31 30
 void BioConfirmHomeXYZ::onRedraw(draw_mode_t) {
@@ -53,4 +52,4 @@ bool BioConfirmHomeXYZ::onTouchEnd(uint8_t tag) {
53 52
   return true;
54 53
 }
55 54
 
56
-#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO
55
+#endif // FTDI_BIO_CONFIRM_HOME_XYZ

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.h View File

@@ -0,0 +1,32 @@
1
+/**************************
2
+ * bio_confirm_home_xyz.h *
3
+ **************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_BIO_CONFIRM_HOME_XYZ
26
+#define FTDI_BIO_CONFIRM_HOME_XYZ_CLASS BioConfirmHomeXYZ
27
+
28
+class BioConfirmHomeXYZ : public DialogBoxBaseClass, public UncachedScreen {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_BIO_MAIN_MENU
27
+
29 28
 using namespace FTDI;
30 29
 using namespace Theme;
31 30
 
@@ -85,4 +84,4 @@ bool MainMenu::onTouchEnd(uint8_t tag) {
85 84
   return true;
86 85
 }
87 86
 
88
-#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO
87
+#endif // FTDI_BIO_MAIN_MENU

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.h View File

@@ -0,0 +1,32 @@
1
+/*********************
2
+ * bio_main_menu.cpp *
3
+ *********************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_BIO_MAIN_MENU
26
+#define FTDI_BIO_MAIN_MENU_CLASS MainMenu
27
+
28
+class MainMenu : public BaseScreen, public CachedScreen<MENU_SCREEN_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_BIO_PRINTING_DIALOG_BOX
27
+
29 28
 #include "../ftdi_eve_lib/extras/circular_progress.h"
30 29
 
31 30
 using namespace FTDI;
@@ -147,4 +146,4 @@ void BioPrintingDialogBox::show() {
147 146
   GOTO_SCREEN(BioPrintingDialogBox);
148 147
 }
149 148
 
150
-#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO
149
+#endif // FTDI_BIO_PRINTING_DIALOG_BOX

+ 44
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.h View File

@@ -0,0 +1,44 @@
1
+/*****************************
2
+ * bio_printing_dialog_box.h *
3
+ *****************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_BIO_PRINTING_DIALOG_BOX
26
+#define FTDI_BIO_PRINTING_DIALOG_BOX_CLASS BioPrintingDialogBox
27
+
28
+class BioPrintingDialogBox : public BaseScreen, public CachedScreen<PRINTING_SCREEN_CACHE,PRINTING_SCREEN_DL_SIZE> {
29
+  private:
30
+    static void draw_status_message(draw_mode_t, const char * const);
31
+    static void draw_progress(draw_mode_t);
32
+    static void draw_time_remaining(draw_mode_t);
33
+    static void draw_interaction_buttons(draw_mode_t);
34
+  public:
35
+    static void onRedraw(draw_mode_t);
36
+
37
+    static void show();
38
+
39
+    static void setStatusMessage(const char *);
40
+    static void setStatusMessage(progmem_str);
41
+
42
+    static void onIdle();
43
+    static bool onTouchEnd(uint8_t tag);
44
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.cpp View File

@@ -22,11 +22,10 @@
22 22
  ****************************************************************************/
23 23
 
24 24
 #include "../config.h"
25
-
26
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
27
-
28 25
 #include "screens.h"
29 26
 
27
+#ifdef FTDI_BIO_STATUS_SCREEN
28
+
30 29
 #include "../ftdi_eve_lib/extras/poly_ui.h"
31 30
 
32 31
 #if ENABLED(TOUCH_UI_PORTRAIT)
@@ -376,4 +375,4 @@ void StatusScreen::onIdle() {
376 375
   }
377 376
 }
378 377
 
379
-#endif // TOUCH_UI_FTDI_EVE
378
+#endif // FTDI_BIO_STATUS_SCREEN

+ 56
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.h View File

@@ -0,0 +1,56 @@
1
+/*************************
2
+ * bio_status_screen.cpp *
3
+ *************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *   Written By Marcio Teixeira 2019 - Cocoa Press                          *
9
+ *                                                                          *
10
+ *   This program is free software: you can redistribute it and/or modify   *
11
+ *   it under the terms of the GNU General Public License as published by   *
12
+ *   the Free Software Foundation, either version 3 of the License, or      *
13
+ *   (at your option) any later version.                                    *
14
+ *                                                                          *
15
+ *   This program is distributed in the hope that it will be useful,        *
16
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
17
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
18
+ *   GNU General Public License for more details.                           *
19
+ *                                                                          *
20
+ *   To view a copy of the GNU General Public License, go to the following  *
21
+ *   location: <https://www.gnu.org/licenses/>.                             *
22
+ ****************************************************************************/
23
+
24
+#pragma once
25
+
26
+#define FTDI_BIO_STATUS_SCREEN
27
+#define FTDI_BIO_STATUS_SCREEN_CLASS StatusScreen
28
+
29
+class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE> {
30
+  private:
31
+    static float increment;
32
+    static bool  jog_xy;
33
+    static bool  fine_motion;
34
+
35
+    static void draw_progress(draw_mode_t what);
36
+    static void draw_temperature(draw_mode_t what);
37
+    static void draw_syringe(draw_mode_t what);
38
+    static void draw_arrows(draw_mode_t what);
39
+    static void draw_overlay_icons(draw_mode_t what);
40
+    static void draw_fine_motion(draw_mode_t what);
41
+    static void draw_buttons(draw_mode_t what);
42
+  public:
43
+    static void loadBitmaps();
44
+    static void unlockMotors();
45
+
46
+    static void setStatusMessage(const char *);
47
+    static void setStatusMessage(progmem_str);
48
+
49
+    static void onRedraw(draw_mode_t);
50
+
51
+    static bool onTouchStart(uint8_t tag);
52
+    static bool onTouchHeld(uint8_t tag);
53
+    static bool onTouchEnd(uint8_t tag);
54
+    static void onIdle();
55
+
56
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_BIO_TUNE_MENU
27
+
29 28
 using namespace FTDI;
30 29
 using namespace Theme;
31 30
 using namespace ExtUI;
@@ -76,4 +75,4 @@ bool TuneMenu::onTouchEnd(uint8_t tag) {
76 75
   return true;
77 76
 }
78 77
 
79
-#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO
78
+#endif // FTDI_BIO_TUNE_MENU

+ 35
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.h View File

@@ -0,0 +1,35 @@
1
+/*******************
2
+ * bio_tune_menu.h *
3
+ *******************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_BIO_TUNE_MENU
26
+#define FTDI_BIO_TUNE_MENU_CLASS TuneMenu
27
+
28
+class TuneMenu : public BaseScreen, public CachedScreen<TUNE_SCREEN_CACHE> {
29
+  private:
30
+    static void pausePrint();
31
+    static void resumePrint();
32
+  public:
33
+    static void onRedraw(draw_mode_t);
34
+    static bool onTouchEnd(uint8_t tag);
35
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/boot_screen.cpp View File

@@ -22,11 +22,10 @@
22 22
  ****************************************************************************/
23 23
 
24 24
 #include "../config.h"
25
-
26
-#if ENABLED(TOUCH_UI_FTDI_EVE)
27
-
28 25
 #include "screens.h"
29 26
 
27
+#ifdef FTDI_BOOT_SCREEN
28
+
30 29
 #include "../ftdi_eve_lib/extras/poly_ui.h"
31 30
 #include "../archim2-flash/flash_storage.h"
32 31
 
@@ -127,4 +126,4 @@ void BootScreen::showSplashScreen() {
127 126
   ExtUI::delay_ms(2500);
128 127
 }
129 128
 
130
-#endif // TOUCH_UI_FTDI_EVE
129
+#endif // FTDI_BOOT_SCREEN

+ 35
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/boot_screen.h View File

@@ -0,0 +1,35 @@
1
+/*****************
2
+ * boot_screen.h *
3
+ *****************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *   Written By Marcio Teixeira 2019 - Cocoa Press                          *
9
+ *                                                                          *
10
+ *   This program is free software: you can redistribute it and/or modify   *
11
+ *   it under the terms of the GNU General Public License as published by   *
12
+ *   the Free Software Foundation, either version 3 of the License, or      *
13
+ *   (at your option) any later version.                                    *
14
+ *                                                                          *
15
+ *   This program is distributed in the hope that it will be useful,        *
16
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
17
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
18
+ *   GNU General Public License for more details.                           *
19
+ *                                                                          *
20
+ *   To view a copy of the GNU General Public License, go to the following  *
21
+ *   location: <https://www.gnu.org/licenses/>.                             *
22
+ ****************************************************************************/
23
+
24
+#pragma once
25
+
26
+#define FTDI_BOOT_SCREEN
27
+#define FTDI_BOOT_SCREEN_CLASS BootScreen
28
+
29
+class BootScreen : public BaseScreen, public UncachedScreen {
30
+  private:
31
+    static void showSplashScreen();
32
+  public:
33
+    static void onRedraw(draw_mode_t);
34
+    static void onIdle();
35
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/case_light_screen.cpp View File

@@ -20,11 +20,10 @@
20 20
  ****************************************************************************/
21 21
 
22 22
 #include "../config.h"
23
-
24
-#if BOTH(TOUCH_UI_FTDI_EVE, CASE_LIGHT_ENABLE)
25
-
26 23
 #include "screens.h"
27 24
 
25
+#ifdef FTDI_CASE_LIGHT_SCREEN
26
+
28 27
 using namespace FTDI;
29 28
 using namespace ExtUI;
30 29
 using namespace Theme;
@@ -59,4 +58,4 @@ bool CaseLightScreen::onTouchHeld(uint8_t tag) {
59 58
   return true;
60 59
 }
61 60
 
62
-#endif // TOUCH_UI_FTDI_EVE
61
+#endif // FTDI_CASE_LIGHT_SCREEN

+ 31
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/case_light_screen.h View File

@@ -0,0 +1,31 @@
1
+/***********************
2
+ * case_light_screen.h *
3
+ ***********************/
4
+
5
+/****************************************************************************
6
+ *   Written By Marcio Teixeira 2019 - Cocoa Press                          *
7
+ *                                                                          *
8
+ *   This program is free software: you can redistribute it and/or modify   *
9
+ *   it under the terms of the GNU General Public License as published by   *
10
+ *   the Free Software Foundation, either version 3 of the License, or      *
11
+ *   (at your option) any later version.                                    *
12
+ *                                                                          *
13
+ *   This program is distributed in the hope that it will be useful,        *
14
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
15
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
16
+ *   GNU General Public License for more details.                           *
17
+ *                                                                          *
18
+ *   To view a copy of the GNU General Public License, go to the following  *
19
+ *   location: <https://www.gnu.org/licenses/>.                             *
20
+ ****************************************************************************/
21
+
22
+#pragma once
23
+
24
+#define FTDI_CASE_LIGHT_SCREEN
25
+#define FTDI_CASE_LIGHT_SCREEN_CLASS CaseLightScreen
26
+
27
+class CaseLightScreen : public BaseNumericAdjustmentScreen, public CachedScreen<CASE_LIGHT_SCREEN_CACHE> {
28
+  public:
29
+    static void onRedraw(draw_mode_t);
30
+    static bool onTouchHeld(uint8_t tag);
31
+};

+ 31
- 30
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/change_filament_screen.cpp View File

@@ -21,16 +21,17 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 #include "screen_data.h"
29 26
 
27
+#ifdef FTDI_CHANGE_FILAMENT_SCREEN
28
+
30 29
 using namespace ExtUI;
31 30
 using namespace FTDI;
32 31
 using namespace Theme;
33 32
 
33
+constexpr static ChangeFilamentScreenData &mydata = screen_data.ChangeFilamentScreen;
34
+
34 35
 #ifdef TOUCH_UI_PORTRAIT
35 36
   #define GRID_COLS 2
36 37
   #define GRID_ROWS 11
@@ -122,17 +123,17 @@ void ChangeFilamentScreen::drawTempGradient(uint16_t x, uint16_t y, uint16_t w,
122 123
 
123 124
 void ChangeFilamentScreen::onEntry() {
124 125
   BaseScreen::onEntry();
125
-  screen_data.ChangeFilament.e_tag = ExtUI::getActiveTool() + 10;
126
-  screen_data.ChangeFilament.t_tag = 0;
127
-  screen_data.ChangeFilament.repeat_tag = 0;
128
-  screen_data.ChangeFilament.saved_extruder = getActiveTool();
126
+  mydata.e_tag = ExtUI::getActiveTool() + 10;
127
+  mydata.t_tag = 0;
128
+  mydata.repeat_tag = 0;
129
+  mydata.saved_extruder = getActiveTool();
129 130
   #if FILAMENT_UNLOAD_PURGE_LENGTH > 0
130
-    screen_data.ChangeFilament.need_purge = true;
131
+    mydata.need_purge = true;
131 132
   #endif
132 133
 }
133 134
 
134 135
 void ChangeFilamentScreen::onExit() {
135
-  setActiveTool(screen_data.ChangeFilament.saved_extruder, true);
136
+  setActiveTool(mydata.saved_extruder, true);
136 137
 }
137 138
 
138 139
 void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
@@ -170,7 +171,7 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
170 171
 
171 172
     const bool t_ok = getActualTemp_celsius(e) > getSoftenTemp() - 10;
172 173
 
173
-    if (screen_data.ChangeFilament.t_tag && !t_ok) {
174
+    if (mydata.t_tag && !t_ok) {
174 175
       cmd.text(HEATING_LBL_POS, GET_TEXT_F(MSG_HEATING));
175 176
     } else if (getActualTemp_celsius(e) > 100) {
176 177
       cmd.cmd(COLOR_RGB(0xFF0000))
@@ -181,12 +182,12 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
181 182
 
182 183
     #define TOG_STYLE(A) colors(A ? action_btn : normal_btn)
183 184
 
184
-    const bool tog2  = screen_data.ChangeFilament.t_tag == 2;
185
-    const bool tog3  = screen_data.ChangeFilament.t_tag == 3;
186
-    const bool tog4  = screen_data.ChangeFilament.t_tag == 4;
187
-    const bool tog10 = screen_data.ChangeFilament.e_tag == 10;
185
+    const bool tog2  = mydata.t_tag == 2;
186
+    const bool tog3  = mydata.t_tag == 3;
187
+    const bool tog4  = mydata.t_tag == 4;
188
+    const bool tog10 = mydata.e_tag == 10;
188 189
     #if HAS_MULTI_HOTEND
189
-      const bool tog11 = screen_data.ChangeFilament.e_tag == 11;
190
+      const bool tog11 = mydata.e_tag == 11;
190 191
     #endif
191 192
 
192 193
     cmd.TOG_STYLE(tog10)
@@ -200,8 +201,8 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
200 201
 
201 202
     if (!t_ok) reset_menu_timeout();
202 203
 
203
-    const bool tog7 = screen_data.ChangeFilament.repeat_tag == 7;
204
-    const bool tog8 = screen_data.ChangeFilament.repeat_tag == 8;
204
+    const bool tog7 = mydata.repeat_tag == 7;
205
+    const bool tog8 = mydata.repeat_tag == 8;
205 206
 
206 207
     {
207 208
       char str[30];
@@ -228,7 +229,7 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
228 229
 }
229 230
 
230 231
 uint8_t ChangeFilamentScreen::getSoftenTemp() {
231
-  switch (screen_data.ChangeFilament.t_tag) {
232
+  switch (mydata.t_tag) {
232 233
     case 2:  return LOW_TEMP;
233 234
     case 3:  return MED_TEMP;
234 235
     case 4:  return HIGH_TEMP;
@@ -237,7 +238,7 @@ uint8_t ChangeFilamentScreen::getSoftenTemp() {
237 238
 }
238 239
 
239 240
 ExtUI::extruder_t ChangeFilamentScreen::getExtruder() {
240
-  switch (screen_data.ChangeFilament.e_tag) {
241
+  switch (mydata.e_tag) {
241 242
     case 13: return ExtUI::E3;
242 243
     case 12: return ExtUI::E2;
243 244
     case 11: return ExtUI::E1;
@@ -248,8 +249,8 @@ ExtUI::extruder_t ChangeFilamentScreen::getExtruder() {
248 249
 void ChangeFilamentScreen::doPurge() {
249 250
   #if FILAMENT_UNLOAD_PURGE_LENGTH > 0
250 251
     constexpr float purge_distance_mm = FILAMENT_UNLOAD_PURGE_LENGTH;
251
-    if (screen_data.ChangeFilament.need_purge) {
252
-      screen_data.ChangeFilament.need_purge = false;
252
+    if (mydata.need_purge) {
253
+      mydata.need_purge = false;
253 254
       MoveAxisScreen::setManualFeedrate(getExtruder(), purge_distance_mm);
254 255
       ExtUI::setAxisPosition_mm(ExtUI::getAxisPosition_mm(getExtruder()) + purge_distance_mm, getExtruder());
255 256
     }
@@ -277,23 +278,23 @@ bool ChangeFilamentScreen::onTouchEnd(uint8_t tag) {
277 278
     case 3:
278 279
     case 4:
279 280
       // Change temperature
280
-      screen_data.ChangeFilament.t_tag = tag;
281
+      mydata.t_tag = tag;
281 282
       setTargetTemp_celsius(getSoftenTemp(), getExtruder());
282 283
       break;
283 284
     case 7:
284
-      screen_data.ChangeFilament.repeat_tag = (screen_data.ChangeFilament.repeat_tag == 7) ? 0 : 7;
285
+      mydata.repeat_tag = (mydata.repeat_tag == 7) ? 0 : 7;
285 286
       break;
286 287
     case 8:
287
-      screen_data.ChangeFilament.repeat_tag = (screen_data.ChangeFilament.repeat_tag == 8) ? 0 : 8;
288
+      mydata.repeat_tag = (mydata.repeat_tag == 8) ? 0 : 8;
288 289
       break;
289 290
     case 10:
290 291
     case 11:
291 292
       // Change extruder
292
-      screen_data.ChangeFilament.e_tag      = tag;
293
-      screen_data.ChangeFilament.t_tag      = 0;
294
-      screen_data.ChangeFilament.repeat_tag = 0;
293
+      mydata.e_tag      = tag;
294
+      mydata.t_tag      = 0;
295
+      mydata.repeat_tag = 0;
295 296
       #if FILAMENT_UNLOAD_PURGE_LENGTH > 0
296
-        screen_data.ChangeFilament.need_purge = true;
297
+        mydata.need_purge = true;
297 298
       #endif
298 299
       setActiveTool(getExtruder(), true);
299 300
       break;
@@ -319,7 +320,7 @@ bool ChangeFilamentScreen::onTouchHeld(uint8_t tag) {
319 320
 
320 321
 void ChangeFilamentScreen::onIdle() {
321 322
   reset_menu_timeout();
322
-  if (screen_data.ChangeFilament.repeat_tag) onTouchHeld(screen_data.ChangeFilament.repeat_tag);
323
+  if (mydata.repeat_tag) onTouchHeld(mydata.repeat_tag);
323 324
   if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) {
324 325
     onRefresh();
325 326
     refresh_timer.start();
@@ -327,4 +328,4 @@ void ChangeFilamentScreen::onIdle() {
327 328
   BaseScreen::onIdle();
328 329
 }
329 330
 
330
-#endif // TOUCH_UI_FTDI_EVE
331
+#endif // FTDI_CHANGE_FILAMENT_SCREEN

+ 51
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/change_filament_screen.h View File

@@ -0,0 +1,51 @@
1
+/****************************
2
+ * change_filament_screen.h *
3
+ ****************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_CHANGE_FILAMENT_SCREEN
26
+#define FTDI_CHANGE_FILAMENT_SCREEN_CLASS ChangeFilamentScreen
27
+
28
+struct ChangeFilamentScreenData {
29
+  uint8_t e_tag, t_tag, repeat_tag;
30
+  ExtUI::extruder_t saved_extruder;
31
+  #if FILAMENT_UNLOAD_PURGE_LENGTH > 0
32
+    bool need_purge;
33
+  #endif
34
+};
35
+
36
+class ChangeFilamentScreen : public BaseScreen, public CachedScreen<CHANGE_FILAMENT_SCREEN_CACHE> {
37
+  private:
38
+    static uint8_t getSoftenTemp();
39
+    static ExtUI::extruder_t getExtruder();
40
+    static void drawTempGradient(uint16_t x, uint16_t y, uint16_t w, uint16_t h);
41
+    static uint32_t getTempColor(uint32_t temp);
42
+    static void doPurge();
43
+  public:
44
+    static void onEntry();
45
+    static void onExit();
46
+    static void onRedraw(draw_mode_t);
47
+    static bool onTouchStart(uint8_t tag);
48
+    static bool onTouchEnd(uint8_t tag);
49
+    static bool onTouchHeld(uint8_t tag);
50
+    static void onIdle();
51
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_advanced_settings_menu.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_COCOA_ADVANCED_SETTINGS_MENU
27
+
29 28
 using namespace FTDI;
30 29
 using namespace ExtUI;
31 30
 using namespace Theme;
@@ -99,4 +98,4 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
99 98
   }
100 99
   return true;
101 100
 }
102
-#endif // TOUCH_UI_FTDI_EVE
101
+#endif // FTDI_COCOA_ADVANCED_SETTINGS_MENU

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_advanced_settings_menu.h View File

@@ -0,0 +1,32 @@
1
+/***************************************
2
+ * cocoa_press_advance_settings_menu.h *
3
+ ***************************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                              *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_COCOA_ADVANCED_SETTINGS_MENU
26
+#define FTDI_COCOA_ADVANCED_SETTINGS_MENU_CLASS AdvancedSettingsMenu
27
+
28
+class AdvancedSettingsMenu : public BaseScreen, public CachedScreen<ADVANCED_SETTINGS_SCREEN_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp View File

@@ -22,12 +22,11 @@
22 22
  ****************************************************************************/
23 23
 
24 24
 #include "../config.h"
25
-
26
-#if ENABLED(TOUCH_UI_FTDI_EVE) && ENABLED(TOUCH_UI_COCOA_PRESS)
27
-
28 25
 #include "screens.h"
29 26
 #include "screen_data.h"
30 27
 
28
+#ifdef FTDI_COCOA_LOAD_CHOCOLATE_SCREEN
29
+
31 30
 using namespace ExtUI;
32 31
 using namespace FTDI;
33 32
 using namespace Theme;
@@ -98,4 +97,4 @@ bool LoadChocolateScreen::onTouchHeld(uint8_t tag) {
98 97
   return false;
99 98
 }
100 99
 
101
-#endif // TOUCH_UI_FTDI_EVE
100
+#endif // FTDI_COCOA_LOAD_CHOCOLATE_SCREEN

+ 34
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.h View File

@@ -0,0 +1,34 @@
1
+/********************************
2
+ * cocoa_press_load_chocolate.h *
3
+ ********************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *   Written By Marcio Teixeira 2020 - Cocoa Press                          *
9
+ *                                                                          *
10
+ *   This program is free software: you can redistribute it and/or modify   *
11
+ *   it under the terms of the GNU General Public License as published by   *
12
+ *   the Free Software Foundation, either version 3 of the License, or      *
13
+ *   (at your option) any later version.                                    *
14
+ *                                                                          *
15
+ *   This program is distributed in the hope that it will be useful,        *
16
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
17
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
18
+ *   GNU General Public License for more details.                           *
19
+ *                                                                          *
20
+ *   To view a copy of the GNU General Public License, go to the following  *
21
+ *   location: <https://www.gnu.org/licenses/>.                              *
22
+ ****************************************************************************/
23
+
24
+#pragma once
25
+
26
+#define FTDI_COCOA_LOAD_CHOCOLATE_SCREEN
27
+#define FTDI_COCOA_LOAD_CHOCOLATE_SCREEN_CLASS LoadChocolateScreen
28
+
29
+class LoadChocolateScreen : public BaseScreen, public CachedScreen<LOAD_CHOCOLATE_SCREEN_CACHE> {
30
+  public:
31
+    static void onRedraw(draw_mode_t);
32
+    static bool onTouchEnd(uint8_t tag);
33
+    static bool onTouchHeld(uint8_t tag);
34
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_main_menu.cpp View File

@@ -22,11 +22,10 @@
22 22
  ****************************************************************************/
23 23
 
24 24
 #include "../config.h"
25
-
26
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
27
-
28 25
 #include "screens.h"
29 26
 
27
+#ifdef FTDI_COCOA_MAIN_MENU
28
+
30 29
 using namespace FTDI;
31 30
 using namespace Theme;
32 31
 
@@ -86,4 +85,4 @@ bool MainMenu::onTouchEnd(uint8_t tag) {
86 85
   return true;
87 86
 }
88 87
 
89
-#endif // TOUCH_UI_FTDI_EVE
88
+#endif // FTDI_COCOA_MAIN_MENU

+ 33
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_main_menu.h View File

@@ -0,0 +1,33 @@
1
+/***************************
2
+ * cocoa_press_main_menu.h *
3
+ ***************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *   Written By Marcio Teixeira 2019 - Cocoa Press                          *
9
+ *                                                                          *
10
+ *   This program is free software: you can redistribute it and/or modify   *
11
+ *   it under the terms of the GNU General Public License as published by   *
12
+ *   the Free Software Foundation, either version 3 of the License, or      *
13
+ *   (at your option) any later version.                                    *
14
+ *                                                                          *
15
+ *   This program is distributed in the hope that it will be useful,        *
16
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
17
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
18
+ *   GNU General Public License for more details.                           *
19
+ *                                                                          *
20
+ *   To view a copy of the GNU General Public License, go to the following  *
21
+ *   location: <https://www.gnu.org/licenses/>.                              *
22
+ ****************************************************************************/
23
+
24
+#pragma once
25
+
26
+#define FTDI_COCOA_MAIN_MENU
27
+#define FTDI_COCOA_MAIN_MENU_CLASS MainMenu
28
+
29
+class MainMenu : public BaseScreen, public CachedScreen<MENU_SCREEN_CACHE> {
30
+  public:
31
+    static void onRedraw(draw_mode_t);
32
+    static bool onTouchEnd(uint8_t tag);
33
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_e_screen.cpp View File

@@ -22,12 +22,11 @@
22 22
  ****************************************************************************/
23 23
 
24 24
 #include "../config.h"
25
-
26
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
27
-
28 25
 #include "screens.h"
29 26
 #include "screen_data.h"
30 27
 
28
+#ifdef FTDI_COCOA_MOVE_E_SCREEN
29
+
31 30
 using namespace FTDI;
32 31
 using namespace ExtUI;
33 32
 
@@ -59,4 +58,4 @@ void MoveEScreen::onIdle() {
59 58
   }
60 59
   BaseScreen::onIdle();
61 60
 }
62
-#endif // TOUCH_UI_FTDI_EVE
61
+#endif // FTDI_COCOA_MOVE_E_SCREEN

+ 33
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_e_screen.h View File

@@ -0,0 +1,33 @@
1
+/*******************************
2
+ * cocoa_press_move_e_screen.h *
3
+ *******************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *   Written By Marcio Teixeira 2019 - Cocoa Press                          *
9
+ *                                                                          *
10
+ *   This program is free software: you can redistribute it and/or modify   *
11
+ *   it under the terms of the GNU General Public License as published by   *
12
+ *   the Free Software Foundation, either version 3 of the License, or      *
13
+ *   (at your option) any later version.                                    *
14
+ *                                                                          *
15
+ *   This program is distributed in the hope that it will be useful,        *
16
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
17
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
18
+ *   GNU General Public License for more details.                           *
19
+ *                                                                          *
20
+ *   To view a copy of the GNU General Public License, go to the following  *
21
+ *   location: <https://www.gnu.org/licenses/>.                              *
22
+ ****************************************************************************/
23
+
24
+#pragma once
25
+
26
+#define FTDI_COCOA_MOVE_E_SCREEN
27
+#define FTDI_COCOA_MOVE_E_SCREEN_CLASS MoveEScreen
28
+
29
+class MoveEScreen : public BaseMoveAxisScreen, public CachedScreen<MOVE_E_SCREEN_CACHE> {
30
+  public:
31
+    static void onRedraw(draw_mode_t);
32
+    static void onIdle();
33
+};

+ 5
- 6
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_xyz_screen.cpp View File

@@ -1,6 +1,6 @@
1
-/************************************
1
+/***********************************
2 2
  * cocoa_press_move_xyz_screen.cpp *
3
- ************************************/
3
+ ***********************************/
4 4
 
5 5
 /****************************************************************************
6 6
  *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
@@ -22,12 +22,11 @@
22 22
  ****************************************************************************/
23 23
 
24 24
 #include "../config.h"
25
-
26
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
27
-
28 25
 #include "screens.h"
29 26
 #include "screen_data.h"
30 27
 
28
+#ifdef FTDI_COCOA_MOVE_XYZ_SCREEN
29
+
31 30
 using namespace FTDI;
32 31
 using namespace ExtUI;
33 32
 
@@ -50,4 +49,4 @@ void MoveXYZScreen::onIdle() {
50 49
   }
51 50
   BaseScreen::onIdle();
52 51
 }
53
-#endif // TOUCH_UI_FTDI_EVE
52
+#endif // FTDI_COCOA_MOVE_XYZ_SCREEN

+ 33
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_xyz_screen.h View File

@@ -0,0 +1,33 @@
1
+/*********************************
2
+ * cocoa_press_move_xyz_screen.h *
3
+ *********************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *   Written By Marcio Teixeira 2019 - Cocoa Press                          *
9
+ *                                                                          *
10
+ *   This program is free software: you can redistribute it and/or modify   *
11
+ *   it under the terms of the GNU General Public License as published by   *
12
+ *   the Free Software Foundation, either version 3 of the License, or      *
13
+ *   (at your option) any later version.                                    *
14
+ *                                                                          *
15
+ *   This program is distributed in the hope that it will be useful,        *
16
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
17
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
18
+ *   GNU General Public License for more details.                           *
19
+ *                                                                          *
20
+ *   To view a copy of the GNU General Public License, go to the following  *
21
+ *   location: <https://www.gnu.org/licenses/>.                              *
22
+ ****************************************************************************/
23
+
24
+#pragma once
25
+
26
+#define FTDI_COCOA_MOVE_XYZ_SCREEN
27
+#define FTDI_COCOA_MOVE_XYZ_SCREEN_CLASS MoveXYZScreen
28
+
29
+class MoveXYZScreen : public BaseMoveAxisScreen, public CachedScreen<MOVE_XYZ_SCREEN_CACHE> {
30
+  public:
31
+    static void onRedraw(draw_mode_t);
32
+    static void onIdle();
33
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_menu.cpp View File

@@ -20,11 +20,10 @@
20 20
  ****************************************************************************/
21 21
 
22 22
 #include "../config.h"
23
-
24
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
25
-
26 23
 #include "screens.h"
27 24
 
25
+#ifdef FTDI_COCOA_PREHEAT_MENU
26
+
28 27
 using namespace FTDI;
29 28
 using namespace ExtUI;
30 29
 using namespace Theme;
@@ -110,4 +109,4 @@ bool PreheatMenu::onTouchEnd(uint8_t tag) {
110 109
   return true;
111 110
 }
112 111
 
113
-#endif // TOUCH_UI_FTDI_EVE
112
+#endif // FTDI_COCOA_PREHEAT_MENU

+ 31
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_menu.h View File

@@ -0,0 +1,31 @@
1
+/******************************
2
+ * cocoa_press_preheat_menu.h *
3
+ ******************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Marcio Teixeira 2020 - Cocoa Press                          *
7
+ *                                                                          *
8
+ *   This program is free software: you can redistribute it and/or modify   *
9
+ *   it under the terms of the GNU General Public License as published by   *
10
+ *   the Free Software Foundation, either version 3 of the License, or      *
11
+ *   (at your option) any later version.                                    *
12
+ *                                                                          *
13
+ *   This program is distributed in the hope that it will be useful,        *
14
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
15
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
16
+ *   GNU General Public License for more details.                           *
17
+ *                                                                          *
18
+ *   To view a copy of the GNU General Public License, go to the following  *
19
+ *   location: <https://www.gnu.org/licenses/>.                             *
20
+ ****************************************************************************/
21
+
22
+#pragma once
23
+
24
+#define FTDI_COCOA_PREHEAT_MENU
25
+#define FTDI_COCOA_PREHEAT_MENU_CLASS PreheatMenu
26
+
27
+class PreheatMenu : public BaseScreen, public CachedScreen<PREHEAT_MENU_CACHE> {
28
+  public:
29
+    static void onRedraw(draw_mode_t);
30
+    static bool onTouchEnd(uint8_t tag);
31
+};

+ 7
- 6
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_screen.cpp View File

@@ -20,18 +20,19 @@
20 20
  ****************************************************************************/
21 21
 
22 22
 #include "../config.h"
23
-
24
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
25
-
26 23
 #include "screens.h"
27 24
 #include "screen_data.h"
28 25
 
26
+#ifdef FTDI_COCOA_PREHEAT_SCREEN
27
+
29 28
 #include "../ftdi_eve_lib/extras/circular_progress.h"
30 29
 
31 30
 using namespace FTDI;
32 31
 using namespace ExtUI;
33 32
 using namespace Theme;
34 33
 
34
+constexpr static PreheatTimerScreenData &mydata = screen_data.PreheatTimerScreen;
35
+
35 36
 #define GRID_COLS 2
36 37
 #define GRID_ROWS 8
37 38
 
@@ -54,7 +55,7 @@ void PreheatTimerScreen::draw_message(draw_mode_t what) {
54 55
 }
55 56
 
56 57
 uint16_t PreheatTimerScreen::secondsRemaining() {
57
-  const uint32_t elapsed_sec = (millis() - screen_data.PreheatTimer.start_ms) / 1000;
58
+  const uint32_t elapsed_sec = (millis() - mydata.start_ms) / 1000;
58 59
   return (COCOA_PRESS_PREHEAT_SECONDS > elapsed_sec) ? COCOA_PRESS_PREHEAT_SECONDS - elapsed_sec : 0;
59 60
 }
60 61
 
@@ -118,7 +119,7 @@ void PreheatTimerScreen::draw_adjuster(draw_mode_t what, uint8_t tag, progmem_st
118 119
 }
119 120
 
120 121
 void PreheatTimerScreen::onEntry() {
121
-  screen_data.PreheatTimer.start_ms = millis();
122
+  mydata.start_ms = millis();
122 123
 }
123 124
 
124 125
 void PreheatTimerScreen::onRedraw(draw_mode_t what) {
@@ -169,4 +170,4 @@ void PreheatTimerScreen::onIdle() {
169 170
   BaseScreen::onIdle();
170 171
 }
171 172
 
172
-#endif // TOUCH_UI_FTDI_EVE
173
+#endif // FTDI_COCOA_PREHEAT_SCREEN

+ 46
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_screen.h View File

@@ -0,0 +1,46 @@
1
+/*********************************
2
+ * cocoapress_preheat_screen.cpp *
3
+ *********************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Marcio Teixeira 2019 - Cocoa Press                          *
7
+ *                                                                          *
8
+ *   This program is free software: you can redistribute it and/or modify   *
9
+ *   it under the terms of the GNU General Public License as published by   *
10
+ *   the Free Software Foundation, either version 3 of the License, or      *
11
+ *   (at your option) any later version.                                    *
12
+ *                                                                          *
13
+ *   This program is distributed in the hope that it will be useful,        *
14
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
15
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
16
+ *   GNU General Public License for more details.                           *
17
+ *                                                                          *
18
+ *   To view a copy of the GNU General Public License, go to the following  *
19
+ *   location: <https://www.gnu.org/licenses/>.                             *
20
+ ****************************************************************************/
21
+
22
+#pragma once
23
+
24
+#define FTDI_COCOA_PREHEAT_SCREEN
25
+#define FTDI_COCOA_PREHEAT_SCREEN_CLASS PreheatTimerScreen
26
+
27
+struct PreheatTimerScreenData {
28
+    uint32_t start_ms;
29
+};
30
+
31
+class PreheatTimerScreen : public BaseScreen, public CachedScreen<PREHEAT_TIMER_SCREEN_CACHE> {
32
+  private:
33
+    static uint16_t secondsRemaining();
34
+
35
+    static void draw_message(draw_mode_t);
36
+    static void draw_time_remaining(draw_mode_t);
37
+    static void draw_interaction_buttons(draw_mode_t);
38
+    static void draw_adjuster(draw_mode_t, uint8_t tag, progmem_str label, float value, int16_t x, int16_t y, int16_t w, int16_t h);
39
+  public:
40
+    static void onRedraw(draw_mode_t);
41
+
42
+    static void onEntry();
43
+    static void onIdle();
44
+    static bool onTouchHeld(uint8_t tag);
45
+    static bool onTouchEnd(uint8_t tag);
46
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp View File

@@ -22,11 +22,10 @@
22 22
  ****************************************************************************/
23 23
 
24 24
 #include "../config.h"
25
-
26
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
27
-
28 25
 #include "screens.h"
29 26
 
27
+#ifdef FTDI_COCOA_STATUS_SCREEN
28
+
30 29
 #include "../ftdi_eve_lib/extras/poly_ui.h"
31 30
 
32 31
 #include "cocoa_press_ui.h"
@@ -304,4 +303,4 @@ void StatusScreen::onIdle() {
304 303
   }
305 304
 }
306 305
 
307
-#endif // TOUCH_UI_FTDI_EVE
306
+#endif // FTDI_COCOA_STATUS_SCREEN

+ 55
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.h View File

@@ -0,0 +1,55 @@
1
+/*******************************
2
+ * cocoa_press_status_screen.h *
3
+ *******************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *   Written By Marcio Teixeira 2019 - Cocoa Press                          *
9
+ *                                                                          *
10
+ *   This program is free software: you can redistribute it and/or modify   *
11
+ *   it under the terms of the GNU General Public License as published by   *
12
+ *   the Free Software Foundation, either version 3 of the License, or      *
13
+ *   (at your option) any later version.                                    *
14
+ *                                                                          *
15
+ *   This program is distributed in the hope that it will be useful,        *
16
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
17
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
18
+ *   GNU General Public License for more details.                           *
19
+ *                                                                          *
20
+ *   To view a copy of the GNU General Public License, go to the following  *
21
+ *   location: <https://www.gnu.org/licenses/>.                             *
22
+ ****************************************************************************/
23
+
24
+#pragma once
25
+
26
+#define FTDI_COCOA_STATUS_SCREEN
27
+#define FTDI_COCOA_STATUS_SCREEN_CLASS StatusScreen
28
+
29
+class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE> {
30
+  private:
31
+    static float increment;
32
+    static bool  jog_xy;
33
+    static bool  fine_motion;
34
+
35
+    static void draw_progress(draw_mode_t what);
36
+    static void draw_temperature(draw_mode_t what);
37
+    static void draw_syringe(draw_mode_t what);
38
+    static void draw_arrows(draw_mode_t what);
39
+    static void draw_overlay_icons(draw_mode_t what);
40
+    static void draw_fine_motion(draw_mode_t what);
41
+    static void draw_buttons(draw_mode_t what);
42
+  public:
43
+    static void loadBitmaps();
44
+    static void unlockMotors();
45
+
46
+    static void setStatusMessage(const char *);
47
+    static void setStatusMessage(progmem_str);
48
+
49
+    static void onRedraw(draw_mode_t);
50
+
51
+    static bool onTouchStart(uint8_t tag);
52
+    static bool onTouchHeld(uint8_t tag);
53
+    static bool onTouchEnd(uint8_t tag);
54
+    static void onIdle();
55
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_unload_cartridge.cpp View File

@@ -22,12 +22,11 @@
22 22
  ****************************************************************************/
23 23
 
24 24
 #include "../config.h"
25
-
26
-#if ENABLED(TOUCH_UI_FTDI_EVE) && ENABLED(TOUCH_UI_COCOA_PRESS)
27
-
28 25
 #include "screens.h"
29 26
 #include "screen_data.h"
30 27
 
28
+#ifdef FTDI_COCOA_UNLOAD_CARTRIDGE_SCREEN
29
+
31 30
 using namespace ExtUI;
32 31
 using namespace FTDI;
33 32
 using namespace Theme;
@@ -98,4 +97,4 @@ bool UnloadCartridgeScreen::onTouchHeld(uint8_t tag) {
98 97
   return false;
99 98
 }
100 99
 
101
-#endif // TOUCH_UI_FTDI_EVE
100
+#endif // FTDI_COCOA_UNLOAD_CARTRIDGE_SCREEN

+ 34
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_unload_cartridge.h View File

@@ -0,0 +1,34 @@
1
+/**********************************
2
+ * cocoa_press_unload_cartridge.h *
3
+ **********************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *   Written By Marcio Teixeira 2020 - Cocoa Press                          *
9
+ *                                                                          *
10
+ *   This program is free software: you can redistribute it and/or modify   *
11
+ *   it under the terms of the GNU General Public License as published by   *
12
+ *   the Free Software Foundation, either version 3 of the License, or      *
13
+ *   (at your option) any later version.                                    *
14
+ *                                                                          *
15
+ *   This program is distributed in the hope that it will be useful,        *
16
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
17
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
18
+ *   GNU General Public License for more details.                           *
19
+ *                                                                          *
20
+ *   To view a copy of the GNU General Public License, go to the following  *
21
+ *   location: <https://www.gnu.org/licenses/>.                              *
22
+ ****************************************************************************/
23
+
24
+#pragma once
25
+
26
+#define FTDI_COCOA_UNLOAD_CARTRIDGE_SCREEN
27
+#define FTDI_COCOA_UNLOAD_CARTRIDGE_SCREEN_CLASS UnloadCartridgeScreen
28
+
29
+class UnloadCartridgeScreen : public BaseScreen, public CachedScreen<UNLOAD_CARTRIDGE_SCREEN_CACHE> {
30
+  public:
31
+    static void onRedraw(draw_mode_t);
32
+    static bool onTouchEnd(uint8_t tag);
33
+    static bool onTouchHeld(uint8_t tag);
34
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_abort_print_dialog_box.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_CONFIRM_ABORT_PRINT_DIALOG_BOX
27
+
29 28
 #include "../../../../../feature/host_actions.h"
30 29
 
31 30
 using namespace ExtUI;
@@ -50,4 +49,4 @@ bool ConfirmAbortPrintDialogBox::onTouchEnd(uint8_t tag) {
50 49
   }
51 50
 }
52 51
 
53
-#endif // TOUCH_UI_FTDI_EVE
52
+#endif // FTDI_CONFIRM_ABORT_PRINT_DIALOG_BOX

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_abort_print_dialog_box.h View File

@@ -0,0 +1,32 @@
1
+/************************************
2
+ * confirm_abort_print_dialog_box.h *
3
+ ************************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_CONFIRM_ABORT_PRINT_DIALOG_BOX
26
+#define FTDI_CONFIRM_ABORT_PRINT_DIALOG_BOX_CLASS ConfirmAbortPrintDialogBox
27
+
28
+class ConfirmAbortPrintDialogBox : public DialogBoxBaseClass, public UncachedScreen {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_auto_calibration_dialog_box.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, CALIBRATION_GCODE)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_CONFIRM_AUTO_CALIBRATION_DIALOG_BOX
27
+
29 28
 using namespace ExtUI;
30 29
 using namespace Theme;
31 30
 
@@ -45,4 +44,4 @@ bool ConfirmAutoCalibrationDialogBox::onTouchEnd(uint8_t tag) {
45 44
   }
46 45
 }
47 46
 
48
-#endif // TOUCH_UI_FTDI_EVE
47
+#endif // FTDI_CONFIRM_AUTO_CALIBRATION_DIALOG_BOX

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_auto_calibration_dialog_box.h View File

@@ -0,0 +1,32 @@
1
+/*****************************************
2
+ * confirm_auto_calibration_dialog_box.h *
3
+ *****************************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_CONFIRM_AUTO_CALIBRATION_DIALOG_BOX
26
+#define FTDI_CONFIRM_AUTO_CALIBRATION_DIALOG_BOX_CLASS ConfirmAutoCalibrationDialogBox
27
+
28
+class ConfirmAutoCalibrationDialogBox : public DialogBoxBaseClass, public UncachedScreen {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_erase_flash_dialog_box.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_DEVELOPER_MENU)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_CONFIRM_ERASE_FLASH_DIALOG_BOX
27
+
29 28
 #include "../archim2-flash/flash_storage.h"
30 29
 
31 30
 using namespace FTDI;
@@ -51,4 +50,4 @@ bool ConfirmEraseFlashDialogBox::onTouchEnd(uint8_t tag) {
51 50
   }
52 51
 }
53 52
 
54
-#endif // TOUCH_UI_FTDI_EVE
53
+#endif // FTDI_CONFIRM_ERASE_FLASH_DIALOG_BOX

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_erase_flash_dialog_box.h View File

@@ -0,0 +1,32 @@
1
+/************************************
2
+ * confirm_erase_flash_dialog_box.h *
3
+ ************************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_CONFIRM_ERASE_FLASH_DIALOG_BOX
26
+#define FTDI_CONFIRM_ERASE_FLASH_DIALOG_BOX_CLASS ConfirmEraseFlashDialogBox
27
+
28
+class ConfirmEraseFlashDialogBox : public DialogBoxBaseClass, public UncachedScreen {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 7
- 6
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_start_print_dialog_box.cpp View File

@@ -21,16 +21,17 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 #include "screen_data.h"
29 26
 
27
+#ifdef FTDI_CONFIRM_START_PRINT_DIALOG_BOX
28
+
30 29
 using namespace FTDI;
31 30
 using namespace Theme;
32 31
 using namespace ExtUI;
33 32
 
33
+constexpr static ConfirmStartPrintDialogBoxData &mydata = screen_data.ConfirmStartPrintDialogBox;
34
+
34 35
 void ConfirmStartPrintDialogBox::onRedraw(draw_mode_t) {
35 36
   const char *filename = getLongFilename();
36 37
   char buffer[strlen_P(GET_TEXT(MSG_START_PRINT_CONFIRMATION)) + strlen(filename) + 1];
@@ -53,13 +54,13 @@ bool ConfirmStartPrintDialogBox::onTouchEnd(uint8_t tag) {
53 54
 
54 55
 const char *ConfirmStartPrintDialogBox::getFilename(bool longName) {
55 56
   FileList files;
56
-  files.seek(screen_data.ConfirmStartPrintDialog.file_index, true);
57
+  files.seek(mydata.file_index, true);
57 58
   return longName ? files.longFilename() : files.shortFilename();
58 59
 }
59 60
 
60 61
 void ConfirmStartPrintDialogBox::show(uint8_t file_index) {
61
-  screen_data.ConfirmStartPrintDialog.file_index = file_index;
62
+  mydata.file_index = file_index;
62 63
    GOTO_SCREEN(ConfirmStartPrintDialogBox);
63 64
 }
64 65
 
65
-#endif // TOUCH_UI_FTDI_EVE
66
+#endif // FTDI_CONFIRM_START_PRINT_DIALOG_BOX

+ 43
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_start_print_dialog_box.h View File

@@ -0,0 +1,43 @@
1
+/************************************
2
+ * confirm_start_print_dialog_box.h *
3
+ ************************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_CONFIRM_START_PRINT_DIALOG_BOX
26
+#define FTDI_CONFIRM_START_PRINT_DIALOG_BOX_CLASS ConfirmStartPrintDialogBox
27
+
28
+struct ConfirmStartPrintDialogBoxData {
29
+  uint8_t file_index;
30
+};
31
+
32
+class ConfirmStartPrintDialogBox : public DialogBoxBaseClass, public UncachedScreen {
33
+  private:
34
+    inline static const char *getShortFilename() {return getFilename(false);}
35
+    inline static const char *getLongFilename()  {return getFilename(true);}
36
+
37
+    static const char *getFilename(bool longName);
38
+  public:
39
+    static void onRedraw(draw_mode_t);
40
+    static bool onTouchEnd(uint8_t);
41
+
42
+    static void show(uint8_t file_index);
43
+};

+ 4
- 5
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_user_request_alert_box.cpp View File

@@ -21,12 +21,11 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 #include "screen_data.h"
29 26
 
27
+#ifdef FTDI_CONFIRM_USER_REQUEST_ALERT_BOX
28
+
30 29
 using namespace FTDI;
31 30
 
32 31
 void ConfirmUserRequestAlertBox::onRedraw(draw_mode_t mode) {
@@ -54,7 +53,7 @@ bool ConfirmUserRequestAlertBox::onTouchEnd(uint8_t tag) {
54 53
 void ConfirmUserRequestAlertBox::show(const char* msg) {
55 54
   drawMessage(msg);
56 55
   storeBackground();
57
-  screen_data.AlertDialog.isError = false;
56
+  screen_data.AlertDialogBox.isError = false;
58 57
   GOTO_SCREEN(ConfirmUserRequestAlertBox);
59 58
 }
60 59
 
@@ -63,4 +62,4 @@ void ConfirmUserRequestAlertBox::hide() {
63 62
     GOTO_PREVIOUS();
64 63
 }
65 64
 
66
-#endif // TOUCH_UI_FTDI_EVE
65
+#endif // FTDI_CONFIRM_USER_REQUEST_ALERT_BOX

+ 35
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_user_request_alert_box.h View File

@@ -0,0 +1,35 @@
1
+/************************************
2
+ * confirm_user_request_alert_box.h *
3
+ ************************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_CONFIRM_USER_REQUEST_ALERT_BOX
26
+#define FTDI_CONFIRM_USER_REQUEST_ALERT_BOX_CLASS ConfirmUserRequestAlertBox
27
+
28
+class ConfirmUserRequestAlertBox : public AlertDialogBox {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t);
32
+    static void hide();
33
+    static void show(const char*);
34
+    static void onIdle();
35
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.cpp View File

@@ -21,11 +21,10 @@
21 21
  */
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, CUSTOM_USER_MENUS) && NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_CUSTOM_USER_MENUS
27
+
29 28
 using namespace FTDI;
30 29
 using namespace ExtUI;
31 30
 using namespace Theme;
@@ -212,4 +211,4 @@ bool CustomUserMenus::onTouchEnd(uint8_t tag) {
212 211
   return true;
213 212
 }
214 213
 
215
-#endif // TOUCH_UI_FTDI_EVE && CUSTOM_USER_MENUS && !TOUCH_UI_LULZBOT_BIO && !TOUCH_UI_COCOA_PRESS
214
+#endif // FTDI_CUSTOM_USER_MENUS

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.h View File

@@ -0,0 +1,32 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+#pragma once
24
+
25
+#define FTDI_CUSTOM_USER_MENUS
26
+#define FTDI_CUSTOM_USER_MENUS_CLASS CustomUserMenus
27
+
28
+class CustomUserMenus : public BaseScreen, public CachedScreen<CUSTOM_USER_MENUS_SCREEN_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/default_acceleration_screen.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_DEFAULT_ACCELERATION_SCREEN
27
+
29 28
 using namespace FTDI;
30 29
 using namespace ExtUI;
31 30
 using namespace Theme;
@@ -60,4 +59,4 @@ bool DefaultAccelerationScreen::onTouchHeld(uint8_t tag) {
60 59
   return true;
61 60
 }
62 61
 
63
-#endif // TOUCH_UI_FTDI_EVE
62
+#endif // FTDI_DEFAULT_ACCELERATION_SCREEN

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/default_acceleration_screen.h View File

@@ -0,0 +1,32 @@
1
+/*********************************
2
+ * default_acceleration_screen.h *
3
+ *********************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_DEFAULT_ACCELERATION_SCREEN
26
+#define FTDI_DEFAULT_ACCELERATION_SCREEN_CLASS DefaultAccelerationScreen
27
+
28
+class DefaultAccelerationScreen : public BaseNumericAdjustmentScreen, public CachedScreen<DEFAULT_ACCELERATION_SCREEN_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchHeld(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/developer_menu.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_DEVELOPER_MENU)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_DEVELOPER_MENU
27
+
29 28
 #include "../archim2-flash/flash_storage.h"
30 29
 
31 30
 using namespace FTDI;
@@ -147,4 +146,4 @@ bool DeveloperMenu::onTouchEnd(uint8_t tag) {
147 146
   return true;
148 147
 }
149 148
 
150
-#endif // TOUCH_UI_FTDI_EVE
149
+#endif // FTDI_DEVELOPER_MENU

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/developer_menu.h View File

@@ -0,0 +1,32 @@
1
+/********************
2
+ * developer_menu.h *
3
+ ********************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_DEVELOPER_MENU
26
+#define FTDI_DEVELOPER_MENU_CLASS DeveloperMenu
27
+
28
+class DeveloperMenu : public BaseScreen, public UncachedScreen {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/dialog_box_base_class.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_DIALOG_BOX_BASE_CLASS
27
+
29 28
 using namespace FTDI;
30 29
 using namespace Theme;
31 30
 
@@ -84,4 +83,4 @@ void DialogBoxBaseClass::onIdle() {
84 83
   reset_menu_timeout();
85 84
 }
86 85
 
87
-#endif // TOUCH_UI_FTDI_EVE
86
+#endif // FTDI_DIALOG_BOX_BASE_CLASS

+ 40
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/dialog_box_base_class.h View File

@@ -0,0 +1,40 @@
1
+/***************************
2
+ * dialog_box_base_class.h *
3
+ ***************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_DIALOG_BOX_BASE_CLASS
26
+#define FTDI_DIALOG_BOX_BASE_CLASS_CLASS DialogBoxBaseClass
27
+
28
+class DialogBoxBaseClass : public BaseScreen {
29
+  protected:
30
+    template<typename T> static void drawMessage(const T, int16_t font = 0);
31
+    static void drawYesNoButtons(uint8_t default_btn = 0);
32
+    static void drawOkayButton();
33
+    static void drawSpinner();
34
+    static void drawButton(const progmem_str);
35
+
36
+    static void onRedraw(draw_mode_t) {};
37
+  public:
38
+    static bool onTouchEnd(uint8_t tag);
39
+    static void onIdle();
40
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/display_tuning_screen.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_DISPLAY_TUNING_SCREEN
27
+
29 28
 using namespace FTDI;
30 29
 using namespace Theme;
31 30
 
@@ -58,4 +57,4 @@ bool DisplayTuningScreen::onTouchHeld(uint8_t tag) {
58 57
   return true;
59 58
 }
60 59
 
61
-#endif // TOUCH_UI_FTDI_EVE
60
+#endif // FTDI_DISPLAY_TUNING_SCREEN

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/display_tuning_screen.h View File

@@ -0,0 +1,32 @@
1
+/***************************
2
+ * display_tuning_screen.h *
3
+ ***************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_DISPLAY_TUNING_SCREEN
26
+#define FTDI_DISPLAY_TUNING_SCREEN_CLASS DisplayTuningScreen
27
+
28
+class DisplayTuningScreen : public BaseNumericAdjustmentScreen, public CachedScreen<DISPLAY_TIMINGS_SCREEN_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchHeld(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_ENDSTOP_STATE_SCREEN
27
+
29 28
 using namespace FTDI;
30 29
 using namespace Theme;
31 30
 using namespace ExtUI;
@@ -149,4 +148,4 @@ void EndstopStatesScreen::onIdle() {
149 148
   BaseScreen::onIdle();
150 149
 }
151 150
 
152
-#endif // TOUCH_UI_FTDI_EVE
151
+#endif // FTDI_ENDSTOP_STATE_SCREEN

+ 35
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.h View File

@@ -0,0 +1,35 @@
1
+/**************************
2
+ * endstop_state_screen.h *
3
+ **************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_ENDSTOP_STATE_SCREEN
26
+#define FTDI_ENDSTOP_STATE_SCREEN_CLASS EndstopStatesScreen
27
+
28
+class EndstopStatesScreen : public BaseScreen, public UncachedScreen {
29
+  public:
30
+    static void onEntry();
31
+    static void onExit();
32
+    static void onRedraw(draw_mode_t);
33
+    static bool onTouchEnd(uint8_t tag);
34
+    static void onIdle();
35
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/feedrate_percent_screen.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_FEEDRATE_PERCENT_SCREEN
27
+
29 28
 using namespace FTDI;
30 29
 using namespace ExtUI;
31 30
 
@@ -49,4 +48,4 @@ bool FeedratePercentScreen::onTouchHeld(uint8_t tag) {
49 48
   return true;
50 49
 }
51 50
 
52
-#endif // TOUCH_UI_FTDI_EVE
51
+#endif // FTDI_FEEDRATE_PERCENT_SCREEN

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/feedrate_percent_screen.h View File

@@ -0,0 +1,32 @@
1
+/*****************************
2
+ * feedrate_percent_screen.h *
3
+ *****************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_FEEDRATE_PERCENT_SCREEN
26
+#define FTDI_FEEDRATE_PERCENT_SCREEN_CLASS FeedratePercentScreen
27
+
28
+class FeedratePercentScreen : public BaseNumericAdjustmentScreen, public CachedScreen<MAX_FEEDRATE_SCREEN_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchHeld(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_menu.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE) && ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_FILAMENT_MENU
27
+
29 28
 using namespace FTDI;
30 29
 using namespace ExtUI;
31 30
 using namespace Theme;
@@ -82,4 +81,4 @@ bool FilamentMenu::onTouchEnd(uint8_t tag) {
82 81
   return true;
83 82
 }
84 83
 
85
-#endif // TOUCH_UI_FTDI_EVE
84
+#endif // FTDI_FILAMENT_MENU

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_menu.h View File

@@ -0,0 +1,32 @@
1
+/*******************
2
+ * filament_menu.h *
3
+ *******************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_FILAMENT_MENU
26
+#define FTDI_FILAMENT_MENU_CLASS FilamentMenu
27
+
28
+class FilamentMenu : public BaseNumericAdjustmentScreen, public CachedScreen<FILAMENT_MENU_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_runout_screen.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, FILAMENT_RUNOUT_SENSOR)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_FILAMENT_RUNOUT_SCREEN
27
+
29 28
 using namespace FTDI;
30 29
 using namespace ExtUI;
31 30
 using namespace Theme;
@@ -62,4 +61,4 @@ bool FilamentRunoutScreen::onTouchHeld(uint8_t tag) {
62 61
   return true;
63 62
 }
64 63
 
65
-#endif // TOUCH_UI_FTDI_EVE
64
+#endif // FTDI_FILAMENT_RUNOUT_SCREEN

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_runout_screen.h View File

@@ -0,0 +1,32 @@
1
+/****************************
2
+ * filament_runout_screen.h *
3
+ ****************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_FILAMENT_RUNOUT_SCREEN
26
+#define FTDI_FILAMENT_RUNOUT_SCREEN_CLASS FilamentRunoutScreen
27
+
28
+class FilamentRunoutScreen : public BaseNumericAdjustmentScreen, public CachedScreen<FILAMENT_RUNOUT_SCREEN_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchHeld(uint8_t tag);
32
+};

+ 35
- 34
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp View File

@@ -21,19 +21,20 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, SDSUPPORT)
26
-
27 24
 #include "screens.h"
28 25
 #include "screen_data.h"
29 26
 
27
+#ifdef FTDI_FILES_SCREEN
28
+
30 29
 using namespace FTDI;
31 30
 using namespace ExtUI;
32 31
 using namespace Theme;
33 32
 
33
+constexpr static FilesScreenData &mydata = screen_data.FilesScreen;
34
+
34 35
 void FilesScreen::onEntry() {
35
-  screen_data.Files.cur_page        = 0;
36
-  screen_data.Files.selected_tag    = 0xFF;
36
+  mydata.cur_page        = 0;
37
+  mydata.selected_tag    = 0xFF;
37 38
   #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
38 39
     CLCD::mem_write_32(CLCD::REG::MACRO_0,DL::NOP);
39 40
   #endif
@@ -50,21 +51,21 @@ const char *FilesScreen::getSelectedFilename(bool longName) {
50 51
 void FilesScreen::drawSelectedFile() {
51 52
   FileList files;
52 53
   files.seek(getSelectedFileIndex(), true);
53
-  screen_data.Files.flags.is_dir = files.isDir();
54
+  mydata.flags.is_dir = files.isDir();
54 55
   drawFileButton(
55 56
     files.filename(),
56
-    screen_data.Files.selected_tag,
57
-    screen_data.Files.flags.is_dir,
57
+    mydata.selected_tag,
58
+    mydata.flags.is_dir,
58 59
     true
59 60
   );
60 61
 }
61 62
 
62 63
 uint16_t FilesScreen::getSelectedFileIndex() {
63
-  return getFileForTag(screen_data.Files.selected_tag);
64
+  return getFileForTag(mydata.selected_tag);
64 65
 }
65 66
 
66 67
 uint16_t FilesScreen::getFileForTag(uint8_t tag) {
67
-  return screen_data.Files.cur_page * files_per_page + tag - 2;
68
+  return mydata.cur_page * files_per_page + tag - 2;
68 69
 }
69 70
 
70 71
 #if ENABLED(TOUCH_UI_PORTRAIT)
@@ -106,15 +107,15 @@ void FilesScreen::drawFileButton(const char* filename, uint8_t tag, bool is_dir,
106 107
 
107 108
 void FilesScreen::drawFileList() {
108 109
   FileList files;
109
-  screen_data.Files.num_page = max(1,ceil(float(files.count()) / files_per_page));
110
-  screen_data.Files.cur_page = min(screen_data.Files.cur_page, screen_data.Files.num_page-1);
111
-  screen_data.Files.flags.is_root  = files.isAtRootDir();
110
+  mydata.num_page = max(1,ceil(float(files.count()) / files_per_page));
111
+  mydata.cur_page = min(mydata.cur_page, mydata.num_page-1);
112
+  mydata.flags.is_root  = files.isAtRootDir();
112 113
 
113 114
   #undef MARGIN_T
114 115
   #undef MARGIN_B
115 116
   #define MARGIN_T 0
116 117
   #define MARGIN_B 0
117
-  uint16_t fileIndex = screen_data.Files.cur_page * files_per_page;
118
+  uint16_t fileIndex = mydata.cur_page * files_per_page;
118 119
   for (uint8_t i = 0; i < files_per_page; i++, fileIndex++) {
119 120
     if (files.seek(fileIndex)) {
120 121
       drawFileButton(files.filename(), getTagForLine(i), files.isDir(), false);
@@ -126,8 +127,8 @@ void FilesScreen::drawFileList() {
126 127
 }
127 128
 
128 129
 void FilesScreen::drawHeader() {
129
-  const bool prev_enabled = screen_data.Files.cur_page > 0;
130
-  const bool next_enabled = screen_data.Files.cur_page < (screen_data.Files.num_page - 1);
130
+  const bool prev_enabled = mydata.cur_page > 0;
131
+  const bool next_enabled = mydata.cur_page < (mydata.num_page - 1);
131 132
 
132 133
   #undef MARGIN_T
133 134
   #undef MARGIN_B
@@ -136,7 +137,7 @@ void FilesScreen::drawHeader() {
136 137
 
137 138
   char str[16];
138 139
   sprintf_P(str, PSTR("Page %d of %d"),
139
-    screen_data.Files.cur_page + 1, screen_data.Files.num_page);
140
+    mydata.cur_page + 1, mydata.num_page);
140 141
 
141 142
   CommandProcessor cmd;
142 143
   cmd.colors(normal_btn)
@@ -158,8 +159,8 @@ void FilesScreen::drawFooter() {
158 159
     #define MARGIN_T 5
159 160
     #define MARGIN_B 5
160 161
   #endif
161
-  const bool    has_selection = screen_data.Files.selected_tag != 0xFF;
162
-  const uint8_t back_tag      = screen_data.Files.flags.is_root ? 240 : 245;
162
+  const bool    has_selection = mydata.selected_tag != 0xFF;
163
+  const uint8_t back_tag      = mydata.flags.is_root ? 240 : 245;
163 164
   const uint8_t y             = GRID_ROWS - footer_h + 1;
164 165
   const uint8_t h             = footer_h;
165 166
 
@@ -171,7 +172,7 @@ void FilesScreen::drawFooter() {
171 172
      .enabled(has_selection)
172 173
      .colors(has_selection ? action_btn : normal_btn);
173 174
 
174
-  if (screen_data.Files.flags.is_dir)
175
+  if (mydata.flags.is_dir)
175 176
     cmd.tag(244).button(BTN_POS(1, y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BUTTON_OPEN));
176 177
   else
177 178
     cmd.tag(243).button(BTN_POS(1, y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BUTTON_PRINT));
@@ -186,8 +187,8 @@ void FilesScreen::onRedraw(draw_mode_t what) {
186 187
 }
187 188
 
188 189
 void FilesScreen::gotoPage(uint8_t page) {
189
-  screen_data.Files.selected_tag = 0xFF;
190
-  screen_data.Files.cur_page     = page;
190
+  mydata.selected_tag = 0xFF;
191
+  mydata.cur_page     = page;
191 192
   CommandProcessor cmd;
192 193
   cmd.cmd(CMD_DLSTART)
193 194
      .cmd(CLEAR_COLOR_RGB(bg_color))
@@ -201,13 +202,13 @@ bool FilesScreen::onTouchEnd(uint8_t tag) {
201 202
   switch (tag) {
202 203
     case 240: GOTO_PREVIOUS();                  return true;
203 204
     case 241:
204
-      if (screen_data.Files.cur_page > 0) {
205
-        gotoPage(screen_data.Files.cur_page-1);
205
+      if (mydata.cur_page > 0) {
206
+        gotoPage(mydata.cur_page-1);
206 207
       }
207 208
       break;
208 209
     case 242:
209
-      if (screen_data.Files.cur_page < (screen_data.Files.num_page-1)) {
210
-        gotoPage(screen_data.Files.cur_page+1);
210
+      if (mydata.cur_page < (mydata.num_page-1)) {
211
+        gotoPage(mydata.cur_page+1);
211 212
       }
212 213
       break;
213 214
     case 243:
@@ -229,18 +230,18 @@ bool FilesScreen::onTouchEnd(uint8_t tag) {
229 230
       break;
230 231
     default:
231 232
       if (tag < 240) {
232
-        screen_data.Files.selected_tag = tag;
233
+        mydata.selected_tag = tag;
233 234
         #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
234 235
           if (FTDI::ftdi_chip >= 810) {
235 236
             const char *longFilename = getSelectedLongFilename();
236 237
             if (longFilename[0]) {
237 238
               CommandProcessor cmd;
238 239
               uint16_t text_width = cmd.font(font_medium).text_width(longFilename);
239
-              screen_data.Files.scroll_pos = 0;
240
+              mydata.scroll_pos = 0;
240 241
               if (text_width > display_width)
241
-                screen_data.Files.scroll_max = text_width - display_width + MARGIN_L + MARGIN_R;
242
+                mydata.scroll_max = text_width - display_width + MARGIN_L + MARGIN_R;
242 243
               else
243
-                screen_data.Files.scroll_max = 0;
244
+                mydata.scroll_max = 0;
244 245
             }
245 246
           }
246 247
         #endif
@@ -254,11 +255,11 @@ void FilesScreen::onIdle() {
254 255
   #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
255 256
     if (FTDI::ftdi_chip >= 810) {
256 257
       CLCD::mem_write_32(CLCD::REG::MACRO_0,
257
-        VERTEX_TRANSLATE_X(-int32_t(screen_data.Files.scroll_pos)));
258
-      if (screen_data.Files.scroll_pos < screen_data.Files.scroll_max * 16)
259
-        screen_data.Files.scroll_pos++;
258
+        VERTEX_TRANSLATE_X(-int32_t(mydata.scroll_pos)));
259
+      if (mydata.scroll_pos < mydata.scroll_max * 16)
260
+        mydata.scroll_pos++;
260 261
     }
261 262
   #endif
262 263
 }
263 264
 
264
-#endif // TOUCH_UI_FTDI_EVE
265
+#endif // FTDI_FILES_SCREEN

+ 75
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.h View File

@@ -0,0 +1,75 @@
1
+/******************
2
+ * files_screen.h *
3
+ ******************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_FILES_SCREEN
26
+#define FTDI_FILES_SCREEN_CLASS FilesScreen
27
+
28
+struct FilesScreenData {
29
+  struct {
30
+    uint8_t is_dir  : 1;
31
+    uint8_t is_root : 1;
32
+  } flags;
33
+  uint8_t   selected_tag;
34
+  uint8_t   num_page;
35
+  uint8_t   cur_page;
36
+  #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
37
+    uint16_t  scroll_pos;
38
+    uint16_t  scroll_max;
39
+  #endif
40
+};
41
+
42
+class FilesScreen : public BaseScreen, public CachedScreen<FILES_SCREEN_CACHE, FILE_SCREEN_DL_SIZE> {
43
+  private:
44
+    #if ENABLED(TOUCH_UI_PORTRAIT)
45
+      static constexpr uint8_t header_h       = 2;
46
+      static constexpr uint8_t footer_h       = 2;
47
+      static constexpr uint8_t files_per_page = 11;
48
+    #else
49
+      static constexpr uint8_t header_h       = 1;
50
+      static constexpr uint8_t footer_h       = 1;
51
+      static constexpr uint8_t files_per_page = 6;
52
+    #endif
53
+
54
+    static uint8_t  getTagForLine(uint8_t line) {return line + 2;}
55
+    static uint8_t  getLineForTag(uint8_t tag)  {return  tag - 2;}
56
+    static uint16_t getFileForTag(uint8_t tag);
57
+    static uint16_t getSelectedFileIndex();
58
+
59
+    inline static const char *getSelectedShortFilename() {return getSelectedFilename(false);}
60
+    inline static const char *getSelectedLongFilename()  {return getSelectedFilename(true);}
61
+    static const char *getSelectedFilename(bool longName);
62
+
63
+    static void drawFileButton(const char* filename, uint8_t tag, bool is_dir, bool is_highlighted);
64
+    static void drawFileList();
65
+    static void drawHeader();
66
+    static void drawFooter();
67
+    static void drawSelectedFile();
68
+
69
+    static void gotoPage(uint8_t);
70
+  public:
71
+    static void onEntry();
72
+    static void onRedraw(draw_mode_t);
73
+    static bool onTouchEnd(uint8_t tag);
74
+    static void onIdle();
75
+};

+ 12
- 12
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp View File

@@ -21,12 +21,11 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 #include "screen_data.h"
29 26
 
27
+#ifdef FTDI_INTERFACE_SETTINGS_SCREEN
28
+
30 29
 #include "../archim2-flash/flash_storage.h"
31 30
 
32 31
 #include "../../../../../module/settings.h"
@@ -42,13 +41,14 @@ using namespace ExtUI;
42 41
 using namespace Theme;
43 42
 
44 43
 constexpr bool PERSISTENT_STORE_SUCCESS = false; // persistentStore uses true for error
44
+constexpr static InterfaceSettingsScreenData &mydata = screen_data.InterfaceSettingsScreen;
45 45
 
46 46
 void InterfaceSettingsScreen::onStartup() {
47 47
 }
48 48
 
49 49
 void InterfaceSettingsScreen::onEntry() {
50
-  screen_data.InterfaceSettings.brightness = CLCD::get_brightness();
51
-  screen_data.InterfaceSettings.volume     = SoundPlayer::get_volume();
50
+  mydata.brightness = CLCD::get_brightness();
51
+  mydata.volume     = SoundPlayer::get_volume();
52 52
   BaseScreen::onEntry();
53 53
 }
54 54
 
@@ -96,9 +96,9 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
96 96
     #define EDGE_R 30
97 97
        .colors(ui_slider)
98 98
     #if DISABLED(LCD_FYSETC_TFT81050)
99
-       .tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettings.brightness, 128)
99
+       .tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), mydata.brightness, 128)
100 100
     #endif
101
-       .tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), screen_data.InterfaceSettings.volume,     0xFF)
101
+       .tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), mydata.volume,     0xFF)
102 102
        .colors(ui_toggle)
103 103
        .tag(4).toggle2(BTN_POS(3,4), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), LockScreen::is_enabled())
104 104
     #if DISABLED(TOUCH_UI_NO_BOOTSCREEN)
@@ -161,13 +161,13 @@ void InterfaceSettingsScreen::onIdle() {
161 161
     CommandProcessor cmd;
162 162
     switch (cmd.track_tag(value)) {
163 163
       case 2:
164
-        screen_data.InterfaceSettings.brightness = max(11, (value * 128UL) / 0xFFFF);
165
-        CLCD::set_brightness(screen_data.InterfaceSettings.brightness);
164
+        mydata.brightness = max(11, (value * 128UL) / 0xFFFF);
165
+        CLCD::set_brightness(mydata.brightness);
166 166
         SaveSettingsDialogBox::settingsChanged();
167 167
         break;
168 168
       case 3:
169
-        screen_data.InterfaceSettings.volume = value >> 8;
170
-        SoundPlayer::set_volume(screen_data.InterfaceSettings.volume);
169
+        mydata.volume = value >> 8;
170
+        SoundPlayer::set_volume(mydata.volume);
171 171
         SaveSettingsDialogBox::settingsChanged();
172 172
         break;
173 173
       default:
@@ -288,4 +288,4 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) {
288 288
   }
289 289
 #endif
290 290
 
291
-#endif // TOUCH_UI_FTDI_EVE
291
+#endif // FTDI_INTERFACE_SETTINGS_SCREEN

+ 67
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.h View File

@@ -0,0 +1,67 @@
1
+/*******************************
2
+ * interface_settings_screen.h *
3
+ *******************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_INTERFACE_SETTINGS_SCREEN
26
+#define FTDI_INTERFACE_SETTINGS_SCREEN_CLASS InterfaceSettingsScreen
27
+
28
+struct InterfaceSettingsScreenData {
29
+  uint8_t volume;
30
+  uint8_t brightness;
31
+};
32
+
33
+class InterfaceSettingsScreen : public BaseScreen, public CachedScreen<INTERFACE_SETTINGS_SCREEN_CACHE> {
34
+  private:
35
+    struct persistent_data_t {
36
+      uint32_t touch_transform_a;
37
+      uint32_t touch_transform_b;
38
+      uint32_t touch_transform_c;
39
+      uint32_t touch_transform_d;
40
+      uint32_t touch_transform_e;
41
+      uint32_t touch_transform_f;
42
+      uint16_t passcode;
43
+      uint8_t  display_brightness;
44
+      int8_t   display_h_offset_adj;
45
+      int8_t   display_v_offset_adj;
46
+      uint8_t  sound_volume;
47
+      uint8_t  bit_flags;
48
+      uint8_t  event_sounds[InterfaceSoundsScreen::NUM_EVENTS];
49
+    };
50
+
51
+  public:
52
+    #ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE
53
+      static bool backupEEPROM();
54
+    #endif
55
+
56
+    static void saveSettings(char *);
57
+    static void loadSettings(const char *);
58
+    static void defaultSettings();
59
+    static void failSafeSettings();
60
+
61
+    static void onStartup();
62
+    static void onEntry();
63
+    static void onRedraw(draw_mode_t);
64
+    static bool onTouchStart(uint8_t tag);
65
+    static bool onTouchEnd(uint8_t tag);
66
+    static void onIdle();
67
+};

+ 7
- 8
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.cpp View File

@@ -21,12 +21,11 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 #include "screen_data.h"
29 26
 
27
+#ifdef FTDI_INTERFACE_SOUNDS_SCREEN
28
+
30 29
 using namespace FTDI;
31 30
 using namespace Theme;
32 31
 using namespace ExtUI;
@@ -93,7 +92,7 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) {
93 92
     cmd.font(font_medium)
94 93
        .colors(ui_slider)
95 94
     #define EDGE_R 30
96
-       .tag(2).slider    (BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettings.volume, 0xFF)
95
+       .tag(2).slider    (BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.volume, 0xFF)
97 96
        .colors(ui_toggle)
98 97
        .tag(3).toggle2   (BTN_POS(3,3), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), UIData::touch_sounds_enabled())
99 98
     #undef EDGE_R
@@ -108,7 +107,7 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) {
108 107
 }
109 108
 
110 109
 void InterfaceSoundsScreen::onEntry() {
111
-  screen_data.InterfaceSettings.volume = SoundPlayer::get_volume();
110
+  screen_data.InterfaceSettingsScreen.volume = SoundPlayer::get_volume();
112 111
   BaseScreen::onEntry();
113 112
 }
114 113
 
@@ -145,8 +144,8 @@ void InterfaceSoundsScreen::onIdle() {
145 144
     CommandProcessor cmd;
146 145
     switch (cmd.track_tag(value)) {
147 146
       case 2:
148
-        screen_data.InterfaceSettings.volume = value >> 8;
149
-        SoundPlayer::set_volume(screen_data.InterfaceSettings.volume);
147
+        screen_data.InterfaceSettingsScreen.volume = value >> 8;
148
+        SoundPlayer::set_volume(screen_data.InterfaceSettingsScreen.volume);
150 149
         SaveSettingsDialogBox::settingsChanged();
151 150
         break;
152 151
       default:
@@ -157,4 +156,4 @@ void InterfaceSoundsScreen::onIdle() {
157 156
   BaseScreen::onIdle();
158 157
 }
159 158
 
160
-#endif // TOUCH_UI_FTDI_EVE
159
+#endif // FTDI_INTERFACE_SOUNDS_SCREEN

+ 57
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.h View File

@@ -0,0 +1,57 @@
1
+/*****************************
2
+ * interface_sounds_screen.h *
3
+ *****************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_INTERFACE_SOUNDS_SCREEN
26
+#define FTDI_INTERFACE_SOUNDS_SCREEN_CLASS InterfaceSoundsScreen
27
+
28
+class InterfaceSoundsScreen : public BaseScreen, public CachedScreen<INTERFACE_SOUNDS_SCREEN_CACHE> {
29
+  public:
30
+    enum event_t {
31
+      PRINTING_STARTED  = 0,
32
+      PRINTING_FINISHED = 1,
33
+      PRINTING_FAILED   = 2,
34
+
35
+      NUM_EVENTS
36
+    };
37
+
38
+  private:
39
+    friend class InterfaceSettingsScreen;
40
+
41
+    static uint8_t event_sounds[NUM_EVENTS];
42
+
43
+    static const char* getSoundSelection(event_t);
44
+    static void toggleSoundSelection(event_t);
45
+    static void setSoundSelection(event_t, const FTDI::SoundPlayer::sound_t*);
46
+
47
+  public:
48
+    static void playEventSound(event_t, FTDI::play_mode_t = FTDI::PLAY_ASYNCHRONOUS);
49
+
50
+    static void defaultSettings();
51
+
52
+    static void onEntry();
53
+    static void onRedraw(draw_mode_t);
54
+    static bool onTouchStart(uint8_t tag);
55
+    static bool onTouchEnd(uint8_t tag);
56
+    static void onIdle();
57
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/jerk_screen.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, CLASSIC_JERK)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_JERK_SCREEN
27
+
29 28
 using namespace FTDI;
30 29
 using namespace ExtUI;
31 30
 using namespace Theme;
@@ -62,4 +61,4 @@ bool JerkScreen::onTouchHeld(uint8_t tag) {
62 61
   return true;
63 62
 }
64 63
 
65
-#endif // TOUCH_UI_FTDI_EVE && CLASSIC_JERK
64
+#endif // FTDI_JERK_SCREEN

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/jerk_screen.h View File

@@ -0,0 +1,32 @@
1
+/*****************
2
+ * jerk_screen.h *
3
+ *****************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_JERK_SCREEN
26
+#define FTDI_JERK_SCREEN_CLASS JerkScreen
27
+
28
+class JerkScreen : public BaseNumericAdjustmentScreen, public CachedScreen<JERK_SCREEN_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchHeld(uint8_t tag);
32
+};

+ 6
- 7
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/junction_deviation_screen.cpp View File

@@ -1,6 +1,6 @@
1
-/*******************
2
- * boot_screen.cpp *
3
- *******************/
1
+/*********************************
2
+ * junction_deviation_screen.cpp *
3
+ *********************************/
4 4
 
5 5
 /****************************************************************************
6 6
  *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, HAS_JUNCTION_DEVIATION)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_JUNCTION_DEVIATION_SCREEN
27
+
29 28
 using namespace FTDI;
30 29
 using namespace ExtUI;
31 30
 using namespace Theme;
@@ -51,4 +50,4 @@ bool JunctionDeviationScreen::onTouchHeld(uint8_t tag) {
51 50
   return true;
52 51
 }
53 52
 
54
-#endif // TOUCH_UI_FTDI_EVE && !CLASSIC_JERK
53
+#endif // FTDI_JUNCTION_DEVIATION_SCREEN

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/junction_deviation_screen.h View File

@@ -0,0 +1,32 @@
1
+/*******************************
2
+ * junction_deviation_screen.h *
3
+ *******************************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_JUNCTION_DEVIATION_SCREEN
26
+#define FTDI_JUNCTION_DEVIATION_SCREEN_CLASS JunctionDeviationScreen
27
+
28
+class JunctionDeviationScreen : public BaseNumericAdjustmentScreen, public CachedScreen<JUNC_DEV_SCREEN_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchHeld(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/kill_screen.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_KILL_SCREEN
27
+
29 28
 using namespace FTDI;
30 29
 
31 30
 // The kill screen is an oddball that happens after Marlin has killed the events
@@ -59,4 +58,4 @@ void KillScreen::show(const char *message) {
59 58
   InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED, PLAY_SYNCHRONOUS);
60 59
 }
61 60
 
62
-#endif // TOUCH_UI_FTDI_EVE
61
+#endif // FTDI_KILL_SCREEN

+ 33
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/kill_screen.h View File

@@ -0,0 +1,33 @@
1
+/*****************
2
+ * kill_screen.h *
3
+ *****************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_KILL_SCREEN
26
+#define FTDI_KILL_SCREEN_CLASS KillScreen
27
+
28
+class KillScreen {
29
+  // The KillScreen is behaves differently than the
30
+  // others, so we do not bother extending UIScreen.
31
+  public:
32
+    static void show(const char*);
33
+};

+ 4
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/language_menu.cpp View File

@@ -21,11 +21,11 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-#include "../language/language.h"
24
+#include "screens.h"
25 25
 
26
-#if ENABLED(TOUCH_UI_FTDI_EVE) && NUM_LANGUAGES > 1
26
+#ifdef FTDI_LANGUAGE_MENU
27 27
 
28
-#include "screens.h"
28
+#include "../language/language.h"
29 29
 
30 30
 using namespace FTDI;
31 31
 using namespace Theme;
@@ -63,4 +63,4 @@ bool LanguageMenu::onTouchEnd(uint8_t tag) {
63 63
   return false;
64 64
 }
65 65
 
66
-#endif // TOUCH_UI_FTDI_EVE
66
+#endif // FTDI_LANGUAGE_MENU

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/language_menu.h View File

@@ -0,0 +1,32 @@
1
+/*******************
2
+ * language_menu.h *
3
+ *******************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_LANGUAGE_MENU
26
+#define FTDI_LANGUAGE_MENU_CLASS LanguageMenu
27
+
28
+class LanguageMenu : public BaseScreen, public UncachedScreen {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/leveling_menu.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE,HAS_LEVELING)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_LEVELING_MENU
27
+
29 28
 #if BOTH(HAS_BED_PROBE,BLTOUCH)
30 29
   #include "../../../../../feature/bltouch.h"
31 30
 #endif
@@ -118,4 +117,4 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) {
118 117
   return true;
119 118
 }
120 119
 
121
-#endif // TOUCH_UI_FTDI_EVE && HAS_LEVELING
120
+#endif // FTDI_LEVELING_MENU

+ 32
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/leveling_menu.h View File

@@ -0,0 +1,32 @@
1
+/*******************
2
+ * leveling_menu.h *
3
+ *******************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+#define FTDI_LEVELING_MENU
26
+#define FTDI_LEVELING_MENU_CLASS LevelingMenu
27
+
28
+class LevelingMenu : public BaseScreen, public CachedScreen<LEVELING_SCREEN_CACHE> {
29
+  public:
30
+    static void onRedraw(draw_mode_t);
31
+    static bool onTouchEnd(uint8_t tag);
32
+};

+ 3
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/linear_advance_screen.cpp View File

@@ -21,11 +21,10 @@
21 21
  ****************************************************************************/
22 22
 
23 23
 #include "../config.h"
24
-
25
-#if BOTH(TOUCH_UI_FTDI_EVE, LIN_ADVANCE)
26
-
27 24
 #include "screens.h"
28 25
 
26
+#ifdef FTDI_LINEAR_ADVANCE_SCREEN
27
+
29 28
 using namespace FTDI;
30 29
 using namespace ExtUI;
31 30
 using namespace Theme;
@@ -74,4 +73,4 @@ bool LinearAdvanceScreen::onTouchHeld(uint8_t tag) {
74 73
   return true;
75 74
 }
76 75
 
77
-#endif // TOUCH_UI_FTDI_EVE
76
+#endif // FTDI_LINEAR_ADVANCE_SCREEN

+ 0
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/linear_advance_screen.h View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save