Browse Source

📺 Assorted small FTDI Eve Touch UI fixes (#22273)

Marcio T 4 years ago
parent
commit
e5e939bb4c
No account linked to committer's email address

+ 1
- 3
Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h View File

32
 class MediaFileReader {
32
 class MediaFileReader {
33
   private:
33
   private:
34
     #if ENABLED(SDSUPPORT)
34
     #if ENABLED(SDSUPPORT)
35
-      DiskIODriver_SPI_SD card;
36
-      SdVolume volume;
37
-      SdFile   root, file;
35
+      SdFile root, file;
38
     #endif
36
     #endif
39
 
37
 
40
   public:
38
   public:

+ 0
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h View File

118
 #include "../generic/files_screen.h"
118
 #include "../generic/files_screen.h"
119
 #include "../generic/move_axis_screen.h"
119
 #include "../generic/move_axis_screen.h"
120
 #include "../generic/flow_percent_screen.h"
120
 #include "../generic/flow_percent_screen.h"
121
-#include "../generic/tune_menu.h"
122
 #if HAS_JUNCTION_DEVIATION
121
 #if HAS_JUNCTION_DEVIATION
123
   #include "../generic/junction_deviation_screen.h"
122
   #include "../generic/junction_deviation_screen.h"
124
 #else
123
 #else

+ 10
- 0
Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp View File

294
   }
294
   }
295
 }
295
 }
296
 
296
 
297
+void StatusScreen::onMediaInserted() {
298
+  if (AT_SCREEN(StatusScreen))
299
+    setStatusMessage(GET_TEXT_F(MSG_MEDIA_INSERTED));
300
+}
301
+
302
+void StatusScreen::onMediaRemoved() {
303
+  if (AT_SCREEN(StatusScreen) || ExtUI::isPrintingFromMedia())
304
+    setStatusMessage(GET_TEXT_F(MSG_MEDIA_REMOVED));
305
+}
306
+
297
 #endif // COCOA_STATUS_SCREEN
307
 #endif // COCOA_STATUS_SCREEN

+ 2
- 0
Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h View File

52
     static bool onTouchHeld(uint8_t tag);
52
     static bool onTouchHeld(uint8_t tag);
53
     static bool onTouchEnd(uint8_t tag);
53
     static bool onTouchEnd(uint8_t tag);
54
     static void onIdle();
54
     static void onIdle();
55
+    static void onMediaInserted();
56
+    static void onMediaRemoved();
55
 };
57
 };

+ 3
- 3
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h View File

239
  */
239
  */
240
 template<class POLY_READER=DeduplicatedPolyReader<TransformedPolyReader>>
240
 template<class POLY_READER=DeduplicatedPolyReader<TransformedPolyReader>>
241
 class GenericPolyUI {
241
 class GenericPolyUI {
242
-  private:
242
+  protected:
243
     CommandProcessor &cmd;
243
     CommandProcessor &cmd;
244
+    draw_mode_t mode;
244
 
245
 
246
+  private:
245
     // Attributes used to paint buttons
247
     // Attributes used to paint buttons
246
 
248
 
247
     uint32_t btn_fill_color   = 0x000000;
249
     uint32_t btn_fill_color   = 0x000000;
250
     uint32_t btn_stroke_color = 0x000000;
252
     uint32_t btn_stroke_color = 0x000000;
251
     uint8_t  btn_stroke_width = 28;
253
     uint8_t  btn_stroke_width = 28;
252
 
254
 
253
-    draw_mode_t mode;
254
-
255
   public:
255
   public:
256
     enum ButtonStyle : uint8_t {
256
     enum ButtonStyle : uint8_t {
257
       FILL    = 1,
257
       FILL    = 1,

+ 47
- 0
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py View File

1
+#!/usr/bin/python
2
+
3
+# Written By Marcio Teixeira 2021 - SynDaver Labs, Inc.
4
+#
5
+# This program is free software: you can redistribute it and/or modify
6
+# it under the terms of the GNU General Public License as published by
7
+# the Free Software Foundation, either version 3 of the License, or
8
+# (at your option) any later version.
9
+#
10
+# This program is distributed in the hope that it will be useful,
11
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
+# GNU General Public License for more details.
14
+#
15
+# To view a copy of the GNU General Public License, go to the following
16
+# location: <https://www.gnu.org/licenses/>.
17
+
18
+from __future__ import print_function
19
+import argparse
20
+import textwrap
21
+import os
22
+import zlib
23
+
24
+def deflate(data):
25
+  return zlib.compress(data)
26
+
27
+if __name__ == "__main__":
28
+  parser = argparse.ArgumentParser(description='Converts a file into a packed C array for use as data')
29
+  parser.add_argument("input")
30
+  parser.add_argument("-d", "--deflate", action="store_true", help="Packs the data using the deflate algorithm")
31
+  args = parser.parse_args()
32
+
33
+  varname = os.path.splitext(os.path.basename(args.input))[0];
34
+  
35
+  with open(args.input, "rb") as in_file:
36
+    data = in_file.read()
37
+  if args.deflate:
38
+    data = deflate(data)
39
+  data = bytearray(data)
40
+  data = list(map(lambda a: "0x" + format(a, '02x'), data))
41
+  nElements = len(data)
42
+  data = ', '.join(data)
43
+  data = textwrap.fill(data, 75, initial_indent = '  ', subsequent_indent = '  ')
44
+
45
+  print("const unsigned char " + varname + "[" + format(nElements) + "] PROGMEM = {")
46
+  print(data)
47
+  print("};")

+ 108
- 0
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py View File

1
+#!/usr/bin/python
2
+
3
+# Written By Marcio Teixeira 2019 - Aleph Objects, Inc.
4
+#
5
+# This program is free software: you can redistribute it and/or modify
6
+# it under the terms of the GNU General Public License as published by
7
+# the Free Software Foundation, either version 3 of the License, or
8
+# (at your option) any later version.
9
+#
10
+# This program is distributed in the hope that it will be useful,
11
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
+# GNU General Public License for more details.
14
+#
15
+# To view a copy of the GNU General Public License, go to the following
16
+# location: <https://www.gnu.org/licenses/>.
17
+
18
+from __future__ import print_function
19
+from PIL import Image
20
+import argparse
21
+import textwrap
22
+
23
+def pack_rle(data):
24
+  """Use run-length encoding to pack the bytes"""
25
+  rle = []
26
+  value = data[0]
27
+  count = 0
28
+  for i in data:
29
+    if i != value or count == 255:
30
+      rle.append(count)
31
+      rle.append(value)
32
+      value = i
33
+      count = 1
34
+    else:
35
+      count += 1
36
+  rle.append(count)
37
+  rle.append(value)
38
+  return rle
39
+
40
+class WriteSource:
41
+  def __init__(self, lines_in_blocks):
42
+    self.blocks      = []
43
+    self.values      = []
44
+    self.block_size  = lines_in_blocks
45
+    self.rows        = 0
46
+
47
+  def add_pixel(self, value):
48
+    self.values.append(value)
49
+
50
+  def convert_to_4bpp(self, data, chunk_size = 0):
51
+    # Invert the image
52
+    data = list(map(lambda i: 255 - i, data))
53
+    # Quanitize 8-bit values into 4-bits
54
+    data = list(map(lambda i: i >> 4, data))
55
+    # Make sure there is an even number of elements
56
+    if (len(data) & 1) == 1:
57
+      data.append(0)
58
+    # Combine each two adjacent values into one
59
+    i = iter(data)
60
+    data = list(map(lambda a, b: a << 4 | b, i ,i))
61
+    # Pack the data
62
+    data = pack_rle(data)
63
+    # Convert values into hex strings
64
+    return list(map(lambda a: "0x" + format(a, '02x'), data))
65
+
66
+  def end_row(self, y):
67
+    # Pad each row into even number of values
68
+    if len(self.values) & 1:
69
+      self.values.append(0)
70
+
71
+    self.rows += 1
72
+    if self.block_size and (self.rows % self.block_size) == 0:
73
+      self.blocks.append(self.values)
74
+      self.values = []
75
+
76
+  def write(self):
77
+    if len(self.values):
78
+      self.blocks.append(self.values)
79
+
80
+    block_strs = [];
81
+    for b in self.blocks:
82
+      data = self.convert_to_4bpp(b)
83
+      data = ', '.join(data)
84
+      data = textwrap.fill(data, 75, initial_indent = '  ', subsequent_indent = '  ')
85
+      block_strs.append(data)
86
+
87
+    print("const unsigned char font[] PROGMEM = {")
88
+    for i, b in enumerate(block_strs):
89
+      if i:
90
+        print(',')
91
+      print('\n  /* {} */'.format(i))
92
+      print(b, end='')
93
+    print("\n};")
94
+
95
+if __name__ == "__main__":
96
+  parser = argparse.ArgumentParser(description='Converts a grayscale bitmap into a 16-level RLE packed C array for use as font data')
97
+  parser.add_argument("input")
98
+  parser.add_argument('--char_height', help='Adds a separator every so many lines', type=int)
99
+  args = parser.parse_args()
100
+
101
+  writer = WriteSource(args.char_height)
102
+
103
+  img = Image.open(args.input).convert('L')
104
+  for y in range(img.height):
105
+    for x in range(img.width):
106
+      writer.add_pixel(img.getpixel((x,y)))
107
+    writer.end_row(y)
108
+  writer.write()

+ 113
- 0
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py View File

1
+#!/usr/bin/python
2
+
3
+# Written By Marcio Teixeira 2021 - SynDaver Labs, Inc.
4
+#
5
+# This program is free software: you can redistribute it and/or modify
6
+# it under the terms of the GNU General Public License as published by
7
+# the Free Software Foundation, either version 3 of the License, or
8
+# (at your option) any later version.
9
+#
10
+# This program is distributed in the hope that it will be useful,
11
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
+# GNU General Public License for more details.
14
+#
15
+# To view a copy of the GNU General Public License, go to the following
16
+# location: <https://www.gnu.org/licenses/>.
17
+
18
+from __future__ import print_function
19
+from PIL import Image
20
+import argparse
21
+import textwrap
22
+import os
23
+import sys
24
+import zlib
25
+
26
+class WriteSource:
27
+  def __init__(self, mode):
28
+    self.values      = []
29
+    self.mode        = mode
30
+    self.offset      = 8
31
+    self.byte        = 0
32
+    
33
+  def finish_byte(self):
34
+    if self.offset != 8:
35
+      self.values.append(self.byte)
36
+      self.offset = 8
37
+      self.byte   = 0
38
+      
39
+  def add_bits_to_byte(self, value, size = 1):
40
+    self.offset -= size
41
+    self.byte = self.byte | value << self.offset
42
+    if self.offset == 0:
43
+      self.finish_byte()
44
+
45
+  def append_rgb565(self, color):
46
+    value = ((color[0] & 0xF8) << 8) + ((color[1] & 0xFC) << 3) + ((color[2] & 0xF8) >> 3)
47
+    self.values.append((value & 0x00FF) >> 0);
48
+    self.values.append((value & 0xFF00) >> 8);
49
+
50
+  def append_rgb332(self, color):
51
+    value = (color[0] & 0xE0) + ((color[1] & 0xE0) >> 3) + ((color[2] & 0xC0) >> 6)
52
+    self.values.append(value);
53
+
54
+  def append_grayscale(self, color, bits):
55
+    luminance = int(0.2126 * color[0] + 0.7152 * color[1] + 0.0722 * color[2])
56
+    self.add_bits_to_byte(luminance >> (8 - bits), bits)
57
+
58
+  def deflate(self, data):
59
+     return zlib.compress(data)
60
+
61
+  def add_pixel(self, color):
62
+    if self.mode == "l1":
63
+      self.append_grayscale(color, 1)
64
+    elif self.mode == "l2":
65
+      self.append_grayscale(color, 2)
66
+    elif self.mode == "l4":
67
+      self.append_grayscale(color, 4)
68
+    elif self.mode == "l8":
69
+      self.append_grayscale(color, 8)
70
+    elif self.mode == "rgb565":
71
+      self.append_rgb565(color)
72
+    elif self.mode == "rgb332":
73
+      self.append_rgb332(color)
74
+
75
+  def end_row(self, y):
76
+    if self.mode in ["l1", "l2", "l3"]:
77
+       self.finish_byte()
78
+
79
+  def write(self, varname, deflate):
80
+    print("Length of uncompressed data: ", len(self.values), file=sys.stderr)
81
+    data = bytes(bytearray(self.values))
82
+    if deflate:
83
+      data = self.deflate(data)
84
+      print("Length of data after compression: ", len(data), file=sys.stderr)
85
+    data = bytearray(data)
86
+    data = list(map(lambda a: "0x" + format(a, '02x'), data))
87
+    nElements = len(data)
88
+    data = ', '.join(data)
89
+    data = textwrap.fill(data, 75, initial_indent = '  ', subsequent_indent = '  ')
90
+
91
+    print("const unsigned char " + varname + "[" + format(nElements) + "] PROGMEM = {")
92
+    print(data)
93
+    print("};")
94
+
95
+if __name__ == "__main__":
96
+  parser = argparse.ArgumentParser(description='Converts a bitmap into a C array')
97
+  parser.add_argument("input")
98
+  parser.add_argument("-d", "--deflate", action="store_true", help="Packs the data using the deflate algorithm")
99
+  parser.add_argument("-m", "--mode", default="l1", help="Mode, can be l1, l2, l4, l8, rgb332 or rgb565")
100
+  args = parser.parse_args()
101
+
102
+  varname = os.path.splitext(os.path.basename(args.input))[0];
103
+
104
+  writer = WriteSource(args.mode)
105
+
106
+  img = Image.open(args.input)
107
+  print("Image height: ", img.height, file=sys.stderr)
108
+  print("Image width:  ", img.width,  file=sys.stderr)
109
+  for y in range(img.height):
110
+    for x in range(img.width):
111
+      writer.add_pixel(img.getpixel((x,y)))
112
+    writer.end_row(y)
113
+  writer.write(varname, args.deflate)

+ 5
- 11
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp View File

190
 }
190
 }
191
 
191
 
192
 void BedMeshEditScreen::show() {
192
 void BedMeshEditScreen::show() {
193
-  // On entry, home if needed and save current mesh
194
-  if (!ExtUI::isMachineHomed()) {
195
-    SpinnerDialogBox::enqueueAndWait_P(F("G28\nG29 S1"));
196
-    // After the spinner, go to this screen.
197
-    current_screen.forget();
198
-    PUSH_SCREEN(BedMeshEditScreen);
199
-  }
200
-  else {
201
-    injectCommands_P(PSTR("G29 S1"));
202
-    GOTO_SCREEN(BedMeshEditScreen);
203
-  }
193
+  // On entry, always home (to account for possible Z offset changes) and save current mesh
194
+  SpinnerDialogBox::enqueueAndWait_P(F("G28\nG29 S1"));
195
+  // After the spinner, go to this screen.
196
+  current_screen.forget();
197
+  PUSH_SCREEN(BedMeshEditScreen);
204
 }
198
 }
205
 
199
 
206
 #endif // FTDI_BED_MESH_EDIT_SCREEN
200
 #endif // FTDI_BED_MESH_EDIT_SCREEN

+ 1
- 2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp View File

132
       mydata.count = GRID_MAX_POINTS;
132
       mydata.count = GRID_MAX_POINTS;
133
       break;
133
       break;
134
     case ExtUI::G26_START:
134
     case ExtUI::G26_START:
135
-      GOTO_SCREEN(BedMeshViewScreen);
136
       mydata.message = nullptr;
135
       mydata.message = nullptr;
137
       mydata.count = 0;
136
       mydata.count = 0;
138
       break;
137
       break;
161
 void BedMeshViewScreen::doMeshValidation() {
160
 void BedMeshViewScreen::doMeshValidation() {
162
   mydata.count = 0;
161
   mydata.count = 0;
163
   GOTO_SCREEN(StatusScreen);
162
   GOTO_SCREEN(StatusScreen);
164
-  injectCommands_P(PSTR("M75\nG28 O\nM117 Heating...\nG26 R X0 Y0\nG27\nM77"));
163
+  injectCommands_P(PSTR("G28\nM117 Heating...\nG26 R X0 Y0\nG27"));
165
 }
164
 }
166
 
165
 
167
 void BedMeshViewScreen::show() {
166
 void BedMeshViewScreen::show() {

+ 4
- 2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.cpp View File

83
       if (UIData::animations_enabled()) {
83
       if (UIData::animations_enabled()) {
84
         // If there is a startup video in the flash SPI, play
84
         // If there is a startup video in the flash SPI, play
85
         // that, otherwise show a static splash screen.
85
         // that, otherwise show a static splash screen.
86
-        if (!MediaPlayerScreen::playBootMedia())
87
-          showSplashScreen();
86
+        #ifdef FTDI_MEDIA_PLAYER_SCREEN
87
+          if (!MediaPlayerScreen::playBootMedia())
88
+        #endif
89
+            showSplashScreen();
88
       }
90
       }
89
     #endif
91
     #endif
90
 
92
 

+ 9
- 6
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.cpp View File

35
 bool ConfirmUserRequestAlertBox::onTouchEnd(uint8_t tag) {
35
 bool ConfirmUserRequestAlertBox::onTouchEnd(uint8_t tag) {
36
   switch (tag) {
36
   switch (tag) {
37
     case 1:
37
     case 1:
38
-      if (ExtUI::isPrintingPaused()) {
39
-        // The TuneMenu will call ExtUI::setUserConfirmed()
40
-        GOTO_SCREEN(TuneMenu);
41
-        current_screen.forget();
42
-      }
43
-      else {
38
+      #ifdef FTDI_TUNE_MENU
39
+        if (ExtUI::isPrintingPaused()) {
40
+          // The TuneMenu will call ExtUI::setUserConfirmed()
41
+          GOTO_SCREEN(TuneMenu);
42
+          current_screen.forget();
43
+        }
44
+        else
45
+      #endif
46
+      {
44
         ExtUI::setUserConfirmed();
47
         ExtUI::setUserConfirmed();
45
         GOTO_PREVIOUS();
48
         GOTO_PREVIOUS();
46
       }
49
       }

+ 19
- 16
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp View File

83
        .font(font_medium).colors(normal_btn)
83
        .font(font_medium).colors(normal_btn)
84
        .enabled(EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION))
84
        .enabled(EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION))
85
        .tag(2).button(LEVEL_AXIS_POS, GET_TEXT_F(MSG_LEVEL_X_AXIS))
85
        .tag(2).button(LEVEL_AXIS_POS, GET_TEXT_F(MSG_LEVEL_X_AXIS))
86
+       .enabled(ENABLED(HAS_BED_PROBE))
86
        .tag(3).button(PROBE_BED_POS, GET_TEXT_F(MSG_PROBE_BED))
87
        .tag(3).button(PROBE_BED_POS, GET_TEXT_F(MSG_PROBE_BED))
87
        .enabled(ENABLED(HAS_MESH))
88
        .enabled(ENABLED(HAS_MESH))
88
        .tag(4).button(SHOW_MESH_POS, GET_TEXT_F(MSG_SHOW_MESH))
89
        .tag(4).button(SHOW_MESH_POS, GET_TEXT_F(MSG_SHOW_MESH))
101
 
102
 
102
 bool LevelingMenu::onTouchEnd(uint8_t tag) {
103
 bool LevelingMenu::onTouchEnd(uint8_t tag) {
103
   switch (tag) {
104
   switch (tag) {
104
-    case 1: GOTO_PREVIOUS();                   break;
105
+    case 1: GOTO_PREVIOUS(); break;
105
     #if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION)
106
     #if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION)
106
-    case 2: SpinnerDialogBox::enqueueAndWait_P(F("G34")); break;
107
+      case 2: SpinnerDialogBox::enqueueAndWait_P(F("G34")); break;
107
     #endif
108
     #endif
108
-    case 3:
109
-    #ifndef BED_LEVELING_COMMANDS
110
-      #define BED_LEVELING_COMMANDS "G29"
109
+    #if ENABLED(HAS_BED_PROBE)
110
+      case 3:
111
+        #ifndef BED_LEVELING_COMMANDS
112
+          #define BED_LEVELING_COMMANDS "G29"
113
+        #endif
114
+        #if ENABLED(AUTO_BED_LEVELING_UBL)
115
+          BedMeshViewScreen::doProbe();
116
+        #else
117
+          SpinnerDialogBox::enqueueAndWait_P(F(BED_LEVELING_COMMANDS));
118
+        #endif
119
+        break;
111
     #endif
120
     #endif
112
     #if ENABLED(AUTO_BED_LEVELING_UBL)
121
     #if ENABLED(AUTO_BED_LEVELING_UBL)
113
-      BedMeshViewScreen::doProbe();
114
-    #else
115
-      SpinnerDialogBox::enqueueAndWait_P(F(BED_LEVELING_COMMANDS));
116
-    #endif
117
-    break;
118
-    #if ENABLED(AUTO_BED_LEVELING_UBL)
119
-    case 4: BedMeshViewScreen::show(); break;
120
-    case 5: BedMeshEditScreen::show(); break;
122
+      case 4: BedMeshViewScreen::show(); break;
123
+      case 5: BedMeshEditScreen::show(); break;
121
     #endif
124
     #endif
122
     #if ENABLED(G26_MESH_VALIDATION)
125
     #if ENABLED(G26_MESH_VALIDATION)
123
-    case 6: BedMeshViewScreen::doMeshValidation(); break;
126
+      case 6: BedMeshViewScreen::doMeshValidation(); break;
124
     #endif
127
     #endif
125
     #if ENABLED(BLTOUCH)
128
     #if ENABLED(BLTOUCH)
126
-    case 7: injectCommands_P(PSTR("M280 P0 S60")); break;
127
-    case 8: SpinnerDialogBox::enqueueAndWait_P(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break;
129
+      case 7: injectCommands_P(PSTR("M280 P0 S60")); break;
130
+      case 8: SpinnerDialogBox::enqueueAndWait_P(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break;
128
     #endif
131
     #endif
129
     default: return false;
132
     default: return false;
130
   }
133
   }

+ 7
- 4
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp View File

77
        .tag(3).button(FIL_CHANGE_POS,  GET_TEXT_F(MSG_FILAMENTCHANGE))
77
        .tag(3).button(FIL_CHANGE_POS,  GET_TEXT_F(MSG_FILAMENTCHANGE))
78
        .enabled(EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR))
78
        .enabled(EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR))
79
        .tag(9).button(FILAMENT_POS, GET_TEXT_F(MSG_FILAMENT))
79
        .tag(9).button(FILAMENT_POS, GET_TEXT_F(MSG_FILAMENT))
80
-       .enabled(BOTH(HAS_LEVELING, HAS_BED_PROBE) || ENABLED(BABYSTEPPING))
81
-       .tag(4).button(NUDGE_NOZ_POS, GET_TEXT_F(TERN(BABYSTEPPING, MSG_NUDGE_NOZZLE, MSG_ZPROBE_ZOFFSET)))
80
+       #if ENABLED(BABYSTEPPING) && HAS_MULTI_HOTEND
81
+         .tag(4).button(NUDGE_NOZ_POS, GET_TEXT_F(MSG_NUDGE_NOZZLE))
82
+       #elif BOTH(HAS_LEVELING, HAS_BED_PROBE)
83
+         .tag(4).button(NUDGE_NOZ_POS, GET_TEXT_F(MSG_ZPROBE_ZOFFSET))
84
+       #endif
82
        .tag(5).button(SPEED_POS, GET_TEXT_F(MSG_PRINT_SPEED))
85
        .tag(5).button(SPEED_POS, GET_TEXT_F(MSG_PRINT_SPEED))
83
        .enabled(sdOrHostPrinting)
86
        .enabled(sdOrHostPrinting)
84
        .tag(sdOrHostPaused ? 7 : 6)
87
        .tag(sdOrHostPaused ? 7 : 6)
99
   using namespace Theme;
102
   using namespace Theme;
100
   using namespace ExtUI;
103
   using namespace ExtUI;
101
   switch (tag) {
104
   switch (tag) {
102
-    case  1: GOTO_PREVIOUS();                    break;
105
+    case  1: SaveSettingsDialogBox::promptToSaveSettings(); break;
103
     case  2: GOTO_SCREEN(TemperatureScreen);     break;
106
     case  2: GOTO_SCREEN(TemperatureScreen);     break;
104
     case  3: GOTO_SCREEN(ChangeFilamentScreen);  break;
107
     case  3: GOTO_SCREEN(ChangeFilamentScreen);  break;
105
     case  4:
108
     case  4:
106
-      #if ENABLED(BABYSTEPPING)
109
+      #if ENABLED(BABYSTEPPING) && HAS_MULTI_HOTEND
107
         GOTO_SCREEN(NudgeNozzleScreen);
110
         GOTO_SCREEN(NudgeNozzleScreen);
108
       #elif BOTH(HAS_LEVELING, HAS_BED_PROBE)
111
       #elif BOTH(HAS_LEVELING, HAS_BED_PROBE)
109
         GOTO_SCREEN(ZOffsetScreen);
112
         GOTO_SCREEN(ZOffsetScreen);

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.cpp View File

53
   w.heading(                  GET_TEXT_F(MSG_ZPROBE_ZOFFSET));
53
   w.heading(                  GET_TEXT_F(MSG_ZPROBE_ZOFFSET));
54
   w.color(z_axis).adjuster(4, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), getZOffset_mm());
54
   w.color(z_axis).adjuster(4, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), getZOffset_mm());
55
   w.increments();
55
   w.increments();
56
-  w.button(2, GET_TEXT_F(MSG_PROBE_WIZARD), !isPrinting());
56
+  w.button(2, GET_TEXT_F(MSG_PROBE_WIZARD), !isPrinting() && !wizardRunning());
57
 }
57
 }
58
 
58
 
59
 void ZOffsetScreen::move(float mm, int16_t steps) {
59
 void ZOffsetScreen::move(float mm, int16_t steps) {

+ 2
- 2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h View File

130
   PROGMEM Language_Str MSG_EEPROM_RESTORED          = u8"Settings restored from backup";
130
   PROGMEM Language_Str MSG_EEPROM_RESTORED          = u8"Settings restored from backup";
131
   PROGMEM Language_Str MSG_EEPROM_RESET             = u8"Settings restored to default";
131
   PROGMEM Language_Str MSG_EEPROM_RESET             = u8"Settings restored to default";
132
   PROGMEM Language_Str MSG_EEPROM_SAVED             = u8"Settings saved!";
132
   PROGMEM Language_Str MSG_EEPROM_SAVED             = u8"Settings saved!";
133
-  PROGMEM Language_Str MSG_EEPROM_SAVE_PROMPT       = u8"Do you wish to save these settings for next power-on?";
133
+  PROGMEM Language_Str MSG_EEPROM_SAVE_PROMPT       = u8"Settings applied. Save these settings for next power-on?";
134
   PROGMEM Language_Str MSG_EEPROM_RESET_WARNING     = u8"Are you sure? Customizations will be lost.";
134
   PROGMEM Language_Str MSG_EEPROM_RESET_WARNING     = u8"Are you sure? Customizations will be lost.";
135
 
135
 
136
   PROGMEM Language_Str MSG_PASSCODE_REJECTED        = u8"Wrong passcode!";
136
   PROGMEM Language_Str MSG_PASSCODE_REJECTED        = u8"Wrong passcode!";
146
   PROGMEM Language_Str MSG_AXIS_LEVELING            = u8"Axis Leveling";
146
   PROGMEM Language_Str MSG_AXIS_LEVELING            = u8"Axis Leveling";
147
   PROGMEM Language_Str MSG_PROBE_BED                = u8"Probe Mesh";
147
   PROGMEM Language_Str MSG_PROBE_BED                = u8"Probe Mesh";
148
   PROGMEM Language_Str MSG_SHOW_MESH                = u8"View Mesh";
148
   PROGMEM Language_Str MSG_SHOW_MESH                = u8"View Mesh";
149
-  PROGMEM Language_Str MSG_PRINT_TEST               = u8"Print Test";
149
+  PROGMEM Language_Str MSG_PRINT_TEST               = u8"Print Test (PLA)";
150
   PROGMEM Language_Str MSG_MOVE_Z_TO_TOP            = u8"Raise Z to Top";
150
   PROGMEM Language_Str MSG_MOVE_Z_TO_TOP            = u8"Raise Z to Top";
151
 
151
 
152
   #if ENABLED(TOUCH_UI_LULZBOT_BIO)
152
   #if ENABLED(TOUCH_UI_LULZBOT_BIO)

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h View File

40
 #if ENABLED(TOUCH_UI_LULZBOT_BIO)
40
 #if ENABLED(TOUCH_UI_LULZBOT_BIO)
41
   #include "bioprinter/screens.h"
41
   #include "bioprinter/screens.h"
42
 #elif ENABLED(TOUCH_UI_COCOA_PRESS)
42
 #elif ENABLED(TOUCH_UI_COCOA_PRESS)
43
-  #include "cocoapress/screens.h"
43
+  #include "cocoa_press/screens.h"
44
 #elif ENABLED(TOUCH_UI_SYNDAVER_LEVEL)
44
 #elif ENABLED(TOUCH_UI_SYNDAVER_LEVEL)
45
   #include "syndaver_level/screens.h"
45
   #include "syndaver_level/screens.h"
46
 #else
46
 #else

+ 58
- 8
Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h View File

36
     .height       = 23,
36
     .height       = 23,
37
   };
37
   };
38
 
38
 
39
-  constexpr PROGMEM unsigned char Extruder_Icon[] = {
39
+  constexpr PROGMEM unsigned char Extruder_Icon[69] = {
40
     0x3F, 0xFF, 0xFC,
40
     0x3F, 0xFF, 0xFC,
41
     0x7F, 0xFF, 0xFE,
41
     0x7F, 0xFF, 0xFE,
42
     0xC0, 0x00, 0x03,
42
     0xC0, 0x00, 0x03,
68
     .filter       = BILINEAR,
68
     .filter       = BILINEAR,
69
     .wrapx        = BORDER,
69
     .wrapx        = BORDER,
70
     .wrapy        = BORDER,
70
     .wrapy        = BORDER,
71
-    .RAMG_offset  = 8100,
71
+    .RAMG_offset  = 8069,
72
     .width        = 32,
72
     .width        = 32,
73
     .height       = 23,
73
     .height       = 23,
74
   };
74
   };
75
 
75
 
76
-  constexpr PROGMEM unsigned char Bed_Heat_Icon[] = {
76
+  constexpr PROGMEM unsigned char Bed_Heat_Icon[92] = {
77
     0x01, 0x81, 0x81, 0x80,
77
     0x01, 0x81, 0x81, 0x80,
78
     0x01, 0x81, 0x81, 0x80,
78
     0x01, 0x81, 0x81, 0x80,
79
     0x00, 0xC0, 0xC0, 0xC0,
79
     0x00, 0xC0, 0xC0, 0xC0,
105
     .filter       = BILINEAR,
105
     .filter       = BILINEAR,
106
     .wrapx        = BORDER,
106
     .wrapx        = BORDER,
107
     .wrapy        = BORDER,
107
     .wrapy        = BORDER,
108
-    .RAMG_offset  = 8300,
108
+    .RAMG_offset  = 8161,
109
     .width        = 32,
109
     .width        = 32,
110
     .height       = 32,
110
     .height       = 32,
111
   };
111
   };
112
 
112
 
113
-  constexpr PROGMEM unsigned char Fan_Icon[] = {
113
+  constexpr PROGMEM unsigned char Fan_Icon[128] = {
114
     0xFF, 0xFF, 0xFF, 0xFF,
114
     0xFF, 0xFF, 0xFF, 0xFF,
115
     0xFF, 0xFF, 0xFF, 0xFF,
115
     0xFF, 0xFF, 0xFF, 0xFF,
116
     0xF8, 0x00, 0x00, 0x1F,
116
     0xF8, 0x00, 0x00, 0x1F,
151
     .filter       = BILINEAR,
151
     .filter       = BILINEAR,
152
     .wrapx        = BORDER,
152
     .wrapx        = BORDER,
153
     .wrapy        = BORDER,
153
     .wrapy        = BORDER,
154
-    .RAMG_offset  = 9000,
154
+    .RAMG_offset  = 8289,
155
     .width        = 50,
155
     .width        = 50,
156
     .height       = 20,
156
     .height       = 20,
157
   };
157
   };
158
 
158
 
159
-  constexpr PROGMEM unsigned char TD_Icon[] = {
159
+  constexpr PROGMEM unsigned char TD_Icon[140] = {
160
     0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00,                    // Thumb Drive Widget
160
     0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00,                    // Thumb Drive Widget
161
     0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
161
     0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
162
     0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x80,
162
     0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x80,
179
     0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00
179
     0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00
180
   };
180
   };
181
 
181
 
182
-  constexpr PROGMEM uint32_t UTF8_FONT_OFFSET = 10000;
182
+  constexpr PROGMEM bitmap_info_t File_Icon_Info = {
183
+    .format       = L1,
184
+    .linestride   = 4,
185
+    .filter       = BILINEAR,
186
+    .wrapx        = BORDER,
187
+    .wrapy        = BORDER,
188
+    .RAMG_offset  = 8429,
189
+    .width        = 25,
190
+    .height       = 32,
191
+  };
192
+
193
+  const unsigned char File_Icon[128] PROGMEM = {
194
+    0x00, 0x00, 0x00, 0x00, 0x7F, 0xFE, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00,
195
+    0x40, 0x02, 0x80, 0x00, 0x40, 0x02, 0x40, 0x00, 0x40, 0x02, 0x20, 0x00,
196
+    0x40, 0x02, 0x10, 0x00, 0x40, 0x02, 0x08, 0x00, 0x40, 0x02, 0x04, 0x00,
197
+    0x40, 0x02, 0x02, 0x00, 0x40, 0x03, 0xFF, 0x00, 0x40, 0x00, 0x01, 0x00,
198
+    0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00,
199
+    0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00,
200
+    0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00,
201
+    0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00,
202
+    0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00,
203
+    0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00,
204
+    0x7F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00
205
+  };
206
+
207
+  constexpr PROGMEM bitmap_info_t Clock_Icon_Info = {
208
+    .format       = L1,
209
+    .linestride   = 4,
210
+    .filter       = BILINEAR,
211
+    .wrapx        = BORDER,
212
+    .wrapy        = BORDER,
213
+    .RAMG_offset  = 8557,
214
+    .width        = 32,
215
+    .height       = 32,
216
+  };
217
+
218
+  const unsigned char Clock_Icon[128] PROGMEM = {
219
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x7E, 0x7E, 0x00,
220
+    0x00, 0xE0, 0x07, 0x00, 0x03, 0x80, 0x01, 0xC0, 0x07, 0x01, 0x00, 0xE0,
221
+    0x0C, 0x01, 0x80, 0x70, 0x0C, 0x01, 0x80, 0x30, 0x18, 0x01, 0x80, 0x18,
222
+    0x30, 0x01, 0x80, 0x08, 0x30, 0x01, 0x80, 0x0C, 0x20, 0x01, 0x80, 0x0C,
223
+    0x60, 0x01, 0x80, 0x04, 0x60, 0x01, 0x80, 0x06, 0x60, 0x01, 0x80, 0x06,
224
+    0x60, 0x01, 0xFF, 0x06, 0x60, 0x01, 0xFF, 0x06, 0x60, 0x00, 0x00, 0x06,
225
+    0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x0C,
226
+    0x30, 0x00, 0x00, 0x0C, 0x30, 0x00, 0x00, 0x08, 0x18, 0x00, 0x00, 0x18,
227
+    0x0C, 0x00, 0x00, 0x30, 0x0E, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0xE0,
228
+    0x03, 0x80, 0x01, 0xC0, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x7F, 0xFE, 0x00,
229
+    0x00, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00
230
+  };
231
+
232
+  constexpr PROGMEM uint32_t UTF8_FONT_OFFSET  = 10000;
183
 }; // namespace Theme
233
 }; // namespace Theme

+ 5
- 1
Marlin/src/lcd/extui/ui_api.h View File

190
     void setHostResponse(const uint8_t);
190
     void setHostResponse(const uint8_t);
191
   #endif
191
   #endif
192
 
192
 
193
-  inline void simulateUserClick() { ui.lcd_clicked = true; }
193
+  inline void simulateUserClick() {
194
+    #if EITHER(HAS_LCD_MENU, EXTENSIBLE_UI)
195
+      ui.lcd_clicked = true;
196
+    #endif
197
+  }
194
 
198
 
195
   #if ENABLED(PRINTCOUNTER)
199
   #if ENABLED(PRINTCOUNTER)
196
     char* getFailedPrints_str(char buffer[21]);
200
     char* getFailedPrints_str(char buffer[21]);

Loading…
Cancel
Save