Quellcode durchsuchen

Move 'draw' methods into Menu Item classes (#15760)

Scott Lahteine vor 4 Jahren
Ursprung
Commit
ea3217cd46
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
32 geänderte Dateien mit 351 neuen und 399 gelöschten Zeilen
  1. 1
    1
      Marlin/src/HAL/HAL_STM32_F4_F7/watchdog.cpp
  2. 3
    0
      Marlin/src/core/types.h
  3. 0
    1
      Marlin/src/inc/MarlinConfigPre.h
  4. 14
    11
      Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp
  5. 6
    10
      Marlin/src/lcd/dogm/ultralcd_DOGM.cpp
  6. 3
    3
      Marlin/src/lcd/language/language_cz.h
  7. 3
    3
      Marlin/src/lcd/language/language_de.h
  8. 3
    3
      Marlin/src/lcd/language/language_en.h
  9. 3
    3
      Marlin/src/lcd/language/language_es.h
  10. 3
    3
      Marlin/src/lcd/language/language_fr.h
  11. 3
    3
      Marlin/src/lcd/language/language_it.h
  12. 3
    3
      Marlin/src/lcd/language/language_pl.h
  13. 3
    3
      Marlin/src/lcd/language/language_pt_br.h
  14. 3
    3
      Marlin/src/lcd/language/language_ru.h
  15. 3
    3
      Marlin/src/lcd/language/language_sk.h
  16. 3
    3
      Marlin/src/lcd/language/language_tr.h
  17. 9
    7
      Marlin/src/lcd/menu/menu.cpp
  18. 182
    148
      Marlin/src/lcd/menu/menu.h
  19. 16
    22
      Marlin/src/lcd/menu/menu_advanced.cpp
  20. 17
    21
      Marlin/src/lcd/menu/menu_bed_corners.cpp
  21. 4
    4
      Marlin/src/lcd/menu/menu_bed_leveling.cpp
  22. 1
    1
      Marlin/src/lcd/menu/menu_cancelobject.cpp
  23. 9
    17
      Marlin/src/lcd/menu/menu_configuration.cpp
  24. 1
    1
      Marlin/src/lcd/menu/menu_filament.cpp
  25. 28
    16
      Marlin/src/lcd/menu/menu_main.cpp
  26. 9
    3
      Marlin/src/lcd/menu/menu_media.cpp
  27. 13
    17
      Marlin/src/lcd/menu/menu_mixer.cpp
  28. 2
    2
      Marlin/src/lcd/menu/menu_motion.cpp
  29. 0
    82
      Marlin/src/lcd/menu/menu_service.cpp
  30. 1
    1
      Marlin/src/lcd/menu/menu_tune.cpp
  31. 1
    1
      Marlin/src/lcd/menu/menu_ubl.cpp
  32. 1
    0
      buildroot/share/tests/megaatmega2560-tests

+ 1
- 1
Marlin/src/HAL/HAL_STM32_F4_F7/watchdog.cpp Datei anzeigen

@@ -38,7 +38,7 @@
38 38
       //Error_Handler();
39 39
     }
40 40
     else {
41
-      #if PIN_EXISTS(LED) && !ENABLED(PINS_DEBUGGING)
41
+      #if PIN_EXISTS(LED) && DISABLED(PINS_DEBUGGING)
42 42
         TOGGLE(LED_PIN);  // heartbeat indicator
43 43
       #endif
44 44
     }

+ 3
- 0
Marlin/src/core/types.h Datei anzeigen

@@ -26,6 +26,9 @@
26 26
 
27 27
 #include "millis_t.h"
28 28
 
29
+class __FlashStringHelper;
30
+typedef const __FlashStringHelper *progmem_str;
31
+
29 32
 //
30 33
 // Enumerated axis indices
31 34
 //

+ 0
- 1
Marlin/src/inc/MarlinConfigPre.h Datei anzeigen

@@ -36,7 +36,6 @@
36 36
 #include "../core/macros.h"
37 37
 #include "../../Configuration.h"
38 38
 
39
-
40 39
 #ifdef CUSTOM_VERSION_FILE
41 40
   #if defined(__has_include)
42 41
     #if __has_include(XSTR(../../CUSTOM_VERSION_FILE))

+ 14
- 11
Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp Datei anzeigen

@@ -991,7 +991,8 @@ void MarlinUI::draw_status_screen() {
991 991
 
992 992
   #endif // ADVANCED_PAUSE_FEATURE
993 993
 
994
-  void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
994
+  // Draw a static item with no left-right margin required. Centered by default.
995
+  void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
995 996
     int8_t n = LCD_WIDTH;
996 997
     lcd_moveto(0, row);
997 998
     if ((style & SS_CENTER) && !valstr) {
@@ -1003,7 +1004,8 @@ void MarlinUI::draw_status_screen() {
1003 1004
     for (; n > 0; --n) lcd_put_wchar(' ');
1004 1005
   }
1005 1006
 
1006
-  void draw_menu_item(const bool sel, const uint8_t row, PGM_P pstr, const char pre_char, const char post_char) {
1007
+  // Draw a generic menu item with pre_char (if selected) and post_char
1008
+  void MenuItemBase::_draw(const bool sel, const uint8_t row, PGM_P const pstr, const char pre_char, const char post_char) {
1007 1009
     uint8_t n = LCD_WIDTH - 2;
1008 1010
     lcd_put_wchar(0, row, sel ? pre_char : ' ');
1009 1011
     n -= lcd_put_u8str_max_P(pstr, n);
@@ -1011,16 +1013,18 @@ void MarlinUI::draw_status_screen() {
1011 1013
     lcd_put_wchar(post_char);
1012 1014
   }
1013 1015
 
1014
-  void _draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P pstr, const char* const data, const bool pgm) {
1015
-    uint8_t n = LCD_WIDTH - 2 - (pgm ? utf8_strlen_P(data) : utf8_strlen(data));
1016
+  // Draw an edit menu item with label and value string
1017
+  void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P pstr, const char* const data, const bool pgm) {
1018
+    int8_t n = LCD_WIDTH - 2 - (pgm ? utf8_strlen_P(data) : utf8_strlen(data));
1016 1019
     lcd_put_wchar(0, row, sel ? LCD_STR_ARROW_RIGHT[0] : ' ');
1017 1020
     n -= lcd_put_u8str_max_P(pstr, n);
1018 1021
     lcd_put_wchar(':');
1019
-    for (; n; --n) lcd_put_wchar(' ');
1022
+    for (; n > 0; --n) lcd_put_wchar(' ');
1020 1023
     if (pgm) lcd_put_u8str_P(data); else lcd_put_u8str(data);
1021 1024
   }
1022 1025
 
1023
-  void draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) {
1026
+  // Draw the edit screen for an editable menu item
1027
+  void MenuEditItemBase::edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) {
1024 1028
     ui.encoder_direction_normal();
1025 1029
 
1026 1030
     lcd_put_u8str_P(0, 1, pstr);
@@ -1033,7 +1037,8 @@ void MarlinUI::draw_status_screen() {
1033 1037
     }
1034 1038
   }
1035 1039
 
1036
-  void draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string, PGM_P const suff) {
1040
+  // The Select Screen presents a prompt and two "buttons"
1041
+  void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) {
1037 1042
     ui.draw_select_screen_prompt(pref, string, suff);
1038 1043
     SETCURSOR(0, LCD_HEIGHT - 1);
1039 1044
     lcd_put_wchar(yesno ? ' ' : '['); lcd_put_u8str_P(no); lcd_put_wchar(yesno ? ' ' : ']');
@@ -1043,9 +1048,7 @@ void MarlinUI::draw_status_screen() {
1043 1048
 
1044 1049
   #if ENABLED(SDSUPPORT)
1045 1050
 
1046
-    void draw_sd_menu_item(const bool sel, const uint8_t row, PGM_P const pstr, CardReader &theCard, const bool isDir) {
1047
-      UNUSED(pstr);
1048
-
1051
+    void MenuItem_sdbase::draw(const bool sel, const uint8_t row, PGM_P const, CardReader &theCard, const bool isDir) {
1049 1052
       lcd_put_wchar(0, row, sel ? LCD_STR_ARROW_RIGHT[0] : ' ');
1050 1053
       constexpr uint8_t maxlen = LCD_WIDTH - 2;
1051 1054
       uint8_t n = maxlen - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), maxlen);
@@ -1053,7 +1056,7 @@ void MarlinUI::draw_status_screen() {
1053 1056
       lcd_put_wchar(isDir ? LCD_STR_FOLDER[0] : ' ');
1054 1057
     }
1055 1058
 
1056
-  #endif // SDSUPPORT
1059
+  #endif
1057 1060
 
1058 1061
   #if ENABLED(LCD_HAS_STATUS_INDICATORS)
1059 1062
 

+ 6
- 10
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp Datei anzeigen

@@ -363,7 +363,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
363 363
   }
364 364
 
365 365
   // Draw a static line of text in the same idiom as a menu item
366
-  void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
366
+  void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
367 367
 
368 368
     if (mark_as_selected(row, style & SS_INVERT)) {
369 369
 
@@ -380,9 +380,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
380 380
   }
381 381
 
382 382
   // Draw a generic menu item
383
-  void draw_menu_item(const bool sel, const uint8_t row, PGM_P const pstr, const char pre_char, const char post_char) {
384
-    UNUSED(pre_char);
385
-
383
+  void MenuItemBase::_draw(const bool sel, const uint8_t row, PGM_P const pstr, const char, const char post_char) {
386 384
     if (mark_as_selected(row, sel)) {
387 385
       u8g_uint_t n = (LCD_WIDTH - 2) * (MENU_FONT_WIDTH);
388 386
       n -= lcd_put_u8str_max_P(pstr, n);
@@ -393,7 +391,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
393 391
   }
394 392
 
395 393
   // Draw a menu item with an editable value
396
-  void _draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm) {
394
+  void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm) {
397 395
     if (mark_as_selected(row, sel)) {
398 396
       const uint8_t vallen = (pgm ? utf8_strlen_P(data) : utf8_strlen((char*)data));
399 397
       u8g_uint_t n = (LCD_WIDTH - 2 - vallen) * (MENU_FONT_WIDTH);
@@ -405,7 +403,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
405 403
     }
406 404
   }
407 405
 
408
-  void draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) {
406
+  void MenuEditItemBase::edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) {
409 407
     ui.encoder_direction_normal();
410 408
 
411 409
     const u8g_uint_t labellen = utf8_strlen_P(pstr), vallen = utf8_strlen(value);
@@ -466,7 +464,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
466 464
     if (inv) u8g.setColorIndex(1);
467 465
   }
468 466
 
469
-  void draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string, PGM_P const suff) {
467
+  void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) {
470 468
     ui.draw_select_screen_prompt(pref, string, suff);
471 469
     draw_boxed_string(1, LCD_HEIGHT - 1, no, !yesno);
472 470
     draw_boxed_string(LCD_WIDTH - (utf8_strlen_P(yes) + 1), LCD_HEIGHT - 1, yes, yesno);
@@ -474,9 +472,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
474 472
 
475 473
   #if ENABLED(SDSUPPORT)
476 474
 
477
-    void draw_sd_menu_item(const bool sel, const uint8_t row, PGM_P const pstr, CardReader &theCard, const bool isDir) {
478
-      UNUSED(pstr);
479
-
475
+    void MenuItem_sdbase::draw(const bool sel, const uint8_t row, PGM_P const, CardReader &theCard, const bool isDir) {
480 476
       if (mark_as_selected(row, sel)) {
481 477
         if (isDir) lcd_put_wchar(LCD_STR_FOLDER[0]);
482 478
         constexpr uint8_t maxlen = LCD_WIDTH - 1;

+ 3
- 3
Marlin/src/lcd/language/language_cz.h Datei anzeigen

@@ -137,9 +137,9 @@ namespace Language_cz {
137 137
   PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE             = _UxGT("Duplikace");
138 138
   PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY         = _UxGT("Zrcadlení");
139 139
   PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL             = _UxGT("Plná kontrola");
140
-  PROGMEM Language_Str MSG_X_OFFSET                        = _UxGT("2. tryska X");
141
-  PROGMEM Language_Str MSG_Y_OFFSET                        = _UxGT("2. tryska Y");
142
-  PROGMEM Language_Str MSG_Z_OFFSET                        = _UxGT("2. tryska Z");
140
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_X                 = _UxGT("2. tryska X");
141
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Y                 = _UxGT("2. tryska Y");
142
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Z                 = _UxGT("2. tryska Z");
143 143
 
144 144
   PROGMEM Language_Str MSG_UBL_DOING_G29                   = _UxGT("Provádím G29");
145 145
   PROGMEM Language_Str MSG_UBL_TOOLS                       = _UxGT("UBL nástroje");

+ 3
- 3
Marlin/src/lcd/language/language_de.h Datei anzeigen

@@ -137,9 +137,9 @@ namespace Language_de {
137 137
   PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE             = _UxGT("Duplizieren");
138 138
   PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY         = _UxGT("Spiegelkopie");
139 139
   PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL             = _UxGT("vollstä. Kontrolle");
140
-  PROGMEM Language_Str MSG_X_OFFSET                        = _UxGT("2. Düse X");
141
-  PROGMEM Language_Str MSG_Y_OFFSET                        = _UxGT("2. Düse Y");
142
-  PROGMEM Language_Str MSG_Z_OFFSET                        = _UxGT("2. Düse Z");
140
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_X                 = _UxGT("2. Düse X");
141
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Y                 = _UxGT("2. Düse Y");
142
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Z                 = _UxGT("2. Düse Z");
143 143
   PROGMEM Language_Str MSG_UBL_DOING_G29                   = _UxGT("G29 ausführen");
144 144
   PROGMEM Language_Str MSG_UBL_TOOLS                       = _UxGT("UBL-Werkzeuge");
145 145
   PROGMEM Language_Str MSG_UBL_LEVEL_BED                   = _UxGT("Unified Bed Leveling");

+ 3
- 3
Marlin/src/lcd/language/language_en.h Datei anzeigen

@@ -150,9 +150,9 @@ namespace Language_en {
150 150
   PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE             = _UxGT("Duplication");
151 151
   PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY         = _UxGT("Mirrored Copy");
152 152
   PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL             = _UxGT("Full Control");
153
-  PROGMEM Language_Str MSG_X_OFFSET                        = _UxGT("2nd Nozzle X");
154
-  PROGMEM Language_Str MSG_Y_OFFSET                        = _UxGT("2nd Nozzle Y");
155
-  PROGMEM Language_Str MSG_Z_OFFSET                        = _UxGT("2nd Nozzle Z");
153
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_X                 = _UxGT("2nd Nozzle X");
154
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Y                 = _UxGT("2nd Nozzle Y");
155
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Z                 = _UxGT("2nd Nozzle Z");
156 156
   PROGMEM Language_Str MSG_UBL_DOING_G29                   = _UxGT("Doing G29");
157 157
   PROGMEM Language_Str MSG_UBL_TOOLS                       = _UxGT("UBL Tools");
158 158
   PROGMEM Language_Str MSG_UBL_LEVEL_BED                   = _UxGT("Unified Bed Leveling");

+ 3
- 3
Marlin/src/lcd/language/language_es.h Datei anzeigen

@@ -142,9 +142,9 @@ namespace Language_es {
142 142
   PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE             = _UxGT("Duplicar");
143 143
   PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY         = _UxGT("Copia Reflejada");
144 144
   PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL             = _UxGT("Control Total");
145
-  PROGMEM Language_Str MSG_X_OFFSET                        = _UxGT("2ª Boquilla X");
146
-  PROGMEM Language_Str MSG_Y_OFFSET                        = _UxGT("2ª Boquilla Y");
147
-  PROGMEM Language_Str MSG_Z_OFFSET                        = _UxGT("2ª Boquilla Z");
145
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_X                 = _UxGT("2ª Boquilla X");
146
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Y                 = _UxGT("2ª Boquilla Y");
147
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Z                 = _UxGT("2ª Boquilla Z");
148 148
   PROGMEM Language_Str MSG_UBL_DOING_G29                   = _UxGT("Hacer G29");
149 149
   PROGMEM Language_Str MSG_UBL_TOOLS                       = _UxGT("Herramientas UBL");
150 150
   PROGMEM Language_Str MSG_UBL_LEVEL_BED                   = _UxGT("Nivel.Cama.Uni.(UBL)");

+ 3
- 3
Marlin/src/lcd/language/language_fr.h Datei anzeigen

@@ -138,9 +138,9 @@ namespace Language_fr {
138 138
   PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY         = _UxGT("Copie miroir");
139 139
   PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL             = _UxGT("Contrôle complet");
140 140
   PROGMEM Language_Str MSG_OFFSETS_MENU                    = _UxGT("Offsets Outil");
141
-  PROGMEM Language_Str MSG_X_OFFSET                        = _UxGT("Buse 2 X");
142
-  PROGMEM Language_Str MSG_Y_OFFSET                        = _UxGT("Buse 2 Y");
143
-  PROGMEM Language_Str MSG_Z_OFFSET                        = _UxGT("Buse 2 Z");
141
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_X                 = _UxGT("Buse 2 X");
142
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Y                 = _UxGT("Buse 2 Y");
143
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Z                 = _UxGT("Buse 2 Z");
144 144
   PROGMEM Language_Str MSG_G26_HEATING_BED                 = _UxGT("G26 Chauffe lit");
145 145
   PROGMEM Language_Str MSG_G26_HEATING_NOZZLE              = _UxGT("G26 Chauffe buse");
146 146
   PROGMEM Language_Str MSG_G26_MANUAL_PRIME                = _UxGT("Amorce manuelle...");

+ 3
- 3
Marlin/src/lcd/language/language_it.h Datei anzeigen

@@ -143,9 +143,9 @@ namespace Language_it {
143 143
   PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE             = _UxGT("Duplicazione");
144 144
   PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY         = _UxGT("Copia speculare");
145 145
   PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL             = _UxGT("Pieno controllo");
146
-  PROGMEM Language_Str MSG_X_OFFSET                        = _UxGT("2° ugello X");
147
-  PROGMEM Language_Str MSG_Y_OFFSET                        = _UxGT("2° ugello Y");
148
-  PROGMEM Language_Str MSG_Z_OFFSET                        = _UxGT("2° ugello Z");
146
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_X                 = _UxGT("2° ugello X");
147
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Y                 = _UxGT("2° ugello Y");
148
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Z                 = _UxGT("2° ugello Z");
149 149
   PROGMEM Language_Str MSG_UBL_DOING_G29                   = _UxGT("G29 in corso");
150 150
   PROGMEM Language_Str MSG_UBL_TOOLS                       = _UxGT("Strumenti UBL");
151 151
   PROGMEM Language_Str MSG_UBL_LEVEL_BED                   = _UxGT("Unified Bed Leveling");

+ 3
- 3
Marlin/src/lcd/language/language_pl.h Datei anzeigen

@@ -142,9 +142,9 @@ namespace Language_pl {
142 142
   PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE             = _UxGT("Duplikowanie");
143 143
   PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY         = _UxGT("Kopia lustrzana");
144 144
   PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL             = _UxGT("Pełne sterowanie");
145
-  PROGMEM Language_Str MSG_X_OFFSET                        = _UxGT("2ga dysza X");
146
-  PROGMEM Language_Str MSG_Y_OFFSET                        = _UxGT("2ga dysza Y");
147
-  PROGMEM Language_Str MSG_Z_OFFSET                        = _UxGT("2ga dysza Z");
145
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_X                 = _UxGT("2ga dysza X");
146
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Y                 = _UxGT("2ga dysza Y");
147
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Z                 = _UxGT("2ga dysza Z");
148 148
   PROGMEM Language_Str MSG_UBL_DOING_G29                   = _UxGT("Wykonywanie G29");
149 149
   PROGMEM Language_Str MSG_UBL_TOOLS                       = _UxGT("Narzędzia UBL");
150 150
   PROGMEM Language_Str MSG_UBL_LEVEL_BED                   = _UxGT("Unified Bed Leveling");

+ 3
- 3
Marlin/src/lcd/language/language_pt_br.h Datei anzeigen

@@ -119,9 +119,9 @@ namespace Language_pt_br {
119 119
   PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE             = _UxGT("Duplicação");
120 120
   PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY         = _UxGT("Cópia espelhada");
121 121
   PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL             = _UxGT("Controle Total");
122
-  PROGMEM Language_Str MSG_X_OFFSET                        = _UxGT("2o bico X");
123
-  PROGMEM Language_Str MSG_Y_OFFSET                        = _UxGT("2o bico Y");
124
-  PROGMEM Language_Str MSG_Z_OFFSET                        = _UxGT("2o bico Z");
122
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_X                 = _UxGT("2o bico X");
123
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Y                 = _UxGT("2o bico Y");
124
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Z                 = _UxGT("2o bico Z");
125 125
 
126 126
   PROGMEM Language_Str MSG_UBL_DOING_G29                   = _UxGT("Executando G29");
127 127
   PROGMEM Language_Str MSG_UBL_TOOLS                       = _UxGT("Ferramentas UBL");

+ 3
- 3
Marlin/src/lcd/language/language_ru.h Datei anzeigen

@@ -117,9 +117,9 @@ namespace Language_ru {
117 117
   // TODO: IDEX Menu
118 118
   PROGMEM Language_Str MSG_OFFSETS_MENU                    = _UxGT("Размещение сопел");
119 119
 
120
-  PROGMEM Language_Str MSG_X_OFFSET                        = _UxGT("2-е сопло X");
121
-  PROGMEM Language_Str MSG_Y_OFFSET                        = _UxGT("2-е сопло Y");
122
-  PROGMEM Language_Str MSG_Z_OFFSET                        = _UxGT("2-е сопло Z");
120
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_X                 = _UxGT("2-е сопло X");
121
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Y                 = _UxGT("2-е сопло Y");
122
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Z                 = _UxGT("2-е сопло Z");
123 123
 
124 124
   PROGMEM Language_Str MSG_UBL_DOING_G29                   = _UxGT("Выполняем G29");
125 125
   PROGMEM Language_Str MSG_UBL_TOOLS                       = _UxGT("Утилиты UBL");

+ 3
- 3
Marlin/src/lcd/language/language_sk.h Datei anzeigen

@@ -145,9 +145,9 @@ namespace Language_sk {
145 145
   PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE             = _UxGT("Duplikácia");
146 146
   PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY         = _UxGT("Zrkadlená kópia");
147 147
   PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL             = _UxGT("Plná kontrola");
148
-  PROGMEM Language_Str MSG_X_OFFSET                        = _UxGT("2. tryska X");
149
-  PROGMEM Language_Str MSG_Y_OFFSET                        = _UxGT("2. tryska Y");
150
-  PROGMEM Language_Str MSG_Z_OFFSET                        = _UxGT("2. tryska Z");
148
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_X                 = _UxGT("2. tryska X");
149
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Y                 = _UxGT("2. tryska Y");
150
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Z                 = _UxGT("2. tryska Z");
151 151
   PROGMEM Language_Str MSG_UBL_DOING_G29                   = _UxGT("Vykonávam G29");
152 152
   PROGMEM Language_Str MSG_UBL_TOOLS                       = _UxGT("Nástroje UBL");
153 153
   PROGMEM Language_Str MSG_UBL_LEVEL_BED                   = _UxGT("UBL rovnanie");

+ 3
- 3
Marlin/src/lcd/language/language_tr.h Datei anzeigen

@@ -123,9 +123,9 @@ namespace Language_tr {
123 123
   PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE             = _UxGT("Kopyala");
124 124
   PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY         = _UxGT("Yansıtılmış kopya");
125 125
   PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL             = _UxGT("Tam Kontrol");
126
-  PROGMEM Language_Str MSG_X_OFFSET                        = _UxGT("2. nozul X");
127
-  PROGMEM Language_Str MSG_Y_OFFSET                        = _UxGT("2. nozul Y");
128
-  PROGMEM Language_Str MSG_Z_OFFSET                        = _UxGT("2. nozul Z");
126
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_X                 = _UxGT("2. nozul X");
127
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Y                 = _UxGT("2. nozul Y");
128
+  PROGMEM Language_Str MSG_HOTEND_OFFSET_Z                 = _UxGT("2. nozul Z");
129 129
   PROGMEM Language_Str MSG_UBL_DOING_G29                   = _UxGT("G29 Çalışıyor");
130 130
   PROGMEM Language_Str MSG_UBL_TOOLS                       = _UxGT("UBL Araçları");
131 131
   PROGMEM Language_Str MSG_UBL_LEVEL_BED                   = _UxGT("UBL Yatak Hizalama");

+ 9
- 7
Marlin/src/lcd/menu/menu.cpp Datei anzeigen

@@ -141,7 +141,7 @@ void MenuItem_gcode::action(PGM_P const, PGM_P const pgcode) { queue.inject_P(pg
141 141
  *
142 142
  * ...which calls:
143 143
  *       MenuItem_int3::action(plabel, &feedrate_percentage, 10, 999)
144
- *       draw_menu_item_int3(encoderLine == _thisItemNr, _lcdLineNr, plabel, &feedrate_percentage, 10, 999)
144
+ *       MenuItem_int3::draw(encoderLine == _thisItemNr, _lcdLineNr, plabel, &feedrate_percentage, 10, 999)
145 145
  */
146 146
 void MenuEditItemBase::edit(strfunc_t strfunc, loadfunc_t loadfunc) {
147 147
   #if ENABLED(TOUCH_BUTTONS)
@@ -150,7 +150,7 @@ void MenuEditItemBase::edit(strfunc_t strfunc, loadfunc_t loadfunc) {
150 150
   if (int32_t(ui.encoderPosition) < 0) ui.encoderPosition = 0;
151 151
   if (int32_t(ui.encoderPosition) > maxEditValue) ui.encoderPosition = maxEditValue;
152 152
   if (ui.should_draw())
153
-    draw_edit_screen(editLabel, strfunc(ui.encoderPosition + minEditValue));
153
+    edit_screen(editLabel, strfunc(ui.encoderPosition + minEditValue));
154 154
   if (ui.lcd_clicked || (liveEdit && ui.should_draw())) {
155 155
     if (editValue != nullptr) loadfunc(editValue, ui.encoderPosition + minEditValue);
156 156
     if (callbackFunc && (liveEdit || ui.lcd_clicked)) (*callbackFunc)();
@@ -187,6 +187,7 @@ DEFINE_MENU_EDIT_ITEM(float43);     // 1.234
187 187
 DEFINE_MENU_EDIT_ITEM(float5);      // 12345      right-justified
188 188
 DEFINE_MENU_EDIT_ITEM(float5_25);   // 12345      right-justified (25 increment)
189 189
 DEFINE_MENU_EDIT_ITEM(float51);     // 1234.5     right-justified
190
+DEFINE_MENU_EDIT_ITEM(float41sign); // +123.4
190 191
 DEFINE_MENU_EDIT_ITEM(float51sign); // +1234.5
191 192
 DEFINE_MENU_EDIT_ITEM(float52sign); // +123.45
192 193
 DEFINE_MENU_EDIT_ITEM(long5);       // 12345      right-justified
@@ -309,7 +310,7 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, co
309 310
 static PGM_P sync_message;
310 311
 
311 312
 void MarlinUI::_synchronize() {
312
-  if (should_draw()) draw_menu_item_static(LCD_HEIGHT >= 4 ? 1 : 0, sync_message);
313
+  if (should_draw()) MenuItem_static::draw(LCD_HEIGHT >= 4, sync_message);
313 314
   if (no_reentry) return;
314 315
   // Make this the current handler till all moves are done
315 316
   no_reentry = true;
@@ -417,10 +418,10 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
417 418
     if (ui.should_draw()) {
418 419
       #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
419 420
         if (!do_probe)
420
-          draw_edit_screen(GET_TEXT(MSG_Z_OFFSET), ftostr43sign(hotend_offset[active_extruder].z));
421
+          MenuEditItemBase::edit_screen(GET_TEXT(MSG_HOTEND_OFFSET_Z), ftostr43sign(hotend_offset[active_extruder].z));
421 422
         else
422 423
       #endif
423
-          draw_edit_screen(GET_TEXT(MSG_ZPROBE_ZOFFSET), ftostr43sign(probe_offset.z));
424
+          MenuEditItemBase::edit_screen(GET_TEXT(MSG_ZPROBE_ZOFFSET), ftostr43sign(probe_offset.z));
424 425
 
425 426
       #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
426 427
         if (do_probe) _lcd_zoffset_overlay_gfx(probe_offset.z);
@@ -465,7 +466,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
465 466
 
466 467
 void _lcd_draw_homing() {
467 468
   constexpr uint8_t line = (LCD_HEIGHT - 1) / 2;
468
-  if (ui.should_draw()) draw_menu_item_static(line, GET_TEXT(MSG_LEVEL_BED_HOMING));
469
+  if (ui.should_draw()) MenuItem_static::draw(line, GET_TEXT(MSG_LEVEL_BED_HOMING));
469 470
   ui.refresh(LCDVIEW_CALL_NO_REDRAW);
470 471
 }
471 472
 
@@ -486,7 +487,8 @@ bool MarlinUI::update_selection() {
486 487
   }
487 488
   return selection;
488 489
 }
489
-void do_select_screen(PGM_P const yes, PGM_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) {
490
+
491
+void MenuItem_confirm::select_screen(PGM_P const yes, PGM_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) {
490 492
   const bool ui_selection = ui.update_selection(), got_click = ui.use_click();
491 493
   if (got_click || ui.should_draw()) {
492 494
     draw_select_screen(yes, no, ui_selection, pref, string, suff);

+ 182
- 148
Marlin/src/lcd/menu/menu.h Datei anzeigen

@@ -37,118 +37,79 @@ extern bool screen_changed;
37 37
 void scroll_screen(const uint8_t limit, const bool is_menu);
38 38
 bool printer_busy();
39 39
 
40
-////////////////////////////////////////////
41
-////////// Menu Item Numeric Types /////////
42
-////////////////////////////////////////////
43
-
44
-#define DECLARE_MENU_EDIT_TYPE(TYPE, NAME, STRFUNC, SCALE) \
45
-  struct MenuEditItemInfo_##NAME { \
46
-    typedef TYPE type_t; \
47
-    static constexpr float scale = SCALE; \
48
-    static inline const char* strfunc(const float value) { return STRFUNC((TYPE) value); } \
49
-  };
50
-
51
-DECLARE_MENU_EDIT_TYPE(uint8_t,  percent,     ui8tostr4pct, 100.0/255);   // 100%       right-justified
52
-DECLARE_MENU_EDIT_TYPE(int16_t,  int3,        i16tostr3,       1     );   // 123, -12   right-justified
53
-DECLARE_MENU_EDIT_TYPE(int16_t,  int4,        i16tostr4sign,   1     );   // 1234, -123 right-justified
54
-DECLARE_MENU_EDIT_TYPE(int8_t,   int8,        i8tostr3,        1     );   // 123, -12   right-justified
55
-DECLARE_MENU_EDIT_TYPE(uint8_t,  uint8,       ui8tostr3,       1     );   // 123        right-justified
56
-DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_3,    ui16tostr3,      1     );   // 123        right-justified
57
-DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_4,    ui16tostr4,      0.1   );   // 1234       right-justified
58
-DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_5,    ui16tostr5,      0.01  );   // 12345      right-justified
59
-DECLARE_MENU_EDIT_TYPE(float,    float3,      ftostr3,         1     );   // 123        right-justified
60
-DECLARE_MENU_EDIT_TYPE(float,    float52,     ftostr42_52,   100     );   // _2.34, 12.34, -2.34 or 123.45, -23.45
61
-DECLARE_MENU_EDIT_TYPE(float,    float43,     ftostr43sign, 1000     );   // 1.234
62
-DECLARE_MENU_EDIT_TYPE(float,    float5,      ftostr5rj,       1     );   // 12345      right-justified
63
-DECLARE_MENU_EDIT_TYPE(float,    float5_25,   ftostr5rj,       0.04f );   // 12345      right-justified (25 increment)
64
-DECLARE_MENU_EDIT_TYPE(float,    float51,     ftostr51rj,     10     );   // 1234.5     right-justified
65
-DECLARE_MENU_EDIT_TYPE(float,    float51sign, ftostr51sign,   10     );   // +1234.5
66
-DECLARE_MENU_EDIT_TYPE(float,    float52sign, ftostr52sign,  100     );   // +123.45
67
-DECLARE_MENU_EDIT_TYPE(uint32_t, long5,       ftostr5rj,       0.01f );   // 12345      right-justified
68
-DECLARE_MENU_EDIT_TYPE(uint32_t, long5_25,    ftostr5rj,       0.04f );   // 12345      right-justified (25 increment)
69
-
70
-////////////////////////////////////////////
71
-///////// Menu Item Draw Functions /////////
72
-////////////////////////////////////////////
73
-
74 40
 typedef void (*selectFunc_t)();
75
-void draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string, PGM_P const suff);
76
-void do_select_screen(PGM_P const yes, PGM_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr);
77
-inline void do_select_screen_yn(selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr) {
78
-  do_select_screen(GET_TEXT(MSG_YES), GET_TEXT(MSG_NO), yesFunc, noFunc, pref, string, suff);
79
-}
80 41
 
81 42
 #define SS_LEFT    0x00
82 43
 #define SS_CENTER  0x01
83 44
 #define SS_INVERT  0x02
84 45
 #define SS_DEFAULT SS_CENTER
85 46
 
86
-void draw_edit_screen(PGM_P const pstr, const char* const value=nullptr);
87
-void draw_menu_item(const bool sel, const uint8_t row, PGM_P const pstr, const char pre_char, const char post_char);
88
-void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const uint8_t style=SS_DEFAULT, const char * const valstr=nullptr);
89
-void _draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm);
90
-FORCE_INLINE void draw_menu_item_back(const bool sel, const uint8_t row, PGM_P const pstr) { draw_menu_item(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]); }
91
-FORCE_INLINE void draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data) { _draw_menu_item_edit(sel, row, pstr, data, false); }
92
-FORCE_INLINE void draw_menu_item_edit_P(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data) { _draw_menu_item_edit(sel, row, pstr, data, true); }
93
-#define draw_menu_item_submenu(sel, row, pstr, data)  draw_menu_item(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0])
94
-#define draw_menu_item_gcode(sel, row, pstr, gcode)   draw_menu_item(sel, row, pstr, '>', ' ')
95
-#define draw_menu_item_function(sel, row, pstr, data) draw_menu_item(sel, row, pstr, '>', ' ')
96
-#define DRAW_MENU_ITEM_SETTING_EDIT_GENERIC(VAL)      draw_menu_item_edit(sel, row, pstr, VAL)
97
-#define DRAW_BOOL_SETTING(sel, row, pstr, data)       draw_menu_item_edit_P(sel, row, pstr, (*(data))?GET_TEXT(MSG_LCD_ON):GET_TEXT(MSG_LCD_OFF))
98
-
99
-#if ENABLED(SDSUPPORT)
100
-  class CardReader;
101
-  void draw_sd_menu_item(const bool sel, const uint8_t row, PGM_P const pstr, CardReader &theCard, const bool isDir);
102
-  FORCE_INLINE void draw_menu_item_sdfile(const bool sel, const uint8_t row, PGM_P const pstr, CardReader &theCard) { draw_sd_menu_item(sel, row, pstr, theCard, false); }
103
-  FORCE_INLINE void draw_menu_item_sdfolder(const bool sel, const uint8_t row, PGM_P const pstr, CardReader &theCard) { draw_sd_menu_item(sel, row, pstr, theCard, true); }
104
-#endif
105
-
106 47
 #if HAS_GRAPHICAL_LCD && EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
107 48
   void _lcd_zoffset_overlay_gfx(const float zvalue);
108 49
 #endif
109 50
 
110 51
 ////////////////////////////////////////////
111
-/////// Edit Setting Draw Functions ////////
52
+///////////// Base Menu Items //////////////
112 53
 ////////////////////////////////////////////
113 54
 
114
-#define _DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(TYPE, NAME, STRFUNC) \
115
-  FORCE_INLINE void draw_menu_item_##NAME (const bool sel, const uint8_t row, PGM_P const pstr, TYPE * const data, ...) { \
116
-    DRAW_MENU_ITEM_SETTING_EDIT_GENERIC(STRFUNC(*(data))); \
117
-  } \
118
-  FORCE_INLINE void draw_menu_item_accessor_##NAME (const bool sel, const uint8_t row, PGM_P const pstr, PGM_P const, TYPE (*pget)(), void (*)(TYPE), ...) { \
119
-    DRAW_MENU_ITEM_SETTING_EDIT_GENERIC(STRFUNC(pget())); \
120
-  } \
121
-  typedef void NAME##_void
122
-#define DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(NAME) _DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(MenuEditItemInfo_##NAME::type_t, NAME, MenuEditItemInfo_##NAME::strfunc)
123
-
124
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(percent);          // 100%       right-justified
125
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(int3);             // 123, -12   right-justified
126
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(int4);             // 1234, -123 right-justified
127
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(int8);             // 123, -12   right-justified
128
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint8);            // 123        right-justified
129
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_3);         // 123        right-justified
130
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_4);         // 1234       right-justified
131
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_5);         // 12345      right-justified
132
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float3);           // 123        right-justified
133
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float52);          // _2.34, 12.34, -2.34 or 123.45, -23.45
134
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float43);          // 1.234
135
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float5);           // 12345      right-justified
136
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float5_25);        // 12345      right-justified (25 increment)
137
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float51);          // _1234.5    right-justified
138
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float51sign);      // +1234.5
139
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float52sign);      // +123.45
140
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(long5);            // 12345      right-justified
141
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(long5_25);         // 12345      right-justified (25 increment)
142
-
143
-#define draw_menu_item_bool(sel, row, pstr, data, ...)           DRAW_BOOL_SETTING(sel, row, pstr, data)
144
-#define draw_menu_item_accessor_bool(sel, row, pstr, pget, pset) DRAW_BOOL_SETTING(sel, row, pstr, data)
55
+class MenuItem_static {
56
+  public:
57
+    static void draw(const uint8_t row, PGM_P const pstr, const uint8_t style=SS_DEFAULT, const char * const valstr=nullptr);
58
+};
145 59
 
146
-////////////////////////////////////////////
147
-/////////////// Menu Actions ///////////////
148
-////////////////////////////////////////////
60
+class MenuItemBase {
61
+  public:
62
+    // Draw an item either selected (pre_char) or not (space) with post_char
63
+    static void _draw(const bool sel, const uint8_t row, PGM_P const pstr, const char pre_char, const char post_char);
64
+
65
+    // Draw an item either selected ('>') or not (space) with post_char
66
+    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, const char post_char) {
67
+      _draw(sel, row, pstr, '>', post_char);
68
+    }
69
+};
149 70
 
150
-class MenuItem_back {
71
+// CONFIRM_ITEM(PLABEL,Y,N,FY,FN,V...), YESNO_ITEM(PLABEL,FY,FN,V...)
72
+class MenuItem_confirm : MenuItemBase {
151 73
   public:
74
+    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, ...) {
75
+      _draw(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0]);
76
+    }
77
+    // Implemented for HD44780 and DOGM
78
+    // Draw the prompt, buttons, and state
79
+    static void draw_select_screen(
80
+      PGM_P const yes,            // Right option label
81
+      PGM_P const no,             // Left option label
82
+      const bool yesno,           // Is "yes" selected?
83
+      PGM_P const pref,           // Prompt prefix
84
+      const char * const string,  // Prompt runtime string
85
+      PGM_P const suff            // Prompt suffix
86
+    );
87
+    static void select_screen(
88
+      PGM_P const yes, PGM_P const no,
89
+      selectFunc_t yesFunc, selectFunc_t noFunc,
90
+      PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr
91
+    );
92
+    static inline void select_screen(
93
+      PGM_P const yes, PGM_P const no,
94
+      selectFunc_t yesFunc, selectFunc_t noFunc,
95
+      PGM_P const pref, const progmem_str string, PGM_P const suff=nullptr
96
+    ) {
97
+      char str[strlen_P((PGM_P)string) + 1];
98
+      strcpy_P(str, (PGM_P)string);
99
+      select_screen(yes, no, yesFunc, noFunc, pref, str, suff);
100
+    }
101
+    // Shortcut for prompt with "NO"/ "YES" labels
102
+    FORCE_INLINE static void confirm_screen(selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr) {
103
+      select_screen(GET_TEXT(MSG_YES), GET_TEXT(MSG_NO), yesFunc, noFunc, pref, string, suff);
104
+    }
105
+};
106
+
107
+// BACK_ITEM(PLABEL)
108
+class MenuItem_back : public MenuItemBase {
109
+  public:
110
+    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr) {
111
+      _draw(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]);
112
+    }
152 113
     static inline void action(PGM_P const=nullptr) {
153 114
       ui.goto_previous_screen(
154 115
         #if ENABLED(TURBO_BACK_MENU_ITEM)
@@ -158,30 +119,46 @@ class MenuItem_back {
158 119
     }
159 120
 };
160 121
 
161
-class MenuItem_submenu {
122
+// SUBMENU(PLABEL, screen_handler)
123
+class MenuItem_submenu : public MenuItemBase {
162 124
   public:
125
+    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, ...) {
126
+      _draw(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0]);
127
+    }
163 128
     static inline void action(PGM_P const, const screenFunc_t func) { ui.save_previous_screen(); ui.goto_screen(func); }
164 129
 };
165 130
 
166
-class MenuItem_gcode {
131
+// GCODE_ITEM(PLABEL, gcode)
132
+class MenuItem_gcode : public MenuItemBase {
167 133
   public:
134
+    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, ...) {
135
+      _draw(sel, row, pstr, '>', ' ');
136
+    }
168 137
     static void action(PGM_P const, const char * const pgcode);
169 138
 };
170 139
 
171
-class MenuItem_function {
140
+// ACTION_ITEM(PLABEL, function)
141
+class MenuItem_function : public MenuItemBase {
172 142
   public:
143
+    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, ...) {
144
+      _draw(sel, row, pstr, '>', ' ');
145
+    }
173 146
     static inline void action(PGM_P const, const menuAction_t func) { (*func)(); };
174 147
 };
175 148
 
149
+#if ENABLED(SDSUPPORT)
150
+  class CardReader;
151
+  class MenuItem_sdbase {
152
+    public:
153
+      static void draw(const bool sel, const uint8_t row, PGM_P const pstr, CardReader &theCard, const bool isDir);
154
+  };
155
+#endif
156
+
176 157
 ////////////////////////////////////////////
177
-/////////// Menu Editing Actions ///////////
158
+///////////// Edit Menu Items //////////////
178 159
 ////////////////////////////////////////////
179 160
 
180
-//
181 161
 // The Menu Edit shadow value
182
-// Only one edit value is needed at a time
183
-//
184
-
185 162
 typedef union {
186 163
   bool     state;
187 164
   float    decimal;
@@ -192,11 +169,10 @@ typedef union {
192 169
   uint16_t uint16;
193 170
   uint32_t uint32;
194 171
 } chimera_t;
195
-
196 172
 extern chimera_t editable;
197 173
 
198 174
 // Edit items use long integer encoder units
199
-class MenuEditItemBase {
175
+class MenuEditItemBase : public MenuItemBase {
200 176
   private:
201 177
     static PGM_P editLabel;
202 178
     static void *editValue;
@@ -208,6 +184,17 @@ class MenuEditItemBase {
208 184
     typedef void (*loadfunc_t)(void *, const int32_t);
209 185
     static void init(PGM_P const el, void * const ev, const int32_t minv, const int32_t maxv, const uint16_t ep, const screenFunc_t cs, const screenFunc_t cb, const bool le);
210 186
     static void edit(strfunc_t, loadfunc_t);
187
+  public:
188
+    // Implemented for HD44780 and DOGM
189
+    // Draw the current item at specified row with edit data
190
+    static void draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm);
191
+
192
+    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data) { draw(sel, row, pstr, data, false); }
193
+    FORCE_INLINE static void draw_P(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data) { draw(sel, row, pstr, data, true); }
194
+
195
+    // Implemented for HD44780 and DOGM
196
+    // This low-level method is good to draw from anywhere
197
+    static void edit_screen(PGM_P const pstr, const char* const value=nullptr);
211 198
 };
212 199
 
213 200
 template<typename NAME>
@@ -219,6 +206,12 @@ class TMenuEditItem : MenuEditItemBase {
219 206
     static void load(void *ptr, const int32_t value)  { *((type_t*)ptr) = unscale(value);     }
220 207
     static const char* to_string(const int32_t value) { return NAME::strfunc(unscale(value)); }
221 208
   public:
209
+    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, type_t * const data, ...) {
210
+      MenuEditItemBase::draw(sel, row, pstr, NAME::strfunc(*(data)));
211
+    }
212
+    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, type_t (*pget)(), ...) {
213
+      MenuEditItemBase::draw(sel, row, pstr, NAME::strfunc(pget()));
214
+    }
222 215
     static void action(
223 216
       PGM_P const pstr,                     // Edit label
224 217
       type_t * const ptr,                   // Value pointer
@@ -235,30 +228,53 @@ class TMenuEditItem : MenuEditItemBase {
235 228
     static void edit() { MenuEditItemBase::edit(to_string, load); }
236 229
 };
237 230
 
238
-#define DECLARE_MENU_EDIT_ITEM(NAME) typedef TMenuEditItem<MenuEditItemInfo_##NAME> MenuItem_##NAME;
239
-
240
-DECLARE_MENU_EDIT_ITEM(percent);
241
-DECLARE_MENU_EDIT_ITEM(int3);
242
-DECLARE_MENU_EDIT_ITEM(int4);
243
-DECLARE_MENU_EDIT_ITEM(int8);
244
-DECLARE_MENU_EDIT_ITEM(uint8);
245
-DECLARE_MENU_EDIT_ITEM(uint16_3);
246
-DECLARE_MENU_EDIT_ITEM(uint16_4);
247
-DECLARE_MENU_EDIT_ITEM(uint16_5);
248
-DECLARE_MENU_EDIT_ITEM(float3);
249
-DECLARE_MENU_EDIT_ITEM(float52);
250
-DECLARE_MENU_EDIT_ITEM(float43);
251
-DECLARE_MENU_EDIT_ITEM(float5);
252
-DECLARE_MENU_EDIT_ITEM(float5_25);
253
-DECLARE_MENU_EDIT_ITEM(float51);
254
-DECLARE_MENU_EDIT_ITEM(float51sign);
255
-DECLARE_MENU_EDIT_ITEM(float52sign);
256
-DECLARE_MENU_EDIT_ITEM(long5);
257
-DECLARE_MENU_EDIT_ITEM(long5_25);
258
-
259
-class MenuItem_bool {
231
+// Provide a set of Edit Item Types which encompass a primitive
232
+// type, a string function, and a scale factor for edit and display.
233
+// These items call the Edit Item draw method passing the prepared string.
234
+#define DEFINE_MENU_EDIT_ITEM_TYPE(TYPE, NAME, STRFUNC, SCALE) \
235
+  struct MenuEditItemInfo_##NAME { \
236
+    typedef TYPE type_t; \
237
+    static constexpr float scale = SCALE; \
238
+    static inline const char* strfunc(const float value) { return STRFUNC((TYPE)value); } \
239
+  }; \
240
+  typedef TMenuEditItem<MenuEditItemInfo_##NAME> MenuItem_##NAME
241
+
242
+//                         TYPE      NAME         STRFUNC       SCALE
243
+DEFINE_MENU_EDIT_ITEM_TYPE(uint8_t,  percent,     ui8tostr4pct, 100.0/255);   // 100%       right-justified
244
+DEFINE_MENU_EDIT_ITEM_TYPE(int16_t,  int3,        i16tostr3,       1     );   // 123, -12   right-justified
245
+DEFINE_MENU_EDIT_ITEM_TYPE(int16_t,  int4,        i16tostr4sign,   1     );   // 1234, -123 right-justified
246
+DEFINE_MENU_EDIT_ITEM_TYPE(int8_t,   int8,        i8tostr3,        1     );   // 123, -12   right-justified
247
+DEFINE_MENU_EDIT_ITEM_TYPE(uint8_t,  uint8,       ui8tostr3,       1     );   // 123        right-justified
248
+DEFINE_MENU_EDIT_ITEM_TYPE(uint16_t, uint16_3,    ui16tostr3,      1     );   // 123        right-justified
249
+DEFINE_MENU_EDIT_ITEM_TYPE(uint16_t, uint16_4,    ui16tostr4,      0.1   );   // 1234       right-justified
250
+DEFINE_MENU_EDIT_ITEM_TYPE(uint16_t, uint16_5,    ui16tostr5,      0.01  );   // 12345      right-justified
251
+DEFINE_MENU_EDIT_ITEM_TYPE(float,    float3,      ftostr3,         1     );   // 123        right-justified
252
+DEFINE_MENU_EDIT_ITEM_TYPE(float,    float52,     ftostr42_52,   100     );   // _2.34, 12.34, -2.34 or 123.45, -23.45
253
+DEFINE_MENU_EDIT_ITEM_TYPE(float,    float43,     ftostr43sign, 1000     );   // 1.234
254
+DEFINE_MENU_EDIT_ITEM_TYPE(float,    float5,      ftostr5rj,       1     );   // 12345      right-justified
255
+DEFINE_MENU_EDIT_ITEM_TYPE(float,    float5_25,   ftostr5rj,       0.04f );   // 12345      right-justified (25 increment)
256
+DEFINE_MENU_EDIT_ITEM_TYPE(float,    float51,     ftostr51rj,     10     );   // 1234.5     right-justified
257
+DEFINE_MENU_EDIT_ITEM_TYPE(float,    float41sign, ftostr41sign,   10     );   // +123.4
258
+DEFINE_MENU_EDIT_ITEM_TYPE(float,    float51sign, ftostr51sign,   10     );   // +1234.5
259
+DEFINE_MENU_EDIT_ITEM_TYPE(float,    float52sign, ftostr52sign,  100     );   // +123.45
260
+DEFINE_MENU_EDIT_ITEM_TYPE(uint32_t, long5,       ftostr5rj,       0.01f );   // 12345      right-justified
261
+DEFINE_MENU_EDIT_ITEM_TYPE(uint32_t, long5_25,    ftostr5rj,       0.04f );   // 12345      right-justified (25 increment)
262
+
263
+class MenuItem_bool : public MenuEditItemBase {
260 264
   public:
261
-    static void action(PGM_P const pstr, bool* ptr, const screenFunc_t callbackFunc=nullptr);
265
+    //#define DRAW_BOOL_SETTING(sel, row, pstr, data)  draw_menu_item_edit_P(sel, row, pstr, (*(data))?GET_TEXT(MSG_LCD_ON):GET_TEXT(MSG_LCD_OFF))
266
+    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, const bool onoff) {
267
+      MenuEditItemBase::draw(sel, row, pstr, onoff ? GET_TEXT(MSG_LCD_ON) : GET_TEXT(MSG_LCD_OFF), true);
268
+    }
269
+    //#define draw_menu_item_bool(sel, row, pstr, data, ...)           DRAW_BOOL_SETTING(sel, row, pstr, data)
270
+    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, bool * const data, ...) {
271
+      draw(sel, row, pstr, *data);
272
+    }
273
+    //#define draw_menu_item_accessor_bool(sel, row, pstr, pget, pset) DRAW_BOOL_SETTING(sel, row, pstr, data)
274
+    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, PGM_P const, bool (*pget)(), ...) {
275
+      draw(sel, row, pstr, pget());
276
+    }
277
+    static void action(PGM_P const pstr, bool * const ptr, const screenFunc_t callbackFunc=nullptr);
262 278
 };
263 279
 
264 280
 ////////////////////////////////////////////
@@ -313,39 +329,39 @@ class MenuItem_bool {
313 329
 /**
314 330
  * MENU_ITEM generates draw & handler code for a menu item, potentially calling:
315 331
  *
316
- *   draw_menu_item_<type>(sel, row, label, arg3...)
332
+ *   MenuItem_<type>::draw(sel, row, label, arg3...)
317 333
  *   MenuItem_<type>::action(arg3...)
318 334
  *
319 335
  * Examples:
320 336
  *   BACK_ITEM(MSG_WATCH)
321 337
  *   MENU_ITEM(back, MSG_WATCH)
322
- *     draw_menu_item_back(sel, row, GET_TEXT(MSG_WATCH))
338
+ *     MenuItem_back::draw(sel, row, GET_TEXT(MSG_WATCH))
323 339
  *     MenuItem_back::action()
324 340
  *
325 341
  *   ACTION_ITEM(MSG_PAUSE_PRINT, lcd_sdcard_pause)
326 342
  *   MENU_ITEM(function, MSG_PAUSE_PRINT, lcd_sdcard_pause)
327
- *     draw_menu_item_function(sel, row, GET_TEXT(MSG_PAUSE_PRINT), lcd_sdcard_pause)
328
- *     MenuItem_function::action(lcd_sdcard_pause)
343
+ *     MenuItem_function::draw(sel, row, GET_TEXT(MSG_PAUSE_PRINT), lcd_sdcard_pause)
344
+ *     MenuItem_function::action(GET_TEXT(MSG_PAUSE_PRINT), lcd_sdcard_pause)
329 345
  *
330 346
  *   EDIT_ITEM(int3, MSG_SPEED, &feedrate_percentage, 10, 999)
331
- *     draw_menu_item_int3(sel, row, GET_TEXT(MSG_SPEED), &feedrate_percentage, 10, 999)
347
+ *     MenuItem_int3::draw(sel, row, GET_TEXT(MSG_SPEED), &feedrate_percentage, 10, 999)
332 348
  *     MenuItem_int3::action(GET_TEXT(MSG_SPEED), &feedrate_percentage, 10, 999)
333 349
  *
334 350
  */
335
-#define _MENU_ITEM_P(TYPE, USE_MULTIPLIER, PLABEL, V...) do {  \
336
-    _skipStatic = false;                                          \
337
-    if (_menuLineNr == _thisItemNr) {                             \
338
-      PGM_P const plabel = PLABEL;                                \
339
-      if (encoderLine == _thisItemNr && ui.use_click()) {         \
340
-        _MENU_ITEM_MULTIPLIER_CHECK(USE_MULTIPLIER);              \
341
-        MenuItem_##TYPE ::action(plabel, ##V);                    \
342
-        if (screen_changed) return;                               \
343
-      }                                                           \
344
-      if (ui.should_draw())                                       \
345
-        draw_menu_item_ ## TYPE                                   \
346
-          (encoderLine == _thisItemNr, _lcdLineNr, plabel, ##V);  \
347
-    }                                                             \
348
-  ++_thisItemNr;                                                  \
351
+#define _MENU_ITEM_P(TYPE, USE_MULTIPLIER, PLABEL, V...) do {   \
352
+  _skipStatic = false;                                          \
353
+  if (_menuLineNr == _thisItemNr) {                             \
354
+    PGM_P const plabel = PLABEL;                                \
355
+    if (encoderLine == _thisItemNr && ui.use_click()) {         \
356
+      _MENU_ITEM_MULTIPLIER_CHECK(USE_MULTIPLIER);              \
357
+      MenuItem_##TYPE::action(plabel, ##V);                     \
358
+      if (screen_changed) return;                               \
359
+    }                                                           \
360
+    if (ui.should_draw())                                       \
361
+      MenuItem_##TYPE::draw                                     \
362
+        (encoderLine == _thisItemNr, _lcdLineNr, plabel, ##V);  \
363
+  }                                                             \
364
+  ++_thisItemNr;                                                \
349 365
 }while(0)
350 366
 
351 367
 // Used to print static text with no visible cursor.
@@ -357,7 +373,7 @@ class MenuItem_bool {
357 373
       ++encoderLine;                                      \
358 374
     }                                                     \
359 375
     if (ui.should_draw())                                 \
360
-      draw_menu_item_static(_lcdLineNr, PLABEL, ##V);     \
376
+      MenuItem_static::draw(_lcdLineNr, PLABEL, ##V);     \
361 377
   }                                                       \
362 378
   ++_thisItemNr;                                          \
363 379
 } while(0)
@@ -385,6 +401,24 @@ class MenuItem_bool {
385 401
 #define BACK_ITEM(LABEL)                         MENU_ITEM(back, LABEL)
386 402
 #define SKIP_ITEM() (_thisItemNr++)
387 403
 
404
+#define _CONFIRM_ITEM_P(PLABEL, V...) do {                      \
405
+  _skipStatic = false;                                          \
406
+  if (_menuLineNr == _thisItemNr) {                             \
407
+    if (encoderLine == _thisItemNr && ui.use_click()) {         \
408
+      ui.goto_screen([]{MenuItem_confirm::select_screen(V);});  \
409
+      return;                                                   \
410
+    }                                                           \
411
+    if (ui.should_draw()) MenuItem_confirm::draw                \
412
+      (encoderLine == _thisItemNr, _lcdLineNr, PLABEL, ##V);    \
413
+  }                                                             \
414
+  ++_thisItemNr;                                                \
415
+}while(0)
416
+
417
+#define CONFIRM_ITEM_P(PLABEL,A,B,V...) _CONFIRM_ITEM_P(PLABEL, GET_TEXT(A), GET_TEXT(B), ##V)
418
+#define CONFIRM_ITEM(LABEL, V...)        CONFIRM_ITEM_P(GET_TEXT(LABEL), ##V)
419
+#define YESNO_ITEM_P(PLABEL, V...)      _CONFIRM_ITEM_P(PLABEL, ##V)
420
+#define YESNO_ITEM(LABEL, V...)         _CONFIRM_ITEM_P(GET_TEXT(LABEL), ##V)
421
+
388 422
 ////////////////////////////////////////////
389 423
 /////////////// Menu Screens ///////////////
390 424
 ////////////////////////////////////////////

+ 16
- 22
Marlin/src/lcd/menu/menu_advanced.cpp Datei anzeigen

@@ -48,6 +48,10 @@
48 48
   float lcd_runout_distance_mm;
49 49
 #endif
50 50
 
51
+#if ENABLED(EEPROM_SETTINGS) && DISABLED(SLIM_LCD_MENUS)
52
+  #include "../../module/configuration_store.h"
53
+#endif
54
+
51 55
 void menu_tmc();
52 56
 void menu_backlash();
53 57
 void menu_cancelobject();
@@ -595,27 +599,6 @@ void menu_cancelobject();
595 599
     END_MENU();
596 600
   }
597 601
 
598
-  #if ENABLED(EEPROM_SETTINGS)
599
-
600
-    #include "../../module/configuration_store.h"
601
-
602
-    static void lcd_init_eeprom_confirm() {
603
-      do_select_screen(
604
-        GET_TEXT(MSG_BUTTON_INIT), GET_TEXT(MSG_BUTTON_CANCEL),
605
-        []{
606
-          const bool inited = settings.init_eeprom();
607
-          #if HAS_BUZZER
608
-            ui.completion_feedback(inited);
609
-          #endif
610
-          UNUSED(inited);
611
-        },
612
-        ui.goto_previous_screen,
613
-        GET_TEXT(MSG_INIT_EEPROM), nullptr, PSTR("?")
614
-      );
615
-    }
616
-
617
-  #endif
618
-
619 602
 #endif // !SLIM_LCD_MENUS
620 603
 
621 604
 void menu_advanced_settings() {
@@ -718,7 +701,18 @@ void menu_advanced_settings() {
718 701
   #endif
719 702
 
720 703
   #if ENABLED(EEPROM_SETTINGS) && DISABLED(SLIM_LCD_MENUS)
721
-    SUBMENU(MSG_INIT_EEPROM, lcd_init_eeprom_confirm);
704
+    CONFIRM_ITEM(MSG_INIT_EEPROM,
705
+      MSG_BUTTON_INIT, MSG_BUTTON_CANCEL,
706
+      []{
707
+        const bool inited = settings.init_eeprom();
708
+        #if HAS_BUZZER
709
+          ui.completion_feedback(inited);
710
+        #endif
711
+        UNUSED(inited);
712
+      },
713
+      ui.goto_previous_screen,
714
+      GET_TEXT(MSG_INIT_EEPROM), (PGM_P)nullptr, PSTR("?")
715
+    );
722 716
   #endif
723 717
 
724 718
   END_MENU();

+ 17
- 21
Marlin/src/lcd/menu/menu_bed_corners.cpp Datei anzeigen

@@ -84,31 +84,27 @@ static inline void _lcd_goto_next_corner() {
84 84
   ) bed_corner = 0;
85 85
 }
86 86
 
87
-static inline void menu_level_bed_corners() {
88
-  do_select_screen(
89
-    GET_TEXT(MSG_BUTTON_NEXT), GET_TEXT(MSG_BUTTON_DONE),
90
-    _lcd_goto_next_corner,
91
-    []{
92
-      #if HAS_LEVELING
93
-        set_bed_leveling_enabled(leveling_was_active);
94
-      #endif
95
-      ui.goto_previous_screen_no_defer();
96
-    },
97
-    GET_TEXT(
98
-      #if ENABLED(LEVEL_CENTER_TOO)
99
-        MSG_LEVEL_BED_NEXT_POINT
100
-      #else
101
-        MSG_NEXT_CORNER
102
-      #endif
103
-    ), nullptr, PSTR("?")
104
-  );
105
-}
106
-
107 87
 static inline void _lcd_level_bed_corners_homing() {
108 88
   _lcd_draw_homing();
109 89
   if (all_axes_homed()) {
110 90
     bed_corner = 0;
111
-    ui.goto_screen(menu_level_bed_corners);
91
+    MenuItem_confirm::select_screen(
92
+      GET_TEXT(MSG_BUTTON_NEXT), GET_TEXT(MSG_BUTTON_DONE),
93
+      _lcd_goto_next_corner,
94
+      []{
95
+        #if HAS_LEVELING
96
+          set_bed_leveling_enabled(leveling_was_active);
97
+        #endif
98
+        ui.goto_previous_screen_no_defer();
99
+      },
100
+      GET_TEXT(
101
+        #if ENABLED(LEVEL_CENTER_TOO)
102
+          MSG_LEVEL_BED_NEXT_POINT
103
+        #else
104
+          MSG_NEXT_CORNER
105
+        #endif
106
+      ), (PGM_P)nullptr, PSTR("?")
107
+    );
112 108
     ui.set_selection(true);
113 109
     _lcd_goto_next_corner();
114 110
   }

+ 4
- 4
Marlin/src/lcd/menu/menu_bed_leveling.cpp Datei anzeigen

@@ -81,7 +81,7 @@
81 81
         ui.completion_feedback();
82 82
       #endif
83 83
     }
84
-    if (ui.should_draw()) draw_menu_item_static(LCD_HEIGHT >= 4 ? 1 : 0, GET_TEXT(MSG_LEVEL_BED_DONE));
84
+    if (ui.should_draw()) MenuItem_static::draw(LCD_HEIGHT >= 4, GET_TEXT(MSG_LEVEL_BED_DONE));
85 85
     ui.refresh(LCDVIEW_CALL_REDRAW_NEXT);
86 86
   }
87 87
 
@@ -132,7 +132,7 @@
132 132
     //
133 133
     if (ui.should_draw()) {
134 134
       const float v = current_position.z;
135
-      draw_edit_screen(GET_TEXT(MSG_MOVE_Z), ftostr43sign(v + (v < 0 ? -0.0001f : 0.0001f), '+'));
135
+      MenuEditItemBase::edit_screen(GET_TEXT(MSG_MOVE_Z), ftostr43sign(v + (v < 0 ? -0.0001f : 0.0001f), '+'));
136 136
     }
137 137
   }
138 138
 
@@ -143,7 +143,7 @@
143 143
     if (ui.should_draw()) {
144 144
       char msg[10];
145 145
       sprintf_P(msg, PSTR("%i / %u"), int(manual_probe_index + 1), total_probe_points);
146
-      draw_edit_screen(GET_TEXT(MSG_LEVEL_BED_NEXT_POINT), msg);
146
+      MenuEditItemBase::edit_screen(GET_TEXT(MSG_LEVEL_BED_NEXT_POINT), msg);
147 147
     }
148 148
     ui.refresh(LCDVIEW_CALL_NO_REDRAW);
149 149
     if (!ui.wait_for_bl_move) ui.goto_screen(_lcd_level_bed_get_z);
@@ -169,7 +169,7 @@
169 169
   //         Move to the first probe position
170 170
   //
171 171
   void _lcd_level_bed_homing_done() {
172
-    if (ui.should_draw()) draw_edit_screen(GET_TEXT(MSG_LEVEL_BED_WAITING));
172
+    if (ui.should_draw()) MenuItem_static::draw(1, GET_TEXT(MSG_LEVEL_BED_WAITING));
173 173
     if (ui.use_click()) {
174 174
       manual_probe_index = 0;
175 175
       _lcd_level_goto_next_point();

+ 1
- 1
Marlin/src/lcd/menu/menu_cancelobject.cpp Datei anzeigen

@@ -41,7 +41,7 @@ static void lcd_cancel_object_confirm() {
41 41
     char('0' + (v % 10)),
42 42
     '\0'
43 43
   };
44
-  do_select_screen_yn(
44
+  MenuItem_confirm::confirm_screen(
45 45
     []{
46 46
       cancelable.cancel_object(editable.int8 - 1);
47 47
       #if HAS_BUZZER

+ 9
- 17
Marlin/src/lcd/menu/menu_configuration.cpp Datei anzeigen

@@ -68,7 +68,7 @@ void menu_advanced_settings();
68 68
     bar_percent += (int8_t)ui.encoderPosition;
69 69
     LIMIT(bar_percent, 0, 100);
70 70
     ui.encoderPosition = 0;
71
-    draw_menu_item_static(0, GET_TEXT(MSG_PROGRESS_BAR_TEST), SS_CENTER|SS_INVERT);
71
+    MenuItem_static::draw(0, GET_TEXT(MSG_PROGRESS_BAR_TEST), SS_CENTER|SS_INVERT);
72 72
     lcd_put_int((LCD_WIDTH) / 2 - 2, LCD_HEIGHT - 2, bar_percent); lcd_put_wchar('%');
73 73
     lcd_moveto(0, LCD_HEIGHT - 1); ui.draw_progress_bar(bar_percent);
74 74
   }
@@ -138,12 +138,12 @@ void menu_advanced_settings();
138 138
     START_MENU();
139 139
     BACK_ITEM(MSG_CONFIGURATION);
140 140
     #if ENABLED(DUAL_X_CARRIAGE)
141
-      EDIT_ITEM_FAST(float51, MSG_X_OFFSET, &hotend_offset[1].x, float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets);
141
+      EDIT_ITEM_FAST(float51, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets);
142 142
     #else
143
-      EDIT_ITEM_FAST(float52sign, MSG_X_OFFSET, &hotend_offset[1].x, -99.0, 99.0, _recalc_offsets);
143
+      EDIT_ITEM_FAST(float41sign, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, -99.0, 99.0, _recalc_offsets);
144 144
     #endif
145
-    EDIT_ITEM_FAST(float52sign, MSG_Y_OFFSET, &hotend_offset[1].y, -99.0, 99.0, _recalc_offsets);
146
-    EDIT_ITEM_FAST(float52sign, MSG_Z_OFFSET, &hotend_offset[1].z, Z_PROBE_LOW_POINT, 10.0, _recalc_offsets);
145
+    EDIT_ITEM_FAST(float41sign, MSG_HOTEND_OFFSET_Y, &hotend_offset[1].y, -99.0, 99.0, _recalc_offsets);
146
+    EDIT_ITEM_FAST(float41sign, MSG_HOTEND_OFFSET_Z, &hotend_offset[1].z, Z_PROBE_LOW_POINT, 10.0, _recalc_offsets);
147 147
     #if ENABLED(EEPROM_SETTINGS)
148 148
       ACTION_ITEM(MSG_STORE_EEPROM, lcd_store_settings);
149 149
     #endif
@@ -202,19 +202,11 @@ void menu_advanced_settings();
202 202
     ACTION_ITEM(MSG_BLTOUCH_STOW, bltouch._stow);
203 203
     ACTION_ITEM(MSG_BLTOUCH_SW_MODE, bltouch._set_SW_mode);
204 204
     #if ENABLED(BLTOUCH_LCD_VOLTAGE_MENU)
205
-      SUBMENU(MSG_BLTOUCH_5V_MODE, []{
206
-        do_select_screen(GET_TEXT(MSG_BLTOUCH_5V_MODE), GET_TEXT(MSG_BUTTON_CANCEL), bltouch._set_5V_mode, ui.goto_previous_screen, GET_TEXT(MSG_BLTOUCH_MODE_CHANGE));
207
-      });
208
-      SUBMENU(MSG_BLTOUCH_OD_MODE, []{
209
-        do_select_screen(GET_TEXT(MSG_BLTOUCH_OD_MODE), GET_TEXT(MSG_BUTTON_CANCEL), bltouch._set_OD_mode, ui.goto_previous_screen, GET_TEXT(MSG_BLTOUCH_MODE_CHANGE));
210
-      });
205
+      CONFIRM_ITEM(MSG_BLTOUCH_5V_MODE, MSG_BLTOUCH_5V_MODE, MSG_BUTTON_CANCEL, bltouch._set_5V_mode, ui.goto_previous_screen, GET_TEXT(MSG_BLTOUCH_MODE_CHANGE));
206
+      CONFIRM_ITEM(MSG_BLTOUCH_OD_MODE, MSG_BLTOUCH_OD_MODE, MSG_BUTTON_CANCEL, bltouch._set_OD_mode, ui.goto_previous_screen, GET_TEXT(MSG_BLTOUCH_MODE_CHANGE));
211 207
       ACTION_ITEM(MSG_BLTOUCH_MODE_STORE, bltouch._mode_store);
212
-      SUBMENU(MSG_BLTOUCH_MODE_STORE_5V, []{
213
-        do_select_screen(GET_TEXT(MSG_BLTOUCH_MODE_STORE_5V), GET_TEXT(MSG_BUTTON_CANCEL), bltouch.mode_conv_5V, ui.goto_previous_screen, GET_TEXT(MSG_BLTOUCH_MODE_CHANGE));
214
-      });
215
-      SUBMENU(MSG_BLTOUCH_MODE_STORE_OD, []{
216
-        do_select_screen(GET_TEXT(MSG_BLTOUCH_MODE_STORE_OD), GET_TEXT(MSG_BUTTON_CANCEL), bltouch.mode_conv_OD, ui.goto_previous_screen, GET_TEXT(MSG_BLTOUCH_MODE_CHANGE));
217
-      });
208
+      CONFIRM_ITEM(MSG_BLTOUCH_MODE_STORE_5V, MSG_BLTOUCH_MODE_STORE_5V, MSG_BUTTON_CANCEL, bltouch.mode_conv_5V, ui.goto_previous_screen, GET_TEXT(MSG_BLTOUCH_MODE_CHANGE));
209
+      CONFIRM_ITEM(MSG_BLTOUCH_MODE_STORE_OD, MSG_BLTOUCH_MODE_STORE_OD, MSG_BUTTON_CANCEL, bltouch.mode_conv_OD, ui.goto_previous_screen, GET_TEXT(MSG_BLTOUCH_MODE_CHANGE));
218 210
       ACTION_ITEM(MSG_BLTOUCH_MODE_ECHO, bltouch_report);
219 211
     #endif
220 212
     END_MENU();

+ 1
- 1
Marlin/src/lcd/menu/menu_filament.cpp Datei anzeigen

@@ -281,7 +281,7 @@ static PGM_P pause_header() {
281 281
 #define HOTEND_STATUS_ITEM() do { \
282 282
   if (_menuLineNr == _thisItemNr) { \
283 283
     if (ui.should_draw()) { \
284
-      draw_menu_item_static(_lcdLineNr, GET_TEXT(MSG_FILAMENT_CHANGE_NOZZLE), SS_INVERT); \
284
+      MenuItem_static::draw(_lcdLineNr, GET_TEXT(MSG_FILAMENT_CHANGE_NOZZLE), SS_INVERT); \
285 285
       ui.draw_hotend_status(_lcdLineNr, hotend_status_extruder); \
286 286
     } \
287 287
     if (_skipStatic && encoderLine <= _thisItemNr) { \

+ 28
- 16
Marlin/src/lcd/menu/menu_main.cpp Datei anzeigen

@@ -44,7 +44,11 @@
44 44
 
45 45
 #if MACHINE_CAN_STOP
46 46
   void menu_abort_confirm() {
47
-    do_select_screen(GET_TEXT(MSG_BUTTON_STOP), GET_TEXT(MSG_BACK), ui.abort_print, ui.goto_previous_screen, GET_TEXT(MSG_STOP_PRINT), nullptr, PSTR("?"));
47
+    MenuItem_confirm::select_screen(
48
+      GET_TEXT(MSG_BUTTON_STOP), GET_TEXT(MSG_BACK),
49
+      ui.abort_print, ui.goto_previous_screen,
50
+      GET_TEXT(MSG_STOP_PRINT), (PGM_P)nullptr, PSTR("?")
51
+    );
48 52
   }
49 53
 #endif // MACHINE_CAN_STOP
50 54
 
@@ -83,18 +87,6 @@ void menu_configuration();
83 87
   void menu_mixer();
84 88
 #endif
85 89
 
86
-#if HAS_SERVICE_INTERVALS
87
-  #if SERVICE_INTERVAL_1 > 0
88
-    void menu_service1();
89
-  #endif
90
-  #if SERVICE_INTERVAL_2 > 0
91
-    void menu_service2();
92
-  #endif
93
-  #if SERVICE_INTERVAL_3 > 0
94
-    void menu_service3();
95
-  #endif
96
-#endif
97
-
98 90
 extern const char M21_STR[];
99 91
 
100 92
 void menu_main() {
@@ -239,14 +231,34 @@ void menu_main() {
239 231
   #endif // HAS_ENCODER_WHEEL && SDSUPPORT
240 232
 
241 233
   #if HAS_SERVICE_INTERVALS
234
+    static auto _service_reset = [](const int index) {
235
+      print_job_timer.resetServiceInterval(index);
236
+      #if HAS_BUZZER
237
+        ui.completion_feedback();
238
+      #endif
239
+      ui.reset_status();
240
+      ui.return_to_status();
241
+    };
242 242
     #if SERVICE_INTERVAL_1 > 0
243
-      SUBMENU_P(PSTR(SERVICE_NAME_1), menu_service1);
243
+      CONFIRM_ITEM_P(PSTR(SERVICE_NAME_1),
244
+        MSG_BUTTON_RESET, MSG_BUTTON_CANCEL,
245
+        []{ _service_reset(1); }, ui.goto_previous_screen,
246
+        GET_TEXT(MSG_SERVICE_RESET), F(SERVICE_NAME_1), PSTR("?")
247
+      );
244 248
     #endif
245 249
     #if SERVICE_INTERVAL_2 > 0
246
-      SUBMENU_P(PSTR(SERVICE_NAME_2), menu_service2);
250
+      CONFIRM_ITEM_P(PSTR(SERVICE_NAME_2),
251
+        MSG_BUTTON_RESET, MSG_BUTTON_CANCEL,
252
+        []{ _service_reset(2); }, ui.goto_previous_screen,
253
+        GET_TEXT(MSG_SERVICE_RESET), F(SERVICE_NAME_2), PSTR("?")
254
+      );
247 255
     #endif
248 256
     #if SERVICE_INTERVAL_3 > 0
249
-      SUBMENU_P(PSTR(SERVICE_NAME_3), menu_service3);
257
+      CONFIRM_ITEM_P(PSTR(SERVICE_NAME_3),
258
+        MSG_BUTTON_RESET, MSG_BUTTON_CANCEL,
259
+        []{ _service_reset(3); }, ui.goto_previous_screen,
260
+        GET_TEXT(MSG_SERVICE_RESET), F(SERVICE_NAME_3), PSTR("?")
261
+      );
250 262
     #endif
251 263
   #endif
252 264
 

+ 9
- 3
Marlin/src/lcd/menu/menu_media.cpp Datei anzeigen

@@ -79,7 +79,7 @@ inline void sdcard_start_selected_file() {
79 79
     char buffer[strlen(longest) + 2];
80 80
     buffer[0] = ' ';
81 81
     strcpy(buffer + 1, longest);
82
-    do_select_screen(
82
+    MenuItem_confirm::select_screen(
83 83
       GET_TEXT(MSG_BUTTON_PRINT), GET_TEXT(MSG_BUTTON_CANCEL),
84 84
       sdcard_start_selected_file, ui.goto_previous_screen,
85 85
       GET_TEXT(MSG_START_PRINT), buffer, PSTR("?")
@@ -88,8 +88,11 @@ inline void sdcard_start_selected_file() {
88 88
 
89 89
 #endif
90 90
 
91
-class MenuItem_sdfile {
91
+class MenuItem_sdfile : public MenuItem_sdbase {
92 92
   public:
93
+    static inline void draw(const bool sel, const uint8_t row, PGM_P const pstr, CardReader &theCard) {
94
+      MenuItem_sdbase::draw(sel, row, pstr, theCard, false);
95
+    }
93 96
     static void action(PGM_P const pstr, CardReader &) {
94 97
       #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
95 98
         // Save menu state for the selected file
@@ -106,8 +109,11 @@ class MenuItem_sdfile {
106 109
     }
107 110
 };
108 111
 
109
-class MenuItem_sdfolder {
112
+class MenuItem_sdfolder : public MenuItem_sdbase {
110 113
   public:
114
+    static inline void draw(const bool sel, const uint8_t row, PGM_P const pstr, CardReader &theCard) {
115
+      MenuItem_sdbase::draw(sel, row, pstr, theCard, true);
116
+    }
111 117
     static void action(PGM_P const, CardReader &theCard) {
112 118
       card.cd(theCard.filename);
113 119
       encoderTopLine = 0;

+ 13
- 17
Marlin/src/lcd/menu/menu_mixer.cpp Datei anzeigen

@@ -245,22 +245,6 @@ void lcd_mixer_mix_edit() {
245 245
   }
246 246
 #endif
247 247
 
248
-//
249
-// Reset All V-Tools
250
-//
251
-void menu_mixer_vtools_reset_confirm() {
252
-  do_select_screen(
253
-    GET_TEXT(MSG_BUTTON_RESET), GET_TEXT(MSG_BUTTON_CANCEL),
254
-    []{
255
-      mixer.reset_vtools();
256
-      LCD_MESSAGEPGM(MSG_VTOOLS_RESET);
257
-      ui.return_to_status();
258
-    },
259
-    ui.goto_previous_screen,
260
-    GET_TEXT(MSG_RESET_VTOOLS), nullptr, PSTR("?")
261
-  );
262
-}
263
-
264 248
 void menu_mixer() {
265 249
   START_MENU();
266 250
   BACK_ITEM(MSG_MAIN);
@@ -287,7 +271,19 @@ void menu_mixer() {
287 271
     SUBMENU(MSG_MIX, _lcd_goto_mix_edit);
288 272
   #endif
289 273
 
290
-  SUBMENU(MSG_RESET_VTOOLS, menu_mixer_vtools_reset_confirm);
274
+  //
275
+  // Reset All V-Tools
276
+  //
277
+  CONFIRM_ITEM(MSG_RESET_VTOOLS,
278
+    MSG_BUTTON_RESET, MSG_BUTTON_CANCEL,
279
+    []{
280
+      mixer.reset_vtools();
281
+      LCD_MESSAGEPGM(MSG_VTOOLS_RESET);
282
+      ui.return_to_status();
283
+    },
284
+    ui.goto_previous_screen,
285
+    GET_TEXT(MSG_RESET_VTOOLS), (PGM_P)nullptr, PSTR("?")
286
+  );
291 287
 
292 288
   #if ENABLED(GRADIENT_MIX)
293 289
   {

+ 2
- 2
Marlin/src/lcd/menu/menu_motion.cpp Datei anzeigen

@@ -147,7 +147,7 @@ static void _lcd_move_xyz(PGM_P name, AxisEnum axis) {
147 147
         + manual_move_offset
148 148
       #endif
149 149
     , axis);
150
-    draw_edit_screen(name, move_menu_scale >= 0.1f ? ftostr41sign(pos) : ftostr43sign(pos));
150
+    MenuEditItemBase::edit_screen(name, move_menu_scale >= 0.1f ? ftostr41sign(pos) : ftostr43sign(pos));
151 151
   }
152 152
 }
153 153
 void lcd_move_x() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_X), X_AXIS); }
@@ -200,7 +200,7 @@ void lcd_move_z() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Z), Z_AXIS); }
200 200
         }
201 201
       #endif // E_MANUAL > 1
202 202
 
203
-      draw_edit_screen(pos_label, ftostr41sign(current_position.e
203
+      MenuEditItemBase::edit_screen(pos_label, ftostr41sign(current_position.e
204 204
         #if IS_KINEMATIC
205 205
           + manual_move_offset
206 206
         #endif

+ 0
- 82
Marlin/src/lcd/menu/menu_service.cpp Datei anzeigen

@@ -1,82 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-//
24
-// Service Menus
25
-//
26
-
27
-#include "../../inc/MarlinConfigPre.h"
28
-
29
-#if HAS_LCD_MENU && HAS_SERVICE_INTERVALS
30
-
31
-#include "menu.h"
32
-#include "../../module/printcounter.h"
33
-
34
-inline void _service_reset(const int index) {
35
-  print_job_timer.resetServiceInterval(index);
36
-  #if HAS_BUZZER
37
-    ui.completion_feedback();
38
-  #endif
39
-  ui.reset_status();
40
-  ui.return_to_status();
41
-}
42
-
43
-#if SERVICE_INTERVAL_1 > 0
44
-  void menu_service1() {
45
-    char sram[30];
46
-    strncpy_P(sram, PSTR(SERVICE_NAME_1), 29);
47
-    do_select_screen(
48
-      GET_TEXT(MSG_BUTTON_RESET), GET_TEXT(MSG_BUTTON_CANCEL),
49
-      []{ _service_reset(1); },
50
-      ui.goto_previous_screen,
51
-      GET_TEXT(MSG_SERVICE_RESET), sram, PSTR("?")
52
-    );
53
-  }
54
-#endif
55
-
56
-#if SERVICE_INTERVAL_2 > 0
57
-  void menu_service2() {
58
-    char sram[30];
59
-    strncpy_P(sram, PSTR(SERVICE_NAME_2), 29);
60
-    do_select_screen(
61
-      GET_TEXT(MSG_BUTTON_RESET), GET_TEXT(MSG_BUTTON_CANCEL),
62
-      []{ _service_reset(2); },
63
-      ui.goto_previous_screen,
64
-      GET_TEXT(MSG_SERVICE_RESET), sram, PSTR("?")
65
-    );
66
-  }
67
-#endif
68
-
69
-#if SERVICE_INTERVAL_3 > 0
70
-  void menu_service3() {
71
-    char sram[30];
72
-    strncpy_P(sram, PSTR(SERVICE_NAME_3), 29);
73
-    do_select_screen(
74
-      GET_TEXT(MSG_BUTTON_RESET), GET_TEXT(MSG_BUTTON_CANCEL),
75
-      []{ _service_reset(3); },
76
-      ui.goto_previous_screen,
77
-      GET_TEXT(MSG_SERVICE_RESET), sram, PSTR("?")
78
-    );
79
-  }
80
-#endif
81
-
82
-#endif // HAS_LCD_MENU && HAS_SERVICE_INTERVALS

+ 1
- 1
Marlin/src/lcd/menu/menu_tune.cpp Datei anzeigen

@@ -65,7 +65,7 @@
65 65
     }
66 66
     if (ui.should_draw()) {
67 67
       const float spm = planner.steps_to_mm[axis];
68
-      draw_edit_screen(msg, ftostr54sign(spm * babystep.accum));
68
+      MenuEditItemBase::edit_screen(msg, ftostr54sign(spm * babystep.accum));
69 69
       #if ENABLED(BABYSTEP_DISPLAY_TOTAL)
70 70
         const bool in_view = (true
71 71
           #if HAS_GRAPHICAL_LCD

+ 1
- 1
Marlin/src/lcd/menu/menu_ubl.cpp Datei anzeigen

@@ -65,7 +65,7 @@ static void _lcd_mesh_fine_tune(PGM_P msg) {
65 65
   }
66 66
 
67 67
   if (ui.should_draw()) {
68
-    draw_edit_screen(msg, ftostr43sign(mesh_edit_value));
68
+    MenuEditItemBase::edit_screen(msg, ftostr43sign(mesh_edit_value));
69 69
     #if ENABLED(MESH_EDIT_GFX_OVERLAY)
70 70
       _lcd_zoffset_overlay_gfx(mesh_edit_value);
71 71
     #endif

+ 1
- 0
buildroot/share/tests/megaatmega2560-tests Datei anzeigen

@@ -32,6 +32,7 @@ opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TE
32 32
            BLINKM PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN LED_CONTROL_MENU \
33 33
            NEOPIXEL_LED CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_MENU \
34 34
            PID_PARAMS_PER_HOTEND PID_AUTOTUNE_MENU PID_EDIT_MENU LCD_SHOW_E_TOTAL \
35
+           PRINTCOUNTER SERVICE_NAME_1 SERVICE_INTERVAL_1 LEVEL_BED_CORNERS \
35 36
            NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR FILAMENT_RUNOUT_DISTANCE_MM \
36 37
            ADVANCED_PAUSE_FEATURE FILAMENT_LOAD_UNLOAD_GCODES FILAMENT_UNLOAD_ALL_EXTRUDERS \
37 38
            AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DISTINCT_E_FACTORS \

Laden…
Abbrechen
Speichern