Procházet zdrojové kódy

FTDI whitespace tweaks

Scott Lahteine před 5 roky
rodič
revize
fe969ec6d3
19 změnil soubory, kde provedl 270 přidání a 266 odebrání
  1. 2
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp
  2. 2
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp
  3. 6
    3
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h
  4. 3
    3
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.h
  5. 6
    9
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp
  6. 2
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h
  7. 2
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp
  8. 2
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.cpp
  9. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.cpp
  10. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.cpp
  11. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp
  12. 216
    215
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.cpp
  13. 4
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/poly_ui.h
  14. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_numeric_adjustment_screen.cpp
  15. 6
    8
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp
  16. 2
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp
  17. 6
    12
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/lock_screen.cpp
  18. 4
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp
  19. 2
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp

+ 2
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp Zobrazit soubor

@@ -497,7 +497,8 @@ bool UIFlashStorage::is_present = false;
497 497
       if (verifyOk) {
498 498
         SERIAL_ECHOLNPGM("DONE");
499 499
         return SUCCESS;
500
-      } else {
500
+      }
501
+      else {
501 502
         SERIAL_ECHOLNPGM("FAIL");
502 503
         return VERIFY_ERROR;
503 504
       }

+ 2
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp Zobrazit soubor

@@ -932,7 +932,8 @@ template <class T> bool CLCD::CommandFifo::_write_unaligned(T data, uint16_t len
932 932
     if (command_read_ptr <= command_write_ptr) {
933 933
       bytes_tail = 4096U - command_write_ptr;
934 934
       bytes_head = command_read_ptr;
935
-    } else {
935
+    }
936
+    else {
936 937
       bytes_tail = command_read_ptr - command_write_ptr;
937 938
       bytes_head = 0;
938 939
     }

+ 6
- 3
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h Zobrazit soubor

@@ -78,7 +78,8 @@ class CommandProcessor : public CLCD::CommandFifo {
78 78
         y += (h - th) / 2;
79 79
         w -= tracker ? th * 5.0 : th * 2;
80 80
         h  = th;
81
-      } else {
81
+      }
82
+      else {
82 83
         x += (w - th) / 2;
83 84
         y += tracker ? th * 2.5 : th;
84 85
         w  = th;
@@ -254,7 +255,8 @@ class CommandProcessor : public CLCD::CommandFifo {
254 255
       if (is_tracking) {
255 256
         if (FTDI::EventLoop::is_touch_held()) {
256 257
           return CLCD::get_tracker(value);
257
-        } else {
258
+        }
259
+        else {
258 260
           CLCD::CommandFifo::track(0, 0, 0, 0, 0);
259 261
           CLCD::CommandFifo::execute();
260 262
           is_tracking = false;
@@ -319,7 +321,8 @@ class CommandProcessor : public CLCD::CommandFifo {
319 321
           if (is_utf8) {
320 322
             width  = get_utf8_text_width(text, font_size_t::from_romfont(font));
321 323
             height = font_size_t::from_romfont(font).get_height();
322
-          } else
324
+          }
325
+          else
323 326
         #endif
324 327
           {
325 328
             CLCD::FontMetrics fm(font);

+ 3
- 3
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.h Zobrazit soubor

@@ -33,10 +33,10 @@
33 33
  *     DLCache dlcache(UNIQUE_ID);
34 34
  *
35 35
  *     if (dlcache.hasData()) {
36
- *        dlcache.append();
36
+ *       dlcache.append();
37 37
  *     } else {
38
- *        // Add stuff to the DL
39
- *        dlcache.store();
38
+ *       // Add stuff to the DL
39
+ *       dlcache.store();
40 40
  *     }
41 41
  */
42 42
 class DLCache {

+ 6
- 9
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp Zobrazit soubor

@@ -140,15 +140,12 @@ namespace FTDI {
140 140
             if (UIData::flags.bits.touch_start_sound) sound.play(press_sound);
141 141
           }
142 142
 
143
-          if (lastScreen != current_screen.getScreen()) {
144
-            // In the case in which a touch event triggered a new screen to be
145
-            // drawn, we don't issue a touchEnd since it would be sent to the
146
-            // wrong screen.
147
-            UIData::flags.bits.ignore_unpress = true;
148
-          } else {
149
-            UIData::flags.bits.ignore_unpress = false;
150
-          }
151
-        } else {
143
+          // In the case in which a touch event triggered a new screen to be
144
+          // drawn, we don't issue a touchEnd since it would be sent to the
145
+          // wrong screen.
146
+          UIData::flags.bits.ignore_unpress = (lastScreen != current_screen.getScreen());
147
+        }
148
+        else {
152 149
           touch_timer.start();
153 150
         }
154 151
         break;

+ 2
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h Zobrazit soubor

@@ -209,7 +209,8 @@ class CachedScreen {
209 209
 
210 210
       if (dlcache.has_data()) {
211 211
         dlcache.append();
212
-      } else {
212
+      }
213
+      else {
213 214
         #ifdef TOUCH_UI_USE_UTF8
214 215
           load_utf8_bitmaps(cmd);
215 216
         #endif

+ 2
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp Zobrazit soubor

@@ -98,7 +98,8 @@ namespace FTDI {
98 98
       if (ms == 0 && fx == SILENCE && nt == END_SONG) {
99 99
         sequence = 0;
100 100
         play(SILENCE, REST);
101
-      } else {
101
+      }
102
+      else {
102 103
         wait = ms;
103 104
         timer.start();
104 105
         play(fx, nt);

+ 2
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.cpp Zobrazit soubor

@@ -45,7 +45,8 @@ namespace FTDI {
45 45
       cmd.cmd(BITMAP_HANDLE(handle));
46 46
       cmd.cmd(CELL(cell));
47 47
       cmd.cmd(VERTEX2F(x * 16, y * 16));
48
-    } else {
48
+    }
49
+    else {
49 50
       cmd.cmd(VERTEX2II(x, y, handle, cell));
50 51
     }
51 52
   }

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.cpp Zobrazit soubor

@@ -21,7 +21,7 @@
21 21
 
22 22
 #include "../ftdi_extended.h"
23 23
 
24
-#if defined(FTDI_EXTENDED) && ENABLED(TOUCH_UI_USE_UTF8)
24
+#if BOTH(FTDI_EXTENDED, TOUCH_UI_USE_UTF8)
25 25
 
26 26
 namespace FTDI {
27 27
   // Returns the height of a standard FTDI romfont

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.cpp Zobrazit soubor

@@ -21,7 +21,7 @@
21 21
 
22 22
 #include "../ftdi_extended.h"
23 23
 
24
-#if defined(FTDI_EXTENDED) && ENABLED(TOUCH_UI_USE_UTF8)
24
+#if BOTH(FTDI_EXTENDED, TOUCH_UI_USE_UTF8)
25 25
 
26 26
   constexpr static uint8_t std_font = 31;
27 27
 

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp Zobrazit soubor

@@ -21,7 +21,7 @@
21 21
 
22 22
 #include "../ftdi_extended.h"
23 23
 
24
-#if defined(FTDI_EXTENDED) && ENABLED(TOUCH_UI_USE_UTF8)
24
+#if BOTH(FTDI_EXTENDED, TOUCH_UI_USE_UTF8)
25 25
 
26 26
   using namespace FTDI;
27 27
 

+ 216
- 215
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.cpp Zobrazit soubor

@@ -21,7 +21,7 @@
21 21
 
22 22
 #include "../ftdi_extended.h"
23 23
 
24
-#if defined(FTDI_EXTENDED) && BOTH(TOUCH_UI_USE_UTF8, TOUCH_UI_UTF8_WESTERN_CHARSET)
24
+#if ALL(FTDI_EXTENDED, TOUCH_UI_USE_UTF8, TOUCH_UI_UTF8_WESTERN_CHARSET)
25 25
 
26 26
   #include "western_char_set_bitmap_31.h"
27 27
 
@@ -45,81 +45,81 @@
45 45
     DOT_ABOVE,
46 46
     CEDILLA,
47 47
     NO_DOT_I,
48
-#if ENABLED(TOUCH_UI_UTF8_GERMANIC)
49
-    SHARP_S,
50
-#endif
51
-#if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
52
-    LRG_O_STROKE,
53
-    SML_O_STROKE,
54
-    LRG_AE,
55
-    SML_AE,
56
-    LRG_ETH,
57
-    SML_ETH,
58
-    LRG_THORN,
59
-    SML_THORN,
60
-#endif
61
-#if ENABLED(TOUCH_UI_UTF8_PUNCTUATION)
62
-    LEFT_DBL_QUOTE,
63
-    RIGHT_DBL_QUOTE,
64
-    INV_EXCLAMATION,
65
-    INV_QUESTION,
66
-#endif
67
-#if ENABLED(TOUCH_UI_UTF8_CURRENCY)
68
-    CENT_SIGN,
69
-    POUND_SIGN,
70
-    CURRENCY_SIGN,
71
-    YEN_SIGN,
72
-#endif
73
-#if ENABLED(TOUCH_UI_UTF8_SUPERSCRIPTS)
74
-    SUPERSCRIPT_ONE,
75
-    SUPERSCRIPT_TWO,
76
-    SUPERSCRIPT_THREE,
77
-#endif
78
-#if ENABLED(TOUCH_UI_UTF8_ORDINALS)
79
-    MASCULINE_ORDINAL,
80
-    FEMININE_ORDINAL,
81
-#endif
82
-#if ENABLED(TOUCH_UI_UTF8_COPYRIGHT)
83
-    COPYRIGHT_SIGN,
84
-    REGISTERED_SIGN,
85
-#endif
86
-#if ENABLED(TOUCH_UI_UTF8_MATHEMATICS)
87
-    PLUS_MINUS_SIGN,
88
-    MULTIPLICATION_SIGN,
89
-    DIVISION_SIGN,
90
-#endif
91
-#if ENABLED(TOUCH_UI_UTF8_FRACTIONS)
92
-    FRACTION_QUARTER,
93
-    FRACTION_HALF,
94
-    FRACTION_THREE_FOURTHS,
95
-#endif
96
-#if ENABLED(TOUCH_UI_UTF8_SYMBOLS)
97
-    MICRON_SIGN,
98
-    PILCROW_SIGN,
99
-    BROKEN_BAR,
100
-    SECTION_SIGN,
101
-    NOT_SIGN
102
-#endif
48
+    #if ENABLED(TOUCH_UI_UTF8_GERMANIC)
49
+      SHARP_S,
50
+    #endif
51
+    #if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
52
+      LRG_O_STROKE,
53
+      SML_O_STROKE,
54
+      LRG_AE,
55
+      SML_AE,
56
+      LRG_ETH,
57
+      SML_ETH,
58
+      LRG_THORN,
59
+      SML_THORN,
60
+    #endif
61
+    #if ENABLED(TOUCH_UI_UTF8_PUNCTUATION)
62
+      LEFT_DBL_QUOTE,
63
+      RIGHT_DBL_QUOTE,
64
+      INV_EXCLAMATION,
65
+      INV_QUESTION,
66
+    #endif
67
+    #if ENABLED(TOUCH_UI_UTF8_CURRENCY)
68
+      CENT_SIGN,
69
+      POUND_SIGN,
70
+      CURRENCY_SIGN,
71
+      YEN_SIGN,
72
+    #endif
73
+    #if ENABLED(TOUCH_UI_UTF8_SUPERSCRIPTS)
74
+      SUPERSCRIPT_ONE,
75
+      SUPERSCRIPT_TWO,
76
+      SUPERSCRIPT_THREE,
77
+    #endif
78
+    #if ENABLED(TOUCH_UI_UTF8_ORDINALS)
79
+      MASCULINE_ORDINAL,
80
+      FEMININE_ORDINAL,
81
+    #endif
82
+    #if ENABLED(TOUCH_UI_UTF8_COPYRIGHT)
83
+      COPYRIGHT_SIGN,
84
+      REGISTERED_SIGN,
85
+    #endif
86
+    #if ENABLED(TOUCH_UI_UTF8_MATHEMATICS)
87
+      PLUS_MINUS_SIGN,
88
+      MULTIPLICATION_SIGN,
89
+      DIVISION_SIGN,
90
+    #endif
91
+    #if ENABLED(TOUCH_UI_UTF8_FRACTIONS)
92
+      FRACTION_QUARTER,
93
+      FRACTION_HALF,
94
+      FRACTION_THREE_FOURTHS,
95
+    #endif
96
+    #if ENABLED(TOUCH_UI_UTF8_SYMBOLS)
97
+      MICRON_SIGN,
98
+      PILCROW_SIGN,
99
+      BROKEN_BAR,
100
+      SECTION_SIGN,
101
+      NOT_SIGN
102
+    #endif
103 103
   };
104 104
 
105 105
   /* Centerline of characters that can take accents */
106 106
 
107
-  constexpr int8_t mid_a = 12;
108
-  constexpr int8_t mid_e = 12;
109
-  constexpr int8_t mid_i = 5;
110
-  constexpr int8_t mid_o = 12;
111
-  constexpr int8_t mid_u = 12;
112
-  constexpr int8_t mid_y = 11;
113
-  constexpr int8_t mid_n = 12;
114
-  constexpr int8_t mid_c = 12;
115
-  constexpr int8_t mid_A = 13;
116
-  constexpr int8_t mid_E = 13;
117
-  constexpr int8_t mid_I = 6;
118
-  constexpr int8_t mid_O = 14;
119
-  constexpr int8_t mid_U = 14;
120
-  constexpr int8_t mid_Y = 13;
121
-  constexpr int8_t mid_N = 15;
122
-  constexpr int8_t mid_C = 13;
107
+  constexpr int8_t mid_a = 12,
108
+                   mid_e = 12,
109
+                   mid_i = 5,
110
+                   mid_o = 12,
111
+                   mid_u = 12,
112
+                   mid_y = 11,
113
+                   mid_n = 12,
114
+                   mid_c = 12,
115
+                   mid_A = 13,
116
+                   mid_E = 13,
117
+                   mid_I = 6,
118
+                   mid_O = 14,
119
+                   mid_U = 14,
120
+                   mid_Y = 13,
121
+                   mid_N = 15,
122
+                   mid_C = 13;
123 123
 
124 124
   /* Centerline of accent glyphs */
125 125
 
@@ -144,148 +144,148 @@
144 144
     uint8_t  alt_data; // For accented characters, the centerline; else char width
145 145
   } char_recipe[] = {
146 146
     {0,          0,  NO_DOT_I,           10   },
147
-#if ENABLED(TOUCH_UI_UTF8_PUNCTUATION)
148
-    {UTF8('¡'),  0 , INV_EXCLAMATION,    13   },
149
-#endif
150
-#if ENABLED(TOUCH_UI_UTF8_CURRENCY)
151
-    {UTF8('¢'),  0 , CENT_SIGN,          23   },
152
-    {UTF8('£'),  0 , POUND_SIGN,         24   },
153
-    {UTF8('¤'),  0 , CURRENCY_SIGN,      26   },
154
-    {UTF8('¥'),  0 , YEN_SIGN,           26   },
155
-#endif
156
-#if ENABLED(TOUCH_UI_UTF8_SYMBOLS)
157
-    {UTF8('¦'),  0 , BROKEN_BAR,         11   },
158
-    {UTF8('§'),  0 , SECTION_SIGN,       21   },
159
-#endif
160
-#if ENABLED(TOUCH_UI_UTF8_COPYRIGHT)
161
-    {UTF8('©'),  0 , COPYRIGHT_SIGN,     38   },
162
-#endif
163
-#if ENABLED(TOUCH_UI_UTF8_ORDINALS)
164
-    {UTF8('ª'),  0 , FEMININE_ORDINAL,   19   },
165
-#endif
166
-#if ENABLED(TOUCH_UI_UTF8_PUNCTUATION)
167
-    {UTF8('«'),  0 , LEFT_DBL_QUOTE,     23   },
168
-#endif
169
-#if ENABLED(TOUCH_UI_UTF8_SYMBOLS)
170
-    {UTF8('¬'),  0 , NOT_SIGN,           32   },
171
-#endif
172
-#if ENABLED(TOUCH_UI_UTF8_COPYRIGHT)
173
-    {UTF8('®'),  0 , REGISTERED_SIGN,    38   },
174
-#endif
175
-    {UTF8('°'),  0 , DOT_ABOVE,          24   },
176
-#if ENABLED(TOUCH_UI_UTF8_MATHEMATICS)
177
-    {UTF8('±'),  0 , NOT_SIGN,           32   },
178
-#endif
179
-#if ENABLED(TOUCH_UI_UTF8_SUPERSCRIPTS)
180
-    {UTF8('²'),  0 , SUPERSCRIPT_TWO,    16   },
181
-    {UTF8('³'),  0 , SUPERSCRIPT_THREE,  16   },
182
-#endif
183
-#if ENABLED(TOUCH_UI_UTF8_SYMBOLS)
184
-    {UTF8('µ'),  0 , MICRON_SIGN,        28   },
185
-    {UTF8('¶'),  0 , PILCROW_SIGN,       24   },
186
-#endif
187
-#if ENABLED(TOUCH_UI_UTF8_SUPERSCRIPTS)
188
-    {UTF8('¹'),  0 , SUPERSCRIPT_ONE,    16   },
189
-#endif
190
-#if ENABLED(TOUCH_UI_UTF8_ORDINALS)
191
-    {UTF8('º'),  0 , MASCULINE_ORDINAL,  19   },
192
-#endif
193
-#if ENABLED(TOUCH_UI_UTF8_PUNCTUATION)
194
-    {UTF8('»'),  0 , RIGHT_DBL_QUOTE,    24   },
195
-#endif
196
-#if ENABLED(TOUCH_UI_UTF8_FRACTIONS)
197
-    {UTF8('¼'),  0 , FRACTION_QUARTER,   40   },
198
-    {UTF8('½'),  0 , FRACTION_HALF,      40   },
199
-    {UTF8('¾'),  0 , FRACTION_THREE_FOURTHS, 40 },
200
-#endif
201
-#if ENABLED(TOUCH_UI_UTF8_PUNCTUATION)
202
-    {UTF8('¿'),  0 , INV_QUESTION,       21   },
203
-#endif
204
-    {UTF8('À'), 'A', GRAVE,              mid_A},
205
-    {UTF8('Á'), 'A', ACUTE,              mid_A},
206
-    {UTF8('Â'), 'A', CIRCUMFLEX,         mid_A},
207
-    {UTF8('Ã'), 'A', TILDE,              mid_A},
208
-    {UTF8('Ä'), 'A', DIAERESIS,          mid_A},
209
-    {UTF8('Å'), 'A', DOT_ABOVE,          mid_A},
210
-#if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
211
-    {UTF8('Æ'),  0 , LRG_AE,             40},
212
-#endif
213
-    {UTF8('Ç'), 'C', CEDILLA,            mid_C},
214
-    {UTF8('È'), 'E', GRAVE,              mid_E},
215
-    {UTF8('É'), 'E', ACUTE,              mid_E},
216
-    {UTF8('Ê'), 'E', CIRCUMFLEX,         mid_E},
217
-    {UTF8('Ë'), 'E', DIAERESIS,          mid_E},
218
-    {UTF8('Ì'), 'I', GRAVE,              mid_I},
219
-    {UTF8('Í'), 'I', ACUTE,              mid_I},
220
-    {UTF8('Î'), 'I', CIRCUMFLEX,         mid_I},
221
-    {UTF8('Ï'), 'I', DIAERESIS,          mid_I},
222
-#if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
223
-    {UTF8('Ð'),  0,  LRG_ETH,            31   },
224
-#endif
225
-    {UTF8('Ñ'), 'N', TILDE,              mid_N},
226
-    {UTF8('Ò'), 'O', GRAVE,              mid_O},
227
-    {UTF8('Ó'), 'O', ACUTE,              mid_O},
228
-    {UTF8('Ô'), 'O', CIRCUMFLEX,         mid_O},
229
-    {UTF8('Õ'), 'O', TILDE,              mid_O},
230
-    {UTF8('Ö'), 'O', DIAERESIS,          mid_O},
231
-#if ENABLED(TOUCH_UI_UTF8_MATHEMATICS)
232
-    {UTF8('×'),  0 , MULTIPLICATION_SIGN, 32 },
233
-#endif
234
-#if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
235
-    {UTF8('Ø'),  0 , LRG_O_STROKE,       32   },
236
-#endif
237
-    {UTF8('Ù'), 'U', GRAVE,              mid_U},
238
-    {UTF8('Ú'), 'U', ACUTE,              mid_U},
239
-    {UTF8('Û'), 'U', CIRCUMFLEX,         mid_U},
240
-    {UTF8('Ü'), 'U', DIAERESIS,          mid_U},
241
-    {UTF8('Ý'), 'Y', ACUTE,              mid_Y},
242
-#if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
243
-    {UTF8('Þ'),  0 , LRG_THORN,          25   },
244
-#endif
245
-#if ENABLED(TOUCH_UI_UTF8_GERMANIC)
246
-    {UTF8('ß'),  0 , SHARP_S,            26   },
247
-#endif
248
-    {UTF8('à'), 'a', GRAVE,              mid_a},
249
-    {UTF8('á'), 'a', ACUTE,              mid_a},
250
-    {UTF8('â'), 'a', CIRCUMFLEX,         mid_a},
251
-    {UTF8('ã'), 'a', TILDE,              mid_a},
252
-    {UTF8('ä'), 'a', DIAERESIS,          mid_a},
253
-    {UTF8('å'), 'a', DOT_ABOVE,          mid_a},
254
-#if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
255
-    {UTF8('æ'),  0 , SML_AE,             40   },
256
-#endif
257
-    {UTF8('ç'), 'c', CEDILLA,            mid_c},
258
-    {UTF8('è'), 'e', GRAVE,              mid_e},
259
-    {UTF8('é'), 'e', ACUTE,              mid_e},
260
-    {UTF8('ê'), 'e', CIRCUMFLEX,         mid_e},
261
-    {UTF8('ë'), 'e', DIAERESIS,          mid_e},
262
-    {UTF8('ì'), 'i', GRAVE,              mid_i},
263
-    {UTF8('í'), 'i', ACUTE,              mid_i},
264
-    {UTF8('î'), 'i', CIRCUMFLEX,         mid_i},
265
-    {UTF8('ï'), 'i', DIAERESIS,          mid_i},
266
-#if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
267
-    {UTF8('ð'),  0,  SML_ETH,            24   },
268
-#endif
269
-    {UTF8('ñ'), 'n', TILDE,              mid_n},
270
-    {UTF8('ò'), 'o', GRAVE,              mid_o},
271
-    {UTF8('ó'), 'o', ACUTE,              mid_o},
272
-    {UTF8('ô'), 'o', CIRCUMFLEX,         mid_o},
273
-    {UTF8('õ'), 'o', TILDE,              mid_o},
274
-    {UTF8('ö'), 'o', DIAERESIS,          mid_o},
275
-#if ENABLED(TOUCH_UI_UTF8_MATHEMATICS)
276
-    {UTF8('÷'),  0 , DIVISION_SIGN,      32 },
277
-#endif
278
-#if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
279
-    {UTF8('ø'),  0 , SML_O_STROKE,       25   },
280
-#endif
281
-    {UTF8('ù'), 'u', GRAVE,              mid_u},
282
-    {UTF8('ú'), 'u', ACUTE,              mid_u},
283
-    {UTF8('û'), 'u', CIRCUMFLEX,         mid_u},
284
-    {UTF8('ü'), 'u', DIAERESIS,          mid_u},
285
-    {UTF8('ý'), 'y', ACUTE,              mid_y},
286
-#if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
287
-    {UTF8('þ'),  0 , SML_THORN,          25   },
288
-#endif
147
+    #if ENABLED(TOUCH_UI_UTF8_PUNCTUATION)
148
+      {UTF8('¡'),  0 , INV_EXCLAMATION,    13   },
149
+    #endif
150
+    #if ENABLED(TOUCH_UI_UTF8_CURRENCY)
151
+      {UTF8('¢'),  0 , CENT_SIGN,          23   },
152
+      {UTF8('£'),  0 , POUND_SIGN,         24   },
153
+      {UTF8('¤'),  0 , CURRENCY_SIGN,      26   },
154
+      {UTF8('¥'),  0 , YEN_SIGN,           26   },
155
+    #endif
156
+    #if ENABLED(TOUCH_UI_UTF8_SYMBOLS)
157
+      {UTF8('¦'),  0 , BROKEN_BAR,         11   },
158
+      {UTF8('§'),  0 , SECTION_SIGN,       21   },
159
+    #endif
160
+    #if ENABLED(TOUCH_UI_UTF8_COPYRIGHT)
161
+      {UTF8('©'),  0 , COPYRIGHT_SIGN,     38   },
162
+    #endif
163
+    #if ENABLED(TOUCH_UI_UTF8_ORDINALS)
164
+      {UTF8('ª'),  0 , FEMININE_ORDINAL,   19   },
165
+    #endif
166
+    #if ENABLED(TOUCH_UI_UTF8_PUNCTUATION)
167
+      {UTF8('«'),  0 , LEFT_DBL_QUOTE,     23   },
168
+    #endif
169
+    #if ENABLED(TOUCH_UI_UTF8_SYMBOLS)
170
+      {UTF8('¬'),  0 , NOT_SIGN,           32   },
171
+    #endif
172
+    #if ENABLED(TOUCH_UI_UTF8_COPYRIGHT)
173
+      {UTF8('®'),  0 , REGISTERED_SIGN,    38   },
174
+    #endif
175
+      {UTF8('°'),  0 , DOT_ABOVE,          24   },
176
+    #if ENABLED(TOUCH_UI_UTF8_MATHEMATICS)
177
+      {UTF8('±'),  0 , NOT_SIGN,           32   },
178
+    #endif
179
+    #if ENABLED(TOUCH_UI_UTF8_SUPERSCRIPTS)
180
+      {UTF8('²'),  0 , SUPERSCRIPT_TWO,    16   },
181
+      {UTF8('³'),  0 , SUPERSCRIPT_THREE,  16   },
182
+    #endif
183
+    #if ENABLED(TOUCH_UI_UTF8_SYMBOLS)
184
+      {UTF8('µ'),  0 , MICRON_SIGN,        28   },
185
+      {UTF8('¶'),  0 , PILCROW_SIGN,       24   },
186
+    #endif
187
+    #if ENABLED(TOUCH_UI_UTF8_SUPERSCRIPTS)
188
+      {UTF8('¹'),  0 , SUPERSCRIPT_ONE,    16   },
189
+    #endif
190
+    #if ENABLED(TOUCH_UI_UTF8_ORDINALS)
191
+      {UTF8('º'),  0 , MASCULINE_ORDINAL,  19   },
192
+    #endif
193
+    #if ENABLED(TOUCH_UI_UTF8_PUNCTUATION)
194
+      {UTF8('»'),  0 , RIGHT_DBL_QUOTE,    24   },
195
+    #endif
196
+    #if ENABLED(TOUCH_UI_UTF8_FRACTIONS)
197
+      {UTF8('¼'),  0 , FRACTION_QUARTER,   40   },
198
+      {UTF8('½'),  0 , FRACTION_HALF,      40   },
199
+      {UTF8('¾'),  0 , FRACTION_THREE_FOURTHS, 40 },
200
+    #endif
201
+    #if ENABLED(TOUCH_UI_UTF8_PUNCTUATION)
202
+      {UTF8('¿'),  0 , INV_QUESTION,       21   },
203
+    #endif
204
+      {UTF8('À'), 'A', GRAVE,              mid_A},
205
+      {UTF8('Á'), 'A', ACUTE,              mid_A},
206
+      {UTF8('Â'), 'A', CIRCUMFLEX,         mid_A},
207
+      {UTF8('Ã'), 'A', TILDE,              mid_A},
208
+      {UTF8('Ä'), 'A', DIAERESIS,          mid_A},
209
+      {UTF8('Å'), 'A', DOT_ABOVE,          mid_A},
210
+    #if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
211
+      {UTF8('Æ'),  0 , LRG_AE,             40},
212
+    #endif
213
+      {UTF8('Ç'), 'C', CEDILLA,            mid_C},
214
+      {UTF8('È'), 'E', GRAVE,              mid_E},
215
+      {UTF8('É'), 'E', ACUTE,              mid_E},
216
+      {UTF8('Ê'), 'E', CIRCUMFLEX,         mid_E},
217
+      {UTF8('Ë'), 'E', DIAERESIS,          mid_E},
218
+      {UTF8('Ì'), 'I', GRAVE,              mid_I},
219
+      {UTF8('Í'), 'I', ACUTE,              mid_I},
220
+      {UTF8('Î'), 'I', CIRCUMFLEX,         mid_I},
221
+      {UTF8('Ï'), 'I', DIAERESIS,          mid_I},
222
+    #if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
223
+      {UTF8('Ð'),  0,  LRG_ETH,            31   },
224
+    #endif
225
+      {UTF8('Ñ'), 'N', TILDE,              mid_N},
226
+      {UTF8('Ò'), 'O', GRAVE,              mid_O},
227
+      {UTF8('Ó'), 'O', ACUTE,              mid_O},
228
+      {UTF8('Ô'), 'O', CIRCUMFLEX,         mid_O},
229
+      {UTF8('Õ'), 'O', TILDE,              mid_O},
230
+      {UTF8('Ö'), 'O', DIAERESIS,          mid_O},
231
+    #if ENABLED(TOUCH_UI_UTF8_MATHEMATICS)
232
+      {UTF8('×'),  0 , MULTIPLICATION_SIGN, 32 },
233
+    #endif
234
+    #if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
235
+      {UTF8('Ø'),  0 , LRG_O_STROKE,       32   },
236
+    #endif
237
+      {UTF8('Ù'), 'U', GRAVE,              mid_U},
238
+      {UTF8('Ú'), 'U', ACUTE,              mid_U},
239
+      {UTF8('Û'), 'U', CIRCUMFLEX,         mid_U},
240
+      {UTF8('Ü'), 'U', DIAERESIS,          mid_U},
241
+      {UTF8('Ý'), 'Y', ACUTE,              mid_Y},
242
+    #if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
243
+      {UTF8('Þ'),  0 , LRG_THORN,          25   },
244
+    #endif
245
+    #if ENABLED(TOUCH_UI_UTF8_GERMANIC)
246
+      {UTF8('ß'),  0 , SHARP_S,            26   },
247
+    #endif
248
+      {UTF8('à'), 'a', GRAVE,              mid_a},
249
+      {UTF8('á'), 'a', ACUTE,              mid_a},
250
+      {UTF8('â'), 'a', CIRCUMFLEX,         mid_a},
251
+      {UTF8('ã'), 'a', TILDE,              mid_a},
252
+      {UTF8('ä'), 'a', DIAERESIS,          mid_a},
253
+      {UTF8('å'), 'a', DOT_ABOVE,          mid_a},
254
+    #if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
255
+      {UTF8('æ'),  0 , SML_AE,             40   },
256
+    #endif
257
+      {UTF8('ç'), 'c', CEDILLA,            mid_c},
258
+      {UTF8('è'), 'e', GRAVE,              mid_e},
259
+      {UTF8('é'), 'e', ACUTE,              mid_e},
260
+      {UTF8('ê'), 'e', CIRCUMFLEX,         mid_e},
261
+      {UTF8('ë'), 'e', DIAERESIS,          mid_e},
262
+      {UTF8('ì'), 'i', GRAVE,              mid_i},
263
+      {UTF8('í'), 'i', ACUTE,              mid_i},
264
+      {UTF8('î'), 'i', CIRCUMFLEX,         mid_i},
265
+      {UTF8('ï'), 'i', DIAERESIS,          mid_i},
266
+    #if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
267
+      {UTF8('ð'),  0,  SML_ETH,            24   },
268
+    #endif
269
+      {UTF8('ñ'), 'n', TILDE,              mid_n},
270
+      {UTF8('ò'), 'o', GRAVE,              mid_o},
271
+      {UTF8('ó'), 'o', ACUTE,              mid_o},
272
+      {UTF8('ô'), 'o', CIRCUMFLEX,         mid_o},
273
+      {UTF8('õ'), 'o', TILDE,              mid_o},
274
+      {UTF8('ö'), 'o', DIAERESIS,          mid_o},
275
+    #if ENABLED(TOUCH_UI_UTF8_MATHEMATICS)
276
+      {UTF8('÷'),  0 , DIVISION_SIGN,      32 },
277
+    #endif
278
+    #if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
279
+      {UTF8('ø'),  0 , SML_O_STROKE,       25   },
280
+    #endif
281
+      {UTF8('ù'), 'u', GRAVE,              mid_u},
282
+      {UTF8('ú'), 'u', ACUTE,              mid_u},
283
+      {UTF8('û'), 'u', CIRCUMFLEX,         mid_u},
284
+      {UTF8('ü'), 'u', DIAERESIS,          mid_u},
285
+      {UTF8('ý'), 'y', ACUTE,              mid_y},
286
+    #if ENABLED(TOUCH_UI_UTF8_SCANDINAVIAN)
287
+      {UTF8('þ'),  0 , SML_THORN,          25   },
288
+    #endif
289 289
     {UTF8('ÿ'), 'y', DIAERESIS,          mid_y}
290 290
   };
291 291
 
@@ -424,7 +424,8 @@
424 424
       accent_char  = 0;
425 425
       if (c == UTF8('°'))
426 426
         x -= fs.scale(deg_sign_leading);
427
-    } else {
427
+    }
428
+    else {
428 429
       // Regular character with accent:
429 430
       accent_dx   = alt_data - mid_accent;
430 431
       accent_dy   = isupper(std_char) ? -7 : 0;

+ 4
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/poly_ui.h Zobrazit soubor

@@ -92,7 +92,8 @@ class PolyReader {
92 92
           close_loop();
93 93
         else
94 94
           p = NULL;
95
-      } else {
95
+      }
96
+      else {
96 97
         x = pgm_read_word_far(p++);
97 98
         if (x == eol)
98 99
           close_loop();
@@ -225,7 +226,8 @@ class DeduplicatedPolyReader : public POLY_READER {
225 226
       } while (POLY_READER::x == last_x && POLY_READER::y == last_y && !POLY_READER::end_of_loop());
226 227
       if (POLY_READER::end_of_loop()) {
227 228
         last_x = last_y = eol;
228
-      } else {
229
+      }
230
+      else {
229 231
         last_x = POLY_READER::x;
230 232
         last_y = POLY_READER::y;
231 233
       }

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_numeric_adjustment_screen.cpp Zobrazit soubor

@@ -73,13 +73,13 @@ void BaseNumericAdjustmentScreen::widgets_t::_button_style(CommandProcessor &cmd
73 73
     const btn_colors *old_colors = &normal_btn;
74 74
     const btn_colors *new_colors = &normal_btn;
75 75
 
76
-    switch(_style) {
76
+    switch (_style) {
77 77
       case BTN_ACTION:   old_colors = &action_btn;   break;
78 78
       case BTN_TOGGLE:   old_colors = &ui_toggle;    break;
79 79
       case BTN_DISABLED: old_colors = &disabled_btn; break;
80 80
       default: break;
81 81
     }
82
-    switch(style) {
82
+    switch (style) {
83 83
       case BTN_ACTION:   new_colors = &action_btn;   break;
84 84
       case BTN_TOGGLE:   new_colors = &ui_toggle;    break;
85 85
       case BTN_DISABLED: new_colors = &disabled_btn; break;

+ 6
- 8
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp Zobrazit soubor

@@ -102,12 +102,11 @@ bool BioPrintingDialogBox::onTouchEnd(uint8_t tag) {
102 102
     case 1: GOTO_SCREEN(FeedratePercentScreen); break;
103 103
     case 2: GOTO_SCREEN(TuneMenu); break;
104 104
     case 3:
105
-     if (isPrinting()) {
106
-       GOTO_SCREEN(ConfirmAbortPrintDialogBox);
107
-     } else {
108
-       GOTO_SCREEN(StatusScreen);
109
-     }
110
-     break;
105
+      if (isPrinting())
106
+        GOTO_SCREEN(ConfirmAbortPrintDialogBox);
107
+      else
108
+        GOTO_SCREEN(StatusScreen);
109
+      break;
111 110
     default: return false;
112 111
   }
113 112
   return true;
@@ -136,9 +135,8 @@ void BioPrintingDialogBox::setStatusMessage(const char* message) {
136 135
     SERIAL_ECHOLNPAIR("New status message: ", message);
137 136
   #endif
138 137
 
139
-  if (AT_SCREEN(BioPrintingDialogBox)) {
138
+  if (AT_SCREEN(BioPrintingDialogBox))
140 139
     current_screen.onRefresh();
141
-  }
142 140
 }
143 141
 
144 142
 void BioPrintingDialogBox::onIdle() {

+ 2
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp Zobrazit soubor

@@ -114,7 +114,8 @@ void FilesScreen::drawFileList() {
114 114
   for(uint8_t i = 0; i < files_per_page; i++, fileIndex++) {
115 115
     if (files.seek(fileIndex)) {
116 116
       drawFileButton(files.filename(), getTagForLine(i), files.isDir(), false);
117
-    } else {
117
+    }
118
+    else {
118 119
       break;
119 120
     }
120 121
   }

+ 6
- 12
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/lock_screen.cpp Zobrazit soubor

@@ -72,19 +72,11 @@ void LockScreen::onRedraw(draw_mode_t what) {
72 72
         message = GET_TEXT_F(MSG_PASSCODE_ACCEPTED);
73 73
         break;
74 74
       default:
75
-        if (passcode == 0) {
76
-          message = GET_TEXT_F(MSG_PASSCODE_SELECT);
77
-        } else {
78
-          message = GET_TEXT_F(MSG_PASSCODE_REQUEST);
79
-        }
75
+        message = passcode ? GET_TEXT_F(MSG_PASSCODE_REQUEST) : GET_TEXT_F(MSG_PASSCODE_SELECT);
80 76
     }
81 77
     message_style() = '\0'; // Terminate the string.
82 78
 
83
-    #ifdef TOUCH_UI_PORTRAIT
84
-      constexpr uint8_t l = 6;
85
-    #else
86
-      constexpr uint8_t l = 3;
87
-    #endif
79
+    constexpr uint8_t l = TERN(TOUCH_UI_PORTRAIT, 6, 3);
88 80
 
89 81
     const uint8_t pressed = EventLoop::get_pressed_tag();
90 82
 
@@ -144,7 +136,8 @@ void LockScreen::onPasscodeEntered() {
144 136
       onRefresh();
145 137
       sound.play(twinkle, PLAY_SYNCHRONOUS);
146 138
       GOTO_PREVIOUS();
147
-    } else {
139
+    }
140
+    else {
148 141
       message_style() = 'w';
149 142
       onRefresh();
150 143
       sound.play(sad_trombone, PLAY_SYNCHRONOUS);
@@ -162,7 +155,8 @@ bool LockScreen::onTouchEnd(uint8_t tag) {
162 155
         // Backspace deletes previous entered characters.
163 156
         *--c = '_';
164 157
       }
165
-    } else {
158
+    }
159
+    else {
166 160
       // Append character to passcode
167 161
       *c++ = tag;
168 162
       if (*c == '\0') {

+ 4
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp Zobrazit soubor

@@ -380,7 +380,8 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
380 380
     case 4:
381 381
       if (isPrinting()) {
382 382
         GOTO_SCREEN(TuneMenu);
383
-      } else {
383
+      }
384
+      else {
384 385
         GOTO_SCREEN(MainMenu);
385 386
       }
386 387
       break;
@@ -394,7 +395,8 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
394 395
         #else
395 396
           return false;
396 397
         #endif
397
-      } else {
398
+      }
399
+      else {
398 400
         GOTO_SCREEN(MoveAxisScreen);
399 401
       }
400 402
       break;

+ 2
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp Zobrazit soubor

@@ -123,7 +123,8 @@ void StressTestScreen::onIdle() {
123 123
       if (!isPositionKnown()) {
124 124
         extern const char G28_STR[];
125 125
         injectCommands_P(G28_STR);
126
-      } else {
126
+      }
127
+      else {
127 128
         injectCommands_P(PSTR(
128 129
           "G0 X100 Y100 Z100 F6000\n"
129 130
           "T0\nG4 S1"

Loading…
Zrušit
Uložit