Browse Source

🎨 Updated string macros

Scott Lahteine 3 years ago
parent
commit
a7fdaabd54
51 changed files with 237 additions and 234 deletions
  1. 1
    1
      Marlin/src/core/multi_language.h
  2. 5
    1
      Marlin/src/core/types.h
  3. 4
    7
      Marlin/src/lcd/e3v2/common/dwin_api.h
  4. 3
    3
      Marlin/src/lcd/e3v2/creality/dwin.cpp
  5. 119
    119
      Marlin/src/lcd/e3v2/enhanced/dwin.cpp
  6. 1
    1
      Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h
  7. 0
    1
      Marlin/src/lcd/e3v2/enhanced/dwinui.cpp
  8. 12
    12
      Marlin/src/lcd/e3v2/enhanced/dwinui.h
  9. 2
    0
      Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h
  10. 1
    1
      Marlin/src/lcd/e3v2/marlinui/dwin_string.h
  11. 2
    2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp
  12. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.h
  13. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp
  14. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.h
  15. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp
  16. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.h
  17. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp
  18. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.h
  19. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp
  20. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h
  21. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/compat.h
  22. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp
  23. 5
    5
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp
  24. 5
    5
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h
  25. 2
    2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.cpp
  26. 2
    2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.h
  27. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h
  28. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp
  29. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.h
  30. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp
  31. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.h
  32. 3
    3
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp
  33. 3
    3
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h
  34. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp
  35. 2
    2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/alert_dialog_box.cpp
  36. 15
    15
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.cpp
  37. 12
    12
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.h
  38. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.h
  39. 2
    2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp
  40. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.cpp
  41. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.cpp
  42. 3
    3
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp
  43. 3
    3
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h
  44. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp
  45. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.h
  46. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stress_test_screen.cpp
  47. 1
    0
      Marlin/src/lcd/language/language_en.h
  48. 2
    2
      Marlin/src/lcd/menu/game/brickout.cpp
  49. 2
    2
      Marlin/src/lcd/menu/game/snake.cpp
  50. 1
    1
      Marlin/src/lcd/menu/game/types.h
  51. 1
    1
      Marlin/src/lcd/menu/menu.h

+ 1
- 1
Marlin/src/core/multi_language.h View File

@@ -78,7 +78,7 @@ typedef const char Language_Str[];
78 78
   #define GET_TEXT(MSG) GET_LANG(LCD_LANGUAGE)::MSG
79 79
   #define MAX_LANG_CHARSIZE LANG_CHARSIZE
80 80
 #endif
81
-#define GET_TEXT_F(MSG) (const __FlashStringHelper*)GET_TEXT(MSG)
81
+#define GET_TEXT_F(MSG) FPSTR(GET_TEXT(MSG))
82 82
 
83 83
 #define GET_LANGUAGE_NAME(INDEX) GET_LANG(LCD_LANGUAGE_##INDEX)::LANGUAGE
84 84
 #define LANG_CHARSIZE GET_TEXT(CHARSIZE)

+ 5
- 1
Marlin/src/core/types.h View File

@@ -27,7 +27,11 @@
27 27
 #include "../inc/MarlinConfigPre.h"
28 28
 
29 29
 class __FlashStringHelper;
30
-typedef const __FlashStringHelper *progmem_str;
30
+typedef const __FlashStringHelper* FSTR_P;
31
+#ifndef FPSTR
32
+  #define FPSTR(S) (reinterpret_cast<FSTR_P>(S))
33
+#endif
34
+#define FTOP(S) (reinterpret_cast<const char*>(S))
31 35
 
32 36
 //
33 37
 // Conditional type assignment magic. For example...

+ 4
- 7
Marlin/src/lcd/e3v2/common/dwin_api.h View File

@@ -21,10 +21,7 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-#include <stddef.h>
25
-#include <stdint.h>
26
-
27
-#include "../../../HAL/shared/Marduino.h"
24
+#include "../../../inc/MarlinConfig.h"
28 25
 
29 26
 #ifndef DWIN_WIDTH
30 27
   #define DWIN_WIDTH  272
@@ -74,7 +71,7 @@ inline void DWIN_Text(size_t &i, const char * const string, uint16_t rlimit=0xFF
74 71
   i += len;
75 72
 }
76 73
 
77
-inline void DWIN_Text(size_t &i, const __FlashStringHelper * string, uint16_t rlimit=0xFFFF) {
74
+inline void DWIN_Text(size_t &i, FSTR_P string, uint16_t rlimit=0xFFFF) {
78 75
   if (!string) return;
79 76
   const size_t len = _MIN(sizeof(DWIN_SendBuf) - i, _MIN(rlimit, strlen_P((PGM_P)string))); // cast to PGM_P (const char*) measure with strlen_P.
80 77
   if (len == 0) return;
@@ -175,9 +172,9 @@ void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis,
175 172
 //  rlimit: For draw less chars than string length use rlimit
176 173
 void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string, uint16_t rlimit=0xFFFF);
177 174
 
178
-inline void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const __FlashStringHelper *title) {
175
+inline void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, FSTR_P title) {
179 176
   // Note that this won't work on AVR, only 32-bit systems!
180
-  DWIN_Draw_String(bShow, size, color, bColor, x, y, reinterpret_cast<const char*>(title));
177
+  DWIN_Draw_String(bShow, size, color, bColor, x, y, FTOP(title));
181 178
 }
182 179
 
183 180
 // Draw a positive integer

+ 3
- 3
Marlin/src/lcd/e3v2/creality/dwin.cpp View File

@@ -363,7 +363,7 @@ void Draw_Title(const char * const title) {
363 363
   DWIN_Draw_String(false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title);
364 364
 }
365 365
 
366
-void Draw_Title(const __FlashStringHelper * title) {
366
+void Draw_Title(FSTR_P title) {
367 367
   DWIN_Draw_String(false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title);
368 368
 }
369 369
 
@@ -439,7 +439,7 @@ void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, const char * const
439 439
   DWIN_Draw_Line(Line_Color, 16, MBASE(line) + 33, 256, MBASE(line) + 34);
440 440
 }
441 441
 
442
-void Draw_Menu_LineF(const uint8_t line, const uint8_t icon=0, const __FlashStringHelper *label=nullptr, bool more=false) {
442
+void Draw_Menu_LineF(const uint8_t line, const uint8_t icon=0, FSTR_P label=nullptr, bool more=false) {
443 443
   Draw_Menu_Line(line, icon, (char*)label, more);
444 444
 }
445 445
 
@@ -589,7 +589,7 @@ void say_steps_per_mm_en(const uint8_t row) {
589 589
 void DWIN_Draw_Label(const uint8_t row, char *string) {
590 590
   DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(row), string);
591 591
 }
592
-void DWIN_Draw_Label(const uint8_t row, const __FlashStringHelper *title) {
592
+void DWIN_Draw_Label(const uint8_t row, FSTR_P title) {
593 593
   DWIN_Draw_Label(row, (char*)title);
594 594
 }
595 595
 

+ 119
- 119
Marlin/src/lcd/e3v2/enhanced/dwin.cpp View File

@@ -3078,31 +3078,31 @@ void Draw_Prepare_Menu() {
3078 3078
     CurrentMenu = PrepareMenu;
3079 3079
     SetMenuTitle({133, 1, 28, 13}, {179, 0, 48, 14}, GET_TEXT_F(MSG_PREPARE));
3080 3080
     DWINUI::MenuItemsPrepare(13);
3081
-    ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu);
3081
+    ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu);
3082 3082
     #if ENABLED(ADVANCED_PAUSE_FEATURE)
3083
-      ADDMENUITEM(ICON_FilMan, GET_TEXT(MSG_FILAMENT_MAN), onDrawSubMenu, Draw_FilamentMan_Menu);
3083
+      ADDMENUITEM(ICON_FilMan, GET_TEXT_F(MSG_FILAMENT_MAN), onDrawSubMenu, Draw_FilamentMan_Menu);
3084 3084
     #endif
3085
-    ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_MOVE_AXIS), onDrawMoveSubMenu, Draw_Move_Menu);
3086
-    ADDMENUITEM(ICON_LevBed, GET_TEXT(MSG_BED_LEVELING), onDrawSubMenu, Draw_LevBedCorners_Menu);
3087
-    ADDMENUITEM(ICON_CloseMotor, GET_TEXT(MSG_DISABLE_STEPPERS), onDrawDisableMotors, DisableMotors);
3088
-    ADDMENUITEM(ICON_Homing, GET_TEXT(MSG_AUTO_HOME), onDrawAutoHome, AutoHome);
3085
+    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_MOVE_AXIS), onDrawMoveSubMenu, Draw_Move_Menu);
3086
+    ADDMENUITEM(ICON_LevBed, GET_TEXT_F(MSG_BED_LEVELING), onDrawSubMenu, Draw_LevBedCorners_Menu);
3087
+    ADDMENUITEM(ICON_CloseMotor, GET_TEXT_F(MSG_DISABLE_STEPPERS), onDrawDisableMotors, DisableMotors);
3088
+    ADDMENUITEM(ICON_Homing, GET_TEXT_F(MSG_AUTO_HOME), onDrawAutoHome, AutoHome);
3089 3089
     #if ENABLED(MESH_BED_LEVELING)
3090
-      ADDMENUITEM(ICON_ManualMesh, GET_TEXT(MSG_MANUAL_MESH), onDrawSubMenu, Draw_ManualMesh_Menu);
3090
+      ADDMENUITEM(ICON_ManualMesh, GET_TEXT_F(MSG_MANUAL_MESH), onDrawSubMenu, Draw_ManualMesh_Menu);
3091 3091
     #endif
3092 3092
     #if HAS_ZOFFSET_ITEM
3093 3093
       #if EITHER(HAS_BED_PROBE, BABYSTEPPING)
3094
-        ADDMENUITEM(ICON_SetZOffset, GET_TEXT(MSG_PROBE_WIZARD), onDrawSubMenu, Draw_ZOffsetWiz_Menu);
3094
+        ADDMENUITEM(ICON_SetZOffset, GET_TEXT_F(MSG_PROBE_WIZARD), onDrawSubMenu, Draw_ZOffsetWiz_Menu);
3095 3095
       #else
3096
-        ADDMENUITEM(ICON_SetHome, GET_TEXT(MSG_SET_HOME_OFFSETS), onDrawHomeOffset, SetHome);
3096
+        ADDMENUITEM(ICON_SetHome, GET_TEXT_F(MSG_SET_HOME_OFFSETS), onDrawHomeOffset, SetHome);
3097 3097
       #endif
3098 3098
     #endif
3099 3099
     #if HAS_HOTEND
3100
-      ADDMENUITEM(ICON_PLAPreheat, GET_TEXT(MSG_PREHEAT_1), onDrawPreheat1, SetPreheat0);
3100
+      ADDMENUITEM(ICON_PLAPreheat, GET_TEXT_F(MSG_PREHEAT_1), onDrawPreheat1, SetPreheat0);
3101 3101
       ADDMENUITEM(ICON_ABSPreheat, PSTR("Preheat " PREHEAT_2_LABEL), onDrawPreheat2, SetPreheat1);
3102
-      ADDMENUITEM(ICON_CustomPreheat, GET_TEXT(MSG_PREHEAT_CUSTOM), onDrawMenuItem, SetPreheat2);
3102
+      ADDMENUITEM(ICON_CustomPreheat, GET_TEXT_F(MSG_PREHEAT_CUSTOM), onDrawMenuItem, SetPreheat2);
3103 3103
     #endif
3104 3104
     #if HAS_PREHEAT
3105
-      ADDMENUITEM(ICON_Cool, GET_TEXT(MSG_COOLDOWN), onDrawCooldown, SetCoolDown);
3105
+      ADDMENUITEM(ICON_Cool, GET_TEXT_F(MSG_COOLDOWN), onDrawCooldown, SetCoolDown);
3106 3106
     #endif
3107 3107
     ADDMENUITEM(ICON_Language, PSTR("UI Language"), onDrawLanguage, SetLanguage);
3108 3108
   }
@@ -3117,12 +3117,12 @@ void Draw_LevBedCorners_Menu() {
3117 3117
     CurrentMenu = LevBedMenu;
3118 3118
     SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_BED_TRAMMING)); // TODO: Chinese, English "Bed Tramming" JPG
3119 3119
     DWINUI::MenuItemsPrepare(6);
3120
-    ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu);
3121
-    ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_LEVBED_FL), onDrawMenuItem, LevBedFL);
3122
-    ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_LEVBED_FR), onDrawMenuItem, LevBedFR);
3123
-    ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_LEVBED_BR), onDrawMenuItem, LevBedBR);
3124
-    ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_LEVBED_BL), onDrawMenuItem, LevBedBL);
3125
-    ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_LEVBED_C ), onDrawMenuItem, LevBedC );
3120
+    ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu);
3121
+    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_FL), onDrawMenuItem, LevBedFL);
3122
+    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_FR), onDrawMenuItem, LevBedFR);
3123
+    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_BR), onDrawMenuItem, LevBedBR);
3124
+    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_BL), onDrawMenuItem, LevBedBL);
3125
+    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_C ), onDrawMenuItem, LevBedC );
3126 3126
   }
3127 3127
   CurrentMenu->draw();
3128 3128
 }
@@ -3134,17 +3134,17 @@ void Draw_Control_Menu() {
3134 3134
     CurrentMenu = ControlMenu;
3135 3135
     SetMenuTitle({103, 1, 28, 14}, {128, 2, 49, 11}, GET_TEXT_F(MSG_CONTROL));
3136 3136
     DWINUI::MenuItemsPrepare(9);
3137
-    ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu);
3138
-    ADDMENUITEM(ICON_Temperature, GET_TEXT(MSG_TEMPERATURE), onDrawTempSubMenu, Draw_Temperature_Menu);
3139
-    ADDMENUITEM(ICON_Motion, GET_TEXT(MSG_MOTION), onDrawMotionSubMenu, Draw_Motion_Menu);
3137
+    ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu);
3138
+    ADDMENUITEM(ICON_Temperature, GET_TEXT_F(MSG_TEMPERATURE), onDrawTempSubMenu, Draw_Temperature_Menu);
3139
+    ADDMENUITEM(ICON_Motion, GET_TEXT_F(MSG_MOTION), onDrawMotionSubMenu, Draw_Motion_Menu);
3140 3140
     #if ENABLED(EEPROM_SETTINGS)
3141
-      ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT(MSG_STORE_EEPROM), onDrawWriteEeprom, WriteEeprom);
3142
-      ADDMENUITEM(ICON_ReadEEPROM, GET_TEXT(MSG_LOAD_EEPROM), onDrawReadEeprom, ReadEeprom);
3143
-      ADDMENUITEM(ICON_ResumeEEPROM, GET_TEXT(MSG_RESTORE_DEFAULTS), onDrawResetEeprom, ResetEeprom);
3141
+      ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT_F(MSG_STORE_EEPROM), onDrawWriteEeprom, WriteEeprom);
3142
+      ADDMENUITEM(ICON_ReadEEPROM, GET_TEXT_F(MSG_LOAD_EEPROM), onDrawReadEeprom, ReadEeprom);
3143
+      ADDMENUITEM(ICON_ResumeEEPROM, GET_TEXT_F(MSG_RESTORE_DEFAULTS), onDrawResetEeprom, ResetEeprom);
3144 3144
     #endif
3145
-    ADDMENUITEM(ICON_Reboot, GET_TEXT(MSG_RESET_PRINTER), onDrawMenuItem, RebootPrinter);
3146
-    ADDMENUITEM(ICON_AdvSet, GET_TEXT(MSG_ADVANCED_SETTINGS), onDrawSubMenu, Draw_AdvancedSettings_Menu);
3147
-    ADDMENUITEM(ICON_Info, GET_TEXT(MSG_INFO_SCREEN), onDrawInfoSubMenu, Goto_InfoMenu);
3145
+    ADDMENUITEM(ICON_Reboot, GET_TEXT_F(MSG_RESET_PRINTER), onDrawMenuItem, RebootPrinter);
3146
+    ADDMENUITEM(ICON_AdvSet, GET_TEXT_F(MSG_ADVANCED_SETTINGS), onDrawSubMenu, Draw_AdvancedSettings_Menu);
3147
+    ADDMENUITEM(ICON_Info, GET_TEXT_F(MSG_INFO_SCREEN), onDrawInfoSubMenu, Goto_InfoMenu);
3148 3148
   }
3149 3149
   CurrentMenu->draw();
3150 3150
 }
@@ -3156,12 +3156,12 @@ void Draw_AdvancedSettings_Menu() {
3156 3156
     CurrentMenu = AdvancedSettings;
3157 3157
     SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // TODO: Chinese, English "Advanced Settings" JPG
3158 3158
     DWINUI::MenuItemsPrepare(11);
3159
-    ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu);
3159
+    ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu);
3160 3160
     #if HAS_HOME_OFFSET
3161
-      ADDMENUITEM(ICON_HomeOffset, GET_TEXT(MSG_SET_HOME_OFFSETS), onDrawSubMenu, Draw_HomeOffset_Menu);
3161
+      ADDMENUITEM(ICON_HomeOffset, GET_TEXT_F(MSG_SET_HOME_OFFSETS), onDrawSubMenu, Draw_HomeOffset_Menu);
3162 3162
     #endif
3163 3163
     #if HAS_BED_PROBE
3164
-      ADDMENUITEM(ICON_ProbeSet, GET_TEXT(MSG_ZPROBE_SETTINGS), onDrawSubMenu, Draw_ProbeSet_Menu);
3164
+      ADDMENUITEM(ICON_ProbeSet, GET_TEXT_F(MSG_ZPROBE_SETTINGS), onDrawSubMenu, Draw_ProbeSet_Menu);
3165 3165
     #endif
3166 3166
     #if HAS_HOTEND
3167 3167
       ADDMENUITEM(ICON_PIDNozzle, F("Hotend PID Settings"), onDrawSubMenu, Draw_HotendPID_Menu);
@@ -3170,13 +3170,13 @@ void Draw_AdvancedSettings_Menu() {
3170 3170
       ADDMENUITEM(ICON_PIDbed, F("Bed PID Settings"), onDrawSubMenu, Draw_BedPID_Menu);
3171 3171
     #endif
3172 3172
     #if HAS_FILAMENT_SENSOR
3173
-      ADDMENUITEM(ICON_FilSet, GET_TEXT(MSG_FILAMENT_SET), onDrawSubMenu, Draw_FilSet_Menu);
3173
+      ADDMENUITEM(ICON_FilSet, GET_TEXT_F(MSG_FILAMENT_SET), onDrawSubMenu, Draw_FilSet_Menu);
3174 3174
     #endif
3175 3175
     #if ENABLED(POWER_LOSS_RECOVERY)
3176
-      ADDMENUITEM(ICON_Pwrlossr, F("Power-loss recovery"), onDrawPwrLossR, SetPwrLossr);
3176
+      ADDMENUITEM(ICON_Pwrlossr, GET_TEXT_F(MSG_OUTAGE_RECOVERY), onDrawPwrLossR, SetPwrLossr);
3177 3177
     #endif
3178 3178
     #if HAS_LCD_BRIGHTNESS
3179
-      ADDMENUITEM_P(ICON_Brightness, F("LCD Brightness"), onDrawPInt8Menu, SetBrightness, &ui.brightness);
3179
+      ADDMENUITEM_P(ICON_Brightness, GET_TEXT_F(MSG_BRIGHTNESS), onDrawPInt8Menu, SetBrightness, &ui.brightness);
3180 3180
     #endif
3181 3181
     ADDMENUITEM(ICON_Scolor, F("Select Colors"), onDrawSubMenu, Draw_SelectColors_Menu);
3182 3182
     #if ENABLED(SOUND_MENU_ITEM)
@@ -3194,12 +3194,12 @@ void Draw_Move_Menu() {
3194 3194
     CurrentMenu = MoveMenu;
3195 3195
     SetMenuTitle({192, 1, 42, 14}, {231, 2, 35, 11}, GET_TEXT_F(MSG_MOVE_AXIS));
3196 3196
     DWINUI::MenuItemsPrepare(5);
3197
-    ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu);
3198
-    ADDMENUITEM_P(ICON_MoveX, GET_TEXT(MSG_MOVE_X), onDrawMoveX, SetMoveX, &current_position.x);
3199
-    ADDMENUITEM_P(ICON_MoveY, GET_TEXT(MSG_MOVE_Y), onDrawMoveY, SetMoveY, &current_position.y);
3200
-    ADDMENUITEM_P(ICON_MoveZ, GET_TEXT(MSG_MOVE_Z), onDrawMoveZ, SetMoveZ, &current_position.z);
3197
+    ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu);
3198
+    ADDMENUITEM_P(ICON_MoveX, GET_TEXT_F(MSG_MOVE_X), onDrawMoveX, SetMoveX, &current_position.x);
3199
+    ADDMENUITEM_P(ICON_MoveY, GET_TEXT_F(MSG_MOVE_Y), onDrawMoveY, SetMoveY, &current_position.y);
3200
+    ADDMENUITEM_P(ICON_MoveZ, GET_TEXT_F(MSG_MOVE_Z), onDrawMoveZ, SetMoveZ, &current_position.z);
3201 3201
     #if HAS_HOTEND
3202
-      ADDMENUITEM_P(ICON_Extruder, GET_TEXT(MSG_MOVE_E), onDrawMoveE, SetMoveE, &current_position.e);
3202
+      ADDMENUITEM_P(ICON_Extruder, GET_TEXT_F(MSG_MOVE_E), onDrawMoveE, SetMoveE, &current_position.e);
3203 3203
     #endif
3204 3204
   }
3205 3205
   CurrentMenu->draw();
@@ -3214,10 +3214,10 @@ void Draw_Move_Menu() {
3214 3214
       CurrentMenu = HomeOffMenu;
3215 3215
       SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); // TODO: Chinese, English "Set Home Offsets" JPG
3216 3216
       DWINUI::MenuItemsPrepare(4);
3217
-      ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu);
3218
-      ADDMENUITEM_P(ICON_HomeOffsetX, GET_TEXT(MSG_HOME_OFFSET_X), onDrawPFloatMenu, SetHomeOffsetX, &home_offset[X_AXIS]);
3219
-      ADDMENUITEM_P(ICON_HomeOffsetY, GET_TEXT(MSG_HOME_OFFSET_Y), onDrawPFloatMenu, SetHomeOffsetY, &home_offset[Y_AXIS]);
3220
-      ADDMENUITEM_P(ICON_HomeOffsetZ, GET_TEXT(MSG_HOME_OFFSET_Z), onDrawPFloatMenu, SetHomeOffsetZ, &home_offset[Z_AXIS]);
3217
+      ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu);
3218
+      ADDMENUITEM_P(ICON_HomeOffsetX, GET_TEXT_F(MSG_HOME_OFFSET_X), onDrawPFloatMenu, SetHomeOffsetX, &home_offset[X_AXIS]);
3219
+      ADDMENUITEM_P(ICON_HomeOffsetY, GET_TEXT_F(MSG_HOME_OFFSET_Y), onDrawPFloatMenu, SetHomeOffsetY, &home_offset[Y_AXIS]);
3220
+      ADDMENUITEM_P(ICON_HomeOffsetZ, GET_TEXT_F(MSG_HOME_OFFSET_Z), onDrawPFloatMenu, SetHomeOffsetZ, &home_offset[Z_AXIS]);
3221 3221
     }
3222 3222
     CurrentMenu->draw();
3223 3223
   }
@@ -3231,11 +3231,11 @@ void Draw_Move_Menu() {
3231 3231
       CurrentMenu = ProbeSetMenu;
3232 3232
       SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_ZPROBE_SETTINGS)); // TODO: Chinese, English "Probe Settings" JPG
3233 3233
       DWINUI::MenuItemsPrepare(5);
3234
-      ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu);
3235
-      ADDMENUITEM_P(ICON_ProbeOffsetX, GET_TEXT(MSG_ZPROBE_XOFFSET), onDrawPFloatMenu, SetProbeOffsetX, &probe.offset.x);
3236
-      ADDMENUITEM_P(ICON_ProbeOffsetY, GET_TEXT(MSG_ZPROBE_YOFFSET), onDrawPFloatMenu, SetProbeOffsetY, &probe.offset.y);
3237
-      ADDMENUITEM_P(ICON_ProbeOffsetZ, GET_TEXT(MSG_ZPROBE_ZOFFSET), onDrawPFloat2Menu, SetProbeOffsetZ, &probe.offset.z);
3238
-      ADDMENUITEM(ICON_ProbeTest, GET_TEXT(MSG_M48_TEST), onDrawMenuItem, ProbeTest);
3234
+      ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu);
3235
+      ADDMENUITEM_P(ICON_ProbeOffsetX, GET_TEXT_F(MSG_ZPROBE_XOFFSET), onDrawPFloatMenu, SetProbeOffsetX, &probe.offset.x);
3236
+      ADDMENUITEM_P(ICON_ProbeOffsetY, GET_TEXT_F(MSG_ZPROBE_YOFFSET), onDrawPFloatMenu, SetProbeOffsetY, &probe.offset.y);
3237
+      ADDMENUITEM_P(ICON_ProbeOffsetZ, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), onDrawPFloat2Menu, SetProbeOffsetZ, &probe.offset.z);
3238
+      ADDMENUITEM(ICON_ProbeTest, GET_TEXT_F(MSG_M48_TEST), onDrawMenuItem, ProbeTest);
3239 3239
     }
3240 3240
     CurrentMenu->draw();
3241 3241
   }
@@ -3249,9 +3249,9 @@ void Draw_Move_Menu() {
3249 3249
       CurrentMenu = FilSetMenu;
3250 3250
       CurrentMenu->MenuTitle.SetCaption(GET_TEXT_F(MSG_FILAMENT_SET));
3251 3251
       DWINUI::MenuItemsPrepare(6);
3252
-      ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu);
3252
+      ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu);
3253 3253
       #if HAS_FILAMENT_SENSOR
3254
-        ADDMENUITEM(ICON_Runout, GET_TEXT(MSG_RUNOUT_ENABLE), onDrawRunoutEnable, SetRunoutEnable);
3254
+        ADDMENUITEM(ICON_Runout, GET_TEXT_F(MSG_RUNOUT_ENABLE), onDrawRunoutEnable, SetRunoutEnable);
3255 3255
       #endif
3256 3256
       #if HAS_FILAMENT_RUNOUT_DISTANCE
3257 3257
         ADDMENUITEM_P(ICON_Runout, F("Runout Distance"), onDrawPFloatMenu, SetRunoutDistance, &runout.runout_distance());
@@ -3260,8 +3260,8 @@ void Draw_Move_Menu() {
3260 3260
         ADDMENUITEM_P(ICON_ExtrudeMinT, F("Extrude Min Temp."), onDrawPIntMenu, SetExtMinT, &HMI_data.ExtMinT);
3261 3261
       #endif
3262 3262
       #if ENABLED(ADVANCED_PAUSE_FEATURE)
3263
-        ADDMENUITEM_P(ICON_FilLoad, GET_TEXT(MSG_FILAMENT_LOAD), onDrawPFloatMenu, SetFilLoad, &fc_settings[0].load_length);
3264
-        ADDMENUITEM_P(ICON_FilUnload, GET_TEXT(MSG_FILAMENT_UNLOAD), onDrawPFloatMenu, SetFilUnload, &fc_settings[0].unload_length);
3263
+        ADDMENUITEM_P(ICON_FilLoad, GET_TEXT_F(MSG_FILAMENT_LOAD), onDrawPFloatMenu, SetFilLoad, &fc_settings[0].load_length);
3264
+        ADDMENUITEM_P(ICON_FilUnload, GET_TEXT_F(MSG_FILAMENT_UNLOAD), onDrawPFloatMenu, SetFilUnload, &fc_settings[0].unload_length);
3265 3265
       #endif
3266 3266
     }
3267 3267
     CurrentMenu->draw();
@@ -3275,8 +3275,8 @@ void Draw_SelectColors_Menu() {
3275 3275
     CurrentMenu = SelectColorMenu;
3276 3276
     SetMenuTitle({0}, {0}, F("Select Colors")); // TODO: Chinese, English "Select Color" JPG
3277 3277
     DWINUI::MenuItemsPrepare(20);
3278
-    ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu);
3279
-    ADDMENUITEM(ICON_StockConfiguration, GET_TEXT(MSG_RESTORE_DEFAULTS), onDrawMenuItem, RestoreDefaultsColors);
3278
+    ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu);
3279
+    ADDMENUITEM(ICON_StockConfiguration, GET_TEXT_F(MSG_RESTORE_DEFAULTS), onDrawMenuItem, RestoreDefaultsColors);
3280 3280
     ADDMENUITEM_P(0, "Screen Background", onDrawSelColorItem, SelColor, &HMI_data.Background_Color);
3281 3281
     ADDMENUITEM_P(0, "Cursor", onDrawSelColorItem, SelColor, &HMI_data.Cursor_color);
3282 3282
     ADDMENUITEM_P(0, "Title Background", onDrawSelColorItem, SelColor, &HMI_data.TitleBg_color);
@@ -3306,8 +3306,8 @@ void Draw_GetColor_Menu() {
3306 3306
     CurrentMenu = GetColorMenu;
3307 3307
     SetMenuTitle({0}, {0}, F("Get Color")); // TODO: Chinese, English "Get Color" JPG
3308 3308
     DWINUI::MenuItemsPrepare(5);
3309
-    ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, DWIN_ApplyColor);
3310
-    ADDMENUITEM(ICON_Cancel, GET_TEXT(MSG_BUTTON_CANCEL), onDrawMenuItem, Draw_SelectColors_Menu);
3309
+    ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, DWIN_ApplyColor);
3310
+    ADDMENUITEM(ICON_Cancel, GET_TEXT_F(MSG_BUTTON_CANCEL), onDrawMenuItem, Draw_SelectColors_Menu);
3311 3311
     ADDMENUITEM(0, "Red", onDrawGetColorItem, SetRGBColor);
3312 3312
     ADDMENUITEM(1, "Green", onDrawGetColorItem, SetRGBColor);
3313 3313
     ADDMENUITEM(2, "Blue", onDrawGetColorItem, SetRGBColor);
@@ -3323,23 +3323,23 @@ void Draw_Tune_Menu() {
3323 3323
     CurrentMenu = TuneMenu;
3324 3324
     SetMenuTitle({73, 2, 28, 12}, {94, 2, 33, 11}, GET_TEXT_F(MSG_TUNE)); // TODO: Chinese, English "Tune" JPG
3325 3325
     DWINUI::MenuItemsPrepare(10);
3326
-    ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Goto_PrintProcess);
3327
-    ADDMENUITEM_P(ICON_Speed, GET_TEXT(MSG_SPEED), onDrawSpeedItem, SetSpeed, &feedrate_percentage);
3326
+    ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_PrintProcess);
3327
+    ADDMENUITEM_P(ICON_Speed, GET_TEXT_F(MSG_SPEED), onDrawSpeedItem, SetSpeed, &feedrate_percentage);
3328 3328
     #if HAS_HOTEND
3329
-      HotendTargetItem = ADDMENUITEM_P(ICON_HotendTemp, GET_TEXT(MSG_UBL_SET_TEMP_HOTEND), onDrawHotendTemp, SetHotendTemp, &thermalManager.temp_hotend[0].target);
3329
+      HotendTargetItem = ADDMENUITEM_P(ICON_HotendTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND), onDrawHotendTemp, SetHotendTemp, &thermalManager.temp_hotend[0].target);
3330 3330
     #endif
3331 3331
     #if HAS_HEATED_BED
3332
-      BedTargetItem = ADDMENUITEM_P(ICON_BedTemp, GET_TEXT(MSG_UBL_SET_TEMP_BED), onDrawBedTemp, SetBedTemp, &thermalManager.temp_bed.target);
3332
+      BedTargetItem = ADDMENUITEM_P(ICON_BedTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_BED), onDrawBedTemp, SetBedTemp, &thermalManager.temp_bed.target);
3333 3333
     #endif
3334 3334
     #if HAS_FAN
3335
-      FanSpeedItem = ADDMENUITEM_P(ICON_FanSpeed, GET_TEXT(MSG_FAN_SPEED), onDrawFanSpeed, SetFanSpeed, &thermalManager.fan_speed[0]);
3335
+      FanSpeedItem = ADDMENUITEM_P(ICON_FanSpeed, GET_TEXT_F(MSG_FAN_SPEED), onDrawFanSpeed, SetFanSpeed, &thermalManager.fan_speed[0]);
3336 3336
     #endif
3337 3337
     #if HAS_ZOFFSET_ITEM && EITHER(HAS_BED_PROBE, BABYSTEPPING)
3338
-      ADDMENUITEM_P(ICON_Zoffset, GET_TEXT(MSG_ZPROBE_ZOFFSET), onDrawZOffset, SetZOffset, &BABY_Z_VAR);
3338
+      ADDMENUITEM_P(ICON_Zoffset, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), onDrawZOffset, SetZOffset, &BABY_Z_VAR);
3339 3339
     #endif
3340
-    ADDMENUITEM_P(ICON_Flow, GET_TEXT(MSG_FLOW), onDrawPIntMenu, SetFlow, &planner.flow_percentage[0]);
3340
+    ADDMENUITEM_P(ICON_Flow, GET_TEXT_F(MSG_FLOW), onDrawPIntMenu, SetFlow, &planner.flow_percentage[0]);
3341 3341
     #if ENABLED(ADVANCED_PAUSE_FEATURE)
3342
-      ADDMENUITEM(ICON_FilMan, GET_TEXT(MSG_FILAMENTCHANGE), onDrawMenuItem, ChangeFilament);
3342
+      ADDMENUITEM(ICON_FilMan, GET_TEXT_F(MSG_FILAMENTCHANGE), onDrawMenuItem, ChangeFilament);
3343 3343
     #endif
3344 3344
     ADDMENUITEM(ICON_Lock, F("Lock Screen"), onDrawMenuItem, Goto_LockScreen);
3345 3345
     #if HAS_LCD_BRIGHTNESS
@@ -3356,14 +3356,14 @@ void Draw_Motion_Menu() {
3356 3356
     CurrentMenu = MotionMenu;
3357 3357
     SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_MOTION)); // TODO: Chinese, English "Motion" JPG
3358 3358
     DWINUI::MenuItemsPrepare(6);
3359
-    ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu);
3360
-    ADDMENUITEM(ICON_MaxSpeed, GET_TEXT(MSG_SPEED), onDrawSpeed, Draw_MaxSpeed_Menu);
3361
-    ADDMENUITEM(ICON_MaxAccelerated, GET_TEXT(MSG_ACCELERATION), onDrawAcc, Draw_MaxAccel_Menu);
3359
+    ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu);
3360
+    ADDMENUITEM(ICON_MaxSpeed, GET_TEXT_F(MSG_SPEED), onDrawSpeed, Draw_MaxSpeed_Menu);
3361
+    ADDMENUITEM(ICON_MaxAccelerated, GET_TEXT_F(MSG_ACCELERATION), onDrawAcc, Draw_MaxAccel_Menu);
3362 3362
     #if HAS_CLASSIC_JERK
3363
-      ADDMENUITEM(ICON_MaxJerk, GET_TEXT(MSG_JERK), onDrawJerk, Draw_MaxJerk_Menu);
3363
+      ADDMENUITEM(ICON_MaxJerk, GET_TEXT_F(MSG_JERK), onDrawJerk, Draw_MaxJerk_Menu);
3364 3364
     #endif
3365
-    ADDMENUITEM(ICON_Step, GET_TEXT(MSG_STEPS_PER_MM), onDrawSteps, Draw_Steps_Menu);
3366
-    ADDMENUITEM_P(ICON_Flow, GET_TEXT(MSG_FLOW), onDrawPIntMenu, SetFlow, &planner.flow_percentage[0]);
3365
+    ADDMENUITEM(ICON_Step, GET_TEXT_F(MSG_STEPS_PER_MM), onDrawSteps, Draw_Steps_Menu);
3366
+    ADDMENUITEM_P(ICON_Flow, GET_TEXT_F(MSG_FLOW), onDrawPIntMenu, SetFlow, &planner.flow_percentage[0]);
3367 3367
   }
3368 3368
   CurrentMenu->draw();
3369 3369
 }
@@ -3376,12 +3376,12 @@ void Draw_Motion_Menu() {
3376 3376
       CurrentMenu = FilamentMenu;
3377 3377
       SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_FILAMENT_MAN)); // TODO: Chinese, English "Filament Management" JPG
3378 3378
       DWINUI::MenuItemsPrepare(5);
3379
-      ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu);
3380
-      ADDMENUITEM(ICON_Park, GET_TEXT(MSG_FILAMENT_PARK_ENABLED), onDrawMenuItem, ParkHead);
3381
-      ADDMENUITEM(ICON_FilMan, GET_TEXT(MSG_FILAMENTCHANGE), onDrawMenuItem, ChangeFilament);
3379
+      ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu);
3380
+      ADDMENUITEM(ICON_Park, GET_TEXT_F(MSG_FILAMENT_PARK_ENABLED), onDrawMenuItem, ParkHead);
3381
+      ADDMENUITEM(ICON_FilMan, GET_TEXT_F(MSG_FILAMENTCHANGE), onDrawMenuItem, ChangeFilament);
3382 3382
       #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
3383
-        ADDMENUITEM(ICON_FilUnload, GET_TEXT(MSG_FILAMENTUNLOAD), onDrawMenuItem, UnloadFilament);
3384
-        ADDMENUITEM(ICON_FilLoad, GET_TEXT(MSG_FILAMENTLOAD), onDrawMenuItem, LoadFilament);
3383
+        ADDMENUITEM(ICON_FilUnload, GET_TEXT_F(MSG_FILAMENTUNLOAD), onDrawMenuItem, UnloadFilament);
3384
+        ADDMENUITEM(ICON_FilLoad, GET_TEXT_F(MSG_FILAMENTLOAD), onDrawMenuItem, LoadFilament);
3385 3385
       #endif
3386 3386
     }
3387 3387
     CurrentMenu->draw();
@@ -3396,11 +3396,11 @@ void Draw_Motion_Menu() {
3396 3396
       CurrentMenu = ManualMesh;
3397 3397
       SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_MANUAL_MESH)); // TODO: Chinese, English "Manual Mesh Leveling" JPG
3398 3398
       DWINUI::MenuItemsPrepare(5);
3399
-      ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu);
3400
-      ADDMENUITEM(ICON_ManualMesh, GET_TEXT(MSG_LEVEL_BED), onDrawMenuItem, ManualMeshStart);
3401
-      MMeshMoveZItem = ADDMENUITEM_P(ICON_Zoffset, GET_TEXT(MSG_MOVE_Z), onDrawMMeshMoveZ, SetMMeshMoveZ, &current_position.z);
3402
-      ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_UBL_CONTINUE_MESH), onDrawMenuItem, ManualMeshContinue);
3403
-      ADDMENUITEM(ICON_MeshSave, GET_TEXT(MSG_UBL_SAVE_MESH), onDrawMenuItem, ManualMeshSave);
3399
+      ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu);
3400
+      ADDMENUITEM(ICON_ManualMesh, GET_TEXT_F(MSG_LEVEL_BED), onDrawMenuItem, ManualMeshStart);
3401
+      MMeshMoveZItem = ADDMENUITEM_P(ICON_Zoffset, GET_TEXT_F(MSG_MOVE_Z), onDrawMMeshMoveZ, SetMMeshMoveZ, &current_position.z);
3402
+      ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_UBL_CONTINUE_MESH), onDrawMenuItem, ManualMeshContinue);
3403
+      ADDMENUITEM(ICON_MeshSave, GET_TEXT_F(MSG_UBL_SAVE_MESH), onDrawMenuItem, ManualMeshSave);
3404 3404
     }
3405 3405
     CurrentMenu->draw();
3406 3406
   }
@@ -3414,18 +3414,18 @@ void Draw_Motion_Menu() {
3414 3414
       CurrentMenu = PreheatMenu;
3415 3415
       SetMenuTitle(cn, en, text);
3416 3416
       DWINUI::MenuItemsPrepare(5);
3417
-      ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Temperature_Menu);
3417
+      ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Temperature_Menu);
3418 3418
       #if HAS_HOTEND
3419
-        ADDMENUITEM_P(ICON_SetEndTemp, GET_TEXT(MSG_UBL_SET_TEMP_HOTEND), onDrawSetPreheatHotend, SetPreheatEndTemp, &ui.material_preset[HMI_value.Preheat].hotend_temp);
3419
+        ADDMENUITEM_P(ICON_SetEndTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND), onDrawSetPreheatHotend, SetPreheatEndTemp, &ui.material_preset[HMI_value.Preheat].hotend_temp);
3420 3420
       #endif
3421 3421
       #if HAS_HEATED_BED
3422
-        ADDMENUITEM_P(ICON_SetBedTemp, GET_TEXT(MSG_UBL_SET_TEMP_BED), onDrawSetPreheatBed, SetPreheatBedTemp, &ui.material_preset[HMI_value.Preheat].bed_temp);
3422
+        ADDMENUITEM_P(ICON_SetBedTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_BED), onDrawSetPreheatBed, SetPreheatBedTemp, &ui.material_preset[HMI_value.Preheat].bed_temp);
3423 3423
       #endif
3424 3424
       #if HAS_FAN
3425
-        ADDMENUITEM_P(ICON_FanSpeed, GET_TEXT(MSG_FAN_SPEED), onDrawSetPreheatFan, SetPreheatFanSpeed, &ui.material_preset[HMI_value.Preheat].fan_speed);
3425
+        ADDMENUITEM_P(ICON_FanSpeed, GET_TEXT_F(MSG_FAN_SPEED), onDrawSetPreheatFan, SetPreheatFanSpeed, &ui.material_preset[HMI_value.Preheat].fan_speed);
3426 3426
       #endif
3427 3427
       #if ENABLED(EEPROM_SETTINGS)
3428
-        ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT(MSG_STORE_EEPROM), onDrawWriteEeprom, WriteEeprom);
3428
+        ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT_F(MSG_STORE_EEPROM), onDrawWriteEeprom, WriteEeprom);
3429 3429
       #endif
3430 3430
     }
3431 3431
     CurrentMenu->draw();
@@ -3461,15 +3461,15 @@ void Draw_Temperature_Menu() {
3461 3461
     CurrentMenu = TemperatureMenu;
3462 3462
     SetMenuTitle({236, 2, 28, 12}, {56, 15, 85, 14}, GET_TEXT_F(MSG_TEMPERATURE));
3463 3463
     DWINUI::MenuItemsPrepare(7);
3464
-    ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu);
3464
+    ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu);
3465 3465
     #if HAS_HOTEND
3466
-      HotendTargetItem = ADDMENUITEM_P(ICON_SetEndTemp, GET_TEXT(MSG_UBL_SET_TEMP_HOTEND), onDrawHotendTemp, SetHotendTemp, &thermalManager.temp_hotend[0].target);
3466
+      HotendTargetItem = ADDMENUITEM_P(ICON_SetEndTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND), onDrawHotendTemp, SetHotendTemp, &thermalManager.temp_hotend[0].target);
3467 3467
     #endif
3468 3468
     #if HAS_HEATED_BED
3469
-      BedTargetItem = ADDMENUITEM_P(ICON_SetBedTemp, GET_TEXT(MSG_UBL_SET_TEMP_BED), onDrawBedTemp, SetBedTemp, &thermalManager.temp_bed.target);
3469
+      BedTargetItem = ADDMENUITEM_P(ICON_SetBedTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_BED), onDrawBedTemp, SetBedTemp, &thermalManager.temp_bed.target);
3470 3470
     #endif
3471 3471
     #if HAS_FAN
3472
-      FanSpeedItem = ADDMENUITEM_P(ICON_FanSpeed, GET_TEXT(MSG_FAN_SPEED), onDrawFanSpeed, SetFanSpeed, &thermalManager.fan_speed[0]);
3472
+      FanSpeedItem = ADDMENUITEM_P(ICON_FanSpeed, GET_TEXT_F(MSG_FAN_SPEED), onDrawFanSpeed, SetFanSpeed, &thermalManager.fan_speed[0]);
3473 3473
     #endif
3474 3474
     #if HAS_HOTEND
3475 3475
       ADDMENUITEM(ICON_SetPLAPreheat, F(PREHEAT_1_LABEL " Preheat Settings"), onDrawPLAPreheatSubMenu, Draw_Preheat1_Menu);
@@ -3489,12 +3489,12 @@ void Draw_MaxSpeed_Menu() {
3489 3489
     CurrentMenu = MaxSpeedMenu;
3490 3490
     SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_MAXSPEED));
3491 3491
     DWINUI::MenuItemsPrepare(5);
3492
-    ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu);
3493
-    ADDMENUITEM_P(ICON_MaxSpeedX, GET_TEXT(MSG_MAXSPEED_X), onDrawMaxSpeedX, SetMaxSpeedX, &planner.settings.max_feedrate_mm_s[X_AXIS]);
3494
-    ADDMENUITEM_P(ICON_MaxSpeedY, GET_TEXT(MSG_MAXSPEED_Y), onDrawMaxSpeedY, SetMaxSpeedY, &planner.settings.max_feedrate_mm_s[Y_AXIS]);
3495
-    ADDMENUITEM_P(ICON_MaxSpeedZ, GET_TEXT(MSG_MAXSPEED_Z), onDrawMaxSpeedZ, SetMaxSpeedZ, &planner.settings.max_feedrate_mm_s[Z_AXIS]);
3492
+    ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu);
3493
+    ADDMENUITEM_P(ICON_MaxSpeedX, GET_TEXT_F(MSG_MAXSPEED_X), onDrawMaxSpeedX, SetMaxSpeedX, &planner.settings.max_feedrate_mm_s[X_AXIS]);
3494
+    ADDMENUITEM_P(ICON_MaxSpeedY, GET_TEXT_F(MSG_MAXSPEED_Y), onDrawMaxSpeedY, SetMaxSpeedY, &planner.settings.max_feedrate_mm_s[Y_AXIS]);
3495
+    ADDMENUITEM_P(ICON_MaxSpeedZ, GET_TEXT_F(MSG_MAXSPEED_Z), onDrawMaxSpeedZ, SetMaxSpeedZ, &planner.settings.max_feedrate_mm_s[Z_AXIS]);
3496 3496
     #if HAS_HOTEND
3497
-      ADDMENUITEM_P(ICON_MaxSpeedE, GET_TEXT(MSG_MAXSPEED_E), onDrawMaxSpeedE, SetMaxSpeedE, &planner.settings.max_feedrate_mm_s[Z_AXIS]);
3497
+      ADDMENUITEM_P(ICON_MaxSpeedE, GET_TEXT_F(MSG_MAXSPEED_E), onDrawMaxSpeedE, SetMaxSpeedE, &planner.settings.max_feedrate_mm_s[Z_AXIS]);
3498 3498
     #endif
3499 3499
   }
3500 3500
   CurrentMenu->draw();
@@ -3507,12 +3507,12 @@ void Draw_MaxAccel_Menu() {
3507 3507
     CurrentMenu = MaxAccelMenu;
3508 3508
     SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_ACCELERATION));
3509 3509
     DWINUI::MenuItemsPrepare(5);
3510
-    ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu);
3511
-    ADDMENUITEM_P(ICON_MaxAccX, GET_TEXT(MSG_AMAX_A), onDrawMaxAccelX, SetMaxAccelX, &planner.settings.max_acceleration_mm_per_s2[X_AXIS]);
3512
-    ADDMENUITEM_P(ICON_MaxAccY, GET_TEXT(MSG_AMAX_B), onDrawMaxAccelY, SetMaxAccelY, &planner.settings.max_acceleration_mm_per_s2[Y_AXIS]);
3513
-    ADDMENUITEM_P(ICON_MaxAccZ, GET_TEXT(MSG_AMAX_C), onDrawMaxAccelZ, SetMaxAccelZ, &planner.settings.max_acceleration_mm_per_s2[Z_AXIS]);
3510
+    ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu);
3511
+    ADDMENUITEM_P(ICON_MaxAccX, GET_TEXT_F(MSG_AMAX_A), onDrawMaxAccelX, SetMaxAccelX, &planner.settings.max_acceleration_mm_per_s2[X_AXIS]);
3512
+    ADDMENUITEM_P(ICON_MaxAccY, GET_TEXT_F(MSG_AMAX_B), onDrawMaxAccelY, SetMaxAccelY, &planner.settings.max_acceleration_mm_per_s2[Y_AXIS]);
3513
+    ADDMENUITEM_P(ICON_MaxAccZ, GET_TEXT_F(MSG_AMAX_C), onDrawMaxAccelZ, SetMaxAccelZ, &planner.settings.max_acceleration_mm_per_s2[Z_AXIS]);
3514 3514
     #if HAS_HOTEND
3515
-      ADDMENUITEM_P(ICON_MaxAccE, GET_TEXT(MSG_AMAX_E), onDrawMaxAccelE, SetMaxAccelE, &planner.settings.max_acceleration_mm_per_s2[E_AXIS]);
3515
+      ADDMENUITEM_P(ICON_MaxAccE, GET_TEXT_F(MSG_AMAX_E), onDrawMaxAccelE, SetMaxAccelE, &planner.settings.max_acceleration_mm_per_s2[E_AXIS]);
3516 3516
     #endif
3517 3517
   }
3518 3518
   CurrentMenu->draw();
@@ -3526,12 +3526,12 @@ void Draw_MaxAccel_Menu() {
3526 3526
       CurrentMenu = MaxJerkMenu;
3527 3527
       SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_JERK));
3528 3528
       DWINUI::MenuItemsPrepare(5);
3529
-      ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu);
3530
-      ADDMENUITEM_P(ICON_MaxSpeedJerkX, GET_TEXT(MSG_VA_JERK), onDrawMaxJerkX, SetMaxJerkX, &planner.max_jerk[X_AXIS]);
3531
-      ADDMENUITEM_P(ICON_MaxSpeedJerkY, GET_TEXT(MSG_VB_JERK), onDrawMaxJerkY, SetMaxJerkY, &planner.max_jerk[Y_AXIS]);
3532
-      ADDMENUITEM_P(ICON_MaxSpeedJerkZ, GET_TEXT(MSG_VC_JERK), onDrawMaxJerkZ, SetMaxJerkZ, &planner.max_jerk[Z_AXIS]);
3529
+      ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu);
3530
+      ADDMENUITEM_P(ICON_MaxSpeedJerkX, GET_TEXT_F(MSG_VA_JERK), onDrawMaxJerkX, SetMaxJerkX, &planner.max_jerk[X_AXIS]);
3531
+      ADDMENUITEM_P(ICON_MaxSpeedJerkY, GET_TEXT_F(MSG_VB_JERK), onDrawMaxJerkY, SetMaxJerkY, &planner.max_jerk[Y_AXIS]);
3532
+      ADDMENUITEM_P(ICON_MaxSpeedJerkZ, GET_TEXT_F(MSG_VC_JERK), onDrawMaxJerkZ, SetMaxJerkZ, &planner.max_jerk[Z_AXIS]);
3533 3533
       #if HAS_HOTEND
3534
-        ADDMENUITEM_P(ICON_MaxSpeedJerkE, GET_TEXT(MSG_VE_JERK), onDrawMaxJerkE, SetMaxJerkE, &planner.max_jerk[E_AXIS]);
3534
+        ADDMENUITEM_P(ICON_MaxSpeedJerkE, GET_TEXT_F(MSG_VE_JERK), onDrawMaxJerkE, SetMaxJerkE, &planner.max_jerk[E_AXIS]);
3535 3535
       #endif
3536 3536
     }
3537 3537
     CurrentMenu->draw();
@@ -3545,12 +3545,12 @@ void Draw_Steps_Menu() {
3545 3545
     CurrentMenu = StepsMenu;
3546 3546
     SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_STEPS_PER_MM));
3547 3547
     DWINUI::MenuItemsPrepare(5);
3548
-    ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu);
3549
-    ADDMENUITEM_P(ICON_StepX, GET_TEXT(MSG_A_STEPS), onDrawStepsX, SetStepsX, &planner.settings.axis_steps_per_mm[X_AXIS]);
3550
-    ADDMENUITEM_P(ICON_StepY, GET_TEXT(MSG_B_STEPS), onDrawStepsY, SetStepsY, &planner.settings.axis_steps_per_mm[Y_AXIS]);
3551
-    ADDMENUITEM_P(ICON_StepZ, GET_TEXT(MSG_C_STEPS), onDrawStepsZ, SetStepsZ, &planner.settings.axis_steps_per_mm[Z_AXIS]);
3548
+    ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu);
3549
+    ADDMENUITEM_P(ICON_StepX, GET_TEXT_F(MSG_A_STEPS), onDrawStepsX, SetStepsX, &planner.settings.axis_steps_per_mm[X_AXIS]);
3550
+    ADDMENUITEM_P(ICON_StepY, GET_TEXT_F(MSG_B_STEPS), onDrawStepsY, SetStepsY, &planner.settings.axis_steps_per_mm[Y_AXIS]);
3551
+    ADDMENUITEM_P(ICON_StepZ, GET_TEXT_F(MSG_C_STEPS), onDrawStepsZ, SetStepsZ, &planner.settings.axis_steps_per_mm[Z_AXIS]);
3552 3552
     #if HAS_HOTEND
3553
-      ADDMENUITEM_P(ICON_StepE, GET_TEXT(MSG_E_STEPS), onDrawStepsE, SetStepsE, &planner.settings.axis_steps_per_mm[E_AXIS]);
3553
+      ADDMENUITEM_P(ICON_StepE, GET_TEXT_F(MSG_E_STEPS), onDrawStepsE, SetStepsE, &planner.settings.axis_steps_per_mm[E_AXIS]);
3554 3554
     #endif
3555 3555
   }
3556 3556
   CurrentMenu->draw();
@@ -3564,15 +3564,15 @@ void Draw_Steps_Menu() {
3564 3564
       CurrentMenu = HotendPIDMenu;
3565 3565
       CurrentMenu->MenuTitle.SetCaption(F("Hotend PID Settings"));
3566 3566
       DWINUI::MenuItemsPrepare(8);
3567
-      ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu);
3567
+      ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu);
3568 3568
       ADDMENUITEM(ICON_PIDNozzle, F("Hotend PID"), onDrawMenuItem, HotendPID);
3569 3569
       ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KP), onDrawPFloat2Menu, SetKp, &thermalManager.temp_hotend[0].pid.Kp);
3570 3570
       ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KI), onDrawPIDi, SetKi, &thermalManager.temp_hotend[0].pid.Ki);
3571 3571
       ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KD), onDrawPIDd, SetKd, &thermalManager.temp_hotend[0].pid.Kd);
3572
-      ADDMENUITEM_P(ICON_Temperature, GET_TEXT(MSG_TEMPERATURE), onDrawPIntMenu, SetHotendPidT, &HMI_data.HotendPidT);
3573
-      ADDMENUITEM_P(ICON_PIDcycles, GET_TEXT(MSG_PID_CYCLE), onDrawPIntMenu, SetPidCycles, &HMI_data.PidCycles);
3572
+      ADDMENUITEM_P(ICON_Temperature, GET_TEXT_F(MSG_TEMPERATURE), onDrawPIntMenu, SetHotendPidT, &HMI_data.HotendPidT);
3573
+      ADDMENUITEM_P(ICON_PIDcycles, GET_TEXT_F(MSG_PID_CYCLE), onDrawPIntMenu, SetPidCycles, &HMI_data.PidCycles);
3574 3574
       #if ENABLED(EEPROM_SETTINGS)
3575
-        ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT(MSG_STORE_EEPROM), onDrawMenuItem, WriteEeprom);
3575
+        ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT_F(MSG_STORE_EEPROM), onDrawMenuItem, WriteEeprom);
3576 3576
       #endif
3577 3577
     }
3578 3578
     CurrentMenu->draw();
@@ -3587,15 +3587,15 @@ void Draw_Steps_Menu() {
3587 3587
       CurrentMenu = BedPIDMenu;
3588 3588
       CurrentMenu->MenuTitle.SetCaption(F("Bed PID Settings"));
3589 3589
       DWINUI::MenuItemsPrepare(8);
3590
-      ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu);
3590
+      ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu);
3591 3591
       ADDMENUITEM(ICON_PIDNozzle, F("Bed PID"), onDrawMenuItem,BedPID);
3592 3592
       ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KP), onDrawPFloat2Menu, SetKp, &thermalManager.temp_bed.pid.Kp);
3593 3593
       ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KI), onDrawPIDi, SetKi, &thermalManager.temp_bed.pid.Ki);
3594 3594
       ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KD), onDrawPIDd, SetKd, &thermalManager.temp_bed.pid.Kd);
3595
-      ADDMENUITEM_P(ICON_Temperature, GET_TEXT(MSG_TEMPERATURE), onDrawPIntMenu, SetBedPidT, &HMI_data.BedPidT);
3596
-      ADDMENUITEM_P(ICON_PIDcycles, GET_TEXT(MSG_PID_CYCLE), onDrawPIntMenu, SetPidCycles, &HMI_data.PidCycles);
3595
+      ADDMENUITEM_P(ICON_Temperature, GET_TEXT_F(MSG_TEMPERATURE), onDrawPIntMenu, SetBedPidT, &HMI_data.BedPidT);
3596
+      ADDMENUITEM_P(ICON_PIDcycles, GET_TEXT_F(MSG_PID_CYCLE), onDrawPIntMenu, SetPidCycles, &HMI_data.PidCycles);
3597 3597
       #if ENABLED(EEPROM_SETTINGS)
3598
-        ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT(MSG_STORE_EEPROM), onDrawMenuItem, WriteEeprom);
3598
+        ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT_F(MSG_STORE_EEPROM), onDrawMenuItem, WriteEeprom);
3599 3599
       #endif
3600 3600
     }
3601 3601
     CurrentMenu->draw();
@@ -3610,10 +3610,10 @@ void Draw_Steps_Menu() {
3610 3610
       CurrentMenu = ZOffsetWizMenu;
3611 3611
       CurrentMenu->MenuTitle.SetCaption(GET_TEXT_F(MSG_PROBE_WIZARD));
3612 3612
       DWINUI::MenuItemsPrepare(4);
3613
-      ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawMenuItem, Draw_Prepare_Menu);
3614
-      ADDMENUITEM(ICON_Homing, GET_TEXT(MSG_AUTO_HOME), onDrawMenuItem, AutoHome);
3613
+      ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawMenuItem, Draw_Prepare_Menu);
3614
+      ADDMENUITEM(ICON_Homing, GET_TEXT_F(MSG_AUTO_HOME), onDrawMenuItem, AutoHome);
3615 3615
       ADDMENUITEM(ICON_MoveZ0, F("Move Z to Home"), onDrawMenuItem, SetMoveZto0);
3616
-      ADDMENUITEM_P(ICON_Zoffset, GET_TEXT(MSG_ZPROBE_ZOFFSET), onDrawPFloat2Menu, SetZOffset, &BABY_Z_VAR);
3616
+      ADDMENUITEM_P(ICON_Zoffset, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), onDrawPFloat2Menu, SetZOffset, &BABY_Z_VAR);
3617 3617
     }
3618 3618
     CurrentMenu->draw();
3619 3619
     if (!axis_is_trusted(Z_AXIS)) ui.set_status_P(PSTR("WARNING: Z position is unknow, move Z to home"));

+ 1
- 1
Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h View File

@@ -37,7 +37,7 @@
37 37
 //  str: multi-bit data
38 38
 void DWIN_Draw_QR(uint8_t QR_Pixel, uint16_t x, uint16_t y, char *string);
39 39
 
40
-inline void DWIN_Draw_QR(uint8_t QR_Pixel, uint16_t x, uint16_t y, const __FlashStringHelper *title) {
40
+inline void DWIN_Draw_QR(uint8_t QR_Pixel, uint16_t x, uint16_t y, FSTR_P title) {
41 41
   DWIN_Draw_QR(QR_Pixel, x, y, (char *)title);
42 42
 }
43 43
 

+ 0
- 1
Marlin/src/lcd/e3v2/enhanced/dwinui.cpp View File

@@ -32,7 +32,6 @@
32 32
 #if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
33 33
 
34 34
 #include "../../../inc/MarlinConfig.h"
35
-#include "../../../core/macros.h"
36 35
 #include "dwin_lcd.h"
37 36
 #include "dwinui.h"
38 37
 

+ 12
- 12
Marlin/src/lcd/e3v2/enhanced/dwinui.h View File

@@ -124,9 +124,9 @@ public:
124 124
   rect_t frame = {0};
125 125
   void draw();
126 126
   void SetCaption(const char * const title);
127
-  inline void SetCaption(const __FlashStringHelper * title) { SetCaption((char *)title); }
127
+  inline void SetCaption(FSTR_P title) { SetCaption((char *)title); }
128 128
   void ShowCaption(const char * const title);
129
-  inline void ShowCaption(const __FlashStringHelper * title) { ShowCaption((char *)title); }
129
+  inline void ShowCaption(FSTR_P title) { ShowCaption((char *)title); }
130 130
   void SetFrame(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
131 131
   void SetFrame(uint16_t x, uint16_t y, uint16_t w, uint16_t h);
132 132
   void FrameCopy(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
@@ -146,7 +146,7 @@ public:
146 146
   void (*onClick)() = nullptr;
147 147
   MenuItemClass() {};
148 148
   MenuItemClass(uint8_t cicon, const char * const text=nullptr, void (*ondraw)(MenuItemClass* menuitem, int8_t line)=nullptr, void (*onclick)()=nullptr);
149
-  MenuItemClass(uint8_t cicon, const __FlashStringHelper * text = nullptr, void (*ondraw)(MenuItemClass* menuitem, int8_t line)=nullptr, void (*onclick)()=nullptr) : MenuItemClass(cicon, (char*)text, ondraw, onclick){}
149
+  MenuItemClass(uint8_t cicon, FSTR_P text = nullptr, void (*ondraw)(MenuItemClass* menuitem, int8_t line)=nullptr, void (*onclick)()=nullptr) : MenuItemClass(cicon, FTOP(text), ondraw, onclick){}
150 150
   MenuItemClass(uint8_t cicon, uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, void (*ondraw)(MenuItemClass* menuitem, int8_t line)=nullptr, void (*onclick)()=nullptr);
151 151
   void SetFrame(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
152 152
   virtual ~MenuItemClass(){};
@@ -158,7 +158,7 @@ public:
158 158
   void *value = nullptr;
159 159
   using MenuItemClass::MenuItemClass;
160 160
   MenuItemPtrClass(uint8_t cicon, const char * const text, void (*ondraw)(MenuItemClass* menuitem, int8_t line), void (*onclick)(), void* val);
161
-  MenuItemPtrClass(uint8_t cicon, const __FlashStringHelper * text, void (*ondraw)(MenuItemClass* menuitem, int8_t line), void (*onclick)(), void* val) : MenuItemPtrClass(cicon, (char*)text, ondraw, onclick, val){}
161
+  MenuItemPtrClass(uint8_t cicon, FSTR_P text, void (*ondraw)(MenuItemClass* menuitem, int8_t line), void (*onclick)(), void* val) : MenuItemPtrClass(cicon, FTOP(text), ondraw, onclick, val){}
162 162
 };
163 163
 
164 164
 class MenuClass {
@@ -351,25 +351,25 @@ namespace DWINUI {
351 351
   inline void Draw_String(uint16_t x, uint16_t y, const char * const string) {
352 352
     DWIN_Draw_String(false, font, textcolor, backcolor, x, y, string);
353 353
   }
354
-  inline void Draw_String(uint16_t x, uint16_t y, const __FlashStringHelper *title) {
354
+  inline void Draw_String(uint16_t x, uint16_t y, FSTR_P title) {
355 355
     DWIN_Draw_String(false, font, textcolor, backcolor, x, y, (char *)title);
356 356
   }
357 357
   inline void Draw_String(uint16_t color, uint16_t x, uint16_t y, const char * const string) {
358 358
     DWIN_Draw_String(false, font, color, backcolor, x, y, string);
359 359
   }
360
-  inline void Draw_String(uint16_t color, uint16_t x, uint16_t y, const __FlashStringHelper *title) {
360
+  inline void Draw_String(uint16_t color, uint16_t x, uint16_t y, FSTR_P title) {
361 361
     DWIN_Draw_String(false, font, color, backcolor, x, y, (char *)title);
362 362
   }
363 363
   inline void Draw_String(uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, const char * const string) {
364 364
     DWIN_Draw_String(true, font, color, bgcolor, x, y, string);
365 365
   }
366
-  inline void Draw_String(uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, const __FlashStringHelper *title) {
366
+  inline void Draw_String(uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, FSTR_P title) {
367 367
     DWIN_Draw_String(true, font, color, bgcolor, x, y, (char *)title);
368 368
   }
369 369
   inline void Draw_String(uint8_t size, uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, const char * const string) {
370 370
     DWIN_Draw_String(true, size, color, bgcolor, x, y, string);
371 371
   }
372
-  inline void Draw_String(uint8_t size, uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, const __FlashStringHelper *title) {
372
+  inline void Draw_String(uint8_t size, uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, FSTR_P title) {
373 373
     DWIN_Draw_String(true, size, color, bgcolor, x, y, (char *)title);
374 374
   }
375 375
 
@@ -381,7 +381,7 @@ namespace DWINUI {
381 381
   //  y: Upper coordinate of the string
382 382
   //  *string: The string
383 383
   void Draw_CenteredString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t y, const char * const string);
384
-  inline void Draw_CenteredString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t y, const __FlashStringHelper *title) {
384
+  inline void Draw_CenteredString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t y, FSTR_P title) {
385 385
     Draw_CenteredString(bShow, size, color, bColor, y, (char *)title);
386 386
   }
387 387
   inline void Draw_CenteredString(uint16_t color, uint16_t bcolor, uint16_t y, const char * const string) {
@@ -390,19 +390,19 @@ namespace DWINUI {
390 390
   inline void Draw_CenteredString(uint8_t size, uint16_t color, uint16_t y, const char * const string) {
391 391
     Draw_CenteredString(false, size, color, backcolor, y, string);
392 392
   }
393
-  inline void Draw_CenteredString(uint8_t size, uint16_t color, uint16_t y, const __FlashStringHelper *title) {
393
+  inline void Draw_CenteredString(uint8_t size, uint16_t color, uint16_t y, FSTR_P title) {
394 394
     Draw_CenteredString(false, size, color, backcolor, y, (char *)title);
395 395
   }
396 396
   inline void Draw_CenteredString(uint16_t color, uint16_t y, const char * const string) {
397 397
     Draw_CenteredString(false, font, color, backcolor, y, string);
398 398
   }
399
-  inline void Draw_CenteredString(uint16_t color, uint16_t y, const __FlashStringHelper *title) {
399
+  inline void Draw_CenteredString(uint16_t color, uint16_t y, FSTR_P title) {
400 400
     Draw_CenteredString(false, font, color, backcolor, y, (char *)title);
401 401
   }
402 402
   inline void Draw_CenteredString(uint16_t y, const char * const string) {
403 403
     Draw_CenteredString(false, font, textcolor, backcolor, y, string);
404 404
   }
405
-  inline void Draw_CenteredString(uint16_t y, const __FlashStringHelper *title) {
405
+  inline void Draw_CenteredString(uint16_t y, FSTR_P title) {
406 406
     Draw_CenteredString(false, font, textcolor, backcolor, y, (char *)title);
407 407
   }
408 408
 

+ 2
- 0
Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h View File

@@ -26,6 +26,8 @@
26 26
  * @brief    DWIN screen control functions
27 27
  ********************************************************************************/
28 28
 
29
+#include "../../../inc/MarlinConfigPre.h"
30
+
29 31
 #if ENABLED(DWIN_MARLINUI_LANDSCAPE)
30 32
   #define DWIN_WIDTH  480
31 33
   #define DWIN_HEIGHT 272

+ 1
- 1
Marlin/src/lcd/e3v2/marlinui/dwin_string.h View File

@@ -65,7 +65,7 @@ class DWIN_String {
65 65
     static void set(uint8_t *string)   { set(); add(string); }
66 66
     static void set(wchar_t character) { set(); add(character); }
67 67
     static void set(uint8_t *string, int8_t index, const char *itemString=nullptr) { set(); add(string, index, (uint8_t *)itemString); }
68
-    static inline void set(const __FlashStringHelper *fstring) { set((uint8_t *)fstring); }
68
+    static inline void set(FSTR_P fstring) { set((uint8_t *)fstring); }
69 69
     static inline void set(const char *string) { set((uint8_t *)string); }
70 70
     static inline void set(const char *string, int8_t index, const char *itemString=nullptr) { set((uint8_t *)string, index, itemString); }
71 71
     static inline void add(const char *string) { add((uint8_t *)string); }

+ 2
- 2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp View File

@@ -416,7 +416,7 @@ bool UIFlashStorage::is_present = false;
416 416
   /* Writes a media file from the SD card/USB flash drive into a slot on the SPI Flash. Media
417 417
    * files must be written sequentially following by a chip erase and it is not possible to
418 418
    * overwrite files. */
419
-  UIFlashStorage::error_t UIFlashStorage::write_media_file(progmem_str filename, uint8_t slot) {
419
+  UIFlashStorage::error_t UIFlashStorage::write_media_file(FSTR_P filename, uint8_t slot) {
420 420
     #if ENABLED(SDSUPPORT)
421 421
       uint32_t addr;
422 422
       uint8_t buff[write_page_size];
@@ -543,7 +543,7 @@ bool UIFlashStorage::is_present = false;
543 543
   void UIFlashStorage::write_config_data(const void *, size_t)                {}
544 544
   bool UIFlashStorage::verify_config_data(const void *, size_t)               {return false;}
545 545
   bool UIFlashStorage::read_config_data(void *, size_t )                      {return false;}
546
-  UIFlashStorage::error_t UIFlashStorage::write_media_file(progmem_str, uint8_t) {return FILE_NOT_FOUND;}
546
+  UIFlashStorage::error_t UIFlashStorage::write_media_file(FSTR_P, uint8_t)   {return FILE_NOT_FOUND;}
547 547
   void UIFlashStorage::format_flash()                                         {}
548 548
 
549 549
   bool UIFlashStorage::BootMediaReader::isAvailable(uint32_t)                 {return false;}

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

@@ -88,7 +88,7 @@ class UIFlashStorage : private SPIFlash {
88 88
     static void    write_config_data  (const void *data, size_t size);
89 89
     static bool    verify_config_data (const void *data, size_t size);
90 90
     static bool    read_config_data   (void *data, size_t size);
91
-    static error_t write_media_file   (progmem_str filename, uint8_t slot = 0);
91
+    static error_t write_media_file   (FSTR_P filename, uint8_t slot = 0);
92 92
 
93 93
     class BootMediaReader;
94 94
 };

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp View File

@@ -105,7 +105,7 @@ bool BioPrintingDialogBox::onTouchEnd(uint8_t tag) {
105 105
   return true;
106 106
 }
107 107
 
108
-void BioPrintingDialogBox::setStatusMessage(progmem_str message) {
108
+void BioPrintingDialogBox::setStatusMessage(FSTR_P message) {
109 109
   char buff[strlen_P((const char*)message)+1];
110 110
   strcpy_P(buff, (const char*) message);
111 111
   setStatusMessage(buff);

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

@@ -37,7 +37,7 @@ class BioPrintingDialogBox : public BaseScreen, public CachedScreen<PRINTING_SCR
37 37
     static void show();
38 38
 
39 39
     static void setStatusMessage(const char *);
40
-    static void setStatusMessage(progmem_str);
40
+    static void setStatusMessage(FSTR_P);
41 41
 
42 42
     static void onIdle();
43 43
     static bool onTouchEnd(uint8_t tag);

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp View File

@@ -354,7 +354,7 @@ bool StatusScreen::onTouchHeld(uint8_t tag) {
354 354
   return false;
355 355
 }
356 356
 
357
-void StatusScreen::setStatusMessage(progmem_str pstr) {
357
+void StatusScreen::setStatusMessage(FSTR_P pstr) {
358 358
   BioPrintingDialogBox::setStatusMessage(pstr);
359 359
 }
360 360
 

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

@@ -44,7 +44,7 @@ class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE>
44 44
     static void unlockMotors();
45 45
 
46 46
     static void setStatusMessage(const char *);
47
-    static void setStatusMessage(progmem_str);
47
+    static void setStatusMessage(FSTR_P);
48 48
 
49 49
     static void onRedraw(draw_mode_t);
50 50
 

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp View File

@@ -81,7 +81,7 @@ void PreheatTimerScreen::draw_interaction_buttons(draw_mode_t what) {
81 81
   }
82 82
 }
83 83
 
84
-void PreheatTimerScreen::draw_adjuster(draw_mode_t what, uint8_t tag, progmem_str label, float value, int16_t x, int16_t y, int16_t w, int16_t h) {
84
+void PreheatTimerScreen::draw_adjuster(draw_mode_t what, uint8_t tag, FSTR_P label, float value, int16_t x, int16_t y, int16_t w, int16_t h) {
85 85
     #define SUB_COLS          9
86 86
     #define SUB_ROWS          2
87 87
 

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

@@ -35,7 +35,7 @@ class PreheatTimerScreen : public BaseScreen, public CachedScreen<PREHEAT_TIMER_
35 35
     static void draw_message(draw_mode_t);
36 36
     static void draw_time_remaining(draw_mode_t);
37 37
     static void draw_interaction_buttons(draw_mode_t);
38
-    static void draw_adjuster(draw_mode_t, uint8_t tag, progmem_str label, float value, int16_t x, int16_t y, int16_t w, int16_t h);
38
+    static void draw_adjuster(draw_mode_t, uint8_t tag, FSTR_P label, float value, int16_t x, int16_t y, int16_t w, int16_t h);
39 39
   public:
40 40
     static void onRedraw(draw_mode_t);
41 41
 

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

@@ -279,7 +279,7 @@ bool StatusScreen::onTouchHeld(uint8_t tag) {
279 279
   return false;
280 280
 }
281 281
 
282
-void StatusScreen::setStatusMessage(progmem_str) {
282
+void StatusScreen::setStatusMessage(FSTR_P) {
283 283
 }
284 284
 
285 285
 void StatusScreen::setStatusMessage(const char * const) {

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

@@ -44,7 +44,7 @@ class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE>
44 44
     static void unlockMotors();
45 45
 
46 46
     static void setStatusMessage(const char *);
47
-    static void setStatusMessage(progmem_str);
47
+    static void setStatusMessage(FSTR_P);
48 48
 
49 49
     static void onRedraw(draw_mode_t);
50 50
 

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

@@ -49,5 +49,5 @@
49 49
 #endif
50 50
 
51 51
 class __FlashStringHelper;
52
-typedef const __FlashStringHelper *progmem_str;
52
+typedef const __FlashStringHelper *FSTR_P;
53 53
 extern const char G28_STR[];

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

@@ -71,7 +71,7 @@ namespace ExtUI {
71 71
   }
72 72
 
73 73
   void onStatusChanged(const char *lcd_msg) { StatusScreen::setStatusMessage(lcd_msg); }
74
-  void onStatusChanged(progmem_str lcd_msg) { StatusScreen::setStatusMessage(lcd_msg); }
74
+  void onStatusChanged(FSTR_P lcd_msg) { StatusScreen::setStatusMessage(lcd_msg); }
75 75
 
76 76
   void onPrintTimerStarted() {
77 77
     InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_STARTED);

+ 5
- 5
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp View File

@@ -66,7 +66,7 @@ uint16_t CLCD::FontMetrics::get_text_width(const char *str, size_t n) const {
66 66
   return width;
67 67
 }
68 68
 
69
-uint16_t CLCD::FontMetrics::get_text_width(progmem_str str, size_t n) const {
69
+uint16_t CLCD::FontMetrics::get_text_width(FSTR_P str, size_t n) const {
70 70
   uint16_t width = 0;
71 71
   const uint8_t *p = (const uint8_t *) str;
72 72
   for (;;) {
@@ -162,7 +162,7 @@ void CLCD::mem_write_bulk(uint32_t reg_address, const void *data, uint16_t len,
162 162
 }
163 163
 
164 164
 // Write 3-Byte Address, Multiple Bytes, plus padding bytes, from PROGMEM
165
-void CLCD::mem_write_bulk(uint32_t reg_address, progmem_str str, uint16_t len, uint8_t padding) {
165
+void CLCD::mem_write_bulk(uint32_t reg_address, FSTR_P str, uint16_t len, uint8_t padding) {
166 166
   spi_ftdi_select();
167 167
   spi_write_addr(reg_address);
168 168
   spi_write_bulk<pgm_write>(str, len, padding);
@@ -178,7 +178,7 @@ void CLCD::mem_write_pgm(uint32_t reg_address, const void *data, uint16_t len, u
178 178
 }
179 179
 
180 180
 // Write 3-Byte Address, Multiple Bytes, plus padding bytes, from PROGMEM, reversing bytes (suitable for loading XBM images)
181
-void CLCD::mem_write_xbm(uint32_t reg_address, progmem_str data, uint16_t len, uint8_t padding) {
181
+void CLCD::mem_write_xbm(uint32_t reg_address, FSTR_P data, uint16_t len, uint8_t padding) {
182 182
   spi_ftdi_select();
183 183
   spi_write_addr(reg_address);
184 184
   spi_write_bulk<xbm_write>(data, len, padding);
@@ -1048,7 +1048,7 @@ template <class T> bool CLCD::CommandFifo::write(T data, uint16_t len) {
1048 1048
 #endif // ... FTDI_API_LEVEL != 800
1049 1049
 
1050 1050
 template bool CLCD::CommandFifo::write(const void*, uint16_t);
1051
-template bool CLCD::CommandFifo::write(progmem_str, uint16_t);
1051
+template bool CLCD::CommandFifo::write(FSTR_P, uint16_t);
1052 1052
 
1053 1053
 // CO_PROCESSOR COMMANDS
1054 1054
 
@@ -1071,7 +1071,7 @@ void CLCD::CommandFifo::str(const char * data) {
1071 1071
   write(data, strlen(data)+1);
1072 1072
 }
1073 1073
 
1074
-void CLCD::CommandFifo::str(progmem_str data) {
1074
+void CLCD::CommandFifo::str(FSTR_P data) {
1075 1075
   write(data, strlen_P((const char*)data)+1);
1076 1076
 }
1077 1077
 

+ 5
- 5
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h View File

@@ -93,7 +93,7 @@
93 93
 
94 94
 #pragma once
95 95
 
96
-typedef const __FlashStringHelper *progmem_str;
96
+typedef const __FlashStringHelper *FSTR_P;
97 97
 
98 98
 class UIStorage;
99 99
 
@@ -118,8 +118,8 @@ class CLCD {
118 118
     static void     mem_write_fill (uint32_t reg_address, uint8_t w_data, uint16_t len);
119 119
     static void     mem_write_bulk (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding = 0);
120 120
     static void     mem_write_pgm  (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding = 0);
121
-    static void     mem_write_bulk (uint32_t reg_address, progmem_str str, uint16_t len, uint8_t padding = 0);
122
-    static void     mem_write_xbm  (uint32_t reg_address, progmem_str str, uint16_t len, uint8_t padding = 0);
121
+    static void     mem_write_bulk (uint32_t reg_address, FSTR_P str, uint16_t len, uint8_t padding = 0);
122
+    static void     mem_write_xbm  (uint32_t reg_address, FSTR_P str, uint16_t len, uint8_t padding = 0);
123 123
 
124 124
   public:
125 125
     class CommandFifo;
@@ -168,7 +168,7 @@ class CLCD::FontMetrics {
168 168
 
169 169
     // Returns width of string, up to a maximum of n characters.
170 170
     uint16_t get_text_width(const char *str, size_t n = SIZE_MAX) const;
171
-    uint16_t get_text_width(progmem_str str, size_t n = SIZE_MAX) const;
171
+    uint16_t get_text_width(FSTR_P str, size_t n = SIZE_MAX) const;
172 172
 };
173 173
 
174 174
 /******************* FT800/810 Graphic Commands *********************************/
@@ -250,7 +250,7 @@ class CLCD::CommandFifo {
250 250
     // Sends the string portion of text, button, toggle and keys.
251 251
     void str (const char * data, size_t maxlen);
252 252
     void str (const char * data);
253
-    void str (progmem_str data);
253
+    void str (FSTR_P data);
254 254
 
255 255
     void memzero  (uint32_t ptr, uint32_t size);
256 256
     void memset   (uint32_t ptr, uint32_t value, uint32_t size);

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

@@ -30,7 +30,7 @@
30 30
 #define DEC_POS           SUB_POS(8,1), SUB_SIZE(2,1)
31 31
 
32 32
 namespace FTDI {
33
-  void draw_adjuster_value(CommandProcessor& cmd, int16_t x, int16_t y, int16_t w, int16_t h, float value, progmem_str units, int8_t width, uint8_t precision) {
33
+  void draw_adjuster_value(CommandProcessor& cmd, int16_t x, int16_t y, int16_t w, int16_t h, float value, FSTR_P units, int8_t width, uint8_t precision) {
34 34
     char str[width + precision + 10 + (units ? strlen_P((const char*) units) : 0)];
35 35
     if (isnan(value))
36 36
       strcpy_P(str, PSTR("-"));
@@ -45,7 +45,7 @@ namespace FTDI {
45 45
     cmd.tag(0).text(VAL_POS, str);
46 46
   }
47 47
 
48
-  void draw_adjuster(CommandProcessor& cmd, int16_t x, int16_t y, int16_t w, int16_t h, uint8_t tag, float value, progmem_str units, int8_t width, uint8_t precision, draw_mode_t what) {
48
+  void draw_adjuster(CommandProcessor& cmd, int16_t x, int16_t y, int16_t w, int16_t h, uint8_t tag, float value, FSTR_P units, int8_t width, uint8_t precision, draw_mode_t what) {
49 49
     if (what & BACKGROUND)
50 50
       cmd.tag(0).button(VAL_POS, F(""), FTDI::OPT_FLAT);
51 51
 

+ 2
- 2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.h View File

@@ -25,7 +25,7 @@ namespace FTDI {
25 25
   void draw_adjuster_value(
26 26
     CommandProcessor& cmd,
27 27
     int16_t x, int16_t y, int16_t w, int16_t h,
28
-    float value, progmem_str units = nullptr,
28
+    float value, FSTR_P units = nullptr,
29 29
     int8_t width = 5, uint8_t precision = 1
30 30
   );
31 31
 
@@ -33,7 +33,7 @@ namespace FTDI {
33 33
     CommandProcessor& cmd,
34 34
     int16_t x, int16_t y, int16_t w, int16_t h,
35 35
     uint8_t tag,
36
-    float value, progmem_str units = nullptr,
36
+    float value, FSTR_P units = nullptr,
37 37
     int8_t width = 5, uint8_t precision = 1,
38 38
     draw_mode_t what = BOTH
39 39
   );

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h View File

@@ -241,7 +241,7 @@ class CommandProcessor : public CLCD::CommandFifo {
241 241
       return *this;
242 242
     }
243 243
 
244
-    CommandProcessor& toggle2(int16_t x, int16_t y, int16_t w, int16_t h, progmem_str no, progmem_str yes, bool state, uint16_t options = FTDI::OPT_3D) {
244
+    CommandProcessor& toggle2(int16_t x, int16_t y, int16_t w, int16_t h, FSTR_P no, FSTR_P yes, bool state, uint16_t options = FTDI::OPT_3D) {
245 245
       char text[strlen_P((const char *)no) + strlen_P((const char *)yes) + 2];
246 246
       strcpy_P(text, (const char *)no);
247 247
       strcat(text, "\xFF");

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp View File

@@ -135,7 +135,7 @@ namespace FTDI {
135 135
     }
136 136
   }
137 137
 
138
-  void draw_text_box(CommandProcessor& cmd, int x, int y, int w, int h, progmem_str pstr, uint16_t options, uint8_t font) {
138
+  void draw_text_box(CommandProcessor& cmd, int x, int y, int w, int h, FSTR_P pstr, uint16_t options, uint8_t font) {
139 139
     char str[strlen_P((const char*)pstr) + 1];
140 140
     strcpy_P(str, (const char*)pstr);
141 141
     draw_text_box(cmd, x, y, w, h, (const char*) str, options, font);

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.h View File

@@ -27,6 +27,6 @@
27 27
 namespace FTDI {
28 28
   constexpr uint16_t OPT_BOTTOMY      = 0x1000; // Non-standard
29 29
 
30
-  void draw_text_box(class CommandProcessor& cmd, int x, int y, int w, int h, progmem_str str, uint16_t options = 0, uint8_t font = 31);
30
+  void draw_text_box(class CommandProcessor& cmd, int x, int y, int w, int h, FSTR_P str, uint16_t options = 0, uint8_t font = 31);
31 31
   void draw_text_box(class CommandProcessor& cmd, int x, int y, int w, int h, const char *str, uint16_t options = 0, uint8_t font = 31);
32 32
 }

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp View File

@@ -80,7 +80,7 @@ namespace FTDI {
80 80
     _draw_text_with_ellipsis(cmd, x, y, w, h, tmp, options, font);
81 81
   }
82 82
 
83
-  void draw_text_with_ellipsis(CommandProcessor& cmd, int x, int y, int w, int h, progmem_str pstr, uint16_t options, uint8_t font) {
83
+  void draw_text_with_ellipsis(CommandProcessor& cmd, int x, int y, int w, int h, FSTR_P pstr, uint16_t options, uint8_t font) {
84 84
     char tmp[strlen_P((const char*)pstr) + 3];
85 85
     strcpy_P(tmp, (const char*)pstr);
86 86
     _draw_text_with_ellipsis(cmd, x, y, w, h, tmp, options, font);

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.h View File

@@ -26,6 +26,6 @@
26 26
  * showing ellipsis if it does not fit.
27 27
  */
28 28
 namespace FTDI {
29
-  void draw_text_with_ellipsis(class CommandProcessor& cmd, int x, int y, int w, int h, progmem_str str, uint16_t options = 0, uint8_t font = 31);
29
+  void draw_text_with_ellipsis(class CommandProcessor& cmd, int x, int y, int w, int h, FSTR_P str, uint16_t options = 0, uint8_t font = 31);
30 30
   void draw_text_with_ellipsis(class CommandProcessor& cmd, int x, int y, int w, int h, const char *str, uint16_t options = 0, uint8_t font = 31);
31 31
 }

+ 3
- 3
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp View File

@@ -44,7 +44,7 @@
44 44
     return false;
45 45
   }
46 46
 
47
-  bool FTDI::has_utf8_chars(progmem_str _str) {
47
+  bool FTDI::has_utf8_chars(FSTR_P _str) {
48 48
     const char *str = (const char *) _str;
49 49
     for (;;) {
50 50
       const char c = pgm_read_byte(str++);
@@ -191,7 +191,7 @@
191 191
     return render_utf8_text(nullptr, 0, 0, str, fs, maxlen);
192 192
   }
193 193
 
194
-  uint16_t FTDI::get_utf8_text_width(progmem_str pstr, font_size_t fs) {
194
+  uint16_t FTDI::get_utf8_text_width(FSTR_P pstr, font_size_t fs) {
195 195
     char str[strlen_P((const char*)pstr) + 1];
196 196
     strcpy_P(str, (const char*)pstr);
197 197
     return get_utf8_text_width(str, fs);
@@ -234,7 +234,7 @@
234 234
     cmd.cmd(RESTORE_CONTEXT());
235 235
   }
236 236
 
237
-  void FTDI::draw_utf8_text(CommandProcessor& cmd, int x, int y, progmem_str pstr, font_size_t fs, uint16_t options) {
237
+  void FTDI::draw_utf8_text(CommandProcessor& cmd, int x, int y, FSTR_P pstr, font_size_t fs, uint16_t options) {
238 238
     char str[strlen_P((const char*)pstr) + 1];
239 239
     strcpy_P(str, (const char*)pstr);
240 240
     draw_utf8_text(cmd, x, y, (const char*) str, fs, options);

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

@@ -40,7 +40,7 @@ namespace FTDI {
40 40
 
41 41
     /* Returns true if the string has UTF8 string characters */
42 42
 
43
-    bool has_utf8_chars(progmem_str str);
43
+    bool has_utf8_chars(FSTR_P str);
44 44
     bool has_utf8_chars(const char *str);
45 45
 
46 46
     /* Returns the next character in a UTF8 string and increments the
@@ -66,10 +66,10 @@ namespace FTDI {
66 66
   void load_utf8_bitmaps(CommandProcessor& cmd);
67 67
 
68 68
   uint16_t get_utf8_char_width(utf8_char_t, font_size_t);
69
-  uint16_t get_utf8_text_width(progmem_str, font_size_t);
69
+  uint16_t get_utf8_text_width(FSTR_P, font_size_t);
70 70
   uint16_t get_utf8_text_width(const char *, font_size_t, size_t maxlen=SIZE_MAX);
71 71
 
72
-  void draw_utf8_text(CommandProcessor&, int x, int y, progmem_str, font_size_t, uint16_t options = 0);
72
+  void draw_utf8_text(CommandProcessor&, int x, int y, FSTR_P, font_size_t, uint16_t options = 0);
73 73
   void draw_utf8_text(CommandProcessor&, int x, int y, const char *, font_size_t, uint16_t options = 0, size_t maxlen=SIZE_MAX);
74 74
 
75 75
   // Similar to CLCD::FontMetrics, but can be used with UTF8 encoded strings.

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

@@ -83,7 +83,7 @@ void AboutScreen::onRedraw(draw_mode_t) {
83 83
   #ifdef TOUCH_UI_VERSION
84 84
     F(TOUCH_UI_VERSION)
85 85
   #else
86
-    progmem_str(getFirmwareName_str())
86
+    FPSTR(getFirmwareName_str())
87 87
   #endif
88 88
   , OPT_CENTER, font_medium);
89 89
   cmd.tag(0);

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

@@ -64,8 +64,8 @@ void AlertDialogBox::hide() {
64 64
 }
65 65
 
66 66
 template void AlertDialogBox::show(const char *);
67
-template void AlertDialogBox::show(progmem_str);
67
+template void AlertDialogBox::show(FSTR_P);
68 68
 template void AlertDialogBox::showError(const char *);
69
-template void AlertDialogBox::showError(progmem_str);
69
+template void AlertDialogBox::showError(FSTR_P);
70 70
 
71 71
 #endif // FTDI_ALERT_DIALOG_BOX

+ 15
- 15
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.cpp View File

@@ -109,7 +109,7 @@ void BaseNumericAdjustmentScreen::widgets_t::_button_style(CommandProcessor &cmd
109 109
  * Speed optimization for drawing buttons. Draw all unpressed buttons in the
110 110
  * background layer and draw only the pressed button in the foreground layer.
111 111
  */
112
-void BaseNumericAdjustmentScreen::widgets_t::_button(CommandProcessor &cmd, uint8_t tag, int16_t x, int16_t y, int16_t w, int16_t h, progmem_str text, bool enabled, bool highlight) {
112
+void BaseNumericAdjustmentScreen::widgets_t::_button(CommandProcessor &cmd, uint8_t tag, int16_t x, int16_t y, int16_t w, int16_t h, FSTR_P text, bool enabled, bool highlight) {
113 113
   if (_what & BACKGROUND) enabled = true;
114 114
   if ((_what & BACKGROUND) || buttonIsPressed(tag) || highlight || !enabled) {
115 115
     _button_style(cmd, (!enabled) ? BTN_DISABLED : (highlight ? BTN_ACTION : BTN_NORMAL));
@@ -125,7 +125,7 @@ BaseNumericAdjustmentScreen::widgets_t &BaseNumericAdjustmentScreen::widgets_t::
125 125
   return *this;
126 126
 }
127 127
 
128
-void BaseNumericAdjustmentScreen::widgets_t::heading(progmem_str label) {
128
+void BaseNumericAdjustmentScreen::widgets_t::heading(FSTR_P label) {
129 129
   if (_what & BACKGROUND) {
130 130
     CommandProcessor cmd;
131 131
     _button_style(cmd, TEXT_LABEL);
@@ -176,13 +176,13 @@ void BaseNumericAdjustmentScreen::widgets_t::_draw_increment_btn(CommandProcesso
176 176
 
177 177
   switch (pos) {
178 178
     #if ENABLED(TOUCH_UI_PORTRAIT)
179
-      case 0: _button(cmd, tag, BTN_POS(5,_line), BTN_SIZE(2,1), progmem_str(label), true, highlight); break;
180
-      case 1: _button(cmd, tag, BTN_POS(7,_line), BTN_SIZE(2,1), progmem_str(label), true, highlight); break;
181
-      case 2: _button(cmd, tag, BTN_POS(9,_line), BTN_SIZE(2,1), progmem_str(label), true, highlight); break;
179
+      case 0: _button(cmd, tag, BTN_POS(5,_line), BTN_SIZE(2,1), FPSTR(label), true, highlight); break;
180
+      case 1: _button(cmd, tag, BTN_POS(7,_line), BTN_SIZE(2,1), FPSTR(label), true, highlight); break;
181
+      case 2: _button(cmd, tag, BTN_POS(9,_line), BTN_SIZE(2,1), FPSTR(label), true, highlight); break;
182 182
     #else
183
-      case 0: _button(cmd, tag, BTN_POS(15,2),    BTN_SIZE(4,1), progmem_str(label), true, highlight); break;
184
-      case 1: _button(cmd, tag, BTN_POS(15,3),    BTN_SIZE(4,1), progmem_str(label), true, highlight); break;
185
-      case 2: _button(cmd, tag, BTN_POS(15,4),    BTN_SIZE(4,1), progmem_str(label), true, highlight); break;
183
+      case 0: _button(cmd, tag, BTN_POS(15,2),    BTN_SIZE(4,1), FPSTR(label), true, highlight); break;
184
+      case 1: _button(cmd, tag, BTN_POS(15,3),    BTN_SIZE(4,1), FPSTR(label), true, highlight); break;
185
+      case 2: _button(cmd, tag, BTN_POS(15,4),    BTN_SIZE(4,1), FPSTR(label), true, highlight); break;
186 186
     #endif
187 187
   }
188 188
 }
@@ -213,7 +213,7 @@ void BaseNumericAdjustmentScreen::widgets_t::increments() {
213 213
   #endif
214 214
 }
215 215
 
216
-void BaseNumericAdjustmentScreen::widgets_t::adjuster_sram_val(uint8_t tag, progmem_str label, const char *value, bool is_enabled) {
216
+void BaseNumericAdjustmentScreen::widgets_t::adjuster_sram_val(uint8_t tag, FSTR_P label, const char *value, bool is_enabled) {
217 217
   CommandProcessor cmd;
218 218
 
219 219
   if (_what & BACKGROUND) {
@@ -239,7 +239,7 @@ void BaseNumericAdjustmentScreen::widgets_t::adjuster_sram_val(uint8_t tag, prog
239 239
   _line++;
240 240
 }
241 241
 
242
-void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, progmem_str label, const char *value, bool is_enabled) {
242
+void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, FSTR_P label, const char *value, bool is_enabled) {
243 243
   if (_what & BACKGROUND) {
244 244
     adjuster_sram_val(tag, label, nullptr);
245 245
   }
@@ -251,7 +251,7 @@ void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, progmem_str l
251 251
   }
252 252
 }
253 253
 
254
-void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, progmem_str label, float value, bool is_enabled) {
254
+void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, FSTR_P label, float value, bool is_enabled) {
255 255
   if (_what & BACKGROUND) {
256 256
     adjuster_sram_val(tag, label, nullptr);
257 257
   }
@@ -265,7 +265,7 @@ void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, progmem_str l
265 265
   }
266 266
 }
267 267
 
268
-void BaseNumericAdjustmentScreen::widgets_t::button(uint8_t tag, progmem_str label, bool is_enabled) {
268
+void BaseNumericAdjustmentScreen::widgets_t::button(uint8_t tag, FSTR_P label, bool is_enabled) {
269 269
   CommandProcessor cmd;
270 270
   cmd.font(LAYOUT_FONT);
271 271
   _button(cmd, tag, BTN_POS(5,_line), BTN_SIZE(9,1), label, is_enabled);
@@ -273,7 +273,7 @@ void BaseNumericAdjustmentScreen::widgets_t::button(uint8_t tag, progmem_str lab
273 273
   _line++;
274 274
 }
275 275
 
276
-void BaseNumericAdjustmentScreen::widgets_t::text_field(uint8_t tag, progmem_str label, const char *value, bool is_enabled) {
276
+void BaseNumericAdjustmentScreen::widgets_t::text_field(uint8_t tag, FSTR_P label, const char *value, bool is_enabled) {
277 277
   CommandProcessor cmd;
278 278
 
279 279
   if (_what & BACKGROUND) {
@@ -295,7 +295,7 @@ void BaseNumericAdjustmentScreen::widgets_t::text_field(uint8_t tag, progmem_str
295 295
   _line++;
296 296
 }
297 297
 
298
-void BaseNumericAdjustmentScreen::widgets_t::two_buttons(uint8_t tag1, progmem_str label1, uint8_t tag2, progmem_str label2, bool is_enabled) {
298
+void BaseNumericAdjustmentScreen::widgets_t::two_buttons(uint8_t tag1, FSTR_P label1, uint8_t tag2, FSTR_P label2, bool is_enabled) {
299 299
   CommandProcessor cmd;
300 300
   cmd.font(LAYOUT_FONT);
301 301
   _button(cmd, tag1, BTN_POS(5,_line),   BTN_SIZE(4.5,1), label1, is_enabled);
@@ -304,7 +304,7 @@ void BaseNumericAdjustmentScreen::widgets_t::two_buttons(uint8_t tag1, progmem_s
304 304
   _line++;
305 305
 }
306 306
 
307
-void BaseNumericAdjustmentScreen::widgets_t::toggle(uint8_t tag, progmem_str label, bool value, bool is_enabled) {
307
+void BaseNumericAdjustmentScreen::widgets_t::toggle(uint8_t tag, FSTR_P label, bool value, bool is_enabled) {
308 308
   CommandProcessor cmd;
309 309
 
310 310
   if (_what & BACKGROUND) {

+ 12
- 12
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.h View File

@@ -44,7 +44,7 @@ class BaseNumericAdjustmentScreen : public BaseScreen {
44 44
         uint8_t     _line;
45 45
         uint32_t    _color;
46 46
         uint8_t     _decimals;
47
-        progmem_str _units;
47
+        FSTR_P      _units;
48 48
         enum style_t {
49 49
           BTN_NORMAL,
50 50
           BTN_ACTION,
@@ -56,25 +56,25 @@ class BaseNumericAdjustmentScreen : public BaseScreen {
56 56
 
57 57
       protected:
58 58
         void _draw_increment_btn(CommandProcessor &, uint8_t line, const uint8_t tag);
59
-        void _button(CommandProcessor &, uint8_t tag, int16_t x, int16_t y, int16_t w, int16_t h, progmem_str, bool enabled = true, bool highlight = false);
59
+        void _button(CommandProcessor &, uint8_t tag, int16_t x, int16_t y, int16_t w, int16_t h, FSTR_P, bool enabled = true, bool highlight = false);
60 60
         void _button_style(CommandProcessor &cmd, style_t style);
61 61
       public:
62 62
         widgets_t(draw_mode_t);
63 63
 
64 64
         widgets_t &color(uint32_t color)       {_color = color; return *this;}
65
-        widgets_t &units(progmem_str units)    {_units = units; return *this;}
65
+        widgets_t &units(FSTR_P units)         {_units = units; return *this;}
66 66
         widgets_t &draw_mode(draw_mode_t what) {_what  = what;  return *this;}
67 67
         widgets_t &precision(uint8_t decimals, precision_default_t = DEFAULT_HIGHEST);
68 68
 
69
-        void heading           (progmem_str label);
70
-        void adjuster_sram_val (uint8_t tag,  progmem_str label, const char *value,  bool is_enabled = true);
71
-        void adjuster          (uint8_t tag,  progmem_str label, const char *value,  bool is_enabled = true);
72
-        void adjuster          (uint8_t tag,  progmem_str label, float value=0,      bool is_enabled = true);
73
-        void button            (uint8_t tag,  progmem_str label,                     bool is_enabled = true);
74
-        void text_field        (uint8_t tag,  progmem_str label, const char *value,  bool is_enabled = true);
75
-        void two_buttons       (uint8_t tag1, progmem_str label1,
76
-                                uint8_t tag2, progmem_str label2,                    bool is_enabled = true);
77
-        void toggle            (uint8_t tag,  progmem_str label,                     bool value, bool is_enabled = true);
69
+        void heading           (FSTR_P label);
70
+        void adjuster_sram_val (uint8_t tag,  FSTR_P label, const char *value,  bool is_enabled = true);
71
+        void adjuster          (uint8_t tag,  FSTR_P label, const char *value,  bool is_enabled = true);
72
+        void adjuster          (uint8_t tag,  FSTR_P label, float value=0,      bool is_enabled = true);
73
+        void button            (uint8_t tag,  FSTR_P label,                     bool is_enabled = true);
74
+        void text_field        (uint8_t tag,  FSTR_P label, const char *value,  bool is_enabled = true);
75
+        void two_buttons       (uint8_t tag1, FSTR_P label1,
76
+                                uint8_t tag2, FSTR_P label2,                    bool is_enabled = true);
77
+        void toggle            (uint8_t tag,  FSTR_P label,                     bool value, bool is_enabled = true);
78 78
         void home_buttons      (uint8_t tag);
79 79
         void increments        ();
80 80
     };

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

@@ -25,7 +25,7 @@
25 25
 #define FTDI_BED_MESH_VIEW_SCREEN_CLASS BedMeshViewScreen
26 26
 
27 27
 struct BedMeshViewScreenData {
28
-  progmem_str message;
28
+  FSTR_P message;
29 29
   uint8_t count;
30 30
   xy_uint8_t highlight;
31 31
 };

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

@@ -44,7 +44,7 @@ void DialogBoxBaseClass::drawMessage(T message, int16_t font) {
44 44
 }
45 45
 
46 46
 template void DialogBoxBaseClass::drawMessage(const char *, int16_t font);
47
-template void DialogBoxBaseClass::drawMessage(progmem_str, int16_t font);
47
+template void DialogBoxBaseClass::drawMessage(FSTR_P, int16_t font);
48 48
 
49 49
 void DialogBoxBaseClass::drawYesNoButtons(uint8_t default_btn) {
50 50
   CommandProcessor cmd;
@@ -67,7 +67,7 @@ void DialogBoxBaseClass::drawButton(T label) {
67 67
 }
68 68
 
69 69
 template void DialogBoxBaseClass::drawButton(const char *);
70
-template void DialogBoxBaseClass::drawButton(progmem_str);
70
+template void DialogBoxBaseClass::drawButton(FSTR_P);
71 71
 
72 72
 bool DialogBoxBaseClass::onTouchEnd(uint8_t tag) {
73 73
   switch (tag) {

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

@@ -39,7 +39,7 @@ void FilamentRunoutScreen::onRedraw(draw_mode_t what) {
39 39
     w.units(GET_TEXT_F(MSG_UNITS_MM));
40 40
     w.precision(0);
41 41
     w.color(e_axis);
42
-    w.adjuster( 10, progmem_str(NUL_STR), getFilamentRunoutDistance_mm(), getFilamentRunoutEnabled());
42
+    w.adjuster( 10, FPSTR(NUL_STR), getFilamentRunoutDistance_mm(), getFilamentRunoutEnabled());
43 43
     w.increments();
44 44
   #endif
45 45
 }

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

@@ -63,7 +63,7 @@ void LockScreen::onRedraw(draw_mode_t what) {
63 63
     #define MARGIN_T 3
64 64
     #define MARGIN_B 3
65 65
 
66
-    progmem_str message;
66
+    FSTR_P message;
67 67
     switch (message_style()) {
68 68
       case 'w':
69 69
         message = GET_TEXT_F(MSG_PASSCODE_REJECTED);

+ 3
- 3
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp View File

@@ -60,7 +60,7 @@ void SpinnerDialogBox::onRefresh() {
60 60
 void SpinnerDialogBox::onRedraw(draw_mode_t) {
61 61
 }
62 62
 
63
-void SpinnerDialogBox::show(progmem_str message) {
63
+void SpinnerDialogBox::show(FSTR_P message) {
64 64
   CommandProcessor cmd;
65 65
   if (AT_SCREEN(SpinnerDialogBox)) cmd.stop().execute();
66 66
   cmd.cmd(CMD_DLSTART)
@@ -86,13 +86,13 @@ void SpinnerDialogBox::hide() {
86 86
   GOTO_PREVIOUS();
87 87
 }
88 88
 
89
-void SpinnerDialogBox::enqueueAndWait(progmem_str message, progmem_str commands) {
89
+void SpinnerDialogBox::enqueueAndWait(FSTR_P message, FSTR_P commands) {
90 90
   show(message);
91 91
   ExtUI::injectCommands_P((const char*)commands);
92 92
   mydata.auto_hide = true;
93 93
 }
94 94
 
95
-void SpinnerDialogBox::enqueueAndWait(progmem_str message, char *commands) {
95
+void SpinnerDialogBox::enqueueAndWait(FSTR_P message, char *commands) {
96 96
   show(message);
97 97
   ExtUI::injectCommands(commands);
98 98
   mydata.auto_hide = true;

+ 3
- 3
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h View File

@@ -37,12 +37,12 @@ class SpinnerDialogBox : public UIScreen {
37 37
     static void onRefresh();
38 38
     static void onIdle();
39 39
 
40
-    static void show(progmem_str);
40
+    static void show(FSTR_P);
41 41
     static void hide();
42 42
 
43 43
     template<typename T>
44 44
     static void enqueueAndWait(T commands) {enqueueAndWait(GET_TEXT_F(MSG_PLEASE_WAIT), commands);}
45 45
 
46
-    static void enqueueAndWait(progmem_str message, char *commands);
47
-    static void enqueueAndWait(progmem_str message, progmem_str commands);
46
+    static void enqueueAndWait(FSTR_P message, char *commands);
47
+    static void enqueueAndWait(FSTR_P message, FSTR_P commands);
48 48
 };

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

@@ -344,7 +344,7 @@ void StatusScreen::draw_status_message(draw_mode_t what, const char *message) {
344 344
   #undef  GRID_COLS
345 345
 }
346 346
 
347
-void StatusScreen::setStatusMessage(progmem_str message) {
347
+void StatusScreen::setStatusMessage(FSTR_P message) {
348 348
   char buff[strlen_P((const char * const)message)+1];
349 349
   strcpy_P(buff, (const char * const) message);
350 350
   setStatusMessage((const char *) buff);

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

@@ -36,7 +36,7 @@ class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE,
36 36
   public:
37 37
     static void loadBitmaps();
38 38
     static void setStatusMessage(const char *);
39
-    static void setStatusMessage(progmem_str);
39
+    static void setStatusMessage(FSTR_P);
40 40
     static void onRedraw(draw_mode_t);
41 41
     static void onStartup();
42 42
     static void onEntry();

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

@@ -59,7 +59,7 @@ void StressTestScreen::onRedraw(draw_mode_t) {
59 59
      .cmd(CLEAR(true,true,true))
60 60
      .cmd(COLOR_RGB(bg_text_enabled))
61 61
      .font(font_medium)
62
-     .text(BTN_POS(1,1), BTN_SIZE(4,1), progmem_str(mydata.message));
62
+     .text(BTN_POS(1,1), BTN_SIZE(4,1), FPSTR(mydata.message));
63 63
 
64 64
   drawDots(BTN_POS(1,3), BTN_SIZE(4,4));
65 65
 

+ 1
- 0
Marlin/src/lcd/language/language_en.h View File

@@ -397,6 +397,7 @@ namespace Language_en {
397 397
   LSTR MSG_ADVANCE_K                      = _UxGT("Advance K");
398 398
   LSTR MSG_ADVANCE_K_E                    = _UxGT("Advance K *");
399 399
   LSTR MSG_CONTRAST                       = _UxGT("LCD Contrast");
400
+  LSTR MSG_BRIGHTNESS                     = _UxGT("LCD Brightness");
400 401
   LSTR MSG_STORE_EEPROM                   = _UxGT("Store Settings");
401 402
   LSTR MSG_LOAD_EEPROM                    = _UxGT("Load Settings");
402 403
   LSTR MSG_RESTORE_DEFAULTS               = _UxGT("Restore Defaults");

+ 2
- 2
Marlin/src/lcd/menu/game/brickout.cpp View File

@@ -50,8 +50,8 @@ inline void reset_bricks(const uint16_t v) {
50 50
 void reset_ball() {
51 51
   constexpr uint8_t ball_dist = 24;
52 52
   bdat.bally = BTOF(PADDLE_Y - ball_dist);
53
-  bdat.ballv = FTOP(1.3f);
54
-  bdat.ballh = -FTOP(1.25f);
53
+  bdat.ballv = FTOF(1.3f);
54
+  bdat.ballh = -FTOF(1.25f);
55 55
   uint8_t bx = bdat.paddle_x + (PADDLE_W) / 2 + ball_dist;
56 56
   if (bx >= LCD_PIXEL_WIDTH - 10) { bx -= ball_dist * 2; bdat.ballh = -bdat.ballh; }
57 57
   bdat.ballx = BTOF(bx);

+ 2
- 2
Marlin/src/lcd/menu/game/snake.cpp View File

@@ -63,7 +63,7 @@
63 63
   #define SNAKE_SIZ SNAKE_BOX
64 64
 #endif
65 65
 
66
-constexpr fixed_t snakev = FTOP(0.20);
66
+constexpr fixed_t snakev = FTOF(0.20);
67 67
 
68 68
 snake_data_t &sdat = marlin_game_data.snake;
69 69
 
@@ -125,7 +125,7 @@ void snake_reset() {
125 125
   // Init the head and velocity
126 126
   sdat.snakex = BTOF(1);
127 127
   sdat.snakey = BTOF(GAME_H / 2);
128
-  //snakev = FTOP(0.25);
128
+  //snakev = FTOF(0.25);
129 129
 
130 130
   // Init the tail with a cw turn
131 131
   sdat.snake_dir = 0;

+ 1
- 1
Marlin/src/lcd/menu/game/types.h View File

@@ -27,7 +27,7 @@ typedef struct { int8_t x, y; } pos_t;
27 27
 
28 28
 // Simple 8:8 fixed-point
29 29
 typedef int16_t fixed_t;
30
-#define FTOP(F) fixed_t((F)*256.0f)
30
+#define FTOF(F) fixed_t((F)*256.0f)
31 31
 #define PTOF(P) (float(P)*(1.0f/256.0f))
32 32
 #define BTOF(X) (fixed_t(X)<<8)
33 33
 #define FTOB(X) int8_t(fixed_t(X)>>8)

+ 1
- 1
Marlin/src/lcd/menu/menu.h View File

@@ -114,7 +114,7 @@ class MenuItem_confirm : public MenuItemBase {
114 114
     static inline void select_screen(
115 115
       PGM_P const yes, PGM_P const no,
116 116
       selectFunc_t yesFunc, selectFunc_t noFunc,
117
-      PGM_P const pref, const progmem_str string, PGM_P const suff=nullptr
117
+      PGM_P const pref, FSTR_P const string, PGM_P const suff=nullptr
118 118
     ) {
119 119
       char str[strlen_P((PGM_P)string) + 1];
120 120
       strcpy_P(str, (PGM_P)string);

Loading…
Cancel
Save