Browse Source

🎨 Apply F() to G-code suite and queue

Scott Lahteine 2 years ago
parent
commit
417e2530eb
39 changed files with 136 additions and 134 deletions
  1. 5
    5
      Marlin/src/MarlinCore.cpp
  2. 1
    1
      Marlin/src/feature/mmu/mmu2.cpp
  3. 1
    1
      Marlin/src/feature/powerloss.cpp
  4. 1
    1
      Marlin/src/feature/runout.cpp
  5. 1
    1
      Marlin/src/gcode/bedlevel/mbl/G29.cpp
  6. 4
    4
      Marlin/src/gcode/queue.cpp
  7. 5
    3
      Marlin/src/gcode/queue.h
  8. 8
    8
      Marlin/src/lcd/e3v2/creality/dwin.cpp
  9. 13
    13
      Marlin/src/lcd/e3v2/enhanced/dwin.cpp
  10. 7
    7
      Marlin/src/lcd/e3v2/jyersui/dwin.cpp
  11. 1
    1
      Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp
  12. 2
    2
      Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp
  13. 2
    2
      Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp
  14. 27
    27
      Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp
  15. 2
    2
      Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp
  16. 9
    9
      Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp
  17. 3
    3
      Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp
  18. 1
    1
      Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp
  19. 2
    2
      Marlin/src/lcd/extui/mks_ui/draw_extrusion.cpp
  20. 5
    5
      Marlin/src/lcd/extui/mks_ui/draw_home.cpp
  21. 6
    6
      Marlin/src/lcd/extui/mks_ui/draw_more.cpp
  22. 1
    1
      Marlin/src/lcd/extui/mks_ui/draw_printing.cpp
  23. 1
    1
      Marlin/src/lcd/extui/mks_ui/draw_set.cpp
  24. 1
    1
      Marlin/src/lcd/extui/mks_ui/draw_tool.cpp
  25. 2
    2
      Marlin/src/lcd/extui/mks_ui/wifi_module.cpp
  26. 3
    3
      Marlin/src/lcd/marlinui.cpp
  27. 1
    1
      Marlin/src/lcd/menu/menu_advanced.cpp
  28. 1
    1
      Marlin/src/lcd/menu/menu_bed_corners.cpp
  29. 4
    4
      Marlin/src/lcd/menu/menu_bed_leveling.cpp
  30. 3
    3
      Marlin/src/lcd/menu/menu_configuration.cpp
  31. 1
    1
      Marlin/src/lcd/menu/menu_filament.cpp
  32. 3
    3
      Marlin/src/lcd/menu/menu_item.h
  33. 1
    1
      Marlin/src/lcd/menu/menu_job_recovery.cpp
  34. 3
    3
      Marlin/src/lcd/menu/menu_main.cpp
  35. 1
    1
      Marlin/src/lcd/menu/menu_probe_offset.cpp
  36. 1
    1
      Marlin/src/lcd/menu/menu_tramming.cpp
  37. 1
    1
      Marlin/src/lcd/tft/ui_1024x600.cpp
  38. 1
    1
      Marlin/src/lcd/tft/ui_320x240.cpp
  39. 1
    1
      Marlin/src/lcd/tft/ui_480x320.cpp

+ 5
- 5
Marlin/src/MarlinCore.cpp View File

357
     TERN_(POWER_LOSS_RECOVERY, recovery.purge());
357
     TERN_(POWER_LOSS_RECOVERY, recovery.purge());
358
 
358
 
359
     #ifdef EVENT_GCODE_SD_ABORT
359
     #ifdef EVENT_GCODE_SD_ABORT
360
-      queue.inject_P(PSTR(EVENT_GCODE_SD_ABORT));
360
+      queue.inject(F(EVENT_GCODE_SD_ABORT));
361
     #endif
361
     #endif
362
 
362
 
363
     TERN_(PASSWORD_AFTER_SD_PRINT_ABORT, password.lock_machine());
363
     TERN_(PASSWORD_AFTER_SD_PRINT_ABORT, password.lock_machine());
364
   }
364
   }
365
 
365
 
366
   inline void finishSDPrinting() {
366
   inline void finishSDPrinting() {
367
-    if (queue.enqueue_one_P(PSTR("M1001"))) { // Keep trying until it gets queued
368
-      marlin_state = MF_RUNNING;              // Signal to stop trying
367
+    if (queue.enqueue_one(F("M1001"))) {  // Keep trying until it gets queued
368
+      marlin_state = MF_RUNNING;          // Signal to stop trying
369
       TERN_(PASSWORD_AFTER_SD_PRINT_END, password.lock_machine());
369
       TERN_(PASSWORD_AFTER_SD_PRINT_END, password.lock_machine());
370
       TERN_(DGUS_LCD_UI_MKS, ScreenHandler.SDPrintingFinished());
370
       TERN_(DGUS_LCD_UI_MKS, ScreenHandler.SDPrintingFinished());
371
     }
371
     }
493
         if (ELAPSED(ms, next_cub_ms_##N)) {                            \
493
         if (ELAPSED(ms, next_cub_ms_##N)) {                            \
494
           next_cub_ms_##N = ms + CUB_DEBOUNCE_DELAY_##N;               \
494
           next_cub_ms_##N = ms + CUB_DEBOUNCE_DELAY_##N;               \
495
           CODE;                                                        \
495
           CODE;                                                        \
496
-          queue.inject_P(PSTR(BUTTON##N##_GCODE));                     \
496
+          queue.inject(F(BUTTON##N##_GCODE));                     \
497
           TERN_(HAS_LCD_MENU, ui.quick_feedback());                    \
497
           TERN_(HAS_LCD_MENU, ui.quick_feedback());                    \
498
         }                                                              \
498
         }                                                              \
499
       }                                                                \
499
       }                                                                \
1521
 
1521
 
1522
   #ifdef STARTUP_COMMANDS
1522
   #ifdef STARTUP_COMMANDS
1523
     SETUP_LOG("STARTUP_COMMANDS");
1523
     SETUP_LOG("STARTUP_COMMANDS");
1524
-    queue.inject_P(PSTR(STARTUP_COMMANDS));
1524
+    queue.inject(F(STARTUP_COMMANDS));
1525
   #endif
1525
   #endif
1526
 
1526
 
1527
   #if ENABLED(HOST_PROMPT_SUPPORT)
1527
   #if ENABLED(HOST_PROMPT_SUPPORT)

+ 1
- 1
Marlin/src/feature/mmu/mmu2.cpp View File

842
 }
842
 }
843
 
843
 
844
 void MMU2::filament_runout() {
844
 void MMU2::filament_runout() {
845
-  queue.inject_P(PSTR(MMU2_FILAMENT_RUNOUT_SCRIPT));
845
+  queue.inject(F(MMU2_FILAMENT_RUNOUT_SCRIPT));
846
   planner.synchronize();
846
   planner.synchronize();
847
 }
847
 }
848
 
848
 

+ 1
- 1
Marlin/src/feature/powerloss.cpp View File

109
   if (card.isMounted()) {
109
   if (card.isMounted()) {
110
     load();
110
     load();
111
     if (!valid()) return cancel();
111
     if (!valid()) return cancel();
112
-    queue.inject_P(PSTR("M1000S"));
112
+    queue.inject(F("M1000S"));
113
   }
113
   }
114
 }
114
 }
115
 
115
 

+ 1
- 1
Marlin/src/feature/runout.cpp View File

140
         SERIAL_ECHOPGM("Runout Command: ");
140
         SERIAL_ECHOPGM("Runout Command: ");
141
         SERIAL_ECHOLNPGM(FILAMENT_RUNOUT_SCRIPT);
141
         SERIAL_ECHOLNPGM(FILAMENT_RUNOUT_SCRIPT);
142
       #endif
142
       #endif
143
-      queue.inject_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
143
+      queue.inject(F(FILAMENT_RUNOUT_SCRIPT));
144
     #endif
144
     #endif
145
   }
145
   }
146
 }
146
 }

+ 1
- 1
Marlin/src/gcode/bedlevel/mbl/G29.cpp View File

103
       mbl.reset();
103
       mbl.reset();
104
       mbl_probe_index = 0;
104
       mbl_probe_index = 0;
105
       if (!ui.wait_for_move) {
105
       if (!ui.wait_for_move) {
106
-        queue.inject_P(parser.seen_test('N') ? PSTR("G28" TERN(CAN_SET_LEVELING_AFTER_G28, "L0", "") "\nG29S2") : PSTR("G29S2"));
106
+        queue.inject(parser.seen_test('N') ? F("G28" TERN(CAN_SET_LEVELING_AFTER_G28, "L0", "") "\nG29S2") : F("G29S2"));
107
         TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart());
107
         TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart());
108
         return;
108
         return;
109
       }
109
       }

+ 4
- 4
Marlin/src/gcode/queue.cpp View File

126
  * Enqueue with Serial Echo
126
  * Enqueue with Serial Echo
127
  * Return true if the command was consumed
127
  * Return true if the command was consumed
128
  */
128
  */
129
-bool GCodeQueue::enqueue_one(const char *cmd) {
129
+bool GCodeQueue::enqueue_one(const char * const cmd) {
130
   //SERIAL_ECHOLNPGM("enqueue_one(\"", cmd, "\")");
130
   //SERIAL_ECHOLNPGM("enqueue_one(\"", cmd, "\")");
131
 
131
 
132
   if (*cmd == 0 || ISEOL(*cmd)) return true;
132
   if (*cmd == 0 || ISEOL(*cmd)) return true;
195
  * Enqueue and return only when commands are actually enqueued.
195
  * Enqueue and return only when commands are actually enqueued.
196
  * Never call this from a G-code handler!
196
  * Never call this from a G-code handler!
197
  */
197
  */
198
-void GCodeQueue::enqueue_one_now(const char *cmd) { while (!enqueue_one(cmd)) idle(); }
198
+void GCodeQueue::enqueue_one_now(const char * const cmd) { while (!enqueue_one(cmd)) idle(); }
199
 
199
 
200
 /**
200
 /**
201
  * Attempt to enqueue a single G-code command
201
  * Attempt to enqueue a single G-code command
202
  * and return 'true' if successful.
202
  * and return 'true' if successful.
203
  */
203
  */
204
-bool GCodeQueue::enqueue_one_P(PGM_P const pgcode) {
204
+bool GCodeQueue::enqueue_one(FSTR_P const fgcode) {
205
   size_t i = 0;
205
   size_t i = 0;
206
-  PGM_P p = pgcode;
206
+  PGM_P p = FTOP(fgcode);
207
   char c;
207
   char c;
208
   while ((c = pgm_read_byte(&p[i])) && c != '\n') i++;
208
   while ((c = pgm_read_byte(&p[i])) && c != '\n') i++;
209
   char cmd[i + 1];
209
   char cmd[i + 1];

+ 5
- 3
Marlin/src/gcode/queue.h View File

127
    * Aborts the current PROGMEM queue so only use for one or two commands.
127
    * Aborts the current PROGMEM queue so only use for one or two commands.
128
    */
128
    */
129
   static inline void inject_P(PGM_P const pgcode) { injected_commands_P = pgcode; }
129
   static inline void inject_P(PGM_P const pgcode) { injected_commands_P = pgcode; }
130
+  static inline void inject(FSTR_P const fgcode) { inject_P(FTOP(fgcode)); }
130
 
131
 
131
   /**
132
   /**
132
    * Enqueue command(s) to run from SRAM. Drained by process_injected_command().
133
    * Enqueue command(s) to run from SRAM. Drained by process_injected_command().
139
   /**
140
   /**
140
    * Enqueue and return only when commands are actually enqueued
141
    * Enqueue and return only when commands are actually enqueued
141
    */
142
    */
142
-  static void enqueue_one_now(const char *cmd);
143
+  static void enqueue_one_now(const char * const cmd);
143
 
144
 
144
   /**
145
   /**
145
    * Attempt to enqueue a single G-code command
146
    * Attempt to enqueue a single G-code command
146
    * and return 'true' if successful.
147
    * and return 'true' if successful.
147
    */
148
    */
148
-  static bool enqueue_one_P(PGM_P const pgcode);
149
+  static bool enqueue_one(FSTR_P const fgcode);
149
 
150
 
150
   /**
151
   /**
151
    * Enqueue from program memory and return only when commands are actually enqueued
152
    * Enqueue from program memory and return only when commands are actually enqueued
152
    */
153
    */
153
-  static void enqueue_now_P(PGM_P const cmd);
154
+  static void enqueue_now_P(PGM_P const pcmd);
155
+  static inline void enqueue_now(FSTR_P const fcmd) { enqueue_now_P(FTOP(fcmd)); }
154
 
156
 
155
   /**
157
   /**
156
    * Check whether there are any commands yet to be executed
158
    * Check whether there are any commands yet to be executed

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

2352
     if (select_print.now == PRINT_PAUSE_RESUME) {
2352
     if (select_print.now == PRINT_PAUSE_RESUME) {
2353
       if (HMI_flag.select_flag) {
2353
       if (HMI_flag.select_flag) {
2354
         HMI_flag.pause_action = true;
2354
         HMI_flag.pause_action = true;
2355
-        queue.inject_P(PSTR("M25"));
2355
+        queue.inject(F("M25"));
2356
       }
2356
       }
2357
       Goto_PrintProcess();
2357
       Goto_PrintProcess();
2358
     }
2358
     }
2711
         #endif
2711
         #endif
2712
         break;
2712
         break;
2713
 
2713
 
2714
-      case PREPARE_CASE_DISA: queue.inject_P(PSTR("M84")); break;
2714
+      case PREPARE_CASE_DISA: queue.inject(F("M84")); break;
2715
 
2715
 
2716
       case PREPARE_CASE_HOME: // Homing
2716
       case PREPARE_CASE_HOME: // Homing
2717
         checkkey = Last_Prepare;
2717
         checkkey = Last_Prepare;
2729
             EncoderRate.enabled = true;
2729
             EncoderRate.enabled = true;
2730
           #else
2730
           #else
2731
             // Apply workspace offset, making the current position 0,0,0
2731
             // Apply workspace offset, making the current position 0,0,0
2732
-            queue.inject_P(PSTR("G92 X0 Y0 Z0"));
2732
+            queue.inject(F("G92 X0 Y0 Z0"));
2733
             HMI_AudioFeedback();
2733
             HMI_AudioFeedback();
2734
           #endif
2734
           #endif
2735
           break;
2735
           break;
2944
   void HMI_Leveling() {
2944
   void HMI_Leveling() {
2945
     Popup_Window_Leveling();
2945
     Popup_Window_Leveling();
2946
     DWIN_UpdateLCD();
2946
     DWIN_UpdateLCD();
2947
-    queue.inject_P(PSTR("G28O\nG29"));
2947
+    queue.inject(F("G28O\nG29"));
2948
   }
2948
   }
2949
 #endif
2949
 #endif
2950
 
2950
 
3803
             EncoderRate.enabled = true;
3803
             EncoderRate.enabled = true;
3804
           #else
3804
           #else
3805
             // Apply workspace offset, making the current position 0,0,0
3805
             // Apply workspace offset, making the current position 0,0,0
3806
-            queue.inject_P(PSTR("G92 X0 Y0 Z0"));
3806
+            queue.inject(F("G92 X0 Y0 Z0"));
3807
             HMI_AudioFeedback();
3807
             HMI_AudioFeedback();
3808
           #endif
3808
           #endif
3809
         break;
3809
         break;
4112
       TERN_(HAS_HEATED_BED, resume_bed_temp = thermalManager.degTargetBed());
4112
       TERN_(HAS_HEATED_BED, resume_bed_temp = thermalManager.degTargetBed());
4113
       thermalManager.disable_all_heaters();
4113
       thermalManager.disable_all_heaters();
4114
     #endif
4114
     #endif
4115
-    queue.inject_P(PSTR("G1 F1200 X0 Y0"));
4115
+    queue.inject(F("G1 F1200 X0 Y0"));
4116
   }
4116
   }
4117
 
4117
 
4118
   if (card.isPrinting() && checkkey == PrintProcess) { // print process
4118
   if (card.isPrinting() && checkkey == PrintProcess) { // print process
4182
           if (encoder_diffState == ENCODER_DIFF_ENTER) {
4182
           if (encoder_diffState == ENCODER_DIFF_ENTER) {
4183
             recovery_flag = false;
4183
             recovery_flag = false;
4184
             if (HMI_flag.select_flag) break;
4184
             if (HMI_flag.select_flag) break;
4185
-            TERN_(POWER_LOSS_RECOVERY, queue.inject_P(PSTR("M1000C")));
4185
+            TERN_(POWER_LOSS_RECOVERY, queue.inject(F("M1000C")));
4186
             HMI_StartFrame(true);
4186
             HMI_StartFrame(true);
4187
             return;
4187
             return;
4188
           }
4188
           }
4195
 
4195
 
4196
       select_print.set(0);
4196
       select_print.set(0);
4197
       HMI_ValueStruct.show_mode = 0;
4197
       HMI_ValueStruct.show_mode = 0;
4198
-      queue.inject_P(PSTR("M1000"));
4198
+      queue.inject(F("M1000"));
4199
       Goto_PrintProcess();
4199
       Goto_PrintProcess();
4200
       Draw_Status_Area(true);
4200
       Draw_Status_Area(true);
4201
     }
4201
     }

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

1157
 
1157
 
1158
       case PAGE_INFO_LEVELING:
1158
       case PAGE_INFO_LEVELING:
1159
         #if HAS_ONESTEP_LEVELING
1159
         #if HAS_ONESTEP_LEVELING
1160
-          queue.inject_P(PSTR("G28XYO\nG28Z\nG29"));  // TODO: 'G29' should be homing when needed. Does it make sense for every LCD to do this differently?
1160
+          queue.inject(F("G28XYO\nG28Z\nG29"));  // TODO: 'G29' should be homing when needed. Does it make sense for every LCD to do this differently?
1161
         #else
1161
         #else
1162
           checkkey = Info;
1162
           checkkey = Info;
1163
           Draw_Info_Menu();
1163
           Draw_Info_Menu();
1376
       if (HMI_flag.select_flag) {
1376
       if (HMI_flag.select_flag) {
1377
         HMI_flag.pause_action = true;
1377
         HMI_flag.pause_action = true;
1378
         ICON_Resume();
1378
         ICON_Resume();
1379
-        queue.inject_P(PSTR("M25"));
1379
+        queue.inject(F("M25"));
1380
       }
1380
       }
1381
       else {
1381
       else {
1382
         // cancel pause
1382
         // cancel pause
1510
       TERN_(HAS_FAN, resume_fan = thermalManager.fan_speed[0]);
1510
       TERN_(HAS_FAN, resume_fan = thermalManager.fan_speed[0]);
1511
     #endif
1511
     #endif
1512
     IF_DISABLED(ADVANCED_PAUSE_FEATURE, thermalManager.disable_all_heaters());
1512
     IF_DISABLED(ADVANCED_PAUSE_FEATURE, thermalManager.disable_all_heaters());
1513
-    IF_DISABLED(PARK_HEAD_ON_PAUSE, queue.inject_P(PSTR("G1 F1200 X0 Y0")));
1513
+    IF_DISABLED(PARK_HEAD_ON_PAUSE, queue.inject(F("G1 F1200 X0 Y0")));
1514
   }
1514
   }
1515
 
1515
 
1516
   if (checkkey == PrintProcess) { // print process
1516
   if (checkkey == PrintProcess) { // print process
1588
           if (encoder_diffState == ENCODER_DIFF_ENTER) {
1588
           if (encoder_diffState == ENCODER_DIFF_ENTER) {
1589
             recovery_flag = false;
1589
             recovery_flag = false;
1590
             if (HMI_flag.select_flag) break;
1590
             if (HMI_flag.select_flag) break;
1591
-            TERN_(POWER_LOSS_RECOVERY, queue.inject_P(PSTR("M1000C")));
1591
+            TERN_(POWER_LOSS_RECOVERY, queue.inject(F("M1000C")));
1592
             return HMI_StartFrame(true);
1592
             return HMI_StartFrame(true);
1593
           }
1593
           }
1594
           else
1594
           else
1600
       }
1600
       }
1601
 
1601
 
1602
       select_print.set(PRINT_SETUP);
1602
       select_print.set(PRINT_SETUP);
1603
-      queue.inject_P(PSTR("M1000"));
1603
+      queue.inject(F("M1000"));
1604
       sdprint = true;
1604
       sdprint = true;
1605
       Goto_PrintProcess();
1605
       Goto_PrintProcess();
1606
       Draw_Status_Area(true);
1606
       Draw_Status_Area(true);
2086
   Draw_Info_Menu();
2086
   Draw_Info_Menu();
2087
 }
2087
 }
2088
 
2088
 
2089
-void DisableMotors() { queue.inject_P(PSTR("M84")); }
2089
+void DisableMotors() { queue.inject(F("M84")); }
2090
 
2090
 
2091
 void AutoHome() { queue.inject_P(G28_STR); }
2091
 void AutoHome() { queue.inject_P(G28_STR); }
2092
 
2092
 
2093
 void SetHome() {
2093
 void SetHome() {
2094
   // Apply workspace offset, making the current position 0,0,0
2094
   // Apply workspace offset, making the current position 0,0,0
2095
-  queue.inject_P(PSTR("G92 X0 Y0 Z0"));
2095
+  queue.inject(F("G92 X0 Y0 Z0"));
2096
   HMI_AudioFeedback();
2096
   HMI_AudioFeedback();
2097
 }
2097
 }
2098
 
2098
 
2239
   void SetProbeOffsetZ() { SetPFloatOnClick(-10, 10, 2); }
2239
   void SetProbeOffsetZ() { SetPFloatOnClick(-10, 10, 2); }
2240
   void ProbeTest() {
2240
   void ProbeTest() {
2241
     ui.set_status_P(GET_TEXT(MSG_M48_TEST));
2241
     ui.set_status_P(GET_TEXT(MSG_M48_TEST));
2242
-    queue.inject_P(PSTR("G28O\nM48 P10"));
2242
+    queue.inject(F("G28O\nM48 P10"));
2243
   }
2243
   }
2244
 #endif
2244
 #endif
2245
 
2245
 
2319
 
2319
 
2320
   void ChangeFilament() {
2320
   void ChangeFilament() {
2321
     HMI_SaveProcessID(NothingToDo);
2321
     HMI_SaveProcessID(NothingToDo);
2322
-    queue.inject_P(PSTR("M600 B2"));
2322
+    queue.inject(F("M600 B2"));
2323
   }
2323
   }
2324
 
2324
 
2325
   void ParkHead(){
2325
   void ParkHead(){
2326
     ui.set_status_P(GET_TEXT(MSG_FILAMENT_PARK_ENABLED));
2326
     ui.set_status_P(GET_TEXT(MSG_FILAMENT_PARK_ENABLED));
2327
-    queue.inject_P(PSTR("G28O\nG27"));
2327
+    queue.inject(F("G28O\nG27"));
2328
   }
2328
   }
2329
 
2329
 
2330
   #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
2330
   #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
2331
     void UnloadFilament(){
2331
     void UnloadFilament(){
2332
       ui.set_status_P(GET_TEXT(MSG_FILAMENTUNLOAD));
2332
       ui.set_status_P(GET_TEXT(MSG_FILAMENTUNLOAD));
2333
-      queue.inject_P(PSTR("M702 Z20"));
2333
+      queue.inject(F("M702 Z20"));
2334
     }
2334
     }
2335
 
2335
 
2336
     void LoadFilament(){
2336
     void LoadFilament(){
2337
       ui.set_status_P(GET_TEXT(MSG_FILAMENTLOAD));
2337
       ui.set_status_P(GET_TEXT(MSG_FILAMENTLOAD));
2338
-      queue.inject_P(PSTR("M701 Z20"));
2338
+      queue.inject(F("M701 Z20"));
2339
     }
2339
     }
2340
   #endif
2340
   #endif
2341
 
2341
 
2433
 
2433
 
2434
   void ManualMeshSave(){
2434
   void ManualMeshSave(){
2435
     ui.set_status_P(GET_TEXT(MSG_UBL_STORAGE_MESH_MENU));
2435
     ui.set_status_P(GET_TEXT(MSG_UBL_STORAGE_MESH_MENU));
2436
-    queue.inject_P(PSTR("M211 S1\nM500"));
2436
+    queue.inject(F("M211 S1\nM500"));
2437
   }
2437
   }
2438
 
2438
 
2439
 #endif // MESH_BED_LEVELING
2439
 #endif // MESH_BED_LEVELING

+ 7
- 7
Marlin/src/lcd/e3v2/jyersui/dwin.cpp View File

1055
           if (draw)
1055
           if (draw)
1056
             Draw_Menu_Item(row, ICON_CloseMotor, F("Disable Stepper"));
1056
             Draw_Menu_Item(row, ICON_CloseMotor, F("Disable Stepper"));
1057
           else
1057
           else
1058
-            queue.inject_P(PSTR("M84"));
1058
+            queue.inject(F("M84"));
1059
           break;
1059
           break;
1060
         case PREPARE_HOME:
1060
         case PREPARE_HOME:
1061
           if (draw)
1061
           if (draw)
4499
               #endif
4499
               #endif
4500
               TERN_(HAS_FAN, thermalManager.fan_speed[0] = pausefan);
4500
               TERN_(HAS_FAN, thermalManager.fan_speed[0] = pausefan);
4501
               planner.synchronize();
4501
               planner.synchronize();
4502
-              TERN_(SDSUPPORT, queue.inject_P(PSTR("M24")));
4502
+              TERN_(SDSUPPORT, queue.inject(F("M24")));
4503
             #endif
4503
             #endif
4504
           }
4504
           }
4505
           else {
4505
           else {
4541
                 if (IS_SD_PRINTING()) card.pauseSDPrint();
4541
                 if (IS_SD_PRINTING()) card.pauseSDPrint();
4542
               #endif
4542
               #endif
4543
               planner.synchronize();
4543
               planner.synchronize();
4544
-              queue.inject_P(PSTR("M125"));
4544
+              queue.inject(F("M125"));
4545
               planner.synchronize();
4545
               planner.synchronize();
4546
             #else
4546
             #else
4547
-              queue.inject_P(PSTR("M25"));
4547
+              queue.inject(F("M25"));
4548
               TERN_(HAS_HOTEND, pausetemp = thermalManager.temp_hotend[0].target);
4548
               TERN_(HAS_HOTEND, pausetemp = thermalManager.temp_hotend[0].target);
4549
               TERN_(HAS_HEATED_BED, pausebed = thermalManager.temp_bed.target);
4549
               TERN_(HAS_HEATED_BED, pausebed = thermalManager.temp_bed.target);
4550
               TERN_(HAS_FAN, pausefan = thermalManager.fan_speed[0]);
4550
               TERN_(HAS_FAN, pausefan = thermalManager.fan_speed[0]);
4574
         break;
4574
         break;
4575
       case Resume:
4575
       case Resume:
4576
         if (selection == 0)
4576
         if (selection == 0)
4577
-          queue.inject_P(PSTR("M1000"));
4577
+          queue.inject(F("M1000"));
4578
         else {
4578
         else {
4579
-          queue.inject_P(PSTR("M1000 C"));
4579
+          queue.inject(F("M1000 C"));
4580
           Draw_Main_Menu();
4580
           Draw_Main_Menu();
4581
         }
4581
         }
4582
         break;
4582
         break;
5008
     static bool init = true;
5008
     static bool init = true;
5009
     if (init) {
5009
     if (init) {
5010
       init = false;
5010
       init = false;
5011
-      queue.inject_P(PSTR("M1000 S"));
5011
+      queue.inject(F("M1000 S"));
5012
     }
5012
     }
5013
   #endif
5013
   #endif
5014
 }
5014
 }

+ 1
- 1
Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp View File

683
   void DGUSScreenHandler::HandlePowerLossRecovery(DGUS_VP_Variable &var, void *val_ptr) {
683
   void DGUSScreenHandler::HandlePowerLossRecovery(DGUS_VP_Variable &var, void *val_ptr) {
684
     uint16_t value = swap16(*(uint16_t*)val_ptr);
684
     uint16_t value = swap16(*(uint16_t*)val_ptr);
685
     if (value) {
685
     if (value) {
686
-      queue.inject_P(PSTR("M1000"));
686
+      queue.inject(F("M1000"));
687
       dgusdisplay.WriteVariable(VP_SD_Print_Filename, filelist.filename(), 32, true);
687
       dgusdisplay.WriteVariable(VP_SD_Print_Filename, filelist.filename(), 32, true);
688
       GotoScreen(PLR_SCREEN_RECOVER);
688
       GotoScreen(PLR_SCREEN_RECOVER);
689
     }
689
     }

+ 2
- 2
Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp View File

205
     bool old_relative_mode = relative_mode;
205
     bool old_relative_mode = relative_mode;
206
     if (!relative_mode) {
206
     if (!relative_mode) {
207
       //DEBUG_ECHOPGM(" G91");
207
       //DEBUG_ECHOPGM(" G91");
208
-      queue.enqueue_now_P(PSTR("G91"));
208
+      queue.enqueue_now(F("G91"));
209
       //DEBUG_ECHOPGM(" ✓ ");
209
       //DEBUG_ECHOPGM(" ✓ ");
210
     }
210
     }
211
     char buf[32]; // G1 X9999.99 F12345
211
     char buf[32]; // G1 X9999.99 F12345
227
     //DEBUG_ECHOLNPGM(" ✓ ");
227
     //DEBUG_ECHOLNPGM(" ✓ ");
228
     if (!old_relative_mode) {
228
     if (!old_relative_mode) {
229
       //DEBUG_ECHOPGM("G90");
229
       //DEBUG_ECHOPGM("G90");
230
-      queue.enqueue_now_P(PSTR("G90"));
230
+      queue.enqueue_now(F("G90"));
231
       //DEBUG_ECHOPGM(" ✓ ");
231
       //DEBUG_ECHOPGM(" ✓ ");
232
     }
232
     }
233
   }
233
   }

+ 2
- 2
Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp View File

205
     bool old_relative_mode = relative_mode;
205
     bool old_relative_mode = relative_mode;
206
     if (!relative_mode) {
206
     if (!relative_mode) {
207
       //DEBUG_ECHOPGM(" G91");
207
       //DEBUG_ECHOPGM(" G91");
208
-      queue.enqueue_now_P(PSTR("G91"));
208
+      queue.enqueue_now(F("G91"));
209
       //DEBUG_ECHOPGM(" ✓ ");
209
       //DEBUG_ECHOPGM(" ✓ ");
210
     }
210
     }
211
     char buf[32]; // G1 X9999.99 F12345
211
     char buf[32]; // G1 X9999.99 F12345
227
     //DEBUG_ECHOLNPGM(" ✓ ");
227
     //DEBUG_ECHOLNPGM(" ✓ ");
228
     if (!old_relative_mode) {
228
     if (!old_relative_mode) {
229
       //DEBUG_ECHOPGM("G90");
229
       //DEBUG_ECHOPGM("G90");
230
-      queue.enqueue_now_P(PSTR("G90"));
230
+      queue.enqueue_now(F("G90"));
231
       //DEBUG_ECHOPGM(" ✓ ");
231
       //DEBUG_ECHOPGM(" ✓ ");
232
     }
232
     }
233
   }
233
   }

+ 27
- 27
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp View File

450
           a_first_level = 0;
450
           a_first_level = 0;
451
           queue.enqueue_now_P(G28_STR);
451
           queue.enqueue_now_P(G28_STR);
452
         }
452
         }
453
-        queue.enqueue_now_P(PSTR("G29"));
453
+        queue.enqueue_now(F("G29"));
454
 
454
 
455
       #elif ENABLED(MESH_BED_LEVELING)
455
       #elif ENABLED(MESH_BED_LEVELING)
456
 
456
 
512
         Deci2 = offset * 100;
512
         Deci2 = offset * 100;
513
         Deci2 = Deci2 % 10;
513
         Deci2 = Deci2 % 10;
514
         soft_endstop._enabled = false;
514
         soft_endstop._enabled = false;
515
-        queue.enqueue_now_P(PSTR("G91"));
515
+        queue.enqueue_now(F("G91"));
516
         snprintf_P(cmd_buf, 30, PSTR("G1 Z%d.%d%d"), integer, Deci, Deci2);
516
         snprintf_P(cmd_buf, 30, PSTR("G1 Z%d.%d%d"), integer, Deci, Deci2);
517
         queue.enqueue_one_now(cmd_buf);
517
         queue.enqueue_one_now(cmd_buf);
518
-        queue.enqueue_now_P(PSTR("G90"));
518
+        queue.enqueue_now(F("G90"));
519
         //soft_endstop._enabled = true;
519
         //soft_endstop._enabled = true;
520
         break;
520
         break;
521
 
521
 
527
         Deci2 = offset * 100;
527
         Deci2 = offset * 100;
528
         Deci2 = Deci2 % 10;
528
         Deci2 = Deci2 % 10;
529
         soft_endstop._enabled = false;
529
         soft_endstop._enabled = false;
530
-        queue.enqueue_now_P(PSTR("G91"));
530
+        queue.enqueue_now(F("G91"));
531
         snprintf_P(cmd_buf, 30, PSTR("G1 Z-%d.%d%d"), integer, Deci, Deci2);
531
         snprintf_P(cmd_buf, 30, PSTR("G1 Z-%d.%d%d"), integer, Deci, Deci2);
532
         queue.enqueue_one_now(cmd_buf);
532
         queue.enqueue_one_now(cmd_buf);
533
-        queue.enqueue_now_P(PSTR("G90"));
533
+        queue.enqueue_now(F("G90"));
534
         break;
534
         break;
535
 
535
 
536
       case 2:
536
       case 2:
537
         if (mesh_point_count == GRID_MAX_POINTS) { // The first point
537
         if (mesh_point_count == GRID_MAX_POINTS) { // The first point
538
 
538
 
539
-          queue.enqueue_now_P(PSTR("G28"));
540
-          queue.enqueue_now_P(PSTR("G29S1"));
539
+          queue.enqueue_now(F("G28"));
540
+          queue.enqueue_now(F("G29S1"));
541
           mesh_point_count--;
541
           mesh_point_count--;
542
 
542
 
543
           if (mks_language_index == MKS_English) {
543
           if (mks_language_index == MKS_English) {
550
           }
550
           }
551
         }
551
         }
552
         else if (mesh_point_count > 1) {                              // 倒数第二个点
552
         else if (mesh_point_count > 1) {                              // 倒数第二个点
553
-          queue.enqueue_now_P(PSTR("G29S2"));
553
+          queue.enqueue_now(F("G29S2"));
554
           mesh_point_count--;
554
           mesh_point_count--;
555
           if (mks_language_index == MKS_English) {
555
           if (mks_language_index == MKS_English) {
556
             const char level_buf_en2[] = "Next Point";
556
             const char level_buf_en2[] = "Next Point";
562
           }
562
           }
563
         }
563
         }
564
         else if (mesh_point_count == 1) {
564
         else if (mesh_point_count == 1) {
565
-          queue.enqueue_now_P(PSTR("G29S2"));
565
+          queue.enqueue_now(F("G29S2"));
566
           mesh_point_count--;
566
           mesh_point_count--;
567
           if (mks_language_index == MKS_English) {
567
           if (mks_language_index == MKS_English) {
568
             const char level_buf_en2[] = "Level Finsh";
568
             const char level_buf_en2[] = "Level Finsh";
620
   };
620
   };
621
 
621
 
622
   if (WITHIN(point_value, 0x0001, 0x0005))
622
   if (WITHIN(point_value, 0x0001, 0x0005))
623
-    queue.enqueue_now_P(PSTR("G1Z10"));
623
+    queue.enqueue_now(F("G1Z10"));
624
 
624
 
625
   switch (point_value) {
625
   switch (point_value) {
626
     case 0x0001:
626
     case 0x0001:
627
       enqueue_corner_move(X_MIN_POS + ABS(mks_corner_offsets[0].x),
627
       enqueue_corner_move(X_MIN_POS + ABS(mks_corner_offsets[0].x),
628
                           Y_MIN_POS + ABS(mks_corner_offsets[0].y), level_speed);
628
                           Y_MIN_POS + ABS(mks_corner_offsets[0].y), level_speed);
629
-      queue.enqueue_now_P(PSTR("G28Z"));
629
+      queue.enqueue_now(F("G28Z"));
630
       break;
630
       break;
631
     case 0x0002:
631
     case 0x0002:
632
       enqueue_corner_move(X_MAX_POS - ABS(mks_corner_offsets[1].x),
632
       enqueue_corner_move(X_MAX_POS - ABS(mks_corner_offsets[1].x),
647
   }
647
   }
648
 
648
 
649
   if (WITHIN(point_value, 0x0002, 0x0005)) {
649
   if (WITHIN(point_value, 0x0002, 0x0005)) {
650
-    //queue.enqueue_now_P(PSTR("G28Z"));
651
-    queue.enqueue_now_P(PSTR("G1Z-10"));
650
+    //queue.enqueue_now(F("G28Z"));
651
+    queue.enqueue_now(F("G1Z-10"));
652
   }
652
   }
653
 }
653
 }
654
 
654
 
856
 
856
 
857
     if (!relative_mode) {
857
     if (!relative_mode) {
858
       //DEBUG_ECHOPGM(" G91");
858
       //DEBUG_ECHOPGM(" G91");
859
-      queue.enqueue_now_P(PSTR("G91"));
859
+      queue.enqueue_now(F("G91"));
860
       //DEBUG_ECHOPGM(" ✓ ");
860
       //DEBUG_ECHOPGM(" ✓ ");
861
     }
861
     }
862
     char buf[32]; // G1 X9999.99 F12345
862
     char buf[32]; // G1 X9999.99 F12345
878
     //DEBUG_ECHOLNPGM(" ✓ ");
878
     //DEBUG_ECHOLNPGM(" ✓ ");
879
     if (!old_relative_mode) {
879
     if (!old_relative_mode) {
880
       //DEBUG_ECHOPGM("G90");
880
       //DEBUG_ECHOPGM("G90");
881
-      //queue.enqueue_now_P(PSTR("G90"));
882
-      queue.enqueue_now_P(PSTR("G90"));
881
+      //queue.enqueue_now(F("G90"));
882
+      queue.enqueue_now(F("G90"));
883
       //DEBUG_ECHOPGM(" ✓ ");
883
       //DEBUG_ECHOPGM(" ✓ ");
884
     }
884
     }
885
   }
885
   }
1133
     switch (flag) {
1133
     switch (flag) {
1134
       case 0:
1134
       case 0:
1135
         if (step == 0.01)
1135
         if (step == 0.01)
1136
-          queue.inject_P(PSTR("M290 Z-0.01"));
1136
+          queue.inject(F("M290 Z-0.01"));
1137
         else if (step == 0.1)
1137
         else if (step == 0.1)
1138
-          queue.inject_P(PSTR("M290 Z-0.1"));
1138
+          queue.inject(F("M290 Z-0.1"));
1139
         else if (step == 0.5)
1139
         else if (step == 0.5)
1140
-          queue.inject_P(PSTR("M290 Z-0.5"));
1140
+          queue.inject(F("M290 Z-0.5"));
1141
         else if (step == 1)
1141
         else if (step == 1)
1142
-          queue.inject_P(PSTR("M290 Z-1"));
1142
+          queue.inject(F("M290 Z-1"));
1143
         else
1143
         else
1144
-          queue.inject_P(PSTR("M290 Z-0.01"));
1144
+          queue.inject(F("M290 Z-0.01"));
1145
 
1145
 
1146
         z_offset_add = z_offset_add - ZOffset_distance;
1146
         z_offset_add = z_offset_add - ZOffset_distance;
1147
         break;
1147
         break;
1148
 
1148
 
1149
       case 1:
1149
       case 1:
1150
         if (step == 0.01)
1150
         if (step == 0.01)
1151
-          queue.inject_P(PSTR("M290 Z0.01"));
1151
+          queue.inject(F("M290 Z0.01"));
1152
         else if (step == 0.1)
1152
         else if (step == 0.1)
1153
-          queue.inject_P(PSTR("M290 Z0.1"));
1153
+          queue.inject(F("M290 Z0.1"));
1154
         else if (step == 0.5)
1154
         else if (step == 0.5)
1155
-          queue.inject_P(PSTR("M290 Z0.5"));
1155
+          queue.inject(F("M290 Z0.5"));
1156
         else if (step == 1)
1156
         else if (step == 1)
1157
-          queue.inject_P(PSTR("M290 Z1"));
1157
+          queue.inject(F("M290 Z1"));
1158
         else
1158
         else
1159
-          queue.inject_P(PSTR("M290 Z-0.01"));
1159
+          queue.inject(F("M290 Z-0.01"));
1160
 
1160
 
1161
         z_offset_add = z_offset_add + ZOffset_distance;
1161
         z_offset_add = z_offset_add + ZOffset_distance;
1162
         break;
1162
         break;
1486
 
1486
 
1487
       case RUNOUT_STATUS:
1487
       case RUNOUT_STATUS:
1488
         runout_mks.runout_status = RUNOUT_BEGIN_STATUS;
1488
         runout_mks.runout_status = RUNOUT_BEGIN_STATUS;
1489
-        queue.inject_P(PSTR("M25"));
1489
+        queue.inject(F("M25"));
1490
         GotoScreen(MKSLCD_SCREEN_PAUSE);
1490
         GotoScreen(MKSLCD_SCREEN_PAUSE);
1491
 
1491
 
1492
         sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("Please change filament!"), nullptr, true, true, true, true);
1492
         sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("Please change filament!"), nullptr, true, true, true, true);

+ 2
- 2
Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp View File

205
     bool old_relative_mode = relative_mode;
205
     bool old_relative_mode = relative_mode;
206
     if (!relative_mode) {
206
     if (!relative_mode) {
207
       //DEBUG_ECHOPGM(" G91");
207
       //DEBUG_ECHOPGM(" G91");
208
-      queue.enqueue_now_P(PSTR("G91"));
208
+      queue.enqueue_now(F("G91"));
209
       //DEBUG_ECHOPGM(" ✓ ");
209
       //DEBUG_ECHOPGM(" ✓ ");
210
     }
210
     }
211
     char buf[32]; // G1 X9999.99 F12345
211
     char buf[32]; // G1 X9999.99 F12345
227
     //DEBUG_ECHOLNPGM(" ✓ ");
227
     //DEBUG_ECHOLNPGM(" ✓ ");
228
     if (!old_relative_mode) {
228
     if (!old_relative_mode) {
229
       //DEBUG_ECHOPGM("G90");
229
       //DEBUG_ECHOPGM("G90");
230
-      queue.enqueue_now_P(PSTR("G90"));
230
+      queue.enqueue_now(F("G90"));
231
       //DEBUG_ECHOPGM(" ✓ ");
231
       //DEBUG_ECHOPGM(" ✓ ");
232
     }
232
     }
233
   }
233
   }

+ 9
- 9
Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp View File

523
   dgus_screen_handler.TriggerScreenChange(DGUS_Screen::LEVELING_PROBING);
523
   dgus_screen_handler.TriggerScreenChange(DGUS_Screen::LEVELING_PROBING);
524
 
524
 
525
   #if ENABLED(AUTO_BED_LEVELING_UBL)
525
   #if ENABLED(AUTO_BED_LEVELING_UBL)
526
-    queue.enqueue_now_P(PSTR("G29P1\nG29P3\nG29P5C"));
526
+    queue.enqueue_now(F("G29P1\nG29P3\nG29P5C"));
527
   #else
527
   #else
528
-    queue.enqueue_now_P(PSTR("G29"));
528
+    queue.enqueue_now(F("G29"));
529
   #endif
529
   #endif
530
   queue.enqueue_now_P(DGUS_CMD_EEPROM_SAVE);
530
   queue.enqueue_now_P(DGUS_CMD_EEPROM_SAVE);
531
 }
531
 }
634
 
634
 
635
   switch (axis) {
635
   switch (axis) {
636
     case DGUS_Data::Axis::X_Y_Z:
636
     case DGUS_Data::Axis::X_Y_Z:
637
-      queue.enqueue_now_P(PSTR("G28XYZ"));
637
+      queue.enqueue_now(F("G28XYZ"));
638
       break;
638
       break;
639
     case DGUS_Data::Axis::X_Y:
639
     case DGUS_Data::Axis::X_Y:
640
-      queue.enqueue_now_P(PSTR("G28XY"));
640
+      queue.enqueue_now(F("G28XY"));
641
       break;
641
       break;
642
     case DGUS_Data::Axis::Z:
642
     case DGUS_Data::Axis::Z:
643
-      queue.enqueue_now_P(PSTR("G28Z"));
643
+      queue.enqueue_now(F("G28Z"));
644
       break;
644
       break;
645
   }
645
   }
646
 }
646
 }
784
     return;
784
     return;
785
   }
785
   }
786
 
786
 
787
-  queue.enqueue_now_P(PSTR("M502"));
787
+  queue.enqueue_now(F("M502"));
788
   queue.enqueue_now_P(DGUS_CMD_EEPROM_SAVE);
788
   queue.enqueue_now_P(DGUS_CMD_EEPROM_SAVE);
789
 }
789
 }
790
 
790
 
802
           return;
802
           return;
803
         }
803
         }
804
 
804
 
805
-        queue.enqueue_now_P(PSTR(DGUS_RESET_BLTOUCH));
805
+        queue.enqueue_now(F(DGUS_RESET_BLTOUCH));
806
       #else
806
       #else
807
         dgus_screen_handler.TriggerScreenChange(DGUS_Screen::INFOS);
807
         dgus_screen_handler.TriggerScreenChange(DGUS_Screen::INFOS);
808
       #endif
808
       #endif
942
 
942
 
943
     dgus_screen_handler.TriggerScreenChange(DGUS_Screen::HOME);
943
     dgus_screen_handler.TriggerScreenChange(DGUS_Screen::HOME);
944
 
944
 
945
-    queue.enqueue_now_P(PSTR("M1000C"));
945
+    queue.enqueue_now(F("M1000C"));
946
   }
946
   }
947
 
947
 
948
   void DGUSRxHandler::PowerLossResume(DGUS_VP &vp, void *data_ptr) {
948
   void DGUSRxHandler::PowerLossResume(DGUS_VP &vp, void *data_ptr) {
966
 
966
 
967
     dgus_screen_handler.TriggerScreenChange(DGUS_Screen::PRINT_STATUS);
967
     dgus_screen_handler.TriggerScreenChange(DGUS_Screen::PRINT_STATUS);
968
 
968
 
969
-    queue.enqueue_now_P(PSTR("M1000"));
969
+    queue.enqueue_now(F("M1000"));
970
   }
970
   }
971
 #endif // POWER_LOSS_RECOVERY
971
 #endif // POWER_LOSS_RECOVERY
972
 
972
 

+ 3
- 3
Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp View File

74
 
74
 
75
   if (ExtUI::isPositionKnown()) {
75
   if (ExtUI::isPositionKnown()) {
76
     if (ExtUI::getAxisPosition_mm(ExtUI::Z) < 10.0f) {
76
     if (ExtUI::getAxisPosition_mm(ExtUI::Z) < 10.0f) {
77
-      queue.enqueue_now_P(PSTR("G0Z10"));
77
+      queue.enqueue_now(F("G0Z10"));
78
     }
78
     }
79
 
79
 
80
     return true;
80
     return true;
124
 
124
 
125
   if (ExtUI::isPositionKnown()) {
125
   if (ExtUI::isPositionKnown()) {
126
     if (ExtUI::getAxisPosition_mm(ExtUI::Z) < 4.0f) {
126
     if (ExtUI::getAxisPosition_mm(ExtUI::Z) < 4.0f) {
127
-      queue.enqueue_now_P(PSTR("G0Z4"));
127
+      queue.enqueue_now(F("G0Z4"));
128
     }
128
     }
129
 
129
 
130
     char buffer[20];
130
     char buffer[20];
131
     snprintf_P(buffer, sizeof(buffer), PSTR("G0X%dY%d"), DGUS_LEVEL_CENTER_X, DGUS_LEVEL_CENTER_Y);
131
     snprintf_P(buffer, sizeof(buffer), PSTR("G0X%dY%d"), DGUS_LEVEL_CENTER_X, DGUS_LEVEL_CENTER_Y);
132
 
132
 
133
     queue.enqueue_one_now(buffer);
133
     queue.enqueue_one_now(buffer);
134
-    queue.enqueue_now_P(PSTR("G0Z0"));
134
+    queue.enqueue_now(F("G0Z0"));
135
 
135
 
136
     return true;
136
     return true;
137
   }
137
   }

+ 1
- 1
Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp View File

201
     draw_return_ui();
201
     draw_return_ui();
202
   }
202
   }
203
   else if (DIALOG_IS(TYPE_FILAMENT_LOADING, TYPE_FILAMENT_UNLOADING)) {
203
   else if (DIALOG_IS(TYPE_FILAMENT_LOADING, TYPE_FILAMENT_UNLOADING)) {
204
-    queue.enqueue_one_P(PSTR("M410"));
204
+    queue.enqueue_one(F("M410"));
205
     uiCfg.filament_rate                = 0;
205
     uiCfg.filament_rate                = 0;
206
     uiCfg.filament_loading_completed   = false;
206
     uiCfg.filament_loading_completed   = false;
207
     uiCfg.filament_unloading_completed = false;
207
     uiCfg.filament_unloading_completed = false;

+ 2
- 2
Marlin/src/lcd/extui/mks_ui/draw_extrusion.cpp View File

74
       if (ENABLED(HAS_MULTI_EXTRUDER)) {
74
       if (ENABLED(HAS_MULTI_EXTRUDER)) {
75
         if (uiCfg.extruderIndex == 0) {
75
         if (uiCfg.extruderIndex == 0) {
76
           uiCfg.extruderIndex = 1;
76
           uiCfg.extruderIndex = 1;
77
-          queue.inject_P(PSTR("T1"));
77
+          queue.inject(F("T1"));
78
         }
78
         }
79
         else {
79
         else {
80
           uiCfg.extruderIndex = 0;
80
           uiCfg.extruderIndex = 0;
81
-          queue.inject_P(PSTR("T0"));
81
+          queue.inject(F("T0"));
82
         }
82
         }
83
       }
83
       }
84
       else
84
       else

+ 5
- 5
Marlin/src/lcd/extui/mks_ui/draw_home.cpp View File

52
       queue.inject_P(G28_STR);
52
       queue.inject_P(G28_STR);
53
       break;
53
       break;
54
     case ID_H_X:
54
     case ID_H_X:
55
-      queue.inject_P(PSTR("G28X"));
55
+      queue.inject(F("G28X"));
56
       break;
56
       break;
57
     case ID_H_Y:
57
     case ID_H_Y:
58
-      queue.inject_P(PSTR("G28Y"));
58
+      queue.inject(F("G28Y"));
59
       break;
59
       break;
60
     case ID_H_Z:
60
     case ID_H_Z:
61
-      queue.inject_P(PSTR("G28Z"));
61
+      queue.inject(F("G28Z"));
62
       break;
62
       break;
63
     case ID_H_OFF_ALL:
63
     case ID_H_OFF_ALL:
64
-      queue.inject_P(PSTR("M84"));
64
+      queue.inject(F("M84"));
65
       break;
65
       break;
66
     case ID_H_OFF_XY:
66
     case ID_H_OFF_XY:
67
-      queue.inject_P(PSTR("M84XY"));
67
+      queue.inject(F("M84XY"));
68
       break;
68
       break;
69
     case ID_H_RETURN:
69
     case ID_H_RETURN:
70
       clear_cur_ui();
70
       clear_cur_ui();

+ 6
- 6
Marlin/src/lcd/extui/mks_ui/draw_more.cpp View File

62
   switch (obj->mks_obj_id) {
62
   switch (obj->mks_obj_id) {
63
     case ID_GCODE: lv_clear_more(); lv_draw_gcode(true); break;
63
     case ID_GCODE: lv_clear_more(); lv_draw_gcode(true); break;
64
     #if HAS_USER_ITEM(1)
64
     #if HAS_USER_ITEM(1)
65
-      case ID_CUSTOM_1: queue.inject_P(PSTR(MAIN_MENU_ITEM_1_GCODE)); break;
65
+      case ID_CUSTOM_1: queue.inject(F(MAIN_MENU_ITEM_1_GCODE)); break;
66
     #endif
66
     #endif
67
     #if HAS_USER_ITEM(2)
67
     #if HAS_USER_ITEM(2)
68
-      case ID_CUSTOM_2: queue.inject_P(PSTR(MAIN_MENU_ITEM_2_GCODE)); break;
68
+      case ID_CUSTOM_2: queue.inject(F(MAIN_MENU_ITEM_2_GCODE)); break;
69
     #endif
69
     #endif
70
     #if HAS_USER_ITEM(3)
70
     #if HAS_USER_ITEM(3)
71
-      case ID_CUSTOM_3: queue.inject_P(PSTR(MAIN_MENU_ITEM_3_GCODE)); break;
71
+      case ID_CUSTOM_3: queue.inject(F(MAIN_MENU_ITEM_3_GCODE)); break;
72
     #endif
72
     #endif
73
     #if HAS_USER_ITEM(4)
73
     #if HAS_USER_ITEM(4)
74
-      case ID_CUSTOM_4: queue.inject_P(PSTR(MAIN_MENU_ITEM_4_GCODE)); break;
74
+      case ID_CUSTOM_4: queue.inject(F(MAIN_MENU_ITEM_4_GCODE)); break;
75
     #endif
75
     #endif
76
     #if HAS_USER_ITEM(5)
76
     #if HAS_USER_ITEM(5)
77
-      case ID_CUSTOM_5: queue.inject_P(PSTR(MAIN_MENU_ITEM_5_GCODE)); break;
77
+      case ID_CUSTOM_5: queue.inject(F(MAIN_MENU_ITEM_5_GCODE)); break;
78
     #endif
78
     #endif
79
     #if HAS_USER_ITEM(6)
79
     #if HAS_USER_ITEM(6)
80
-      case ID_CUSTOM_6: queue.inject_P(PSTR(MAIN_MENU_ITEM_6_GCODE)); break;
80
+      case ID_CUSTOM_6: queue.inject(F(MAIN_MENU_ITEM_6_GCODE)); break;
81
     #endif
81
     #endif
82
     case ID_M_RETURN:
82
     case ID_M_RETURN:
83
       lv_clear_more();
83
       lv_clear_more();

+ 1
- 1
Marlin/src/lcd/extui/mks_ui/draw_printing.cpp View File

308
         #if HAS_SUICIDE
308
         #if HAS_SUICIDE
309
           if (gCfgItems.finish_power_off) {
309
           if (gCfgItems.finish_power_off) {
310
             gcode.process_subcommands_now(F("M1001"));
310
             gcode.process_subcommands_now(F("M1001"));
311
-            queue.inject_P(PSTR("M81"));
311
+            queue.inject(F("M81"));
312
             marlin_state = MF_RUNNING;
312
             marlin_state = MF_RUNNING;
313
           }
313
           }
314
         #endif
314
         #endif

+ 1
- 1
Marlin/src/lcd/extui/mks_ui/draw_set.cpp View File

57
   if (event != LV_EVENT_RELEASED) return;
57
   if (event != LV_EVENT_RELEASED) return;
58
   if (obj->mks_obj_id == ID_S_CONTINUE) return;
58
   if (obj->mks_obj_id == ID_S_CONTINUE) return;
59
   if (obj->mks_obj_id == ID_S_MOTOR_OFF) {
59
   if (obj->mks_obj_id == ID_S_MOTOR_OFF) {
60
-    TERN(HAS_SUICIDE, suicide(), queue.enqueue_now_P(PSTR("M84")));
60
+    TERN(HAS_SUICIDE, suicide(), queue.enqueue_now(F("M84")));
61
     return;
61
     return;
62
   }
62
   }
63
   lv_clear_set();
63
   lv_clear_set();

+ 1
- 1
Marlin/src/lcd/extui/mks_ui/draw_tool.cpp View File

62
       #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
62
       #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
63
         get_gcode_command(AUTO_LEVELING_COMMAND_ADDR, (uint8_t *)public_buf_m);
63
         get_gcode_command(AUTO_LEVELING_COMMAND_ADDR, (uint8_t *)public_buf_m);
64
         public_buf_m[sizeof(public_buf_m) - 1] = 0;
64
         public_buf_m[sizeof(public_buf_m) - 1] = 0;
65
-        queue.inject_P(PSTR(public_buf_m));
65
+        queue.inject(public_buf_m);
66
       #else
66
       #else
67
         uiCfg.leveling_first_time = true;
67
         uiCfg.leveling_first_time = true;
68
         lv_draw_manualLevel();
68
         lv_draw_manualLevel();

+ 2
- 2
Marlin/src/lcd/extui/mks_ui/wifi_module.cpp View File

1169
           }
1169
           }
1170
 
1170
 
1171
           send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf));
1171
           send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf));
1172
-          queue.enqueue_one_P(PSTR("M105"));
1172
+          queue.enqueue_one(F("M105"));
1173
           break;
1173
           break;
1174
 
1174
 
1175
         case 992:
1175
         case 992:
2035
         #endif
2035
         #endif
2036
 
2036
 
2037
         // Add the command to the queue
2037
         // Add the command to the queue
2038
-        queue.enqueue_one_P(wifi_line_buffer);
2038
+        queue.enqueue_one(wifi_line_buffer);
2039
       }
2039
       }
2040
       else if (wifi_read_count >= MAX_CMD_SIZE - 1) {
2040
       else if (wifi_read_count >= MAX_CMD_SIZE - 1) {
2041
 
2041
 

+ 3
- 3
Marlin/src/lcd/marlinui.cpp View File

1542
 
1542
 
1543
   #if BOTH(PSU_CONTROL, PS_OFF_CONFIRM)
1543
   #if BOTH(PSU_CONTROL, PS_OFF_CONFIRM)
1544
     void MarlinUI::poweroff() {
1544
     void MarlinUI::poweroff() {
1545
-      queue.inject_P(PSTR("M81"));
1545
+      queue.inject(F("M81"));
1546
       goto_previous_screen();
1546
       goto_previous_screen();
1547
     }
1547
     }
1548
   #endif
1548
   #endif
1570
 
1570
 
1571
     #if ENABLED(PARK_HEAD_ON_PAUSE)
1571
     #if ENABLED(PARK_HEAD_ON_PAUSE)
1572
       pause_show_message(PAUSE_MESSAGE_PARKING, PAUSE_MODE_PAUSE_PRINT); // Show message immediately to let user know about pause in progress
1572
       pause_show_message(PAUSE_MESSAGE_PARKING, PAUSE_MODE_PAUSE_PRINT); // Show message immediately to let user know about pause in progress
1573
-      queue.inject_P(PSTR("M25 P\nM24"));
1573
+      queue.inject(F("M25 P\nM24"));
1574
     #elif ENABLED(SDSUPPORT)
1574
     #elif ENABLED(SDSUPPORT)
1575
-      queue.inject_P(PSTR("M25"));
1575
+      queue.inject(F("M25"));
1576
     #elif defined(ACTION_ON_PAUSE)
1576
     #elif defined(ACTION_ON_PAUSE)
1577
       host_action_pause();
1577
       host_action_pause();
1578
     #endif
1578
     #endif

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

557
       //
557
       //
558
       // Set Home Offsets
558
       // Set Home Offsets
559
       //
559
       //
560
-      ACTION_ITEM(MSG_SET_HOME_OFFSETS, []{ queue.inject_P(PSTR("M428")); ui.return_to_status(); });
560
+      ACTION_ITEM(MSG_SET_HOME_OFFSETS, []{ queue.inject(F("M428")); ui.return_to_status(); });
561
     #endif
561
     #endif
562
 
562
 
563
     // M203 / M205 - Feedrate items
563
     // M203 / M205 - Feedrate items

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

212
   void _lcd_draw_level_prompt() {
212
   void _lcd_draw_level_prompt() {
213
     if (!ui.should_draw()) return;
213
     if (!ui.should_draw()) return;
214
     MenuItem_confirm::confirm_screen(
214
     MenuItem_confirm::confirm_screen(
215
-        []{ queue.inject_P(TERN(HAS_LEVELING, PSTR("G29N"), G28_STR)); ui.return_to_status(); }
215
+        []{ queue.inject(TERN(HAS_LEVELING, F("G29N"), FPSTR(G28_STR))); ui.return_to_status(); }
216
       , []{ ui.goto_previous_screen_no_defer(); }
216
       , []{ ui.goto_previous_screen_no_defer(); }
217
       , GET_TEXT(MSG_BED_TRAMMING_IN_RANGE)
217
       , GET_TEXT(MSG_BED_TRAMMING_IN_RANGE)
218
       , (const char*)nullptr, PSTR("?")
218
       , (const char*)nullptr, PSTR("?")

+ 4
- 4
Marlin/src/lcd/menu/menu_bed_leveling.cpp View File

103
         ui.wait_for_move = true;
103
         ui.wait_for_move = true;
104
         ui.goto_screen(_lcd_level_bed_done);
104
         ui.goto_screen(_lcd_level_bed_done);
105
         #if ENABLED(MESH_BED_LEVELING)
105
         #if ENABLED(MESH_BED_LEVELING)
106
-          queue.inject_P(PSTR("G29S2"));
106
+          queue.inject(F("G29S2"));
107
         #elif ENABLED(PROBE_MANUALLY)
107
         #elif ENABLED(PROBE_MANUALLY)
108
-          queue.inject_P(PSTR("G29V1"));
108
+          queue.inject(F("G29V1"));
109
         #endif
109
         #endif
110
       }
110
       }
111
       else
111
       else
155
     // G29 Records Z, moves, and signals when it pauses
155
     // G29 Records Z, moves, and signals when it pauses
156
     ui.wait_for_move = true;
156
     ui.wait_for_move = true;
157
     #if ENABLED(MESH_BED_LEVELING)
157
     #if ENABLED(MESH_BED_LEVELING)
158
-      queue.inject_P(manual_probe_index ? PSTR("G29S2") : PSTR("G29S1"));
158
+      queue.inject(manual_probe_index ? F("G29S2") : F("G29S1"));
159
     #elif ENABLED(PROBE_MANUALLY)
159
     #elif ENABLED(PROBE_MANUALLY)
160
-      queue.inject_P(PSTR("G29V1"));
160
+      queue.inject(F("G29V1"));
161
     #endif
161
     #endif
162
   }
162
   }
163
 
163
 

+ 3
- 3
Marlin/src/lcd/menu/menu_configuration.cpp View File

341
 
341
 
342
 #if ENABLED(CUSTOM_MENU_CONFIG)
342
 #if ENABLED(CUSTOM_MENU_CONFIG)
343
 
343
 
344
-  void _lcd_custom_menus_configuration_gcode(PGM_P const cmd) {
345
-    queue.inject_P(cmd);
344
+  void _lcd_custom_menus_configuration_gcode(FSTR_P const fstr) {
345
+    queue.inject(fstr);
346
     TERN_(CUSTOM_MENU_CONFIG_SCRIPT_AUDIBLE_FEEDBACK, ui.completion_feedback());
346
     TERN_(CUSTOM_MENU_CONFIG_SCRIPT_AUDIBLE_FEEDBACK, ui.completion_feedback());
347
     TERN_(CUSTOM_MENU_CONFIG_SCRIPT_RETURN, ui.return_to_status());
347
     TERN_(CUSTOM_MENU_CONFIG_SCRIPT_RETURN, ui.return_to_status());
348
   }
348
   }
358
     #else
358
     #else
359
       #define _DONE_SCRIPT ""
359
       #define _DONE_SCRIPT ""
360
     #endif
360
     #endif
361
-    #define GCODE_LAMBDA_CONF(N) []{ _lcd_custom_menus_configuration_gcode(PSTR(CONFIG_MENU_ITEM_##N##_GCODE _DONE_SCRIPT)); }
361
+    #define GCODE_LAMBDA_CONF(N) []{ _lcd_custom_menus_configuration_gcode(F(CONFIG_MENU_ITEM_##N##_GCODE _DONE_SCRIPT)); }
362
     #define _CUSTOM_ITEM_CONF(N) ACTION_ITEM_P(PSTR(CONFIG_MENU_ITEM_##N##_DESC), GCODE_LAMBDA_CONF(N));
362
     #define _CUSTOM_ITEM_CONF(N) ACTION_ITEM_P(PSTR(CONFIG_MENU_ITEM_##N##_DESC), GCODE_LAMBDA_CONF(N));
363
     #define _CUSTOM_ITEM_CONF_CONFIRM(N)               \
363
     #define _CUSTOM_ITEM_CONF_CONFIRM(N)               \
364
       SUBMENU_P(PSTR(CONFIG_MENU_ITEM_##N##_DESC), []{ \
364
       SUBMENU_P(PSTR(CONFIG_MENU_ITEM_##N##_DESC), []{ \

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

209
   #else
209
   #else
210
 
210
 
211
     if (thermalManager.targetHotEnoughToExtrude(active_extruder))
211
     if (thermalManager.targetHotEnoughToExtrude(active_extruder))
212
-      queue.inject_P(PSTR("M600B0"));
212
+      queue.inject(F("M600B0"));
213
     else
213
     else
214
       ui.goto_screen([]{ _menu_temp_filament_op(PAUSE_MODE_CHANGE_FILAMENT, 0); });
214
       ui.goto_screen([]{ _menu_temp_filament_op(PAUSE_MODE_CHANGE_FILAMENT, 0); });
215
 
215
 

+ 3
- 3
Marlin/src/lcd/menu/menu_item.h View File

23
 
23
 
24
 #include "menu.h"
24
 #include "menu.h"
25
 #include "../marlinui.h"
25
 #include "../marlinui.h"
26
-#include "../../gcode/queue.h" // for inject_P
26
+#include "../../gcode/queue.h" // for inject
27
 
27
 
28
 #include "../../inc/MarlinConfigPre.h"
28
 #include "../../inc/MarlinConfigPre.h"
29
 
29
 
64
     FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, ...) {
64
     FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, ...) {
65
       _draw(sel, row, pstr, '>', ' ');
65
       _draw(sel, row, pstr, '>', ' ');
66
     }
66
     }
67
-    static void action(PGM_P const, PGM_P const pgcode) { queue.inject_P(pgcode); }
68
-    static inline void action(PGM_P const pstr, const uint8_t, const char * const pgcode) { action(pstr, pgcode); }
67
+    static void action(PGM_P const, PGM_P const pgcode) { queue.inject(FPSTR(pgcode)); }
68
+    static inline void action(PGM_P const pstr, const uint8_t, PGM_P const pgcode) { action(pstr, pgcode); }
69
 };
69
 };
70
 
70
 
71
 ////////////////////////////////////////////
71
 ////////////////////////////////////////////

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

35
 
35
 
36
 static void lcd_power_loss_recovery_resume() {
36
 static void lcd_power_loss_recovery_resume() {
37
   ui.return_to_status();
37
   ui.return_to_status();
38
-  queue.inject_P(PSTR("M1000"));
38
+  queue.inject(F("M1000"));
39
 }
39
 }
40
 
40
 
41
 void lcd_power_loss_recovery_cancel() {
41
 void lcd_power_loss_recovery_cancel() {

+ 3
- 3
Marlin/src/lcd/menu/menu_main.cpp View File

106
 
106
 
107
 #if ENABLED(CUSTOM_MENU_MAIN)
107
 #if ENABLED(CUSTOM_MENU_MAIN)
108
 
108
 
109
-  void _lcd_custom_menu_main_gcode(PGM_P const cmd) {
110
-    queue.inject_P(cmd);
109
+  void _lcd_custom_menu_main_gcode(FSTR_P const fstr) {
110
+    queue.inject(fstr);
111
     TERN_(CUSTOM_MENU_MAIN_SCRIPT_AUDIBLE_FEEDBACK, ui.completion_feedback());
111
     TERN_(CUSTOM_MENU_MAIN_SCRIPT_AUDIBLE_FEEDBACK, ui.completion_feedback());
112
     TERN_(CUSTOM_MENU_MAIN_SCRIPT_RETURN, ui.return_to_status());
112
     TERN_(CUSTOM_MENU_MAIN_SCRIPT_RETURN, ui.return_to_status());
113
   }
113
   }
123
     #else
123
     #else
124
       #define _DONE_SCRIPT ""
124
       #define _DONE_SCRIPT ""
125
     #endif
125
     #endif
126
-    #define GCODE_LAMBDA_MAIN(N) []{ _lcd_custom_menu_main_gcode(PSTR(MAIN_MENU_ITEM_##N##_GCODE _DONE_SCRIPT)); }
126
+    #define GCODE_LAMBDA_MAIN(N) []{ _lcd_custom_menu_main_gcode(F(MAIN_MENU_ITEM_##N##_GCODE _DONE_SCRIPT)); }
127
     #define _CUSTOM_ITEM_MAIN(N) ACTION_ITEM_P(PSTR(MAIN_MENU_ITEM_##N##_DESC), GCODE_LAMBDA_MAIN(N));
127
     #define _CUSTOM_ITEM_MAIN(N) ACTION_ITEM_P(PSTR(MAIN_MENU_ITEM_##N##_DESC), GCODE_LAMBDA_MAIN(N));
128
     #define _CUSTOM_ITEM_MAIN_CONFIRM(N)             \
128
     #define _CUSTOM_ITEM_MAIN_CONFIRM(N)             \
129
       SUBMENU_P(PSTR(MAIN_MENU_ITEM_##N##_DESC), []{ \
129
       SUBMENU_P(PSTR(MAIN_MENU_ITEM_##N##_DESC), []{ \

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

111
     // If wizard-homing was done by probe with PROBE_OFFSET_WIZARD_START_Z
111
     // If wizard-homing was done by probe with PROBE_OFFSET_WIZARD_START_Z
112
     #if HOMING_Z_WITH_PROBE && defined(PROBE_OFFSET_WIZARD_START_Z)
112
     #if HOMING_Z_WITH_PROBE && defined(PROBE_OFFSET_WIZARD_START_Z)
113
       set_axis_never_homed(Z_AXIS); // On cancel the Z position needs correction
113
       set_axis_never_homed(Z_AXIS); // On cancel the Z position needs correction
114
-      queue.inject_P(PSTR("G28Z"));
114
+      queue.inject(F("G28Z"));
115
     #else // Otherwise do a Z clearance move like after Homing
115
     #else // Otherwise do a Z clearance move like after Homing
116
       z_clearance_move();
116
       z_clearance_move();
117
     #endif
117
     #endif

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

96
 
96
 
97
   // Inject G28, wait for homing to complete,
97
   // Inject G28, wait for homing to complete,
98
   set_all_unhomed();
98
   set_all_unhomed();
99
-  queue.inject_P(TERN(CAN_SET_LEVELING_AFTER_G28, PSTR("G28L0"), G28_STR));
99
+  queue.inject(TERN(CAN_SET_LEVELING_AFTER_G28, F("G28L0"), FPSTR(G28_STR)));
100
 
100
 
101
   ui.goto_screen([]{
101
   ui.goto_screen([]{
102
     _lcd_draw_homing();
102
     _lcd_draw_homing();

+ 1
- 1
Marlin/src/lcd/tft/ui_1024x600.cpp View File

785
 
785
 
786
 static void disable_steppers() {
786
 static void disable_steppers() {
787
   quick_feedback();
787
   quick_feedback();
788
-  queue.inject_P(PSTR("M84"));
788
+  queue.inject(F("M84"));
789
 }
789
 }
790
 
790
 
791
 static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) {
791
 static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) {

+ 1
- 1
Marlin/src/lcd/tft/ui_320x240.cpp View File

770
 
770
 
771
 static void disable_steppers() {
771
 static void disable_steppers() {
772
   quick_feedback();
772
   quick_feedback();
773
-  queue.inject_P(PSTR("M84"));
773
+  queue.inject(F("M84"));
774
 }
774
 }
775
 
775
 
776
 static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) {
776
 static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) {

+ 1
- 1
Marlin/src/lcd/tft/ui_480x320.cpp View File

772
 
772
 
773
 static void disable_steppers() {
773
 static void disable_steppers() {
774
   quick_feedback();
774
   quick_feedback();
775
-  queue.inject_P(PSTR("M84"));
775
+  queue.inject(F("M84"));
776
 }
776
 }
777
 
777
 
778
 static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) {
778
 static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) {

Loading…
Cancel
Save