소스 검색

🎨 Apply F() to UTF-8/MMU2 string put

Scott Lahteine 2 년 전
부모
커밋
eeffac697c

+ 1
- 1
Marlin/src/HAL/shared/progmem.h 파일 보기

@@ -111,7 +111,7 @@ class __FlashStringHelper;
111 111
 #define strrchr_P(str, c) strrchr((str), (c))
112 112
 #endif
113 113
 #ifndef strsep_P
114
-#define strsep_P(strp, delim) strsep((strp), (delim))
114
+#define strsep_P(pstr, delim) strsep((pstr), (delim))
115 115
 #endif
116 116
 #ifndef strspn_P
117 117
 #define strspn_P(str, chrs) strspn((str), (chrs))

+ 25
- 23
Marlin/src/feature/mmu/mmu2.cpp 파일 보기

@@ -54,7 +54,7 @@ MMU2 mmu2;
54 54
 #define MMU_CMD_TIMEOUT 45000UL // 45s timeout for mmu commands (except P0)
55 55
 #define MMU_P0_TIMEOUT 3000UL   // Timeout for P0 command: 3seconds
56 56
 
57
-#define MMU2_COMMAND(S) tx_str_P(PSTR(S "\n"))
57
+#define MMU2_COMMAND(S) tx_str(F(S "\n"))
58 58
 
59 59
 #if ENABLED(MMU_EXTRUDER_SENSOR)
60 60
   uint8_t mmu_idl_sens = 0;
@@ -229,17 +229,17 @@ void MMU2::mmu_loop() {
229 229
       if (cmd) {
230 230
         if (WITHIN(cmd, MMU_CMD_T0, MMU_CMD_T0 + EXTRUDERS - 1)) {
231 231
           // tool change
232
-          int filament = cmd - MMU_CMD_T0;
232
+          const int filament = cmd - MMU_CMD_T0;
233 233
           DEBUG_ECHOLNPGM("MMU <= T", filament);
234
-          tx_printf_P(PSTR("T%d\n"), filament);
234
+          tx_printf(F("T%d\n"), filament);
235 235
           TERN_(MMU_EXTRUDER_SENSOR, mmu_idl_sens = 1); // enable idler sensor, if any
236 236
           state = 3; // wait for response
237 237
         }
238 238
         else if (WITHIN(cmd, MMU_CMD_L0, MMU_CMD_L0 + EXTRUDERS - 1)) {
239 239
           // load
240
-          int filament = cmd - MMU_CMD_L0;
240
+          const int filament = cmd - MMU_CMD_L0;
241 241
           DEBUG_ECHOLNPGM("MMU <= L", filament);
242
-          tx_printf_P(PSTR("L%d\n"), filament);
242
+          tx_printf(F("L%d\n"), filament);
243 243
           state = 3; // wait for response
244 244
         }
245 245
         else if (cmd == MMU_CMD_C0) {
@@ -257,9 +257,9 @@ void MMU2::mmu_loop() {
257 257
         }
258 258
         else if (WITHIN(cmd, MMU_CMD_E0, MMU_CMD_E0 + EXTRUDERS - 1)) {
259 259
           // eject filament
260
-          int filament = cmd - MMU_CMD_E0;
260
+          const int filament = cmd - MMU_CMD_E0;
261 261
           DEBUG_ECHOLNPGM("MMU <= E", filament);
262
-          tx_printf_P(PSTR("E%d\n"), filament);
262
+          tx_printf(F("E%d\n"), filament);
263 263
           state = 3; // wait for response
264 264
         }
265 265
         else if (cmd == MMU_CMD_R0) {
@@ -270,9 +270,9 @@ void MMU2::mmu_loop() {
270 270
         }
271 271
         else if (WITHIN(cmd, MMU_CMD_F0, MMU_CMD_F0 + EXTRUDERS - 1)) {
272 272
           // filament type
273
-          int filament = cmd - MMU_CMD_F0;
273
+          const int filament = cmd - MMU_CMD_F0;
274 274
           DEBUG_ECHOLNPGM("MMU <= F", filament, " ", cmd_arg);
275
-          tx_printf_P(PSTR("F%d %d\n"), filament, cmd_arg);
275
+          tx_printf(F("F%d %d\n"), filament, cmd_arg);
276 276
           state = 3; // wait for response
277 277
         }
278 278
 
@@ -356,13 +356,15 @@ void MMU2::mmu_loop() {
356 356
  */
357 357
 bool MMU2::rx_start() {
358 358
   // check for start message
359
-  return rx_str_P(PSTR("start\n"));
359
+  return rx_str(F("start\n"));
360 360
 }
361 361
 
362 362
 /**
363 363
  * Check if the data received ends with the given string.
364 364
  */
365
-bool MMU2::rx_str_P(const char *str) {
365
+bool MMU2::rx_str(FSTR_P fstr) {
366
+  PGM_P pstr = FTOP(fstr);
367
+
366 368
   uint8_t i = strlen(rx_buffer);
367 369
 
368 370
   while (MMU2_SERIAL.available()) {
@@ -375,14 +377,14 @@ bool MMU2::rx_str_P(const char *str) {
375 377
   }
376 378
   rx_buffer[i] = '\0';
377 379
 
378
-  uint8_t len = strlen_P(str);
380
+  uint8_t len = strlen_P(pstr);
379 381
 
380 382
   if (i < len) return false;
381 383
 
382
-  str += len;
384
+  pstr += len;
383 385
 
384 386
   while (len--) {
385
-    char c0 = pgm_read_byte(str--), c1 = rx_buffer[i--];
387
+    char c0 = pgm_read_byte(pstr--), c1 = rx_buffer[i--];
386 388
     if (c0 == c1) continue;
387 389
     if (c0 == '\r' && c1 == '\n') continue;  // match cr as lf
388 390
     if (c0 == '\n' && c1 == '\r') continue;  // match lf as cr
@@ -394,19 +396,19 @@ bool MMU2::rx_str_P(const char *str) {
394 396
 /**
395 397
  * Transfer data to MMU, no argument
396 398
  */
397
-void MMU2::tx_str_P(const char *str) {
399
+void MMU2::tx_str(FSTR_P fstr) {
398 400
   clear_rx_buffer();
399
-  uint8_t len = strlen_P(str);
400
-  LOOP_L_N(i, len) MMU2_SERIAL.write(pgm_read_byte(str++));
401
+  PGM_P pstr = FTOP(fstr);
402
+  while (const char c = pgm_read_byte(pstr)) { MMU2_SERIAL.write(c); pstr++; }
401 403
   prev_request = millis();
402 404
 }
403 405
 
404 406
 /**
405 407
  * Transfer data to MMU, single argument
406 408
  */
407
-void MMU2::tx_printf_P(const char *format, int argument = -1) {
409
+void MMU2::tx_printf(FSTR_P format, int argument = -1) {
408 410
   clear_rx_buffer();
409
-  uint8_t len = sprintf_P(tx_buffer, format, argument);
411
+  const uint8_t len = sprintf_P(tx_buffer, FTOP(format), argument);
410 412
   LOOP_L_N(i, len) MMU2_SERIAL.write(tx_buffer[i]);
411 413
   prev_request = millis();
412 414
 }
@@ -414,9 +416,9 @@ void MMU2::tx_printf_P(const char *format, int argument = -1) {
414 416
 /**
415 417
  * Transfer data to MMU, two arguments
416 418
  */
417
-void MMU2::tx_printf_P(const char *format, int argument1, int argument2) {
419
+void MMU2::tx_printf(FSTR_P format, int argument1, int argument2) {
418 420
   clear_rx_buffer();
419
-  uint8_t len = sprintf_P(tx_buffer, format, argument1, argument2);
421
+  const uint8_t len = sprintf_P(tx_buffer, FTOP(format), argument1, argument2);
420 422
   LOOP_L_N(i, len) MMU2_SERIAL.write(tx_buffer[i]);
421 423
   prev_request = millis();
422 424
 }
@@ -433,7 +435,7 @@ void MMU2::clear_rx_buffer() {
433 435
  * Check if we received 'ok' from MMU
434 436
  */
435 437
 bool MMU2::rx_ok() {
436
-  if (rx_str_P(PSTR("ok\n"))) {
438
+  if (rx_str(F("ok\n"))) {
437 439
     prev_P0_request = millis();
438 440
     return true;
439 441
   }
@@ -853,7 +855,7 @@ void MMU2::filament_runout() {
853 855
     if (cmd == MMU_CMD_NONE && last_cmd == MMU_CMD_C0) {
854 856
       if (present && !mmu2s_triggered) {
855 857
         DEBUG_ECHOLNPGM("MMU <= 'A'");
856
-        tx_str_P(PSTR("A\n"));
858
+        tx_str(F("A\n"));
857 859
       }
858 860
       // Slowly spin the extruder during C0
859 861
       else {

+ 4
- 4
Marlin/src/feature/mmu/mmu2.h 파일 보기

@@ -57,10 +57,10 @@ public:
57 57
   static bool eject_filament(const uint8_t index, const bool recover);
58 58
 
59 59
 private:
60
-  static bool rx_str_P(const char *str);
61
-  static void tx_str_P(const char *str);
62
-  static void tx_printf_P(const char *format, const int argument);
63
-  static void tx_printf_P(const char *format, const int argument1, const int argument2);
60
+  static inline bool rx_str(FSTR_P fstr);
61
+  static inline void tx_str(FSTR_P fstr);
62
+  static inline void tx_printf(FSTR_P ffmt, const int argument);
63
+  static inline void tx_printf(FSTR_P ffmt, const int argument1, const int argument2);
64 64
   static void clear_rx_buffer();
65 65
 
66 66
   static bool rx_ok();

+ 2
- 2
Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp 파일 보기

@@ -1063,8 +1063,8 @@ int lcd_put_u8str_max(const char * utf8_str, pixel_len_t max_length) {
1063 1063
   return lcd_put_u8str_max_cb(utf8_str, read_byte_ram, max_length);
1064 1064
 }
1065 1065
 
1066
-int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) {
1067
-  return lcd_put_u8str_max_cb(utf8_str_P, read_byte_rom, max_length);
1066
+int lcd_put_u8str_max_P(PGM_P utf8_pstr, pixel_len_t max_length) {
1067
+  return lcd_put_u8str_max_cb(utf8_pstr, read_byte_rom, max_length);
1068 1068
 }
1069 1069
 
1070 1070
 #if ENABLED(DEBUG_LCDPRINT)

+ 23
- 22
Marlin/src/lcd/HD44780/marlinui_HD44780.cpp 파일 보기

@@ -409,15 +409,15 @@ void MarlinUI::clear_lcd() { lcd.clear(); }
409 409
   }
410 410
 
411 411
   // Scroll the PSTR 'text' in a 'len' wide field for 'time' milliseconds at position col,line
412
-  void lcd_scroll(const lcd_uint_t col, const lcd_uint_t line, PGM_P const text, const uint8_t len, const int16_t time) {
413
-    uint8_t slen = utf8_strlen_P(text);
412
+  void lcd_scroll(const lcd_uint_t col, const lcd_uint_t line, FSTR_P const ftxt, const uint8_t len, const int16_t time) {
413
+    uint8_t slen = utf8_strlen_P(FTOP(ftxt));
414 414
     if (slen < len) {
415
-      lcd_put_u8str_max_P(col, line, text, len);
415
+      lcd_put_u8str_max(col, line, ftxt, len);
416 416
       for (; slen < len; ++slen) lcd_put_wchar(' ');
417 417
       safe_delay(time);
418 418
     }
419 419
     else {
420
-      PGM_P p = text;
420
+      PGM_P p = FTOP(ftxt);
421 421
       int dly = time / _MAX(slen, 1);
422 422
       LOOP_LE_N(i, slen) {
423 423
 
@@ -439,9 +439,9 @@ void MarlinUI::clear_lcd() { lcd.clear(); }
439 439
 
440 440
   static void logo_lines(PGM_P const extra) {
441 441
     int16_t indent = (LCD_WIDTH - 8 - utf8_strlen_P(extra)) / 2;
442
-    lcd_put_wchar(indent, 0, '\x00'); lcd_put_u8str_P(PSTR( "------" ));  lcd_put_wchar('\x01');
443
-    lcd_put_u8str_P(indent, 1, PSTR("|Marlin|"));  lcd_put_u8str_P(extra);
444
-    lcd_put_wchar(indent, 2, '\x02'); lcd_put_u8str_P(PSTR( "------" ));  lcd_put_wchar('\x03');
442
+    lcd_put_wchar(indent, 0, '\x00'); lcd_put_u8str(F( "------" ));  lcd_put_wchar('\x01');
443
+    lcd_put_u8str(indent, 1, F("|Marlin|"));  lcd_put_u8str_P(extra);
444
+    lcd_put_wchar(indent, 2, '\x02'); lcd_put_u8str(F( "------" ));  lcd_put_wchar('\x03');
445 445
   }
446 446
 
447 447
   void MarlinUI::show_bootscreen() {
@@ -450,15 +450,16 @@ void MarlinUI::clear_lcd() { lcd.clear(); }
450 450
 
451 451
     #define LCD_EXTRA_SPACE (LCD_WIDTH-8)
452 452
 
453
-    #define CENTER_OR_SCROLL(STRING,DELAY) \
453
+    #define CENTER_OR_SCROLL(STRING,DELAY) { \
454 454
       lcd_erase_line(3); \
455
-      if (utf8_strlen(STRING) <= LCD_WIDTH) { \
456
-        lcd_put_u8str_P((LCD_WIDTH - utf8_strlen_P(PSTR(STRING))) / 2, 3, PSTR(STRING)); \
455
+      const int len = utf8_strlen(STRING); \
456
+      if (len <= LCD_WIDTH) { \
457
+        lcd_put_u8str((LCD_WIDTH - len) / 2, 3, F(STRING)); \
457 458
         safe_delay(DELAY); \
458 459
       } \
459
-      else { \
460
-        lcd_scroll(0, 3, PSTR(STRING), LCD_WIDTH, DELAY); \
461
-      }
460
+      else \
461
+        lcd_scroll(0, 3, F(STRING), LCD_WIDTH, DELAY); \
462
+    }
462 463
 
463 464
     //
464 465
     // Show the Marlin logo with splash line 1
@@ -497,9 +498,9 @@ void MarlinUI::draw_kill_screen() {
497 498
   lcd_put_u8str(0, 0, status_message);
498 499
   lcd_uint_t y = 2;
499 500
   #if LCD_HEIGHT >= 4
500
-    lcd_put_u8str_P(0, y++, GET_TEXT(MSG_HALTED));
501
+    lcd_put_u8str(0, y++, GET_TEXT_F(MSG_HALTED));
501 502
   #endif
502
-  lcd_put_u8str_P(0, y, GET_TEXT(MSG_PLEASE_RESET));
503
+  lcd_put_u8str(0, y, GET_TEXT_F(MSG_PLEASE_RESET));
503 504
 }
504 505
 
505 506
 //
@@ -514,7 +515,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
514 515
   else if (axis_should_home(axis))
515 516
     while (const char c = *value++) lcd_put_wchar(c <= '.' ? c : '?');
516 517
   else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !axis_is_trusted(axis))
517
-    lcd_put_u8str_P(axis == Z_AXIS ? PSTR("       ") : PSTR("    "));
518
+    lcd_put_u8str(axis == Z_AXIS ? F("       ") : F("    "));
518 519
   else
519 520
     lcd_put_u8str(value);
520 521
 }
@@ -613,11 +614,11 @@ FORCE_INLINE void _draw_bed_status(const bool blink) {
613 614
 
614 615
   FORCE_INLINE void _draw_print_progress() {
615 616
     const uint8_t progress = ui.get_progress_percent();
616
-    lcd_put_u8str_P(PSTR(TERN(SDSUPPORT, "SD", "P:")));
617
+    lcd_put_u8str(F(TERN(SDSUPPORT, "SD", "P:")));
617 618
     if (progress)
618 619
       lcd_put_u8str(ui8tostr3rj(progress));
619 620
     else
620
-      lcd_put_u8str_P(PSTR("---"));
621
+      lcd_put_u8str(F("---"));
621 622
     lcd_put_wchar('%');
622 623
   }
623 624
 
@@ -661,9 +662,9 @@ void MarlinUI::draw_status_message(const bool blink) {
661 662
 
662 663
     // Alternate Status message and Filament display
663 664
     if (ELAPSED(millis(), next_filament_display)) {
664
-      lcd_put_u8str_P(PSTR("Dia "));
665
+      lcd_put_u8str(F("Dia "));
665 666
       lcd_put_u8str(ftostr12ns(filwidth.measured_mm));
666
-      lcd_put_u8str_P(PSTR(" V"));
667
+      lcd_put_u8str(F(" V"));
667 668
       lcd_put_u8str(i16tostr3rj(planner.volumetric_percent(parser.volumetric_enabled)));
668 669
       lcd_put_wchar('%');
669 670
       return;
@@ -1473,7 +1474,7 @@ void MarlinUI::draw_status_screen() {
1473 1474
         if (!isnan(ubl.z_values[x_plot][y_plot]))
1474 1475
           lcd_put_u8str(ftostr43sign(ubl.z_values[x_plot][y_plot]));
1475 1476
         else
1476
-          lcd_put_u8str_P(PSTR(" -----"));
1477
+          lcd_put_u8str(F(" -----"));
1477 1478
 
1478 1479
       #else                 // 16x4 or 20x4 display
1479 1480
 
@@ -1492,7 +1493,7 @@ void MarlinUI::draw_status_screen() {
1492 1493
         if (!isnan(ubl.z_values[x_plot][y_plot]))
1493 1494
           lcd_put_u8str(ftostr43sign(ubl.z_values[x_plot][y_plot]));
1494 1495
         else
1495
-          lcd_put_u8str_P(PSTR(" -----"));
1496
+          lcd_put_u8str(F(" -----"));
1496 1497
 
1497 1498
       #endif // LCD_HEIGHT > 3
1498 1499
     }

+ 2
- 2
Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp 파일 보기

@@ -1061,8 +1061,8 @@ int lcd_put_u8str_max(const char * utf8_str, pixel_len_t max_length) {
1061 1061
   return lcd_put_u8str_max_cb(utf8_str, read_byte_ram, max_length);
1062 1062
 }
1063 1063
 
1064
-int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) {
1065
-  return lcd_put_u8str_max_cb(utf8_str_P, read_byte_rom, max_length);
1064
+int lcd_put_u8str_max_P(PGM_P utf8_pstr, pixel_len_t max_length) {
1065
+  return lcd_put_u8str_max_cb(utf8_pstr, read_byte_rom, max_length);
1066 1066
 }
1067 1067
 
1068 1068
 #if ENABLED(DEBUG_LCDPRINT)

+ 21
- 21
Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp 파일 보기

@@ -399,9 +399,9 @@ static void center_text_P(PGM_P pstart, uint8_t y) {
399 399
     uint8_t indent = (LCD_WIDTH - 8) / 2;
400 400
     // symbols 217 (bottom right corner) and 218 (top left corner) are using for letters in some languages
401 401
     // and they should be moved to beginning ASCII table as special symbols
402
-    lcd.setCursor(indent, 0); lcd.write(TLC); lcd_put_u8str_P(PSTR("------"));  lcd.write(TRC);
403
-    lcd.setCursor(indent, 1); lcd.write(LR);  lcd_put_u8str_P(PSTR("Marlin"));  lcd.write(LR);
404
-    lcd.setCursor(indent, 2); lcd.write(BLC); lcd_put_u8str_P(PSTR("------"));  lcd.write(BRC);
402
+    lcd.setCursor(indent, 0); lcd.write(TLC); lcd_put_u8str(F("------"));  lcd.write(TRC);
403
+    lcd.setCursor(indent, 1); lcd.write(LR);  lcd_put_u8str(F("Marlin"));  lcd.write(LR);
404
+    lcd.setCursor(indent, 2); lcd.write(BLC); lcd_put_u8str(F("------"));  lcd.write(BRC);
405 405
     center_text_P(PSTR(SHORT_BUILD_VERSION), 3);
406 406
     center_text_P(PSTR(MARLIN_WEBSITE_URL), 4);
407 407
     picBits = ICON_LOGO;
@@ -437,7 +437,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
437 437
   else if (axis_should_home(axis))
438 438
     while (const char c = *value++) lcd.write(c <= '.' ? c : '?');
439 439
   else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !axis_is_trusted(axis))
440
-    lcd_put_u8str_P(axis == Z_AXIS ? PSTR("       ") : PSTR("    "));
440
+    lcd_put_u8str(axis == Z_AXIS ? F("       ") : F("    "));
441 441
   else
442 442
     lcd_put_u8str(value);
443 443
 }
@@ -515,7 +515,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
515 515
   FORCE_INLINE void _draw_cooler_status(const bool blink) {
516 516
     const celsius_t t2 = thermalManager.degTargetCooler();
517 517
 
518
-    lcd.setCursor(0, 5); lcd_put_u8str_P(PSTR("COOL"));
518
+    lcd.setCursor(0, 5); lcd_put_u8str(F("COOL"));
519 519
     lcd.setCursor(1, 6); lcd_put_u8str(i16tostr3rj(thermalManager.wholeDegCooler()));
520 520
     lcd.setCursor(1, 7);
521 521
 
@@ -543,7 +543,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
543 543
 #if ENABLED(LASER_COOLANT_FLOW_METER)
544 544
 
545 545
   FORCE_INLINE void _draw_flowmeter_status() {
546
-    lcd.setCursor(5, 5); lcd_put_u8str_P(PSTR("FLOW"));
546
+    lcd.setCursor(5, 5); lcd_put_u8str(F("FLOW"));
547 547
     lcd.setCursor(7, 6); lcd_put_wchar('L');
548 548
     lcd.setCursor(6, 7); lcd_put_u8str(ftostr11ns(cooler.flowrate));
549 549
 
@@ -556,7 +556,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
556 556
 #if ENABLED(I2C_AMMETER)
557 557
 
558 558
   FORCE_INLINE void _draw_ammeter_status() {
559
-    lcd.setCursor(10, 5); lcd_put_u8str_P(PSTR("ILAZ"));
559
+    lcd.setCursor(10, 5); lcd_put_u8str(F("ILAZ"));
560 560
     ammeter.read();
561 561
     lcd.setCursor(11, 6);
562 562
     if (ammeter.current <= 0.999f)
@@ -580,9 +580,9 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
580 580
 #if HAS_CUTTER
581 581
 
582 582
   FORCE_INLINE void _draw_cutter_status() {
583
-    lcd.setCursor(15, 5);  lcd_put_u8str_P(PSTR("CUTT"));
583
+    lcd.setCursor(15, 5);  lcd_put_u8str(F("CUTT"));
584 584
     #if CUTTER_UNIT_IS(RPM)
585
-      lcd.setCursor(16, 6);  lcd_put_u8str_P(PSTR("RPM"));
585
+      lcd.setCursor(16, 6);  lcd_put_u8str(F("RPM"));
586 586
       lcd.setCursor(15, 7);  lcd_put_u8str(ftostr31ns(float(cutter.unitPower) / 1000));
587 587
       lcd_put_wchar('K');
588 588
     #elif CUTTER_UNIT_IS(PERCENT)
@@ -604,14 +604,14 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
604 604
     if (!PanelDetected) return;
605 605
     const uint8_t progress = ui._get_progress();
606 606
     #if ENABLED(SDSUPPORT)
607
-      lcd_put_u8str_P(PSTR("SD"));
607
+      lcd_put_u8str(F("SD"));
608 608
     #elif ENABLED(LCD_SET_PROGRESS_MANUALLY)
609
-      lcd_put_u8str_P(PSTR("P:"));
609
+      lcd_put_u8str(F("P:"));
610 610
     #endif
611 611
     if (progress)
612 612
       lcd.print(ui8tostr3rj(progress));
613 613
     else
614
-      lcd_put_u8str_P(PSTR("---"));
614
+      lcd_put_u8str(F("---"));
615 615
     lcd.write('%');
616 616
   }
617 617
 
@@ -643,9 +643,9 @@ void MarlinUI::draw_status_message(const bool blink) {
643 643
 
644 644
     // Alternate Status message and Filament display
645 645
     if (ELAPSED(millis(), next_filament_display)) {
646
-      lcd_put_u8str_P(PSTR("Dia "));
646
+      lcd_put_u8str(F("Dia "));
647 647
       lcd.print(ftostr12ns(filament_width_meas));
648
-      lcd_put_u8str_P(PSTR(" V"));
648
+      lcd_put_u8str(F(" V"));
649 649
       lcd.print(i16tostr3rj(100.0 * (
650 650
           parser.volumetric_enabled
651 651
             ? planner.volumetric_area_nominal / planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
@@ -802,7 +802,7 @@ void MarlinUI::draw_status_screen() {
802 802
   //
803 803
 
804 804
   lcd.setCursor(0, 1);
805
-  lcd_put_u8str_P(PSTR("FR")); lcd.print(i16tostr3rj(feedrate_percentage)); lcd.write('%');
805
+  lcd_put_u8str(F("FR")); lcd.print(i16tostr3rj(feedrate_percentage)); lcd.write('%');
806 806
 
807 807
   #if BOTH(SDSUPPORT, HAS_PRINT_PROGRESS)
808 808
     lcd.setCursor(LCD_WIDTH / 2 - 3, 1);
@@ -895,7 +895,7 @@ void MarlinUI::draw_status_screen() {
895 895
       #else
896 896
         #define FANX 17
897 897
       #endif
898
-      lcd.setCursor(FANX, 5); lcd_put_u8str_P(PSTR("FAN"));
898
+      lcd.setCursor(FANX, 5); lcd_put_u8str(F("FAN"));
899 899
       lcd.setCursor(FANX + 1, 6); lcd.write('%');
900 900
       lcd.setCursor(FANX, 7);
901 901
       lcd.print(i16tostr3rj(per));
@@ -931,7 +931,7 @@ void MarlinUI::draw_status_screen() {
931 931
     void MarlinUI::draw_hotend_status(const uint8_t row, const uint8_t extruder) {
932 932
       if (!PanelDetected) return;
933 933
       lcd.setCursor((LCD_WIDTH - 14) / 2, row + 1);
934
-      lcd.write(LCD_STR_THERMOMETER[0]); lcd_put_u8str_P(PSTR(" E")); lcd.write('1' + extruder); lcd.write(' ');
934
+      lcd.write(LCD_STR_THERMOMETER[0]); lcd_put_u8str(F(" E")); lcd.write('1' + extruder); lcd.write(' ');
935 935
       lcd.print(i16tostr3rj(thermalManager.wholeDegHotend(extruder))); lcd.write(LCD_STR_DEGREE[0]); lcd.write('/');
936 936
       lcd.print(i16tostr3rj(thermalManager.degTargetHotend(extruder))); lcd.write(LCD_STR_DEGREE[0]);
937 937
       lcd.print_line();
@@ -1064,18 +1064,18 @@ void MarlinUI::draw_status_screen() {
1064 1064
       *fb++ = ',';  lcd.print(i16tostr3left(y_plot)); *fb = ')';
1065 1065
 
1066 1066
       // Show all values
1067
-      lcd.setCursor(_LCD_W_POS, 1); lcd_put_u8str_P(PSTR("X:"));
1067
+      lcd.setCursor(_LCD_W_POS, 1); lcd_put_u8str(F("X:"));
1068 1068
       lcd.print(ftostr52(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot]))));
1069
-      lcd.setCursor(_LCD_W_POS, 2); lcd_put_u8str_P(PSTR("Y:"));
1069
+      lcd.setCursor(_LCD_W_POS, 2); lcd_put_u8str(F("Y:"));
1070 1070
       lcd.print(ftostr52(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot]))));
1071 1071
 
1072 1072
       // Show the location value
1073
-      lcd.setCursor(_LCD_W_POS, 3); lcd_put_u8str_P(PSTR("Z:"));
1073
+      lcd.setCursor(_LCD_W_POS, 3); lcd_put_u8str(F("Z:"));
1074 1074
 
1075 1075
       if (!isnan(ubl.z_values[x_plot][y_plot]))
1076 1076
         lcd.print(ftostr43sign(ubl.z_values[x_plot][y_plot]));
1077 1077
       else
1078
-        lcd_put_u8str_P(PSTR(" -----"));
1078
+        lcd_put_u8str(F(" -----"));
1079 1079
 
1080 1080
       center_text_P(GET_TEXT(MSG_UBL_FINE_TUNE_MESH), 8);
1081 1081
 

+ 2
- 2
Marlin/src/lcd/dogm/lcdprint_u8g.cpp 파일 보기

@@ -46,9 +46,9 @@ int lcd_put_u8str_max(const char * utf8_str, pixel_len_t max_length) {
46 46
   return ret;
47 47
 }
48 48
 
49
-int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) {
49
+int lcd_put_u8str_max_P(PGM_P utf8_pstr, pixel_len_t max_length) {
50 50
   u8g_uint_t x = u8g.getPrintCol(), y = u8g.getPrintRow(),
51
-           ret = uxg_DrawUtf8StrP(u8g.getU8g(), x, y, utf8_str_P, max_length);
51
+           ret = uxg_DrawUtf8StrP(u8g.getU8g(), x, y, utf8_pstr, max_length);
52 52
   u8g.setPrintPos(x + ret, y);
53 53
   return ret;
54 54
 }

+ 5
- 5
Marlin/src/lcd/dogm/marlinui_DOGM.cpp 파일 보기

@@ -217,8 +217,8 @@ bool MarlinUI::detected() { return true; }
217 217
     auto _draw_bootscreen_bmp = [&](const uint8_t *bitmap) {
218 218
       u8g.drawBitmapP(offx, offy, START_BMP_BYTEWIDTH, START_BMPHEIGHT, bitmap);
219 219
       set_font(FONT_MENU);
220
-      if (!two_part || !line2) lcd_put_u8str_P(txt_offx_1, txt_base - (MENU_FONT_HEIGHT), PSTR(SHORT_BUILD_VERSION));
221
-      if (!two_part || line2) lcd_put_u8str_P(txt_offx_2, txt_base, PSTR(MARLIN_WEBSITE_URL));
220
+      if (!two_part || !line2) lcd_put_u8str(txt_offx_1, txt_base - (MENU_FONT_HEIGHT), F(SHORT_BUILD_VERSION));
221
+      if (!two_part || line2) lcd_put_u8str(txt_offx_2, txt_base, F(MARLIN_WEBSITE_URL));
222 222
     };
223 223
 
224 224
     auto draw_bootscreen_bmp = [&](const uint8_t *bitmap) {
@@ -331,8 +331,8 @@ void MarlinUI::draw_kill_screen() {
331 331
   do {
332 332
     set_font(FONT_MENU);
333 333
     lcd_put_u8str(0, h4 * 1, status_message);
334
-    lcd_put_u8str_P(0, h4 * 2, GET_TEXT(MSG_HALTED));
335
-    lcd_put_u8str_P(0, h4 * 3, GET_TEXT(MSG_PLEASE_RESET));
334
+    lcd_put_u8str(0, h4 * 2, GET_TEXT_F(MSG_HALTED));
335
+    lcd_put_u8str(0, h4 * 3, GET_TEXT_F(MSG_PLEASE_RESET));
336 336
   } while (u8g.nextPage());
337 337
 }
338 338
 
@@ -611,7 +611,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
611 611
         if (!isnan(ubl.z_values[x_plot][y_plot]))
612 612
           lcd_put_u8str(ftostr43sign(ubl.z_values[x_plot][y_plot]));
613 613
         else
614
-          lcd_put_u8str_P(PSTR(" -----"));
614
+          lcd_put_u8str(F(" -----"));
615 615
       }
616 616
 
617 617
     }

+ 7
- 7
Marlin/src/lcd/dogm/status_screen_DOGM.cpp 파일 보기

@@ -191,7 +191,7 @@
191 191
 
192 192
 FORCE_INLINE void _draw_centered_temp(const celsius_t temp, const uint8_t tx, const uint8_t ty) {
193 193
   if (temp < 0)
194
-    lcd_put_u8str(tx - 3 * (INFO_FONT_WIDTH) / 2 + 1, ty, "err");
194
+    lcd_put_u8str(tx - 3 * (INFO_FONT_WIDTH) / 2 + 1, ty, F("err"));
195 195
   else {
196 196
     const char *str = i16tostr3rj(temp);
197 197
     const uint8_t len = str[0] != ' ' ? 3 : str[1] != ' ' ? 2 : 1;
@@ -436,7 +436,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
436 436
   else if (axis_should_home(axis))
437 437
     while (const char c = *value++) lcd_put_wchar(c <= '.' ? c : '?');
438 438
   else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !axis_is_trusted(axis))
439
-    lcd_put_u8str_P(axis == Z_AXIS ? PSTR("       ") : PSTR("    "));
439
+    lcd_put_u8str(axis == Z_AXIS ? F("       ") : F("    "));
440 440
   else
441 441
     lcd_put_u8str(value);
442 442
 }
@@ -777,7 +777,7 @@ void MarlinUI::draw_status_screen() {
777 777
           }
778 778
         }
779 779
         else if (progress_state == 2 && estimation_string[0]) {
780
-          lcd_put_u8str_P(PROGRESS_BAR_X, EXTRAS_BASELINE, PSTR("R:"));
780
+          lcd_put_u8str(PROGRESS_BAR_X, EXTRAS_BASELINE, F("R:"));
781 781
           lcd_put_u8str(estimation_x_pos, EXTRAS_BASELINE, estimation_string);
782 782
         }
783 783
         else if (elapsed_string[0]) {
@@ -879,7 +879,7 @@ void MarlinUI::draw_status_screen() {
879 879
         if (show_e_total) {
880 880
           #if ENABLED(LCD_SHOW_E_TOTAL)
881 881
             _draw_axis_value(E_AXIS, xstring, true);
882
-            lcd_put_u8str_P(PSTR("       "));
882
+            lcd_put_u8str(F("       "));
883 883
           #endif
884 884
         }
885 885
         else {
@@ -918,7 +918,7 @@ void MarlinUI::draw_status_screen() {
918 918
       lcd_put_u8str(102, EXTRAS_2_BASELINE, mstring);
919 919
       lcd_put_wchar('%');
920 920
       set_font(FONT_MENU);
921
-      lcd_put_wchar(47, EXTRAS_2_BASELINE, LCD_STR_FILAM_DIA[0]); // lcd_put_u8str_P(PSTR(LCD_STR_FILAM_DIA));
921
+      lcd_put_wchar(47, EXTRAS_2_BASELINE, LCD_STR_FILAM_DIA[0]); // lcd_put_u8str(F(LCD_STR_FILAM_DIA));
922 922
       lcd_put_wchar(93, EXTRAS_2_BASELINE, LCD_STR_FILAM_MUL[0]);
923 923
     #endif
924 924
   }
@@ -932,10 +932,10 @@ void MarlinUI::draw_status_screen() {
932 932
     #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
933 933
       // Alternate Status message and Filament display
934 934
       if (ELAPSED(millis(), next_filament_display)) {
935
-        lcd_put_u8str_P(PSTR(LCD_STR_FILAM_DIA));
935
+        lcd_put_u8str(F(LCD_STR_FILAM_DIA));
936 936
         lcd_put_wchar(':');
937 937
         lcd_put_u8str(wstring);
938
-        lcd_put_u8str_P(PSTR("  " LCD_STR_FILAM_MUL));
938
+        lcd_put_u8str(F("  " LCD_STR_FILAM_MUL));
939 939
         lcd_put_wchar(':');
940 940
         lcd_put_u8str(mstring);
941 941
         lcd_put_wchar('%');

+ 6
- 6
Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp 파일 보기

@@ -99,9 +99,9 @@ void ST7920_Lite_Status_Screen::write_str(const char *str, uint8_t len) {
99 99
   while (*str && len--) write_byte(*str++);
100 100
 }
101 101
 
102
-void ST7920_Lite_Status_Screen::write_str_P(PGM_P const str) {
103
-  PGM_P p_str = (PGM_P)str;
104
-  while (char c = pgm_read_byte(p_str++)) write_byte(c);
102
+void ST7920_Lite_Status_Screen::write_str(FSTR_P const fstr) {
103
+  PGM_P pstr = FTOP(fstr);
104
+  while (char c = pgm_read_byte(pstr++)) write_byte(c);
105 105
 }
106 106
 
107 107
 void ST7920_Lite_Status_Screen::write_number(const int16_t value, const uint8_t digits/*=3*/) {
@@ -500,11 +500,11 @@ void ST7920_Lite_Status_Screen::draw_progress_bar(const uint8_t value) {
500 500
   // Draw centered
501 501
   if (value > 9) {
502 502
     write_number(value, 4);
503
-    write_str_P(PSTR("% "));
503
+    write_str(F("% "));
504 504
   }
505 505
   else {
506 506
     write_number(value, 3);
507
-    write_str_P(PSTR("%  "));
507
+    write_str(F("%  "));
508 508
   }
509 509
 }
510 510
 
@@ -559,7 +559,7 @@ void ST7920_Lite_Status_Screen::draw_temps(uint8_t line, const int16_t temp, con
559 559
   };
560 560
 
561 561
   if (targetStateChange) {
562
-    if (!showTarget) write_str_P(PSTR("    "));
562
+    if (!showTarget) write_str(F("    "));
563 563
     draw_degree_symbol(5, line, !showTarget);
564 564
     draw_degree_symbol(9, line,  showTarget);
565 565
   }

+ 1
- 1
Marlin/src/lcd/dogm/status_screen_lite_ST7920.h 파일 보기

@@ -46,7 +46,7 @@ class ST7920_Lite_Status_Screen {
46 46
 
47 47
     static void write_str(const char *str);
48 48
     static void write_str(const char *str, const uint8_t len);
49
-    static void write_str_P(PGM_P const str);
49
+    static void write_str(FSTR_P const fstr);
50 50
     static void write_number(const int16_t value, const uint8_t digits=3);
51 51
 
52 52
     static void _extended_function_set(const bool extended, const bool graphics);

+ 2
- 2
Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp 파일 보기

@@ -101,8 +101,8 @@ int lcd_put_u8str_max(const char * utf8_str, pixel_len_t max_length) {
101 101
   return lcd_put_u8str_max_cb(utf8_str, read_byte_ram, max_length);
102 102
 }
103 103
 
104
-int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) {
105
-  return lcd_put_u8str_max_cb(utf8_str_P, read_byte_rom, max_length);
104
+int lcd_put_u8str_max_P(PGM_P utf8_pstr, pixel_len_t max_length) {
105
+  return lcd_put_u8str_max_cb(utf8_pstr, read_byte_rom, max_length);
106 106
 }
107 107
 
108 108
 lcd_uint_t lcd_put_u8str_ind_P(PGM_P const pstr, const int8_t ind, PGM_P const inStr/*=nullptr*/, const lcd_uint_t maxlen/*=LCD_WIDTH*/) {

+ 2
- 2
Marlin/src/lcd/e3v2/marlinui/ui_common.cpp 파일 보기

@@ -160,11 +160,11 @@ void MarlinUI::draw_kill_screen() {
160 160
 
161 161
   slen = utf8_strlen(S(GET_TEXT_F(MSG_HALTED)));
162 162
   lcd_moveto(cx - (slen / 2), cy);
163
-  lcd_put_u8str_P((const char*)GET_TEXT_F(MSG_HALTED));
163
+  lcd_put_u8str(GET_TEXT_F(MSG_HALTED));
164 164
 
165 165
   slen = utf8_strlen(S(GET_TEXT_F(MSG_HALTED)));
166 166
   lcd_moveto(cx - (slen / 2), cy + 1);
167
-  lcd_put_u8str_P((const char*)GET_TEXT_F(MSG_HALTED));
167
+  lcd_put_u8str(GET_TEXT_F(MSG_HALTED));
168 168
 }
169 169
 
170 170
 //

+ 17
- 6
Marlin/src/lcd/lcdprint.h 파일 보기

@@ -152,17 +152,20 @@ void lcd_moveto(const lcd_uint_t col, const lcd_uint_t row);
152 152
 /**
153 153
  * @brief Draw a ROM UTF-8 string
154 154
  *
155
- * @param utf8_str_P : the ROM UTF-8 string
155
+ * @param utf8_pstr : the ROM UTF-8 string
156 156
  * @param max_length : the pixel length of the string allowed (or number of slots in HD44780)
157 157
  *
158 158
  * @return the pixel width
159 159
  *
160 160
  * Draw a ROM UTF-8 string
161 161
  */
162
-int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length);
163
-inline int lcd_put_u8str_max_P(const lcd_uint_t col, const lcd_uint_t row, PGM_P utf8_str_P, pixel_len_t max_length) {
162
+int lcd_put_u8str_max_P(PGM_P utf8_pstr, pixel_len_t max_length);
163
+inline int lcd_put_u8str_max_P(const lcd_uint_t col, const lcd_uint_t row, PGM_P utf8_pstr, pixel_len_t max_length) {
164 164
   lcd_moveto(col, row);
165
-  return lcd_put_u8str_max_P(utf8_str_P, max_length);
165
+  return lcd_put_u8str_max_P(utf8_pstr, max_length);
166
+}
167
+inline int lcd_put_u8str_max(const lcd_uint_t col, const lcd_uint_t row, FSTR_P const utf8_fstr, pixel_len_t max_length) {
168
+  return lcd_put_u8str_max_P(col, row, FTOP(utf8_fstr), max_length);
166 169
 }
167 170
 
168 171
 void lcd_put_int(const int i);
@@ -177,14 +180,22 @@ inline int lcd_put_u8str_P(const lcd_uint_t col, const lcd_uint_t row, PGM_P con
177 180
   return lcd_put_u8str_P(pstr);
178 181
 }
179 182
 
183
+inline int lcd_put_u8str(FSTR_P const fstr) { return lcd_put_u8str_P(FTOP(fstr)); }
184
+inline int lcd_put_u8str(const lcd_uint_t col, const lcd_uint_t row, FSTR_P const fstr) {
185
+  return lcd_put_u8str_P(col, row, FTOP(fstr));
186
+}
187
+
180 188
 lcd_uint_t lcd_put_u8str_ind_P(PGM_P const pstr, const int8_t ind, PGM_P const inStr=nullptr, const lcd_uint_t maxlen=LCD_WIDTH);
181 189
 inline lcd_uint_t lcd_put_u8str_ind_P(const lcd_uint_t col, const lcd_uint_t row, PGM_P const pstr, const int8_t ind, PGM_P const inStr=nullptr, const lcd_uint_t maxlen=LCD_WIDTH) {
182 190
   lcd_moveto(col, row);
183 191
   return lcd_put_u8str_ind_P(pstr, ind, inStr, maxlen);
184 192
 }
193
+inline lcd_uint_t lcd_put_u8str_ind(const lcd_uint_t col, const lcd_uint_t row, FSTR_P const fstr, const int8_t ind, FSTR_P const inFstr=nullptr, const lcd_uint_t maxlen=LCD_WIDTH) {
194
+  return lcd_put_u8str_ind_P(col, row, FTOP(fstr), ind, FTOP(inFstr), maxlen);
195
+}
185 196
 
186
-inline int lcd_put_u8str(const char *str) { return lcd_put_u8str_max(str, PIXEL_LEN_NOLIMIT); }
187
-inline int lcd_put_u8str(const lcd_uint_t col, const lcd_uint_t row, PGM_P const str) {
197
+inline int lcd_put_u8str(const char * const str) { return lcd_put_u8str_max(str, PIXEL_LEN_NOLIMIT); }
198
+inline int lcd_put_u8str(const lcd_uint_t col, const lcd_uint_t row, const char * const str) {
188 199
   lcd_moveto(col, row);
189 200
   return lcd_put_u8str(str);
190 201
 }

+ 1
- 1
Marlin/src/lcd/menu/game/game.cpp 파일 보기

@@ -48,7 +48,7 @@ void MarlinGame::draw_game_over() {
48 48
     u8g.setColorIndex(0);
49 49
     u8g.drawBox(lx - 1, ly - gohigh - 1, gowide + 2, gohigh + 2);
50 50
     u8g.setColorIndex(1);
51
-    if (ui.get_blink()) lcd_put_u8str_P(lx, ly, PSTR("GAME OVER"));
51
+    if (ui.get_blink()) lcd_put_u8str(lx, ly, F("GAME OVER"));
52 52
   }
53 53
 }
54 54
 

+ 2
- 2
Marlin/src/lcd/menu/menu_bed_corners.cpp 파일 보기

@@ -179,7 +179,7 @@ static void _lcd_level_bed_corners_get_next_position() {
179 179
     // Display # of good points found vs total needed
180 180
     if (PAGE_CONTAINS(y - (MENU_FONT_HEIGHT), y)) {
181 181
       SETCURSOR(TERN(TFT_COLOR_UI, 2, 0), cy);
182
-      lcd_put_u8str_P(GET_TEXT(MSG_BED_TRAMMING_GOOD_POINTS));
182
+      lcd_put_u8str_(GET_TEXT_F(MSG_BED_TRAMMING_GOOD_POINTS));
183 183
       IF_ENABLED(TFT_COLOR_UI, lcd_moveto(12, cy));
184 184
       lcd_put_u8str(GOOD_POINTS_TO_STR(good_points));
185 185
       lcd_put_wchar('/');
@@ -192,7 +192,7 @@ static void _lcd_level_bed_corners_get_next_position() {
192 192
     // Display the Last Z value
193 193
     if (PAGE_CONTAINS(y - (MENU_FONT_HEIGHT), y)) {
194 194
       SETCURSOR(TERN(TFT_COLOR_UI, 2, 0), cy);
195
-      lcd_put_u8str_P(GET_TEXT(MSG_BED_TRAMMING_LAST_Z));
195
+      lcd_put_u8str(GET_TEXT_F(MSG_BED_TRAMMING_LAST_Z));
196 196
       IF_ENABLED(TFT_COLOR_UI, lcd_moveto(12, 2));
197 197
       lcd_put_u8str(LAST_Z_TO_STR(last_z));
198 198
     }

+ 2
- 2
Marlin/src/lcd/menu/menu_mixer.cpp 파일 보기

@@ -57,7 +57,7 @@
57 57
     if (ui.should_draw()) {
58 58
       char tmp[16];
59 59
       SETCURSOR(1, (LCD_HEIGHT - 1) / 2);
60
-      lcd_put_u8str_P(isend ? GET_TEXT(MSG_END_Z) : GET_TEXT(MSG_START_Z));
60
+      lcd_put_u8str(isend ? GET_TEXT_F(MSG_END_Z) : GET_TEXT_F(MSG_START_Z));
61 61
       sprintf_P(tmp, PSTR("%4d.%d mm"), int(zvar), int(zvar * 10) % 10);
62 62
       SETCURSOR_RJ(9, (LCD_HEIGHT - 1) / 2);
63 63
       lcd_put_u8str(tmp);
@@ -114,7 +114,7 @@ static uint8_t v_index;
114 114
   void _lcd_draw_mix(const uint8_t y) {
115 115
     char tmp[20]; // "100%_100%"
116 116
     sprintf_P(tmp, PSTR("%3d%% %3d%%"), int(mixer.mix[0]), int(mixer.mix[1]));
117
-    SETCURSOR(2, y); lcd_put_u8str_P(GET_TEXT(MSG_MIX));
117
+    SETCURSOR(2, y); lcd_put_u8str(GET_TEXT_F(MSG_MIX));
118 118
     SETCURSOR_RJ(10, y); lcd_put_u8str(tmp);
119 119
   }
120 120
 #endif

+ 2
- 2
Marlin/src/lcd/menu/menu_tune.cpp 파일 보기

@@ -73,12 +73,12 @@
73 73
           TERN_(HAS_MARLINUI_U8GLIB, ui.set_font(FONT_MENU));
74 74
           #if ENABLED(TFT_COLOR_UI)
75 75
             lcd_moveto(4, 3);
76
-            lcd_put_u8str_P(GET_TEXT(MSG_BABYSTEP_TOTAL));
76
+            lcd_put_u8str(GET_TEXT_F(MSG_BABYSTEP_TOTAL));
77 77
             lcd_put_wchar(':');
78 78
             lcd_moveto(10, 3);
79 79
           #else
80 80
             lcd_moveto(0, TERN(HAS_MARLINUI_U8GLIB, LCD_PIXEL_HEIGHT - MENU_FONT_DESCENT, LCD_HEIGHT - 1));
81
-            lcd_put_u8str_P(GET_TEXT(MSG_BABYSTEP_TOTAL));
81
+            lcd_put_u8str(GET_TEXT_F(MSG_BABYSTEP_TOTAL));
82 82
             lcd_put_wchar(':');
83 83
           #endif
84 84
           lcd_put_u8str(BABYSTEP_TO_STR(mps * babystep.axis_total[BS_TOTAL_IND(axis)]));

+ 2
- 2
Marlin/src/lcd/tft/ui_common.cpp 파일 보기

@@ -105,9 +105,9 @@ int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length) {
105 105
   return tft_string.width();
106 106
 }
107 107
 
108
-int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) {
108
+int lcd_put_u8str_max_P(PGM_P utf8_pstr, pixel_len_t max_length) {
109 109
   if (max_length < 1) return 0;
110
-  tft_string.set(utf8_str_P);
110
+  tft_string.set(utf8_pstr);
111 111
   tft_string.trim();
112 112
   tft_string.truncate(max_length);
113 113
   tft.add_text(MENU_TEXT_X_OFFSET, MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string);

Loading…
취소
저장