Browse Source

Add NUL_STR global

Scott Lahteine 4 years ago
parent
commit
15f94e5ee5

+ 2
- 1
Marlin/src/Marlin.cpp View File

@@ -184,7 +184,8 @@
184 184
 const char G28_STR[] PROGMEM = "G28",
185 185
            M21_STR[] PROGMEM = "M21",
186 186
            M23_STR[] PROGMEM = "M23 %s",
187
-           M24_STR[] PROGMEM = "M24";
187
+           M24_STR[] PROGMEM = "M24",
188
+           NUL_STR[] PROGMEM = "";
188 189
 
189 190
 bool Running = true;
190 191
 

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

@@ -377,4 +377,4 @@ void protected_pin_err();
377 377
   void event_probe_failure();
378 378
 #endif
379 379
 
380
-extern const char G28_STR[], M21_STR[], M23_STR[], M24_STR[];
380
+extern const char G28_STR[], M21_STR[], M23_STR[], M24_STR[], NUL_STR[];

+ 2
- 1
Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp View File

@@ -464,7 +464,8 @@ void MarlinUI::clear_lcd() { lcd.clear(); }
464 464
       // Show the Marlin logo and short build version
465 465
       // After a delay show the website URL
466 466
       //
467
-      logo_lines(PSTR(""));
467
+      extern const char NUL_STR[];
468
+      logo_lines(NUL_STR);
468 469
       CENTER_OR_SCROLL(SHORT_BUILD_VERSION, 1500);
469 470
       CENTER_OR_SCROLL(MARLIN_WEBSITE_URL, 1500);
470 471
       #ifdef STRING_SPLASH_LINE3

+ 2
- 1
Marlin/src/lcd/extui_dgus_lcd.cpp View File

@@ -44,7 +44,8 @@ namespace ExtUI {
44 44
   void onIdle() { ScreenHandler.loop(); }
45 45
 
46 46
   void onPrinterKilled(PGM_P error, PGM_P component) {
47
-    ScreenHandler.sendinfoscreen(GET_TEXT(MSG_HALTED), error, PSTR(""), GET_TEXT(MSG_PLEASE_RESET), true, true, true, true);
47
+    extern const char NUL_STR[];
48
+    ScreenHandler.sendinfoscreen(GET_TEXT(MSG_HALTED), error, NUL_STR, GET_TEXT(MSG_PLEASE_RESET), true, true, true, true);
48 49
     ScreenHandler.GotoScreen(DGUSLCD_SCREEN_KILL);
49 50
     while (!ScreenHandler.loop());  // Wait while anything is left to be sent
50 51
   }

+ 2
- 1
Marlin/src/lcd/menu/menu_motion.cpp View File

@@ -256,7 +256,8 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
256 256
     SUBMENU(MSG_MOVE_1MM,  []{ _goto_manual_move( 1);    });
257 257
     SUBMENU(MSG_MOVE_01MM, []{ _goto_manual_move( 0.1f); });
258 258
     if (axis == Z_AXIS && (SHORT_MANUAL_Z_MOVE) > 0.0f && (SHORT_MANUAL_Z_MOVE) < 0.1f) {
259
-      SUBMENU_P(PSTR(""), []{ _goto_manual_move(float(SHORT_MANUAL_Z_MOVE)); });
259
+      extern const char NUL_STR[];
260
+      SUBMENU_P(NUL_STR, []{ _goto_manual_move(float(SHORT_MANUAL_Z_MOVE)); });
260 261
       MENU_ITEM_ADDON_START(0);
261 262
         char tmp[20], numstr[10];
262 263
         // Determine digits needed right of decimal

+ 1
- 1
Marlin/src/module/temperature.cpp View File

@@ -539,7 +539,7 @@ volatile bool Temperature::temp_meas_ready = false;
539 539
         SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_FINISHED);
540 540
 
541 541
         #if HAS_PID_FOR_BOTH
542
-          const char * const estring = GHV(PSTR("bed"), PSTR(""));
542
+          const char * const estring = GHV(PSTR("bed"), NUL_STR);
543 543
           say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp);
544 544
           say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki);
545 545
           say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Kd ", tune_pid.Kd);

Loading…
Cancel
Save