浏览代码

Improve / fix FTDI EVE Touch UI (#17338)

- Fix timeout and debugging string
- Fix check for whether `LCD_TIMEOUT_TO_STATUS` is valid
- Fix incorrect debugging message
- Make capitalization of callbacks consistent.
- Allow Touch UI to use hardware SPI on Einsy boards
- Move print stats to About Printer page.
- More generic about screen with GPL license.
- Add missing handler for power loss event
- Less code duplication on status screen and main/advanced menu; more legible
- Reorganize advanced and main menu to add more features
- Hide home Z button when using Z_SAFE_HOMING
- Fix compilation errors when certain features enabled
- Fix missing labels in UI
- Improve color scheme
- Add new preheat menus
- Fix incorrect rendering of Marlin logo on boot
- Add Level X Axis and Auto calibrate buttons
Marcio T 4 年前
父节点
当前提交
d83ad6f321
没有帐户链接到提交者的电子邮件
共有 34 个文件被更改,包括 641 次插入474 次删除
  1. 1
    1
      Marlin/src/gcode/feature/powerloss/M1000.cpp
  2. 1
    1
      Marlin/src/gcode/temp/M303.cpp
  3. 11
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.cpp
  4. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp
  5. 8
    6
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/language/language_en.h
  6. 7
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/marlin_events.cpp
  7. 10
    5
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/pin_mappings.h
  8. 45
    33
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/about_screen.cpp
  9. 72
    82
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp
  10. 8
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_numeric_adjustment_screen.cpp
  11. 4
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_screen.cpp
  12. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp
  13. 7
    5
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp
  14. 6
    4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp
  15. 3
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp
  16. 8
    6
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/boot_screen.cpp
  17. 2
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/change_filament_screen.cpp
  18. 7
    3
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp
  19. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.cpp
  20. 91
    74
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp
  21. 83
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/preheat_menu.cpp
  22. 0
    3
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/preheat_timer_screen.cpp
  23. 1
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp
  24. 8
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h
  25. 107
    119
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp
  26. 128
    100
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/colors.h
  27. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h
  28. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h
  29. 2
    2
      Marlin/src/lcd/extui/ui_api.h
  30. 3
    3
      Marlin/src/lcd/extui_dgus_lcd.cpp
  31. 2
    2
      Marlin/src/lcd/extui_example.cpp
  32. 1
    1
      Marlin/src/lcd/extui_malyan_lcd.cpp
  33. 3
    0
      Marlin/src/lcd/language/language_en.h
  34. 5
    5
      Marlin/src/module/temperature.cpp

+ 1
- 1
Marlin/src/gcode/feature/powerloss/M1000.cpp 查看文件

@@ -63,7 +63,7 @@ void GcodeSuite::M1000() {
63 63
       #if HAS_LCD_MENU
64 64
         ui.goto_screen(menu_job_recovery);
65 65
       #elif ENABLED(EXTENSIBLE_UI)
66
-        ExtUI::OnPowerLossResume();
66
+        ExtUI::onPowerLossResume();
67 67
       #else
68 68
         SERIAL_ECHO_MSG("Resume requires LCD.");
69 69
       #endif

+ 1
- 1
Marlin/src/gcode/temp/M303.cpp 查看文件

@@ -73,7 +73,7 @@ void GcodeSuite::M303() {
73 73
   if (!WITHIN(e, SI, EI)) {
74 74
     SERIAL_ECHOLNPGM(STR_PID_BAD_EXTRUDER_NUM);
75 75
     #if ENABLED(EXTENSIBLE_UI)
76
-      ExtUI::OnPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM);
76
+      ExtUI::onPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM);
77 77
     #endif
78 78
     return;
79 79
   }

+ 11
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.cpp 查看文件

@@ -38,6 +38,11 @@ namespace FTDI {
38 38
     SET_OUTPUT(CLCD_SPI_CS);
39 39
     WRITE(CLCD_SPI_CS, 1);
40 40
 
41
+    #ifdef CLCD_SPI_EXTRA_CS
42
+      SET_OUTPUT(CLCD_SPI_EXTRA_CS);
43
+      WRITE(CLCD_SPI_EXTRA_CS, 1);
44
+    #endif
45
+
41 46
     #ifdef SPI_FLASH_SS
42 47
       SET_OUTPUT(SPI_FLASH_SS);
43 48
       WRITE(SPI_FLASH_SS, 1);
@@ -111,12 +116,18 @@ namespace FTDI {
111 116
       ::SPI.beginTransaction(spi_settings);
112 117
     #endif
113 118
     WRITE(CLCD_SPI_CS, 0);
119
+    #ifdef CLCD_SPI_EXTRA_CS
120
+      WRITE(CLCD_SPI_EXTRA_CS, 0);
121
+    #endif
114 122
     delayMicroseconds(1);
115 123
   }
116 124
 
117 125
   // CLCD SPI - Chip Deselect
118 126
   void SPI::spi_ftdi_deselect() {
119 127
     WRITE(CLCD_SPI_CS, 1);
128
+    #ifdef CLCD_SPI_EXTRA_CS
129
+      WRITE(CLCD_SPI_EXTRA_CS, 1);
130
+    #endif
120 131
     #ifndef CLCD_USE_SOFT_SPI
121 132
       ::SPI.endTransaction();
122 133
     #endif

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp 查看文件

@@ -191,7 +191,7 @@ namespace FTDI {
191 191
 
192 192
             #if ENABLED(TOUCH_UI_DEBUG)
193 193
               SERIAL_ECHO_START();
194
-              SERIAL_ECHOLNPAIR("Touch end: ", tag);
194
+              SERIAL_ECHOLNPAIR("Touch end: ", pressed_tag);
195 195
             #endif
196 196
 
197 197
             const uint8_t saved_pressed_tag = pressed_tag;

+ 8
- 6
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/language/language_en.h 查看文件

@@ -70,13 +70,15 @@ namespace Language_en {
70 70
   PROGMEM Language_Str MSG_PRINT_FINISHED           = u8"Print finished";
71 71
   PROGMEM Language_Str MSG_PRINT_ERROR              = u8"Print error";
72 72
   PROGMEM Language_Str MSG_ABOUT_TOUCH_PANEL_1      = u8"Color Touch Panel";
73
-  PROGMEM Language_Str MSG_ABOUT_TOUCH_PANEL_2      = u8"Portions " COPYRIGHT_SIGN " 2019 Aleph Objects, Inc.\n"
74
-                                                        "Portions " COPYRIGHT_SIGN " 2019 Cocoa Press";
75
-  PROGMEM Language_Str MSG_FIRMWARE_FOR_TOOLHEAD    = u8"Firmware for toolhead:\n%s\n\n";
73
+  PROGMEM Language_Str MSG_ABOUT_TOUCH_PANEL_2      = WEBSITE_URL;
74
+  PROGMEM Language_Str MSG_LICENSE                  = u8"This program is free software: you can redistribute it and/or modify it under the terms of "
75
+                                                        "the GNU General Public License as published by the Free Software Foundation, either version 3 "
76
+                                                        "of the License, or (at your option) any later version.\n\nTo view a copy of the GNU General "
77
+                                                        "Public License, go to the following location: http://www.gnu.org/licenses.";
76 78
   PROGMEM Language_Str MSG_RUNOUT_1                 = u8"Runout 1";
77 79
   PROGMEM Language_Str MSG_RUNOUT_2                 = u8"Runout 2";
78 80
   PROGMEM Language_Str MSG_DISPLAY_MENU             = u8"Display";
79
-  PROGMEM Language_Str MSG_INTERFACE_SETTINGS       = u8"Interface Settings";
81
+  PROGMEM Language_Str MSG_INTERFACE                = u8"Interface";
80 82
   PROGMEM Language_Str MSG_MEASURE_AUTOMATICALLY    = u8"Measure automatically";
81 83
   PROGMEM Language_Str MSG_H_OFFSET                 = u8"H Offset";
82 84
   PROGMEM Language_Str MSG_V_OFFSET                 = u8"V Offset";
@@ -129,7 +131,7 @@ namespace Language_en {
129 131
   PROGMEM Language_Str MSG_SOUND_VOLUME             = u8"Sound volume";
130 132
   PROGMEM Language_Str MSG_SCREEN_LOCK              = u8"Screen lock";
131 133
   PROGMEM Language_Str MSG_BOOT_SCREEN              = u8"Boot screen";
132
-  PROGMEM Language_Str MSG_INTERFACE_SOUNDS         = u8"Interface Sounds";
134
+  PROGMEM Language_Str MSG_SOUNDS                   = u8"Sounds";
133 135
   PROGMEM Language_Str MSG_CLICK_SOUNDS             = u8"Click sounds";
134 136
   PROGMEM Language_Str MSG_EEPROM_RESTORED          = u8"Settings restored from backup";
135 137
   PROGMEM Language_Str MSG_EEPROM_RESET             = u8"Settings restored to default";
@@ -144,12 +146,12 @@ namespace Language_en {
144 146
 
145 147
   PROGMEM Language_Str MSG_TOUCH_CALIBRATION_START  = u8"Release to begin screen calibration";
146 148
   PROGMEM Language_Str MSG_TOUCH_CALIBRATION_PROMPT = u8"Touch the dots to calibrate";
149
+  PROGMEM Language_Str MSG_AUTOLEVEL_X_AXIS         = u8"Level X Axis";
147 150
 
148 151
   #ifdef TOUCH_UI_LULZBOT_BIO
149 152
     PROGMEM Language_Str MSG_MOVE_TO_HOME           = u8"Move to Home";
150 153
     PROGMEM Language_Str MSG_RAISE_PLUNGER          = u8"Raise Plunger";
151 154
     PROGMEM Language_Str MSG_RELEASE_XY_AXIS        = u8"Release X and Y Axis";
152
-    PROGMEM Language_Str MSG_AUTOLEVEL_X_AXIS       = u8"Auto-level X Axis";
153 155
     PROGMEM Language_Str MSG_BED_TEMPERATURE        = u8"Bed Temperature";
154 156
     PROGMEM Language_Str MSG_HOME_XYZ_WARNING       = u8"About to move to home position. Ensure the top and the bed of the printer are clear.\n\nContinue?";
155 157
     PROGMEM Language_Str MSG_HOME_E_WARNING         = u8"About to re-home plunger and auto-level. Remove syringe prior to proceeding.\n\nContinue?";

+ 7
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/marlin_events.cpp 查看文件

@@ -131,8 +131,14 @@ namespace ExtUI {
131 131
     }
132 132
   #endif
133 133
 
134
+  #if ENABLED(POWER_LOSS_RECOVERY)
135
+    void onPowerLossResume() {
136
+      // Called on resume from power-loss
137
+    }
138
+  #endif
139
+
134 140
   #if HAS_PID_HEATING
135
-    void OnPidTuning(const result_t rst) {
141
+    void onPidTuning(const result_t rst) {
136 142
       // Called for temperature PID tuning result
137 143
       SERIAL_ECHOLNPAIR("OnPidTuning:", rst);
138 144
       switch (rst) {

+ 10
- 5
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/pin_mappings.h 查看文件

@@ -129,12 +129,13 @@
129 129
  *      9         GND     GND     GND     -->  GND
130 130
  *     10         5V      5V      5V      -->  KILL [3]
131 131
  *
132
- * [1] This configuration is not compatible with the
133
- *     EinsyRetro 1.1a because there is a level shifter
134
- *     on MISO enabled by SD/USB chip select.
132
+ * [1] This configuration allows daisy-chaining of the
133
+ *     display and SD/USB on EXP2, except for [2]
135 134
  *
136
- * [2] This configuration allows daisy-chaining of the
137
- *     display and SD/USB on EXP2.
135
+ * [2] The Ultimachine Einsy boards have a level shifter
136
+ *     on MISO enabled by SD_CSEL chip select, hence it
137
+ *     is not possible to run both the display and the
138
+ *     SD/USB on EXP2.
138 139
  *
139 140
  * [3] Archim Rambo provides 5V on this pin. On any other
140 141
  *     board, divert this wire from the ribbon cable and
@@ -148,4 +149,8 @@
148 149
 
149 150
   #define CLCD_SPI_CS                    BTN_EN1
150 151
   #define CLCD_MOD_RESET                 BTN_EN2
152
+  
153
+  #if MB(EINSY_RAMBO, EINSY_RETRO) && DISABLED(SDSUPPORT)
154
+    #define CLCD_SPI_EXTRA_CS            SDSS
155
+  #endif
151 156
 #endif

+ 45
- 33
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/about_screen.cpp 查看文件

@@ -27,7 +27,7 @@
27 27
 #include "screens.h"
28 28
 
29 29
 #define GRID_COLS 4
30
-#define GRID_ROWS 9
30
+#define GRID_ROWS 7
31 31
 
32 32
 using namespace FTDI;
33 33
 using namespace Theme;
@@ -45,50 +45,62 @@ void AboutScreen::onRedraw(draw_mode_t) {
45 45
      .cmd(COLOR_RGB(bg_text_enabled))
46 46
      .tag(0);
47 47
 
48
-  draw_text_box(cmd, BTN_POS(1,2), BTN_SIZE(4,1),
49
-    #ifdef CUSTOM_MACHINE_NAME
50
-      F(CUSTOM_MACHINE_NAME)
51
-    #else
52
-      GET_TEXT_F(MSG_ABOUT_TOUCH_PANEL_1)
53
-    #endif
54
-    , OPT_CENTER, font_xlarge
55
-  );
48
+  #define HEADING_POS BTN_POS(1,2), BTN_SIZE(4,1)
49
+  #define FW_VERS_POS BTN_POS(1,3), BTN_SIZE(4,1)
50
+  #define FW_INFO_POS BTN_POS(1,4), BTN_SIZE(4,1)
51
+  #define LICENSE_POS BTN_POS(1,5), BTN_SIZE(4,2)
52
+  #define STATS_POS   BTN_POS(1,7), BTN_SIZE(2,1)
53
+  #define BACK_POS    BTN_POS(3,7), BTN_SIZE(2,1)
56 54
 
57
-  #ifdef TOOLHEAD_NAME
58
-    char about_str[
59
-      strlen_P(GET_TEXT(FIRMWARE_FOR_TOOLHEAD)) +
60
-      strlen_P(TOOLHEAD_NAME) +
61
-      strlen_P(GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2)) + 1
62
-    ];
55
+  #define _INSET_POS(x,y,w,h) x + w/10, y, w - w/5, h
56
+  #define INSET_POS(pos) _INSET_POS(pos)
63 57
 
64
-    sprintf_P(about_str, GET_TEXT(MSG_FIRMWARE_FOR_TOOLHEAD), TOOLHEAD_NAME);
65
-    strcat_P (about_str, GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2));
58
+  char about_str[
59
+    strlen_P(GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2)) +
60
+    strlen_P(TOOLHEAD_NAME) + 1
61
+  ];
62
+  #ifdef TOOLHEAD_NAME
63
+    // If MSG_ABOUT_TOUCH_PANEL_2 has %s, substitute in the toolhead name.
64
+    // But this is optional, so squelch the compiler warning here.
65
+    #pragma GCC diagnostic push
66
+    #pragma GCC diagnostic ignored "-Wformat-extra-args"
67
+    sprintf_P(about_str, GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2), TOOLHEAD_NAME);
68
+    #pragma GCC diagnostic pop
69
+  #else
70
+    strcpy_P(about_str, GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2));
66 71
   #endif
67 72
 
68
-  cmd.tag(2);
69
-  draw_text_box(cmd, BTN_POS(1,3), BTN_SIZE(4,3),
70
-    #ifdef TOOLHEAD_NAME
71
-      about_str
73
+  draw_text_box(cmd, HEADING_POS,
74
+    #ifdef CUSTOM_MACHINE_NAME
75
+      F(CUSTOM_MACHINE_NAME)
72 76
     #else
73
-      GET_TEXT_F(MSG_ABOUT_TOUCH_PANEL_2)
77
+      GET_TEXT_F(MSG_ABOUT_TOUCH_PANEL_1)
74 78
     #endif
75
-    , OPT_CENTER, font_medium
79
+    , OPT_CENTER, font_xlarge
76 80
   );
77
-
78
-  cmd.tag(0);
79
-  draw_text_box(cmd, BTN_POS(1,6), BTN_SIZE(4,2), progmem_str(getFirmwareName_str()), OPT_CENTER, font_medium);
80
-
81
-  cmd.font(font_medium).colors(action_btn).tag(1).button(BTN_POS(2,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_OKAY));
81
+  draw_text_box(cmd, FW_VERS_POS, progmem_str(getFirmwareName_str()), OPT_CENTER, font_medium);
82
+  draw_text_box(cmd, FW_INFO_POS, about_str, OPT_CENTER, font_medium);
83
+  draw_text_box(cmd, INSET_POS(LICENSE_POS), GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny);
84
+
85
+  cmd.font(font_medium)
86
+     .colors(normal_btn)
87
+     .tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU))
88
+     .colors(action_btn)
89
+     .tag(1).button(BACK_POS,  GET_TEXT_F(MSG_BACK));
82 90
 }
83 91
 
84 92
 bool AboutScreen::onTouchEnd(uint8_t tag) {
85 93
   switch (tag) {
86
-    case 1: GOTO_PREVIOUS();            return true;
87
-#if ENABLED(TOUCH_UI_DEVELOPER_MENU)
88
-    case 2: GOTO_SCREEN(DeveloperMenu); return true;
89
-#endif
90
-    default:                            return false;
94
+    case 1: GOTO_PREVIOUS(); break;
95
+    #if ENABLED(PRINTCOUNTER)
96
+      case 2: GOTO_SCREEN(StatisticsScreen); break;
97
+    #endif
98
+    #if ENABLED(TOUCH_UI_DEVELOPER_MENU)
99
+      case 3: GOTO_SCREEN(DeveloperMenu); break;
100
+    #endif
101
+    default: return false;
91 102
   }
103
+  return true;
92 104
 }
93 105
 
94 106
 #endif // TOUCH_UI_FTDI_EVE

+ 72
- 82
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp 查看文件

@@ -37,127 +37,116 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
37 37
        .cmd(CLEAR(true,true,true));
38 38
   }
39 39
 
40
+    #ifdef TOUCH_UI_PORTRAIT
41
+      #if HAS_CASE_LIGHT || ENABLED(SENSORLESS_HOMING)
42
+        #define GRID_ROWS 9
43
+      #else
44
+        #define GRID_ROWS 8
45
+      #endif
46
+      #define GRID_COLS 2
47
+      #define RESTORE_DEFAULTS_POS    BTN_POS(1,1), BTN_SIZE(2,1)
48
+      #define DISPLAY_POS             BTN_POS(1,2), BTN_SIZE(1,1)
49
+      #define INTERFACE_POS           BTN_POS(2,2), BTN_SIZE(1,1)
50
+      #define ZPROBE_ZOFFSET_POS      BTN_POS(1,3), BTN_SIZE(1,1)
51
+      #define STEPS_PER_MM_POS        BTN_POS(2,3), BTN_SIZE(1,1)
52
+      #define FILAMENT_POS            BTN_POS(1,4), BTN_SIZE(1,1)
53
+      #define VELOCITY_POS            BTN_POS(2,4), BTN_SIZE(1,1)
54
+      #define TMC_CURRENT_POS         BTN_POS(1,5), BTN_SIZE(1,1)
55
+      #define ACCELERATION_POS        BTN_POS(2,5), BTN_SIZE(1,1)
56
+      #define ENDSTOPS_POS            BTN_POS(1,6), BTN_SIZE(1,1)
57
+      #define JERK_POS                BTN_POS(2,6), BTN_SIZE(1,1)
58
+      #define OFFSETS_POS             BTN_POS(1,7), BTN_SIZE(1,1)
59
+      #define BACKLASH_POS            BTN_POS(2,7), BTN_SIZE(1,1)
60
+      #define CASE_LIGHT_POS          BTN_POS(1,8), BTN_SIZE(1,1)
61
+      #define TMC_HOMING_THRS_POS     BTN_POS(2,8), BTN_SIZE(1,1)
62
+      #if HAS_CASE_LIGHT || ENABLED(SENSORLESS_HOMING)
63
+        #define BACK_POS              BTN_POS(1,9), BTN_SIZE(2,1)
64
+      #else
65
+        #define BACK_POS              BTN_POS(1,8), BTN_SIZE(2,1)
66
+      #endif
67
+    #else
68
+      #define GRID_ROWS 6
69
+      #define GRID_COLS 3
70
+      #define ZPROBE_ZOFFSET_POS      BTN_POS(1,1), BTN_SIZE(1,1)
71
+      #define CASE_LIGHT_POS          BTN_POS(1,4), BTN_SIZE(1,1)
72
+      #define STEPS_PER_MM_POS        BTN_POS(2,1), BTN_SIZE(1,1)
73
+      #define TMC_CURRENT_POS         BTN_POS(3,1), BTN_SIZE(1,1)
74
+      #define TMC_HOMING_THRS_POS     BTN_POS(3,2), BTN_SIZE(1,1)
75
+      #define BACKLASH_POS            BTN_POS(3,3), BTN_SIZE(1,1)
76
+      #define FILAMENT_POS            BTN_POS(1,3), BTN_SIZE(1,1)
77
+      #define ENDSTOPS_POS            BTN_POS(3,4), BTN_SIZE(1,1)
78
+      #define DISPLAY_POS             BTN_POS(3,5), BTN_SIZE(1,1)
79
+      #define INTERFACE_POS           BTN_POS(1,5), BTN_SIZE(2,1)
80
+      #define RESTORE_DEFAULTS_POS    BTN_POS(1,6), BTN_SIZE(2,1)
81
+      #define VELOCITY_POS            BTN_POS(2,2), BTN_SIZE(1,1)
82
+      #define ACCELERATION_POS        BTN_POS(2,3), BTN_SIZE(1,1)
83
+      #define JERK_POS                BTN_POS(2,4), BTN_SIZE(1,1)
84
+      #define OFFSETS_POS             BTN_POS(1,2), BTN_SIZE(1,1)
85
+      #define BACK_POS                BTN_POS(3,6), BTN_SIZE(1,1)
86
+    #endif
87
+
40 88
   if (what & FOREGROUND) {
41 89
     CommandProcessor cmd;
42 90
     cmd.colors(normal_btn)
43 91
        .font(Theme::font_medium)
44
-    #ifdef TOUCH_UI_PORTRAIT
45
-      #define GRID_ROWS 10
46
-      #define GRID_COLS 2
47 92
       .enabled(
48 93
         #if HAS_BED_PROBE
49 94
           1
50 95
         #endif
51 96
       )
52
-      .tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_ZPROBE_ZOFFSET))
97
+      .tag(2) .button( ZPROBE_ZOFFSET_POS,     GET_TEXT_F(MSG_ZPROBE_ZOFFSET))
53 98
       .enabled(
54 99
         #if HAS_CASE_LIGHT
55 100
           1
56 101
         #endif
57 102
       )
58
-      .tag(16).button( BTN_POS(1,6),  BTN_SIZE(1,1), GET_TEXT_F(MSG_CASE_LIGHT))
59
-      .tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM))
103
+      .tag(16).button( CASE_LIGHT_POS,         GET_TEXT_F(MSG_CASE_LIGHT))
104
+      .tag(3) .button( STEPS_PER_MM_POS,       GET_TEXT_F(MSG_STEPS_PER_MM))
60 105
       .enabled(
61 106
         #if HAS_TRINAMIC_CONFIG
62 107
           1
63 108
         #endif
64 109
       )
65
-      .tag(13).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT))
110
+      .tag(13).button( TMC_CURRENT_POS,        GET_TEXT_F(MSG_TMC_CURRENT))
66 111
       .enabled(
67
-        #if HAS_TRINAMIC_CONFIG
112
+        #if ENABLED(SENSORLESS_HOMING)
68 113
           1
69 114
         #endif
70 115
       )
71
-      .tag(14).button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_TMC_HOMING_THRS))
116
+      .tag(14).button( TMC_HOMING_THRS_POS,    GET_TEXT_F(MSG_TMC_HOMING_THRS))
72 117
       .enabled(
73 118
         #if HOTENDS > 1
74 119
           1
75 120
         #endif
76 121
       )
77
-      .tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_OFFSETS_MENU))
122
+      .tag(4) .button( OFFSETS_POS,            GET_TEXT_F(MSG_OFFSETS_MENU))
78 123
       .enabled(
79 124
         #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
80 125
           1
81 126
         #endif
82 127
       )
83
-      .tag(11).button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_FILAMENT))
84
-      .tag(12).button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_LCD_ENDSTOPS))
85
-      .tag(15).button( BTN_POS(2,6), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISPLAY_MENU))
86
-      .tag(9) .button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE_SETTINGS))
87
-      .tag(10).button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_DEFAULTS))
88
-      .tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_VELOCITY))
89
-      .tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_ACCELERATION))
90
-      #if DISABLED(CLASSIC_JERK)
91
-      .tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_JUNCTION_DEVIATION))
92
-      #else
93
-      .tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_JERK))
94
-      #endif
95
-      .enabled(
96
-        #if ENABLED(BACKLASH_GCODE)
97
-          1
98
-        #endif
99
-      )
100
-      .tag(8).button( BTN_POS(2,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_BACKLASH))
101
-      .colors(action_btn)
102
-      .tag(1) .button( BTN_POS(1,10), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
103
-      #undef GRID_COLS
104
-      #undef GRID_ROWS
105
-    #else
106
-      #define GRID_ROWS 6
107
-      #define GRID_COLS 3
108
-      .enabled(
109
-        #if HAS_BED_PROBE
110
-          1
111
-        #endif
112
-      )
113
-      .tag(2) .button( BTN_POS(1,1),  BTN_SIZE(1,1), GET_TEXT_F(MSG_ZPROBE_ZOFFSET))
114
-      .enabled(
115
-        #if HAS_CASE_LIGHT
116
-          1
117
-        #endif
118
-      )
119
-      .tag(16).button( BTN_POS(1,4),  BTN_SIZE(1,1), GET_TEXT_F(MSG_CASE_LIGHT))
120
-      .enabled(1)
121
-      .tag(3) .button( BTN_POS(2,1),  BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM))
122
-      .enabled(
123
-        #if HAS_TRINAMIC_CONFIG
124
-          1
125
-        #endif
126
-      )
127
-      .tag(13).button( BTN_POS(3,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT))
128
-      .enabled(
129
-        #if HAS_TRINAMIC_CONFIG
130
-          1
128
+      .tag(11).button( FILAMENT_POS,           GET_TEXT_F(MSG_FILAMENT))
129
+      .tag(12).button( ENDSTOPS_POS,           GET_TEXT_F(MSG_LCD_ENDSTOPS))
130
+      .tag(15).button( DISPLAY_POS,            GET_TEXT_F(MSG_DISPLAY_MENU))
131
+      .tag(9) .button( INTERFACE_POS,          GET_TEXT_F(MSG_INTERFACE))
132
+      .tag(10).button( RESTORE_DEFAULTS_POS,   GET_TEXT_F(MSG_RESTORE_DEFAULTS))
133
+      .tag(5) .button( VELOCITY_POS,           GET_TEXT_F(MSG_VELOCITY))
134
+      .tag(6) .button( ACCELERATION_POS,       GET_TEXT_F(MSG_ACCELERATION))
135
+      .tag(7) .button( JERK_POS,               GET_TEXT_F(
136
+        #if DISABLED(CLASSIC_JERK)
137
+          MSG_JUNCTION_DEVIATION
138
+        #else
139
+          JERK_POS
131 140
         #endif
132
-      )
133
-      .tag(14).button( BTN_POS(3,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_HOMING_THRS))
141
+       ))
134 142
       .enabled(
135 143
         #if ENABLED(BACKLASH_GCODE)
136 144
           1
137 145
         #endif
138 146
       )
139
-      .tag(8).button( BTN_POS(3,3),  BTN_SIZE(1,1), GET_TEXT_F(MSG_BACKLASH))
140
-      .enabled(
141
-        #if HOTENDS > 1
142
-          1
143
-        #endif
144
-      )
145
-      .tag(4) .button( BTN_POS(1,2),  BTN_SIZE(1,1), GET_TEXT_F(MSG_OFFSETS_MENU))
146
-      .tag(12).button( BTN_POS(3,4),  BTN_SIZE(1,1), GET_TEXT_F(MSG_LCD_ENDSTOPS))
147
-      .tag(5) .button( BTN_POS(2,2),  BTN_SIZE(1,1), GET_TEXT_F(MSG_VELOCITY))
148
-      .tag(6) .button( BTN_POS(2,3),  BTN_SIZE(1,1), GET_TEXT_F(MSG_ACCELERATION))
149
-      #if DISABLED(CLASSIC_JERK)
150
-      .tag(7) .button( BTN_POS(2,4),  BTN_SIZE(1,1), GET_TEXT_F(MSG_JUNCTION_DEVIATION))
151
-      #else
152
-      .tag(7) .button( BTN_POS(2,4),  BTN_SIZE(1,1), GET_TEXT_F(MSG_JERK))
153
-      #endif
154
-      .tag(11).button( BTN_POS(1,3),  BTN_SIZE(1,1), GET_TEXT_F(MSG_FILAMENT))
155
-      .tag(15).button( BTN_POS(3,5),  BTN_SIZE(1,1), GET_TEXT_F(MSG_DISPLAY_MENU))
156
-      .tag(9) .button( BTN_POS(1,5),  BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE_SETTINGS))
157
-      .tag(10).button( BTN_POS(1,6),  BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_DEFAULTS))
147
+      .tag(8).button( BACKLASH_POS,            GET_TEXT_F(MSG_BACKLASH))
158 148
       .colors(action_btn)
159
-      .tag(1) .button( BTN_POS(3,6),  BTN_SIZE(1,1), GET_TEXT_F(MSG_BACK));
160
-    #endif
149
+      .tag(1).button( BACK_POS,                GET_TEXT_F(MSG_BACK));
161 150
   }
162 151
 }
163 152
 
@@ -191,6 +180,8 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
191 180
     case 12: GOTO_SCREEN(EndstopStatesScreen); break;
192 181
     #if HAS_TRINAMIC_CONFIG
193 182
     case 13: GOTO_SCREEN(StepperCurrentScreen); break;
183
+    #endif
184
+    #if ENABLED(SENSORLESS_HOMING)
194 185
     case 14: GOTO_SCREEN(StepperBumpSensitivityScreen); break;
195 186
     #endif
196 187
     case 15: GOTO_SCREEN(DisplayTuningScreen); break;
@@ -201,5 +192,4 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
201 192
   }
202 193
   return true;
203 194
 }
204
-
205 195
 #endif // TOUCH_UI_FTDI_EVE

+ 8
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_numeric_adjustment_screen.cpp 查看文件

@@ -345,10 +345,14 @@ void BaseNumericAdjustmentScreen::widgets_t::home_buttons(uint8_t tag) {
345 345
   }
346 346
 
347 347
   cmd.font(LAYOUT_FONT);
348
- _button(cmd, tag+0, BTN_POS(5,_line),  BTN_SIZE(2,1), GET_TEXT_F(MSG_AXIS_X));
349
- _button(cmd, tag+1, BTN_POS(7,_line),  BTN_SIZE(2,1), GET_TEXT_F(MSG_AXIS_Y));
350
- _button(cmd, tag+2, BTN_POS(9,_line),  BTN_SIZE(2,1), GET_TEXT_F(MSG_AXIS_Z));
351
- _button(cmd, tag+3, BTN_POS(11,_line), BTN_SIZE(3,1), GET_TEXT_F(MSG_AXIS_ALL));
348
+ _button(cmd, tag+0, BTN_POS(5,_line),    BTN_SIZE(2,1), GET_TEXT_F(MSG_AXIS_X));
349
+ _button(cmd, tag+1, BTN_POS(7,_line),    BTN_SIZE(2,1), GET_TEXT_F(MSG_AXIS_Y));
350
+ #if DISABLED(Z_SAFE_HOMING)
351
+   _button(cmd, tag+2, BTN_POS(9,_line),  BTN_SIZE(2,1), GET_TEXT_F(MSG_AXIS_Z));
352
+   _button(cmd, tag+3, BTN_POS(11,_line), BTN_SIZE(3,1), GET_TEXT_F(MSG_AXIS_ALL));
353
+ #else
354
+   _button(cmd, tag+3, BTN_POS(9,_line),  BTN_SIZE(3,1), GET_TEXT_F(MSG_AXIS_ALL));
355
+ #endif
352 356
 
353 357
   _line++;
354 358
 }

+ 4
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_screen.cpp 查看文件

@@ -46,7 +46,7 @@ bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t
46 46
     return false;
47 47
   }
48 48
 
49
-  #ifdef LCD_TIMEOUT_TO_STATUS
49
+  #if LCD_TIMEOUT_TO_STATUS
50 50
     if (EventLoop::get_pressed_tag() != 0) {
51 51
       reset_menu_timeout();
52 52
     }
@@ -66,7 +66,7 @@ bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t
66 66
 }
67 67
 
68 68
 void BaseScreen::onIdle() {
69
-  #ifdef LCD_TIMEOUT_TO_STATUS
69
+  #if LCD_TIMEOUT_TO_STATUS
70 70
     if ((millis() - last_interaction) > LCD_TIMEOUT_TO_STATUS) {
71 71
       reset_menu_timeout();
72 72
       #if ENABLED(TOUCH_UI_DEBUG)
@@ -78,12 +78,12 @@ void BaseScreen::onIdle() {
78 78
 }
79 79
 
80 80
 void BaseScreen::reset_menu_timeout() {
81
-  #ifdef LCD_TIMEOUT_TO_STATUS
81
+  #if LCD_TIMEOUT_TO_STATUS
82 82
     last_interaction = millis();
83 83
   #endif
84 84
 }
85 85
 
86
-#ifdef LCD_TIMEOUT_TO_STATUS
86
+#if LCD_TIMEOUT_TO_STATUS
87 87
   uint32_t BaseScreen::last_interaction;
88 88
 #endif
89 89
 

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp 查看文件

@@ -85,7 +85,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
85 85
         #endif
86 86
       )
87 87
       .tag(12) .button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_LINEAR_ADVANCE))
88
-      .tag(13) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE_SETTINGS))
88
+      .tag(13) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE))
89 89
       .tag(14) .button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_DEFAULTS))
90 90
       .colors(action_btn)
91 91
       .tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));

+ 7
- 5
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp 查看文件

@@ -36,11 +36,13 @@ void BioConfirmHomeE::onRedraw(draw_mode_t) {
36 36
 bool BioConfirmHomeE::onTouchEnd(uint8_t tag) {
37 37
   switch (tag) {
38 38
     case 1:
39
-      SpinnerDialogBox::enqueueAndWait_P(F(
40
-        "G28 E\n"
41
-        AXIS_LEVELING_COMMANDS "\n"
42
-        PARK_AND_RELEASE_COMMANDS
43
-      ));
39
+      #if defined(AXIS_LEVELING_COMMANDS) && defined(PARK_AND_RELEASE_COMMANDS)
40
+        SpinnerDialogBox::enqueueAndWait_P(F(
41
+          "G28 E\n"
42
+          AXIS_LEVELING_COMMANDS "\n"
43
+          PARK_AND_RELEASE_COMMANDS
44
+        ));
45
+      #endif
44 46
       current_screen.forget();
45 47
       break;
46 48
     case 2:

+ 6
- 4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp 查看文件

@@ -36,10 +36,12 @@ void BioConfirmHomeXYZ::onRedraw(draw_mode_t) {
36 36
 bool BioConfirmHomeXYZ::onTouchEnd(uint8_t tag) {
37 37
   switch (tag) {
38 38
     case 1:
39
-      SpinnerDialogBox::enqueueAndWait_P(F(
40
-       "G28\n"
41
-       PARK_AND_RELEASE_COMMANDS
42
-      ));
39
+      #ifdef PARK_AND_RELEASE_COMMANDS
40
+        SpinnerDialogBox::enqueueAndWait_P(F(
41
+         "G28\n"
42
+         PARK_AND_RELEASE_COMMANDS
43
+        ));
44
+      #endif
43 45
       current_screen.forget();
44 46
       break;
45 47
     case 2:

+ 3
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp 查看文件

@@ -51,7 +51,7 @@ void MainMenu::onRedraw(draw_mode_t what) {
51 51
        .tag(4).button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_RELEASE_XY_AXIS))
52 52
        .tag(5).button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_AUTOLEVEL_X_AXIS))
53 53
        .tag(6).button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_BED_TEMPERATURE))
54
-       .tag(7).button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE_SETTINGS))
54
+       .tag(7).button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE))
55 55
        .tag(8).button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_ADVANCED_SETTINGS))
56 56
        .tag(9).button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_MENU))
57 57
        .colors(action_btn)
@@ -72,7 +72,9 @@ bool MainMenu::onTouchEnd(uint8_t tag) {
72 72
     case 2: GOTO_SCREEN(BioConfirmHomeXYZ);                                              break;
73 73
     case 3: SpinnerDialogBox::enqueueAndWait_P(e_homed ? F("G0 E0 F120") : F("G112"));   break;
74 74
     case 4: StatusScreen::unlockMotors();                                                break;
75
+    #ifdef AXIS_LEVELING_COMMANDS
75 76
     case 5: SpinnerDialogBox::enqueueAndWait_P(F(AXIS_LEVELING_COMMANDS));               break;
77
+    #endif
76 78
     case 6: GOTO_SCREEN(TemperatureScreen);                                              break;
77 79
     case 7: GOTO_SCREEN(InterfaceSettingsScreen);                                        break;
78 80
     case 8: GOTO_SCREEN(AdvancedSettingsMenu);                                           break;

+ 8
- 6
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/boot_screen.cpp 查看文件

@@ -80,12 +80,14 @@ void BootScreen::onIdle() {
80 80
       SpinnerDialogBox::hide();
81 81
     }
82 82
 
83
-    if (UIData::animations_enabled()) {
84
-      // If there is a startup video in the flash SPI, play
85
-      // that, otherwise show a static splash screen.
86
-      if (!MediaPlayerScreen::playBootMedia())
87
-        showSplashScreen();
88
-    }
83
+    #if DISABLED(TOUCH_UI_NO_BOOTSCREEN)
84
+      if (UIData::animations_enabled()) {
85
+        // If there is a startup video in the flash SPI, play
86
+        // that, otherwise show a static splash screen.
87
+        if (!MediaPlayerScreen::playBootMedia())
88
+          showSplashScreen();
89
+      }
90
+    #endif
89 91
 
90 92
     StatusScreen::loadBitmaps();
91 93
 

+ 2
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/change_filament_screen.cpp 查看文件

@@ -111,6 +111,7 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
111 111
   if (what & BACKGROUND) {
112 112
     cmd.cmd(CLEAR_COLOR_RGB(bg_color))
113 113
        .cmd(CLEAR(true,true,true))
114
+       .cmd(COLOR_RGB(bg_text_enabled))
114 115
        .tag(0)
115 116
     #ifdef TOUCH_UI_PORTRAIT
116 117
        .font(font_large)
@@ -119,7 +120,7 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
119 120
     #endif
120 121
        .text(BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXT_F(MSG_EXTRUDER_SELECTION))
121 122
     #ifdef TOUCH_UI_PORTRAIT
122
-       .text(BTN_POS(1,7), BTN_SIZE(1,1), F(""))
123
+       .text(BTN_POS(1,7), BTN_SIZE(1,1), GET_TEXT_F(MSG_CURRENT_TEMPERATURE))
123 124
     #else
124 125
        .text(BTN_POS(3,1), BTN_SIZE(2,1), GET_TEXT_F(MSG_CURRENT_TEMPERATURE))
125 126
        .font(font_small)

+ 7
- 3
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp 查看文件

@@ -69,7 +69,7 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
69 69
        .cmd(COLOR_RGB(bg_text_enabled))
70 70
        .tag(0)
71 71
        .font(font_medium)
72
-       .text(BTN_POS(1,1), BTN_SIZE(4,1), GET_TEXT_F(MSG_INTERFACE_SETTINGS))
72
+       .text(BTN_POS(1,1), BTN_SIZE(4,1), GET_TEXT_F(MSG_INTERFACE))
73 73
     #undef EDGE_R
74 74
     #define EDGE_R 30
75 75
        .font(font_small)
@@ -77,7 +77,9 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
77 77
        .text(BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_LCD_BRIGHTNESS), OPT_RIGHTX | OPT_CENTERY)
78 78
        .text(BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUND_VOLUME),   OPT_RIGHTX | OPT_CENTERY)
79 79
        .text(BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_SCREEN_LOCK),    OPT_RIGHTX | OPT_CENTERY);
80
+    #if DISABLED(TOUCH_UI_NO_BOOTSCREEN)
80 81
     cmd.text(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BOOT_SCREEN),    OPT_RIGHTX | OPT_CENTERY);
82
+    #endif
81 83
     #undef EDGE_R
82 84
   }
83 85
 
@@ -95,16 +97,18 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
95 97
        .tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.volume,     0xFF)
96 98
        .colors(ui_toggle)
97 99
        .tag(4).toggle2(BTN_POS(3,4), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), LockScreen::is_enabled())
100
+    #if DISABLED(TOUCH_UI_NO_BOOTSCREEN)
98 101
        .tag(5).toggle2(BTN_POS(3,5), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), UIData::animations_enabled())
102
+    #endif
99 103
     #undef EDGE_R
100 104
     #define EDGE_R 0
101 105
     #ifdef TOUCH_UI_PORTRAIT
102 106
        .colors(normal_btn)
103
-       .tag(6).button (BTN_POS(1,6), BTN_SIZE(4,1), GET_TEXT_F(MSG_INTERFACE_SOUNDS))
107
+       .tag(6).button (BTN_POS(1,6), BTN_SIZE(4,1), GET_TEXT_F(MSG_SOUNDS))
104 108
        .colors(action_btn)
105 109
        .tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BACK));
106 110
     #else
107
-       .tag(6).button (BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE_SOUNDS))
111
+       .tag(6).button (BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUNDS))
108 112
        .colors(action_btn)
109 113
        .tag(1).button (BTN_POS(3,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
110 114
     #endif

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.cpp 查看文件

@@ -71,7 +71,7 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) {
71 71
     #define GRID_ROWS 9
72 72
 
73 73
        .font(font_medium)
74
-       .text(BTN_POS(1,1), BTN_SIZE(4,1), GET_TEXT_F(MSG_INTERFACE_SOUNDS))
74
+       .text(BTN_POS(1,1), BTN_SIZE(4,1), GET_TEXT_F(MSG_SOUNDS))
75 75
     #undef EDGE_R
76 76
     #define EDGE_R 30
77 77
        .font(font_small)

+ 91
- 74
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp 查看文件

@@ -37,81 +37,89 @@ void MainMenu::onRedraw(draw_mode_t what) {
37 37
        .cmd(CLEAR(true,true,true));
38 38
   }
39 39
 
40
+  #ifdef TOUCH_UI_PORTRAIT
41
+    #define GRID_ROWS 8
42
+    #define GRID_COLS 2
43
+    #define ABOUT_PRINTER_POS     BTN_POS(1,1), BTN_SIZE(2,1)
44
+    #define ADVANCED_SETTINGS_POS BTN_POS(1,2), BTN_SIZE(2,1)
45
+    #define FILAMENTCHANGE_POS    BTN_POS(1,3), BTN_SIZE(2,1)
46
+    #define TEMPERATURE_POS       BTN_POS(1,4), BTN_SIZE(2,1)
47
+    #define MOVE_AXIS_POS         BTN_POS(1,5), BTN_SIZE(1,1)
48
+    #define DISABLE_STEPPERS_POS  BTN_POS(2,5), BTN_SIZE(1,1)
49
+    #define AUTO_HOME_POS         BTN_POS(1,6), BTN_SIZE(1,1)
50
+    #define CLEAN_NOZZLE_POS      BTN_POS(2,6), BTN_SIZE(1,1)
51
+    #define LEVEL_BED_POS         BTN_POS(1,7), BTN_SIZE(1,1)
52
+    #define LEVEL_AXIS_POS        BTN_POS(2,7), BTN_SIZE(1,1)
53
+    #define BACK_POS              BTN_POS(1,8), BTN_SIZE(2,1)
54
+  #else
55
+    #define GRID_ROWS 6
56
+    #define GRID_COLS 2
57
+    #define ADVANCED_SETTINGS_POS BTN_POS(1,1), BTN_SIZE(1,1)
58
+    #define ABOUT_PRINTER_POS     BTN_POS(2,1), BTN_SIZE(1,1)
59
+    #define AUTO_HOME_POS         BTN_POS(1,2), BTN_SIZE(1,1)
60
+    #define CLEAN_NOZZLE_POS      BTN_POS(2,2), BTN_SIZE(1,1)
61
+    #define MOVE_AXIS_POS         BTN_POS(1,3), BTN_SIZE(1,1)
62
+    #define DISABLE_STEPPERS_POS  BTN_POS(2,3), BTN_SIZE(1,1)
63
+    #define TEMPERATURE_POS       BTN_POS(1,4), BTN_SIZE(1,1)
64
+    #define FILAMENTCHANGE_POS    BTN_POS(2,4), BTN_SIZE(1,1)
65
+    #define LEVEL_BED_POS         BTN_POS(1,5), BTN_SIZE(1,1)
66
+    #define LEVEL_AXIS_POS        BTN_POS(2,5), BTN_SIZE(1,1)
67
+    #define BACK_POS              BTN_POS(1,6), BTN_SIZE(2,1)
68
+  #endif
69
+
40 70
   if (what & FOREGROUND) {
41 71
     CommandProcessor cmd;
42 72
     cmd.colors(normal_btn)
43 73
        .font(Theme::font_medium)
44
-    #ifdef TOUCH_UI_PORTRAIT
45
-      #define GRID_ROWS 8
46
-      #define GRID_COLS 2
47
-        .tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_AUTO_HOME))
48
-        .enabled(
49
-          #if ENABLED(NOZZLE_CLEAN_FEATURE)
50
-            1
51
-          #endif
52
-        )
53
-        .tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_CLEAN_NOZZLE))
54
-        .tag(4).button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_MOVE_AXIS))
55
-        .tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISABLE_STEPPERS))
56
-        .tag(6).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_TEMPERATURE))
57
-        .enabled(
58
-          #if NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
59
-            1
60
-          #endif
74
+       .tag(2).button( AUTO_HOME_POS, GET_TEXT_F(MSG_AUTO_HOME))
75
+       .enabled(
76
+           #if ANY(NOZZLE_CLEAN_FEATURE, TOUCH_UI_COCOA_PRESS)
77
+             1
78
+           #endif
79
+         )
80
+       .tag(3).button( CLEAN_NOZZLE_POS, GET_TEXT_F(
81
+         #if ENABLED(TOUCH_UI_COCOA_PRESS)
82
+            MSG_PREHEAT_1
83
+         #else
84
+            MSG_CLEAN_NOZZLE
85
+         #endif
86
+       ))
87
+       .tag(4).button( MOVE_AXIS_POS,        GET_TEXT_F(MSG_MOVE_AXIS))
88
+       .tag(5).button( DISABLE_STEPPERS_POS, GET_TEXT_F(MSG_DISABLE_STEPPERS))
89
+       .tag(6).button( TEMPERATURE_POS,      GET_TEXT_F(MSG_TEMPERATURE))
90
+       .enabled(
91
+           #if DISABLED(TOUCH_UI_LULZBOT_BIO)
92
+             1
93
+           #endif
94
+         )
95
+       .tag(7).button( FILAMENTCHANGE_POS, GET_TEXT_F(
96
+         #if ENABLED(TOUCH_UI_COCOA_PRESS)
97
+             MSG_CASE_LIGHT
98
+         #else
99
+             MSG_FILAMENTCHANGE
100
+         #endif
101
+        ))
102
+       .tag(8).button( ADVANCED_SETTINGS_POS, GET_TEXT_F(MSG_ADVANCED_SETTINGS))
103
+       .enabled(
104
+         #ifdef PRINTCOUNTER
105
+           1
106
+         #endif
61 107
         )
62
-        .tag(7).button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_FILAMENTCHANGE))
63
-        .tag(8).button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_ADVANCED_SETTINGS))
64
-        .enabled(
65
-          #ifdef PRINTCOUNTER
66
-            1
67
-          #endif
108
+       .enabled(
109
+         #ifdef AXIS_LEVELING_COMMANDS
110
+           1
111
+         #endif
68 112
         )
69
-        .tag(9).button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_STATS_MENU))
70
-        .tag(10).button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_MENU))
71
-        .colors(action_btn)
72
-        .tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
73
-      #undef GRID_COLS
74
-      #undef GRID_ROWS
75
-    #else
76
-      #define GRID_ROWS 5
77
-      #define GRID_COLS 2
78
-        .tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_AUTO_HOME))
79
-        #if ENABLED(TOUCH_UI_COCOA_PRESS)
80
-          .tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_PREHEAT_1))
81
-        #else
82
-          .enabled(
83
-            #if ENABLED(NOZZLE_CLEAN_FEATURE)
84
-              1
85
-            #endif
86
-          )
87
-          .tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_CLEAN_NOZZLE))
88
-        #endif
89
-        .tag(4).button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_MOVE_AXIS))
90
-        .tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISABLE_STEPPERS))
91
-        .tag(6).button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_TEMPERATURE))
92
-        #if ENABLED(TOUCH_UI_COCOA_PRESS)
93
-          .tag(7).button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_CASE_LIGHT))
94
-        #else
95
-          .enabled(
96
-            #if DISABLED(TOUCH_UI_LULZBOT_BIO)
97
-              1
98
-            #endif
99
-          )
100
-          .tag(7).button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_FILAMENTCHANGE))
101
-        #endif
102
-        .tag(8).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_ADVANCED_SETTINGS))
103
-        .enabled(
104
-          #ifdef PRINTCOUNTER
105
-            1
106
-          #endif
113
+       .tag(9).button( LEVEL_AXIS_POS, GET_TEXT_F(MSG_AUTOLEVEL_X_AXIS))
114
+       .enabled(
115
+         #ifdef HAS_LEVELING
116
+           1
117
+         #endif
107 118
         )
108
-        .tag(9).button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_INFO_STATS_MENU))
109
-        .tag(10).button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_INFO_MENU))
110
-        .colors(action_btn)
111
-        .tag(1).button( BTN_POS(2,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_BACK));
112
-      #undef GRID_COLS
113
-      #undef GRID_ROWS
114
-    #endif
119
+       .tag(10).button( LEVEL_BED_POS, GET_TEXT_F(MSG_LEVEL_BED))
120
+       .tag(11).button( ABOUT_PRINTER_POS, GET_TEXT_F(MSG_INFO_MENU))
121
+       .colors(action_btn)
122
+       .tag(1).button( BACK_POS, GET_TEXT_F(MSG_BACK));
115 123
   }
116 124
 }
117 125
 
@@ -122,23 +130,32 @@ bool MainMenu::onTouchEnd(uint8_t tag) {
122 130
     case 1:  SaveSettingsDialogBox::promptToSaveSettings();           break;
123 131
     case 2:  SpinnerDialogBox::enqueueAndWait_P(F("G28"));            break;
124 132
     #if ENABLED(TOUCH_UI_COCOA_PRESS)
125
-    case 3:  GOTO_SCREEN(PreheatTimerScreen);                         break;
133
+    case 3:  GOTO_SCREEN(PreheatMenu);                                break;
126 134
     #elif ENABLED(NOZZLE_CLEAN_FEATURE)
127 135
     case 3: injectCommands_P(PSTR("G12")); GOTO_SCREEN(StatusScreen); break;
128 136
     #endif
129 137
     case 4:  GOTO_SCREEN(MoveAxisScreen);                             break;
130 138
     case 5:  injectCommands_P(PSTR("M84"));                           break;
131 139
     case 6:  GOTO_SCREEN(TemperatureScreen);                          break;
132
-    #if ENABLED(TOUCH_UI_COCOA_PRESS)
140
+    #if ENABLED(TOUCH_UI_COCOA_PRESS) && HAS_CASE_LIGHT
133 141
     case 7:  GOTO_SCREEN(CaseLightScreen);                            break;
134 142
     #else
135 143
     case 7:  GOTO_SCREEN(ChangeFilamentScreen);                       break;
136 144
     #endif
137 145
     case 8:  GOTO_SCREEN(AdvancedSettingsMenu);                       break;
138
-#if ENABLED(PRINTCOUNTER)
139
-    case 9:  GOTO_SCREEN(StatisticsScreen);                           break;
140
-#endif
141
-    case 10: GOTO_SCREEN(AboutScreen);                                break;
146
+    #ifdef AXIS_LEVELING_COMMANDS
147
+    case 9: SpinnerDialogBox::enqueueAndWait_P(F(AXIS_LEVELING_COMMANDS)); break;
148
+    #endif
149
+    #ifdef HAS_LEVELING
150
+    case 10:  SpinnerDialogBox::enqueueAndWait_P(F(
151
+      #ifdef BED_LEVELING_COMMANDS
152
+        BED_LEVELING_COMMANDS
153
+      #else
154
+        "G29"
155
+      #endif
156
+    ));            break;
157
+    #endif
158
+    case 11: GOTO_SCREEN(AboutScreen);                                break;
142 159
     default:
143 160
       return false;
144 161
   }

+ 83
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/preheat_menu.cpp 查看文件

@@ -0,0 +1,83 @@
1
+/********************
2
+ * preheat_menu.cpp *
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: <http://www.gnu.org/licenses/>.                              *
20
+ ****************************************************************************/
21
+
22
+#include "../config.h"
23
+
24
+#if ENABLED(TOUCH_UI_FTDI_EVE) && defined(TOUCH_UI_COCOA_PRESS)
25
+
26
+#include "screens.h"
27
+
28
+using namespace FTDI;
29
+using namespace ExtUI;
30
+using namespace Theme;
31
+
32
+void PreheatMenu::onRedraw(draw_mode_t what) {
33
+  if (what & BACKGROUND) {
34
+    CommandProcessor cmd;
35
+    cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color))
36
+       .cmd(CLEAR(true,true,true))
37
+       .tag(0);
38
+  }
39
+
40
+  #define GRID_ROWS 3
41
+  #define GRID_COLS 2
42
+    
43
+  if (what & FOREGROUND) {
44
+    CommandProcessor cmd;
45
+    cmd.cmd(COLOR_RGB(bg_text_enabled))
46
+       .font(Theme::font_medium)
47
+       .text  ( BTN_POS(1,1),  BTN_SIZE(2,1), GET_TEXT_F(MSG_PREHEAT_1))
48
+       .colors(normal_btn)
49
+       .tag(2).button( BTN_POS(1,2),  BTN_SIZE(1,1), F("Dark Chocolate"))
50
+       .tag(3).button( BTN_POS(2,2),  BTN_SIZE(1,1), F("Milk Chocolate"))
51
+       .tag(4).button( BTN_POS(1,3),  BTN_SIZE(1,1), F("White Chocolate"))
52
+       .colors(action_btn)
53
+       .tag(1) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_BACK));
54
+  }
55
+}
56
+
57
+bool PreheatMenu::onTouchEnd(uint8_t tag) {
58
+  switch (tag) {
59
+    case 1: GOTO_PREVIOUS();                   break;
60
+    case 2:
61
+      #ifdef COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_SCRIPT
62
+        injectCommands_P(PSTR(COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_SCRIPT));
63
+      #endif
64
+      GOTO_SCREEN(PreheatTimerScreen);
65
+      break;
66
+    case 3:
67
+      #ifdef COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_SCRIPT
68
+        injectCommands_P(PSTR(COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_SCRIPT));
69
+      #endif
70
+      GOTO_SCREEN(PreheatTimerScreen);
71
+      break;
72
+    case 4:
73
+      #ifdef COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_SCRIPT
74
+        injectCommands_P(PSTR(COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_SCRIPT));
75
+      #endif
76
+      GOTO_SCREEN(PreheatTimerScreen);
77
+      break;
78
+    default: return false;
79
+  }
80
+  return true;
81
+}
82
+
83
+#endif // TOUCH_UI_FTDI_EVE

+ 0
- 3
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/preheat_timer_screen.cpp 查看文件

@@ -77,9 +77,6 @@ void PreheatTimerScreen::draw_interaction_buttons(draw_mode_t what) {
77 77
 
78 78
 void PreheatTimerScreen::onEntry() {
79 79
   screen_data.PreheatTimerScreen.start_ms = millis();
80
-  #ifdef COCOA_PRESS_PREHEAT_SCRIPT
81
-    injectCommands_P(PSTR(COCOA_PRESS_PREHEAT_SCRIPT));
82
-  #endif
83 80
 }
84 81
 
85 82
 void PreheatTimerScreen::onRedraw(draw_mode_t what) {

+ 1
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp 查看文件

@@ -105,6 +105,7 @@ SCREEN_TABLE {
105 105
   DECL_SCREEN(BioConfirmHomeE),
106 106
 #endif
107 107
 #if ENABLED(TOUCH_UI_COCOA_PRESS)
108
+  DECL_SCREEN(PreheatMenu),
108 109
   DECL_SCREEN(PreheatTimerScreen),
109 110
 #endif
110 111
 #if ENABLED(TOUCH_UI_DEVELOPER_MENU)

+ 8
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h 查看文件

@@ -76,6 +76,7 @@ enum {
76 76
   PRINTING_SCREEN_CACHE,
77 77
 #endif
78 78
 #if ENABLED(TOUCH_UI_COCOA_PRESS)
79
+  PREHEAT_MENU_CACHE,
79 80
   PREHEAT_TIMER_SCREEN_CACHE,
80 81
 #endif
81 82
   CHANGE_FILAMENT_SCREEN_CACHE,
@@ -99,7 +100,7 @@ enum {
99 100
 
100 101
 class BaseScreen : public UIScreen {
101 102
   protected:
102
-    #ifdef LCD_TIMEOUT_TO_STATUS
103
+    #if LCD_TIMEOUT_TO_STATUS
103 104
       static uint32_t last_interaction;
104 105
     #endif
105 106
 
@@ -314,6 +315,12 @@ class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE,
314 315
 #endif
315 316
 
316 317
 #if ENABLED(TOUCH_UI_COCOA_PRESS)
318
+  class PreheatMenu : public BaseScreen, public CachedScreen<PREHEAT_MENU_CACHE> {
319
+    public:
320
+      static void onRedraw(draw_mode_t);
321
+      static bool onTouchEnd(uint8_t tag);
322
+  };
323
+
317 324
   class PreheatTimerScreen : public BaseScreen, public CachedScreen<PREHEAT_TIMER_SCREEN_CACHE> {
318 325
     private:
319 326
       static uint16_t secondsRemaining();

+ 107
- 119
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp 查看文件

@@ -33,9 +33,9 @@ using namespace FTDI;
33 33
 using namespace Theme;
34 34
 
35 35
 #ifdef TOUCH_UI_PORTRAIT
36
-  #define GRID_ROWS 8
36
+    #define GRID_ROWS 8
37 37
 #else
38
-  #define GRID_ROWS 8
38
+    #define GRID_ROWS 8
39 39
 #endif
40 40
 
41 41
 void StatusScreen::draw_axis_position(draw_mode_t what) {
@@ -43,41 +43,41 @@ void StatusScreen::draw_axis_position(draw_mode_t what) {
43 43
 
44 44
   #define GRID_COLS 3
45 45
 
46
+  #ifdef TOUCH_UI_PORTRAIT
47
+    #define X_LBL_POS  BTN_POS(1,5), BTN_SIZE(1,1)
48
+    #define Y_LBL_POS  BTN_POS(1,6), BTN_SIZE(1,1)
49
+    #define Z_LBL_POS  BTN_POS(1,7), BTN_SIZE(1,1)
50
+    #define X_VAL_POS  BTN_POS(2,5), BTN_SIZE(2,1)
51
+    #define Y_VAL_POS  BTN_POS(2,6), BTN_SIZE(2,1)
52
+    #define Z_VAL_POS  BTN_POS(2,7), BTN_SIZE(2,1)
53
+  #else
54
+    #define X_LBL_POS  BTN_POS(1,5), BTN_SIZE(1,1)
55
+    #define Y_LBL_POS  BTN_POS(2,5), BTN_SIZE(1,1)
56
+    #define Z_LBL_POS  BTN_POS(3,5), BTN_SIZE(1,1)
57
+    #define X_VAL_POS  BTN_POS(1,6), BTN_SIZE(1,1)
58
+    #define Y_VAL_POS  BTN_POS(2,6), BTN_SIZE(1,1)
59
+    #define Z_VAL_POS  BTN_POS(3,6), BTN_SIZE(1,1)
60
+  #endif
61
+
62
+  #define _UNION_POS(x1,y1,w1,h1,x2,y2,w2,h2) x1,y1,max(x1+w1,x2+w2)-x1,max(y1+h1,y2+h2)-y1
63
+  #define UNION_POS(p1, p2) _UNION_POS(p1, p2)
64
+
46 65
   if (what & BACKGROUND) {
47 66
     cmd.tag(6)
48
-    #ifdef TOUCH_UI_PORTRAIT
49
-      .fgcolor(Theme::axis_label)
50
-        .font(Theme::font_large)
51
-                         .button( BTN_POS(1,5), BTN_SIZE(2,1), F(""), OPT_FLAT)
52
-                         .button( BTN_POS(1,6), BTN_SIZE(2,1), F(""), OPT_FLAT)
53
-                         .button( BTN_POS(1,7), BTN_SIZE(2,1), F(""), OPT_FLAT)
54
-
55
-        .font(Theme::font_small)
56
-                         .text  ( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_AXIS_X))
57
-                         .text  ( BTN_POS(1,6), BTN_SIZE(1,1), GET_TEXT_F(MSG_AXIS_Y))
58
-                         .text  ( BTN_POS(1,7), BTN_SIZE(1,1), GET_TEXT_F(MSG_AXIS_Z))
59
-
60
-        .font(Theme::font_medium)
61
-        .fgcolor(Theme::x_axis) .button( BTN_POS(2,5), BTN_SIZE(2,1), F(""), OPT_FLAT)
62
-        .fgcolor(Theme::y_axis) .button( BTN_POS(2,6), BTN_SIZE(2,1), F(""), OPT_FLAT)
63
-        .fgcolor(Theme::z_axis) .button( BTN_POS(2,7), BTN_SIZE(2,1), F(""), OPT_FLAT);
64
-    #else
65
-      .fgcolor(Theme::axis_label)
66
-        .font(Theme::font_large)
67
-                         .button( BTN_POS(1,5), BTN_SIZE(1,2), F(""),  OPT_FLAT)
68
-                         .button( BTN_POS(2,5), BTN_SIZE(1,2), F(""),  OPT_FLAT)
69
-                         .button( BTN_POS(3,5), BTN_SIZE(1,2), F(""),  OPT_FLAT)
70
-
71
-        .font(Theme::font_small)
72
-                         .text  ( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_AXIS_X))
73
-                         .text  ( BTN_POS(2,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_AXIS_Y))
74
-                         .text  ( BTN_POS(3,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_AXIS_Z))
75
-                         .font(Theme::font_medium)
76
-
77
-        .fgcolor(Theme::x_axis) .button( BTN_POS(1,6), BTN_SIZE(1,1), F(""), OPT_FLAT)
78
-        .fgcolor(Theme::y_axis) .button( BTN_POS(2,6), BTN_SIZE(1,1), F(""), OPT_FLAT)
79
-        .fgcolor(Theme::z_axis) .button( BTN_POS(3,6), BTN_SIZE(1,1), F(""), OPT_FLAT);
80
-    #endif
67
+       .fgcolor(Theme::axis_label)
68
+       .font(Theme::font_large)
69
+                               .button( UNION_POS(X_LBL_POS, X_VAL_POS), F(""), OPT_FLAT)
70
+                               .button( UNION_POS(Y_LBL_POS, Y_VAL_POS), F(""), OPT_FLAT)
71
+                               .button( UNION_POS(Z_LBL_POS, Z_VAL_POS), F(""), OPT_FLAT)
72
+       .font(Theme::font_medium)
73
+       .fgcolor(Theme::x_axis) .button( X_VAL_POS, F(""), OPT_FLAT)
74
+       .fgcolor(Theme::y_axis) .button( Y_VAL_POS, F(""), OPT_FLAT)
75
+       .fgcolor(Theme::z_axis) .button( Z_VAL_POS, F(""), OPT_FLAT)
76
+       .font(Theme::font_small)
77
+                               .text  ( X_LBL_POS, GET_TEXT_F(MSG_AXIS_X))
78
+                               .text  ( Y_LBL_POS, GET_TEXT_F(MSG_AXIS_Y))
79
+                               .text  ( Z_LBL_POS, GET_TEXT_F(MSG_AXIS_Z))
80
+       .colors(normal_btn);
81 81
   }
82 82
 
83 83
   if (what & FOREGROUND) {
@@ -101,16 +101,11 @@ void StatusScreen::draw_axis_position(draw_mode_t what) {
101 101
     else
102 102
       strcpy_P(z_str, PSTR("?"));
103 103
 
104
-    cmd.tag(6).font(Theme::font_medium)
105
-    #ifdef TOUCH_UI_PORTRAIT
106
-         .text  ( BTN_POS(2,5), BTN_SIZE(2,1), x_str)
107
-         .text  ( BTN_POS(2,6), BTN_SIZE(2,1), y_str)
108
-         .text  ( BTN_POS(2,7), BTN_SIZE(2,1), z_str);
109
-    #else
110
-         .text  ( BTN_POS(1,6), BTN_SIZE(1,1), x_str)
111
-         .text  ( BTN_POS(2,6), BTN_SIZE(1,1), y_str)
112
-         .text  ( BTN_POS(3,6), BTN_SIZE(1,1), z_str);
113
-    #endif
104
+    cmd.tag(6)
105
+       .font(Theme::font_medium)
106
+       .text  ( X_VAL_POS, x_str)
107
+       .text  ( Y_VAL_POS, y_str)
108
+       .text  ( Z_VAL_POS, z_str);
114 109
   }
115 110
 
116 111
   #undef GRID_COLS
@@ -125,49 +120,49 @@ void StatusScreen::draw_axis_position(draw_mode_t what) {
125 120
 void StatusScreen::draw_temperature(draw_mode_t what) {
126 121
   using namespace Theme;
127 122
 
123
+  #define TEMP_RECT_1 BTN_POS(1,1), BTN_SIZE(4,2)
124
+  #define TEMP_RECT_2 BTN_POS(1,1), BTN_SIZE(8,1)
125
+  #define NOZ_1_POS   BTN_POS(1,1), BTN_SIZE(4,1)
126
+  #define NOZ_2_POS   BTN_POS(5,1), BTN_SIZE(4,1)
127
+  #define BED_POS     BTN_POS(1,2), BTN_SIZE(4,1)
128
+  #define FAN_POS     BTN_POS(5,2), BTN_SIZE(4,1)
129
+
130
+  #define _ICON_POS(x,y,w,h) x, y, w/4, h
131
+  #define _TEXT_POS(x,y,w,h) x + w/4, y, w - w/4, h
132
+  #define ICON_POS(pos) _ICON_POS(pos)
133
+  #define TEXT_POS(pos) _TEXT_POS(pos)
134
+
128 135
   CommandProcessor cmd;
129 136
 
130 137
   if (what & BACKGROUND) {
131 138
     cmd.font(Theme::font_small)
132
-    #ifdef TOUCH_UI_PORTRAIT
133
-       .tag(5)
134
-       .fgcolor(temp)      .button( BTN_POS(1,1), BTN_SIZE(4,2), F(""), OPT_FLAT)
135
-                                  .button( BTN_POS(1,1), BTN_SIZE(8,1), F(""), OPT_FLAT)
136
-       .fgcolor(fan_speed) .button( BTN_POS(5,2), BTN_SIZE(4,1), F(""), OPT_FLAT)
137
-       .tag(0)
138
-       .fgcolor(progress)  .button( BTN_POS(1,3), BTN_SIZE(4,1), F(""), OPT_FLAT)
139
-                                  .button( BTN_POS(5,3), BTN_SIZE(4,1), F(""), OPT_FLAT);
140
-    #else
141 139
        .tag(5)
142
-       .fgcolor(temp)      .button( BTN_POS(1,1), BTN_SIZE(4,2), F(""), OPT_FLAT)
143
-                                  .button( BTN_POS(1,1), BTN_SIZE(8,1), F(""), OPT_FLAT)
144
-       .fgcolor(fan_speed) .button( BTN_POS(5,2), BTN_SIZE(4,1), F(""), OPT_FLAT)
145
-       .tag(0)
146
-       .fgcolor(progress)  .button( BTN_POS(9,1), BTN_SIZE(4,1), F(""), OPT_FLAT)
147
-                                  .button( BTN_POS(9,2), BTN_SIZE(4,1), F(""), OPT_FLAT);
148
-    #endif
140
+       .fgcolor(temp)     .button( TEMP_RECT_1, F(""), OPT_FLAT)
141
+                          .button( TEMP_RECT_2, F(""), OPT_FLAT)
142
+       .fgcolor(fan_speed).button( FAN_POS,     F(""), OPT_FLAT)
143
+       .tag(0);
149 144
 
150 145
     // Draw Extruder Bitmap on Extruder Temperature Button
151 146
 
152 147
     cmd.tag(5)
153
-       .cmd(BITMAP_SOURCE(Extruder_Icon_Info))
154
-       .cmd(BITMAP_LAYOUT(Extruder_Icon_Info))
155
-       .cmd(BITMAP_SIZE  (Extruder_Icon_Info))
156
-       .icon (BTN_POS(1,1), BTN_SIZE(1,1),  Extruder_Icon_Info, icon_scale)
157
-       .icon (BTN_POS(5,1), BTN_SIZE(1,1),  Extruder_Icon_Info, icon_scale);
148
+       .cmd (BITMAP_SOURCE(Extruder_Icon_Info))
149
+       .cmd (BITMAP_LAYOUT(Extruder_Icon_Info))
150
+       .cmd (BITMAP_SIZE  (Extruder_Icon_Info))
151
+       .icon(ICON_POS(NOZ_1_POS), Extruder_Icon_Info, icon_scale)
152
+       .icon(ICON_POS(NOZ_2_POS), Extruder_Icon_Info, icon_scale);
158 153
 
159 154
     // Draw Bed Heat Bitmap on Bed Heat Button
160
-    cmd.cmd(BITMAP_SOURCE(Bed_Heat_Icon_Info))
161
-       .cmd(BITMAP_LAYOUT(Bed_Heat_Icon_Info))
162
-       .cmd(BITMAP_SIZE  (Bed_Heat_Icon_Info))
163
-       .icon (BTN_POS(1,2), BTN_SIZE(1,1), Bed_Heat_Icon_Info, icon_scale);
155
+    cmd.cmd (BITMAP_SOURCE(Bed_Heat_Icon_Info))
156
+       .cmd (BITMAP_LAYOUT(Bed_Heat_Icon_Info))
157
+       .cmd (BITMAP_SIZE  (Bed_Heat_Icon_Info))
158
+       .icon(ICON_POS(BED_POS), Bed_Heat_Icon_Info, icon_scale);
164 159
 
165 160
     // Draw Fan Percent Bitmap on Bed Heat Button
166 161
 
167
-    cmd.cmd(BITMAP_SOURCE(Fan_Icon_Info))
168
-       .cmd(BITMAP_LAYOUT(Fan_Icon_Info))
169
-       .cmd(BITMAP_SIZE  (Fan_Icon_Info))
170
-       .icon  (BTN_POS(5,2), BTN_SIZE(1,1), Fan_Icon_Info, icon_scale);
162
+    cmd.cmd (BITMAP_SOURCE(Fan_Icon_Info))
163
+       .cmd (BITMAP_LAYOUT(Fan_Icon_Info))
164
+       .cmd (BITMAP_SIZE  (Fan_Icon_Info))
165
+       .icon(ICON_POS(FAN_POS), Fan_Icon_Info, icon_scale);
171 166
 
172 167
     #ifdef TOUCH_UI_USE_UTF8
173 168
       load_utf8_bitmaps(cmd); // Restore font bitmap handles
@@ -212,10 +207,10 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
212 207
 
213 208
     cmd.tag(5)
214 209
        .font(font_medium)
215
-       .text(BTN_POS(2,1), BTN_SIZE(3,1), e0_str)
216
-       .text(BTN_POS(6,1), BTN_SIZE(3,1), e1_str)
217
-       .text(BTN_POS(2,2), BTN_SIZE(3,1), bed_str)
218
-       .text(BTN_POS(6,2), BTN_SIZE(3,1), fan_str);
210
+       .text(TEXT_POS(NOZ_1_POS), e0_str)
211
+       .text(TEXT_POS(NOZ_2_POS), e1_str)
212
+       .text(TEXT_POS(BED_POS), bed_str)
213
+       .text(TEXT_POS(FAN_POS), fan_str);
219 214
   }
220 215
 }
221 216
 
@@ -225,15 +220,18 @@ void StatusScreen::draw_progress(draw_mode_t what) {
225 220
 
226 221
   CommandProcessor cmd;
227 222
 
223
+  #if ENABLED(TOUCH_UI_PORTRAIT)
224
+    #define TIME_POS     BTN_POS(1,3), BTN_SIZE(4,1)
225
+    #define PROGRESS_POS BTN_POS(5,3), BTN_SIZE(4,1)
226
+  #else
227
+    #define TIME_POS     BTN_POS(9,1), BTN_SIZE(4,1)
228
+    #define PROGRESS_POS BTN_POS(9,2), BTN_SIZE(4,1)
229
+  #endif
230
+
228 231
   if (what & BACKGROUND) {
229 232
     cmd.tag(0).font(font_medium)
230
-    #ifdef TOUCH_UI_PORTRAIT
231
-       .fgcolor(progress) .button(BTN_POS(1,3), BTN_SIZE(4,1), F(""), OPT_FLAT)
232
-                                 .button(BTN_POS(5,3), BTN_SIZE(4,1), F(""), OPT_FLAT);
233
-    #else
234
-       .fgcolor(progress) .button(BTN_POS(9,1), BTN_SIZE(4,1), F(""), OPT_FLAT)
235
-                                 .button(BTN_POS(9,2), BTN_SIZE(4,1), F(""), OPT_FLAT);
236
-    #endif
233
+       .fgcolor(progress).button(TIME_POS,     F(""), OPT_FLAT)
234
+                         .button(PROGRESS_POS, F(""), OPT_FLAT);
237 235
   }
238 236
 
239 237
   if (what & FOREGROUND) {
@@ -248,13 +246,8 @@ void StatusScreen::draw_progress(draw_mode_t what) {
248 246
     sprintf_P(progress_str, PSTR("%-3d %%"),      getProgress_percent() );
249 247
 
250 248
     cmd.font(font_medium)
251
-    #ifdef TOUCH_UI_PORTRAIT
252
-       .tag(0).text(BTN_POS(1,3), BTN_SIZE(4,1), time_str)
253
-              .text(BTN_POS(5,3), BTN_SIZE(4,1), progress_str);
254
-    #else
255
-       .tag(0).text(BTN_POS(9,1), BTN_SIZE(4,1), time_str)
256
-              .text(BTN_POS(9,2), BTN_SIZE(4,1), progress_str);
257
-    #endif
249
+       .tag(0).text(TIME_POS, time_str)
250
+              .text(PROGRESS_POS, progress_str);
258 251
   }
259 252
 }
260 253
 
@@ -266,6 +259,14 @@ void StatusScreen::draw_interaction_buttons(draw_mode_t what) {
266 259
   if (what & FOREGROUND) {
267 260
     using namespace ExtUI;
268 261
 
262
+  #if ENABLED(TOUCH_UI_PORTRAIT)
263
+    #define MEDIA_BTN_POS  BTN_POS(1,8), BTN_SIZE(2,1)
264
+    #define MENU_BTN_POS   BTN_POS(3,8), BTN_SIZE(2,1)
265
+  #else
266
+    #define MEDIA_BTN_POS  BTN_POS(1,7), BTN_SIZE(2,2)
267
+    #define MENU_BTN_POS   BTN_POS(3,7), BTN_SIZE(2,2)
268
+  #endif
269
+
269 270
     const bool has_media = isMediaInserted() && !isPrintingFromMedia();
270 271
 
271 272
     CommandProcessor cmd;
@@ -273,42 +274,29 @@ void StatusScreen::draw_interaction_buttons(draw_mode_t what) {
273 274
        .font(Theme::font_medium)
274 275
        .enabled(has_media)
275 276
        .colors(has_media ? action_btn : normal_btn)
276
-       .tag(3).button(
277
-          #ifdef TOUCH_UI_PORTRAIT
278
-            BTN_POS(1,8), BTN_SIZE(2,1),
279
-          #else
280
-            BTN_POS(1,7), BTN_SIZE(2,2),
281
-          #endif
282
-          isPrintingFromMedia() ? GET_TEXT_F(MSG_PRINTING) : GET_TEXT_F(MSG_BUTTON_MEDIA)
283
-        ).colors(!has_media ? action_btn : normal_btn)
284
-      #ifdef TOUCH_UI_PORTRAIT
285
-       .tag(4).button( BTN_POS(3,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_MENU));
286
-      #else
287
-       .tag(4).button( BTN_POS(3,7), BTN_SIZE(2,2), GET_TEXT_F(MSG_BUTTON_MENU));
288
-    #endif
277
+       .tag(3).button(MEDIA_BTN_POS, isPrintingFromMedia() ? GET_TEXT_F(MSG_PRINTING) : GET_TEXT_F(MSG_BUTTON_MEDIA))
278
+       .colors(!has_media ? action_btn : normal_btn)
279
+       .tag(4).button( MENU_BTN_POS, GET_TEXT_F(MSG_BUTTON_MENU));
289 280
   }
290 281
   #undef  GRID_COLS
291 282
 }
292 283
 
293 284
 void StatusScreen::draw_status_message(draw_mode_t what, const char* message) {
294 285
   #define GRID_COLS 1
286
+
287
+  #if ENABLED(TOUCH_UI_PORTRAIT)
288
+    #define STATUS_POS  BTN_POS(1,4), BTN_SIZE(1,1)
289
+  #else
290
+    #define STATUS_POS  BTN_POS(1,3), BTN_SIZE(1,2)
291
+  #endif
292
+
295 293
   if (what & BACKGROUND) {
296 294
     CommandProcessor cmd;
297 295
     cmd.fgcolor(Theme::status_msg)
298 296
        .tag(0)
299
-    #ifdef TOUCH_UI_PORTRAIT
300
-       .button( BTN_POS(1,4), BTN_SIZE(1,1), F(""), OPT_FLAT);
301
-    #else
302
-       .button( BTN_POS(1,3), BTN_SIZE(1,2), F(""), OPT_FLAT);
303
-    #endif
297
+       .button( STATUS_POS, F(""), OPT_FLAT);
304 298
 
305
-    draw_text_box(cmd,
306
-    #ifdef TOUCH_UI_PORTRAIT
307
-      BTN_POS(1,4), BTN_SIZE(1,1),
308
-    #else
309
-      BTN_POS(1,3), BTN_SIZE(1,2),
310
-    #endif
311
-      message, OPT_CENTER, font_large);
299
+    draw_text_box(cmd, STATUS_POS, message, OPT_CENTER, font_large);
312 300
   }
313 301
   #undef  GRID_COLS
314 302
 }
@@ -326,10 +314,10 @@ void StatusScreen::setStatusMessage(const char* message) {
326 314
      .cmd(CLEAR(true,true,true));
327 315
 
328 316
   draw_temperature(BACKGROUND);
329
-  draw_progress(BACKGROUND);
330
-  draw_axis_position(BACKGROUND);
331 317
   draw_status_message(BACKGROUND, message);
332 318
   draw_interaction_buttons(BACKGROUND);
319
+  draw_progress(BACKGROUND);
320
+  draw_axis_position(BACKGROUND);
333 321
 
334 322
   storeBackground();
335 323
 

+ 128
- 100
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/colors.h 查看文件

@@ -24,121 +24,149 @@
24 24
 #pragma once
25 25
 
26 26
 namespace Theme {
27
-  #ifdef TOUCH_UI_LULZBOT_BIO
28
-    // The Lulzbot Bio uses the color PANTONE 2175C on the case silkscreen.
29
-    // This translates to HSL(208°, 100%, 39%) as an accent color on the GUI.
30
-
31
-    constexpr int   accent_hue          = 208;
32
-    constexpr float accent_sat          = 0.5;
33
-
34
-    constexpr uint32_t logo_bg_rgb      = 0xffffff;
35
-    constexpr uint32_t logo_fill_rgb    = 0xffffff;
36
-    constexpr uint32_t logo_stroke_rgb  = hsl_to_rgb(accent_hue, 1.0, 0.39);
27
+  #if ENABLED(TOUCH_UI_COCOA_THEME)
28
+    constexpr int      accent_hue           = 23;
29
+
30
+    // Browns and Oranges
31
+    constexpr uint32_t accent_color_1       = hsl_to_rgb(12.8,0.597,0.263); // Darkest
32
+    constexpr uint32_t accent_color_2       = hsl_to_rgb(12.8,0.597,0.263);
33
+    constexpr uint32_t accent_color_3       = hsl_to_rgb( 9.6,0.664,0.443);
34
+    constexpr uint32_t accent_color_4       = hsl_to_rgb(16.3,0.873,0.537);
35
+    constexpr uint32_t accent_color_5       = hsl_to_rgb(23.0,0.889,0.539);
36
+    constexpr uint32_t accent_color_6       = hsl_to_rgb(23.0,0.889,0.539); // Lightest
37 37
   #else
38
-    // The Lulzbot logo uses the color PANTONE 382c.
39
-    // This translates to HSL(68°, 68%, 52%) as an accent color on the GUI.
40
-
41
-    constexpr int   accent_hue          = 68;
42
-    constexpr float accent_sat          = 0.68;
43
-
44
-    constexpr uint32_t logo_bg_rgb      = hsl_to_rgb(accent_hue, 0.77, 0.64);
45
-    constexpr uint32_t logo_fill_rgb    = hsl_to_rgb(accent_hue, 0.68, 0.52); // Lulzbot Green
46
-    constexpr uint32_t logo_stroke_rgb  = 0x000000;
38
+    // Use linear accent colors
39
+
40
+    #if ANY(TOUCH_UI_ROYAL_THEME, TOUCH_UI_FROZEN_THEME)
41
+        // Dark blue accent colors
42
+        constexpr int      accent_hue       = 216;
43
+        constexpr float    accent_sat       = 0.7;
44
+    #else
45
+        // Green accent colors
46
+        constexpr int      accent_hue       = 68;
47
+        constexpr float    accent_sat       = 0.68;
48
+    #endif
49
+
50
+    // Shades of accent color
51
+    constexpr uint32_t accent_color_0       = hsl_to_rgb(accent_hue, accent_sat, 0.15); // Darkest
52
+    constexpr uint32_t accent_color_1       = hsl_to_rgb(accent_hue, accent_sat, 0.26);
53
+    constexpr uint32_t accent_color_2       = hsl_to_rgb(accent_hue, accent_sat, 0.39);
54
+    constexpr uint32_t accent_color_3       = hsl_to_rgb(accent_hue, accent_sat, 0.52);
55
+    constexpr uint32_t accent_color_4       = hsl_to_rgb(accent_hue, accent_sat, 0.65);
56
+    constexpr uint32_t accent_color_5       = hsl_to_rgb(accent_hue, accent_sat, 0.78);
57
+    constexpr uint32_t accent_color_6       = hsl_to_rgb(accent_hue, accent_sat, 0.91); // Lightest
47 58
   #endif
48 59
 
49
-  // Shades of accent color
60
+  // Shades of gray
50 61
 
51
-  #ifdef TOUCH_UI_COCOA_PRESS
52
-    constexpr uint32_t accent_color_1   = hsl_to_rgb(12.8,0.597,0.263); // Darkest
53
-    constexpr uint32_t accent_color_2   = hsl_to_rgb(12.8,0.597,0.263);
54
-    constexpr uint32_t accent_color_3   = hsl_to_rgb( 9.6,0.664,0.443);
55
-    constexpr uint32_t accent_color_4   = hsl_to_rgb(16.3,0.873,0.537);
56
-    constexpr uint32_t accent_color_5   = hsl_to_rgb(23.0,0.889,0.539);
57
-    constexpr uint32_t accent_color_6   = hsl_to_rgb(23.0,0.889,0.539); // Lightest
62
+  constexpr float    gray_sat               = 0.14;
63
+  constexpr uint32_t gray_color_0           = hsl_to_rgb(accent_hue, gray_sat, 0.15); // Darkest
64
+  constexpr uint32_t gray_color_1           = hsl_to_rgb(accent_hue, gray_sat, 0.26);
65
+  constexpr uint32_t gray_color_2           = hsl_to_rgb(accent_hue, gray_sat, 0.39);
66
+  constexpr uint32_t gray_color_3           = hsl_to_rgb(accent_hue, gray_sat, 0.52);
67
+  constexpr uint32_t gray_color_4           = hsl_to_rgb(accent_hue, gray_sat, 0.65);
68
+  constexpr uint32_t gray_color_5           = hsl_to_rgb(accent_hue, gray_sat, 0.78);
69
+  constexpr uint32_t gray_color_6           = hsl_to_rgb(accent_hue, gray_sat, 0.91); // Lightest
70
+
71
+  #if ENABLED(TOUCH_UI_ROYAL_THEME)
72
+    constexpr uint32_t theme_darkest        = accent_color_1;
73
+    constexpr uint32_t theme_dark           = accent_color_4;
74
+
75
+    constexpr uint32_t bg_color             = gray_color_0;
76
+    constexpr uint32_t axis_label           = gray_color_1;
77
+
78
+    constexpr uint32_t bg_text_enabled      = accent_color_6;
79
+    constexpr uint32_t bg_text_disabled     = gray_color_0;
80
+    constexpr uint32_t bg_normal            = accent_color_4;
81
+    constexpr uint32_t fg_disabled          = gray_color_0;
82
+    constexpr uint32_t fg_normal            = accent_color_0;
83
+    constexpr uint32_t fg_action            = accent_color_1;
84
+
85
+    constexpr uint32_t logo_bg_rgb          = accent_color_1;
86
+    constexpr uint32_t logo_fill_rgb        = accent_color_0;
87
+    constexpr uint32_t logo_stroke_rgb      = accent_color_4;
88
+  #elif ANY(TOUCH_UI_COCOA_THEME, TOUCH_UI_FROZEN_THEME)
89
+    constexpr uint32_t theme_darkest        = accent_color_1;
90
+    constexpr uint32_t theme_dark           = accent_color_4;
91
+
92
+    constexpr uint32_t bg_color             = 0xFFFFFF;
93
+    constexpr uint32_t axis_label           = gray_color_5;
94
+
95
+    constexpr uint32_t bg_text_enabled      = accent_color_1;
96
+    constexpr uint32_t bg_text_disabled     = gray_color_1;
97
+    constexpr uint32_t bg_normal            = accent_color_4;
98
+    constexpr uint32_t fg_disabled          = gray_color_6;
99
+    constexpr uint32_t fg_normal            = accent_color_1;
100
+    constexpr uint32_t fg_action            = accent_color_4;
101
+
102
+    constexpr uint32_t logo_bg_rgb          = accent_color_5;
103
+    constexpr uint32_t logo_fill_rgb        = accent_color_6;
104
+    constexpr uint32_t logo_stroke_rgb      = accent_color_2;
58 105
   #else
59
-    constexpr uint32_t accent_color_1   = hsl_to_rgb(accent_hue, accent_sat, 0.26); // Darkest
60
-    constexpr uint32_t accent_color_2   = hsl_to_rgb(accent_hue, accent_sat, 0.39);
61
-    constexpr uint32_t accent_color_3   = hsl_to_rgb(accent_hue, accent_sat, 0.52);
62
-    constexpr uint32_t accent_color_4   = hsl_to_rgb(accent_hue, accent_sat, 0.65);
63
-    constexpr uint32_t accent_color_5   = hsl_to_rgb(accent_hue, accent_sat, 0.78);
64
-    constexpr uint32_t accent_color_6   = hsl_to_rgb(accent_hue, accent_sat, 0.91); // Lightest
106
+    constexpr uint32_t theme_darkest        = gray_color_1;
107
+    constexpr uint32_t theme_dark           = gray_color_2;
108
+
109
+    constexpr uint32_t bg_color             = gray_color_1;
110
+    constexpr uint32_t axis_label           = gray_color_2;
111
+
112
+    constexpr uint32_t bg_text_enabled      = 0xFFFFFF;
113
+    constexpr uint32_t bg_text_disabled     = gray_color_2;
114
+    constexpr uint32_t bg_normal            = gray_color_1;
115
+    constexpr uint32_t fg_disabled          = gray_color_1;
116
+    constexpr uint32_t fg_normal            = gray_color_2;
117
+    constexpr uint32_t fg_action            = accent_color_2;
118
+
119
+    constexpr uint32_t logo_bg_rgb          = accent_color_4;
120
+    constexpr uint32_t logo_fill_rgb        = accent_color_3;
121
+    constexpr uint32_t logo_stroke_rgb      = 0x000000;
65 122
   #endif
66 123
 
67
-  // Shades of gray
68
-
69
-  constexpr float gray_sat = 0.14;
124
+  constexpr uint32_t shadow_rgb             = gray_color_6;
125
+  constexpr uint32_t stroke_rgb             = accent_color_1;
126
+  constexpr uint32_t fill_rgb               = accent_color_3;
127
+  constexpr uint32_t syringe_rgb            = accent_color_5;
70 128
 
71
-  constexpr uint32_t gray_color_1       = hsl_to_rgb(accent_hue, gray_sat, 0.26); // Darkest
72
-  constexpr uint32_t gray_color_2       = hsl_to_rgb(accent_hue, gray_sat, 0.39);
73
-  constexpr uint32_t gray_color_3       = hsl_to_rgb(accent_hue, gray_sat, 0.52);
74
-  constexpr uint32_t gray_color_4       = hsl_to_rgb(accent_hue, gray_sat, 0.65);
75
-  constexpr uint32_t gray_color_5       = hsl_to_rgb(accent_hue, gray_sat, 0.78);
76
-  constexpr uint32_t gray_color_6       = hsl_to_rgb(accent_hue, gray_sat, 0.91); // Lightest
77
-
78
-  #if NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
79
-    // Lulzbot TAZ Pro
80
-    constexpr uint32_t theme_darkest    = gray_color_1;
81
-    constexpr uint32_t theme_dark       = gray_color_2;
82
-
83
-    constexpr uint32_t bg_color         = theme_darkest;
84
-    constexpr uint32_t bg_text_disabled = theme_dark;
85
-    constexpr uint32_t bg_text_enabled  = 0xFFFFFF;
86
-    constexpr uint32_t bg_normal        = theme_darkest;
87
-
88
-    constexpr uint32_t fg_normal        = theme_dark;
89
-    constexpr uint32_t fg_action        = accent_color_2;
90
-    constexpr uint32_t fg_disabled      = theme_darkest;
129
+  #if ENABLED(TOUCH_UI_ROYAL_THEME)
130
+    constexpr uint32_t x_axis               = hsl_to_rgb(0,   1.00, 0.26);
131
+    constexpr uint32_t y_axis               = hsl_to_rgb(120, 1.00, 0.13);
132
+    constexpr uint32_t z_axis               = hsl_to_rgb(240, 1.00, 0.10); 
91 133
   #else
92
-    // Lulzbot Bio
93
-    constexpr uint32_t theme_darkest    = accent_color_1;
94
-    constexpr uint32_t theme_dark       = accent_color_4;
95
-
96
-    constexpr uint32_t bg_color         = 0xFFFFFF;
97
-    constexpr uint32_t bg_text_disabled = gray_color_1;
98
-    constexpr uint32_t bg_text_enabled  = accent_color_1;
99
-    constexpr uint32_t bg_normal        = accent_color_4;
100
-
101
-    constexpr uint32_t fg_normal        = accent_color_1;
102
-    constexpr uint32_t fg_action        = accent_color_4;
103
-    constexpr uint32_t fg_disabled      = gray_color_6;
104
-
105
-    constexpr uint32_t shadow_rgb       = gray_color_6;
106
-    constexpr uint32_t stroke_rgb       = accent_color_1;
107
-    constexpr uint32_t fill_rgb         = accent_color_3;
108
-    constexpr uint32_t syringe_rgb      = accent_color_5;
134
+    constexpr uint32_t x_axis               = hsl_to_rgb(0,   1.00, 0.5);
135
+    constexpr uint32_t y_axis               = hsl_to_rgb(120, 1.00, 0.37);
136
+    constexpr uint32_t z_axis               = hsl_to_rgb(240, 1.00, 0.37);
109 137
   #endif
110
-
111
-  constexpr uint32_t x_axis             = 0xFF0000;
112
-  constexpr uint32_t y_axis             = 0x00BB00;
113
-  constexpr uint32_t z_axis             = 0x0000BF;
114
-  constexpr uint32_t e_axis             = gray_color_2;
115
-  constexpr uint32_t feedrate           = gray_color_2;
116
-  constexpr uint32_t other              = gray_color_2;
138
+  constexpr uint32_t e_axis                 = axis_label;
139
+  constexpr uint32_t feedrate               = axis_label;
140
+  constexpr uint32_t other                  = axis_label;
117 141
 
118 142
   // Status screen
119
-  constexpr uint32_t progress           = gray_color_2;
120
-  constexpr uint32_t status_msg         = gray_color_2;
121
-  constexpr uint32_t fan_speed          = 0x377198;
122
-  constexpr uint32_t temp               = 0x892c78;
123
-  constexpr uint32_t axis_label         = gray_color_2;
143
+  constexpr uint32_t progress               = axis_label;
144
+  constexpr uint32_t status_msg             = axis_label;
145
+  #if ENABLED(TOUCH_UI_ROYAL_THEME)
146
+    constexpr uint32_t fan_speed            = hsl_to_rgb(240, 0.5, 0.13);
147
+    constexpr uint32_t temp                 = hsl_to_rgb(343, 1.0, 0.23);
148
+  #else
149
+    constexpr uint32_t fan_speed            = hsl_to_rgb(204, 0.47, 0.41);
150
+    constexpr uint32_t temp                 = hsl_to_rgb(311, 0.51, 0.35);
151
+  #endif
124 152
 
125
-  constexpr uint32_t disabled_icon      = gray_color_1;
153
+  constexpr uint32_t disabled_icon          = gray_color_1;
126 154
 
127 155
   // Calibration Registers Screen
128
-  constexpr uint32_t transformA         = 0x3010D0;
129
-  constexpr uint32_t transformB         = 0x4010D0;
130
-  constexpr uint32_t transformC         = 0x5010D0;
131
-  constexpr uint32_t transformD         = 0x6010D0;
132
-  constexpr uint32_t transformE         = 0x7010D0;
133
-  constexpr uint32_t transformF         = 0x8010D0;
134
-  constexpr uint32_t transformVal       = 0x104010;
135
-
136
-  constexpr btn_colors disabled_btn     = {.bg = bg_color,      .grad = fg_disabled, .fg = fg_disabled,  .rgb = fg_disabled };
137
-  constexpr btn_colors normal_btn       = {.bg = fg_action,     .grad = 0xFFFFFF,    .fg = fg_normal,    .rgb = 0xFFFFFF };
138
-  constexpr btn_colors action_btn       = {.bg = bg_color,      .grad = 0xFFFFFF,    .fg = fg_action,    .rgb = 0xFFFFFF };
139
-  constexpr btn_colors red_btn          = {.bg = 0xFF5555,      .grad = 0xFFFFFF,    .fg = 0xFF0000,     .rgb = 0xFFFFFF };
140
-  constexpr btn_colors ui_slider        = {.bg = theme_darkest, .grad = 0xFFFFFF,    .fg = theme_dark,   .rgb = accent_color_3 };
141
-  constexpr btn_colors ui_toggle        = {.bg = theme_darkest, .grad = 0xFFFFFF,    .fg = theme_dark,   .rgb = 0xFFFFFF };
156
+  constexpr uint32_t transformA             = 0x3010D0;
157
+  constexpr uint32_t transformB             = 0x4010D0;
158
+  constexpr uint32_t transformC             = 0x5010D0;
159
+  constexpr uint32_t transformD             = 0x6010D0;
160
+  constexpr uint32_t transformE             = 0x7010D0;
161
+  constexpr uint32_t transformF             = 0x8010D0;
162
+  constexpr uint32_t transformVal           = 0x104010;
163
+
164
+  constexpr btn_colors disabled_btn         = {.bg = bg_color,      .grad = fg_disabled, .fg = fg_disabled,  .rgb = fg_disabled };
165
+  constexpr btn_colors normal_btn           = {.bg = fg_action,     .grad = 0xFFFFFF,    .fg = fg_normal,    .rgb = 0xFFFFFF };
166
+  constexpr btn_colors action_btn           = {.bg = bg_color,      .grad = 0xFFFFFF,    .fg = fg_action,    .rgb = 0xFFFFFF };
167
+  constexpr btn_colors red_btn              = {.bg = 0xFF5555,      .grad = 0xFFFFFF,    .fg = 0xFF0000,     .rgb = 0xFFFFFF };
168
+  constexpr btn_colors ui_slider            = {.bg = theme_darkest, .grad = 0xFFFFFF,    .fg = theme_dark,   .rgb = accent_color_3 };
169
+  constexpr btn_colors ui_toggle            = {.bg = theme_darkest, .grad = 0xFFFFFF,    .fg = theme_dark,   .rgb = 0xFFFFFF };
142 170
 
143 171
   // Temperature color scale
144 172
 

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h 查看文件

@@ -35,5 +35,5 @@ const PROGMEM uint16_t logo_stroke[] = {0xADF3, 0x546C, 0x419D, 0x546F, 0x3D05,
35 35
 
36 36
 #define LOGO_BACKGROUND logo_bg_rgb
37 37
 #define LOGO_PAINT_PATHS \
38
-  LOGO_PAINT_PATH(logo_stroke_rgb, logo_stroke) \
39
-  LOGO_PAINT_PATH(logo_fill_rgb,   logo_fill)
38
+  LOGO_PAINT_PATH(logo_fill_rgb,   logo_fill) \
39
+  LOGO_PAINT_PATH(logo_stroke_rgb, logo_stroke)

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h 查看文件

@@ -35,5 +35,5 @@ const PROGMEM uint16_t logo_stroke[] = {0x3C19, 0x70C5, 0x371A, 0x7159, 0x3302,
35 35
 
36 36
 #define LOGO_BACKGROUND logo_bg_rgb
37 37
 #define LOGO_PAINT_PATHS \
38
-  LOGO_PAINT_PATH(logo_stroke_rgb, logo_stroke) \
39
-  LOGO_PAINT_PATH(logo_fill_rgb,   logo_fill)
38
+  LOGO_PAINT_PATH(logo_fill_rgb,   logo_fill) \
39
+  LOGO_PAINT_PATH(logo_stroke_rgb, logo_stroke)

+ 2
- 2
Marlin/src/lcd/extui/ui_api.h 查看文件

@@ -341,10 +341,10 @@ namespace ExtUI {
341 341
   void onConfigurationStoreWritten(bool success);
342 342
   void onConfigurationStoreRead(bool success);
343 343
   #if ENABLED(POWER_LOSS_RECOVERY)
344
-    void OnPowerLossResume();
344
+    void onPowerLossResume();
345 345
   #endif
346 346
   #if HAS_PID_HEATING
347
-    void OnPidTuning(const result_t rst);
347
+    void onPidTuning(const result_t rst);
348 348
   #endif
349 349
 };
350 350
 

+ 3
- 3
Marlin/src/lcd/extui_dgus_lcd.cpp 查看文件

@@ -123,7 +123,7 @@ namespace ExtUI {
123 123
   }
124 124
 
125 125
   #if ENABLED(POWER_LOSS_RECOVERY)
126
-    void OnPowerLossResume() {
126
+    void onPowerLossResume() {
127 127
       // Called on resume from power-loss
128 128
       ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POWER_LOSS);
129 129
     }
@@ -131,9 +131,9 @@ namespace ExtUI {
131 131
 
132 132
 
133 133
   #if HAS_PID_HEATING
134
-    void OnPidTuning(const result_t rst) {
134
+    void onPidTuning(const result_t rst) {
135 135
       // Called for temperature PID tuning result
136
-      SERIAL_ECHOLNPAIR("OnPidTuning:",rst);
136
+      SERIAL_ECHOLNPAIR("onPidTuning:",rst);
137 137
       switch(rst) {
138 138
         case PID_BAD_EXTRUDER_NUM:
139 139
           ScreenHandler.setstatusmessagePGM(PSTR(STR_PID_BAD_EXTRUDER_NUM));

+ 2
- 2
Marlin/src/lcd/extui_example.cpp 查看文件

@@ -94,13 +94,13 @@ namespace ExtUI {
94 94
   }
95 95
 
96 96
   #if ENABLED(POWER_LOSS_RECOVERY)
97
-    void OnPowerLossResume() {
97
+    void onPowerLossResume() {
98 98
       // Called on resume from power-loss
99 99
     }
100 100
   #endif
101 101
 
102 102
   #if HAS_PID_HEATING
103
-    void OnPidTuning(const result_t rst) {
103
+    void onPidTuning(const result_t rst) {
104 104
       // Called for temperature PID tuning result
105 105
     }
106 106
   #endif

+ 1
- 1
Marlin/src/lcd/extui_malyan_lcd.cpp 查看文件

@@ -483,7 +483,7 @@ namespace ExtUI {
483 483
   void onLoadSettings(const char*) {}
484 484
   void onConfigurationStoreWritten(bool) {}
485 485
   void onConfigurationStoreRead(bool) {}
486
-  void OnPidTuning(const result_t) {}
486
+  void onPidTuning(const result_t) {}
487 487
 }
488 488
 
489 489
 #endif // MALYAN_LCD

+ 3
- 0
Marlin/src/lcd/language/language_en.h 查看文件

@@ -602,6 +602,9 @@ namespace Language_en {
602 602
   PROGMEM Language_Str MSG_BACKLASH_C                      = LCD_STR_C;
603 603
   PROGMEM Language_Str MSG_BACKLASH_CORRECTION             = _UxGT("Correction");
604 604
   PROGMEM Language_Str MSG_BACKLASH_SMOOTHING              = _UxGT("Smoothing");
605
+  
606
+  PROGMEM Language_Str MSG_LEVEL_X_AXIS                    = _UxGT("Level X Axis");
607
+  PROGMEM Language_Str MSG_AUTO_CALIBRATE                  = _UxGT("Auto Calibrate");
605 608
 }
606 609
 
607 610
 #if FAN_COUNT == 1

+ 5
- 5
Marlin/src/module/temperature.cpp 查看文件

@@ -411,7 +411,7 @@ volatile bool Temperature::raw_temps_ready = false;
411 411
     if (target > GHV(BED_MAXTEMP - 10, temp_range[heater].maxtemp - 15)) {
412 412
       SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH);
413 413
       #if ENABLED(EXTENSIBLE_UI)
414
-        ExtUI::OnPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH);
414
+        ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH);
415 415
       #endif
416 416
       return;
417 417
     }
@@ -527,7 +527,7 @@ volatile bool Temperature::raw_temps_ready = false;
527 527
       if (current_temp > target + MAX_OVERSHOOT_PID_AUTOTUNE) {
528 528
         SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH);
529 529
         #if ENABLED(EXTENSIBLE_UI)
530
-          ExtUI::OnPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH);
530
+          ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH);
531 531
         #endif
532 532
         break;
533 533
       }
@@ -572,7 +572,7 @@ volatile bool Temperature::raw_temps_ready = false;
572 572
       #endif
573 573
       if (((ms - t1) + (ms - t2)) > (MAX_CYCLE_TIME_PID_AUTOTUNE * 60L * 1000L)) {
574 574
         #if ENABLED(EXTENSIBLE_UI)
575
-          ExtUI::OnPidTuning(ExtUI::result_t::PID_TUNING_TIMEOUT);
575
+          ExtUI::onPidTuning(ExtUI::result_t::PID_TUNING_TIMEOUT);
576 576
         #endif
577 577
         SERIAL_ECHOLNPGM(STR_PID_TIMEOUT);
578 578
         break;
@@ -623,7 +623,7 @@ volatile bool Temperature::raw_temps_ready = false;
623 623
           printerEventLEDs.onPidTuningDone(color);
624 624
         #endif
625 625
         #if ENABLED(EXTENSIBLE_UI)
626
-          ExtUI::OnPidTuning(ExtUI::result_t::PID_DONE);
626
+          ExtUI::onPidTuning(ExtUI::result_t::PID_DONE);
627 627
         #endif
628 628
 
629 629
         goto EXIT_M303;
@@ -637,7 +637,7 @@ volatile bool Temperature::raw_temps_ready = false;
637 637
       printerEventLEDs.onPidTuningDone(color);
638 638
     #endif
639 639
     #if ENABLED(EXTENSIBLE_UI)
640
-      ExtUI::OnPidTuning(ExtUI::result_t::PID_DONE);
640
+      ExtUI::onPidTuning(ExtUI::result_t::PID_DONE);
641 641
     #endif
642 642
 
643 643
     EXIT_M303:

正在加载...
取消
保存