Browse Source

Optimize common strings

Saves 128 bytes in testing with `mftest mega 1 -y`
Scott Lahteine 5 years ago
parent
commit
f83bc0aa13

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

181
   #include "libs/L6470/L6470_Marlin.h"
181
   #include "libs/L6470/L6470_Marlin.h"
182
 #endif
182
 #endif
183
 
183
 
184
-const char G28_STR[] PROGMEM = "G28",
184
+const char NUL_STR[] PROGMEM = "",
185
+           G28_STR[] PROGMEM = "G28",
185
            M21_STR[] PROGMEM = "M21",
186
            M21_STR[] PROGMEM = "M21",
186
            M23_STR[] PROGMEM = "M23 %s",
187
            M23_STR[] PROGMEM = "M23 %s",
187
            M24_STR[] PROGMEM = "M24",
188
            M24_STR[] PROGMEM = "M24",
188
-           NUL_STR[] PROGMEM = "";
189
+           SP_X_STR[] PROGMEM = " X",
190
+           SP_Y_STR[] PROGMEM = " Y",
191
+           SP_Z_STR[] PROGMEM = " Z",
192
+           SP_E_STR[] PROGMEM = " E";
189
 
193
 
190
 bool Running = true;
194
 bool Running = true;
191
 
195
 

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

377
   void event_probe_failure();
377
   void event_probe_failure();
378
 #endif
378
 #endif
379
 
379
 
380
-extern const char G28_STR[], M21_STR[], M23_STR[], M24_STR[], NUL_STR[];
380
+extern const char NUL_STR[], G28_STR[], M21_STR[], M23_STR[], M24_STR[],
381
+                  SP_X_STR[], SP_Y_STR[], SP_Z_STR[], SP_E_STR[];

+ 3
- 1
Marlin/src/core/serial.cpp View File

67
   }
67
   }
68
 }
68
 }
69
 
69
 
70
+extern const char SP_X_STR[], SP_Y_STR[], SP_Z_STR[];
71
+
70
 void print_xyz(const float &x, const float &y, const float &z, PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) {
72
 void print_xyz(const float &x, const float &y, const float &z, PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) {
71
   serialprintPGM(prefix);
73
   serialprintPGM(prefix);
72
-  SERIAL_ECHOPAIR(" " MSG_X, x, " " MSG_Y, y, " " MSG_Z, z);
74
+  SERIAL_ECHOPAIR_P(SP_X_STR, x, SP_Y_STR, y, SP_Z_STR, z);
73
   if (suffix) serialprintPGM(suffix); else SERIAL_EOL();
75
   if (suffix) serialprintPGM(suffix); else SERIAL_EOL();
74
 }
76
 }

+ 70
- 4
Marlin/src/core/serial.h View File

83
   #define SERIAL_FLUSHTX()
83
   #define SERIAL_FLUSHTX()
84
 #endif
84
 #endif
85
 
85
 
86
-// Print up to 12 pairs of values
86
+// Print up to 12 pairs of values. Odd elements auto-wrapped in PSTR().
87
 #define __SEP_N(N,V...)   _SEP_##N(V)
87
 #define __SEP_N(N,V...)   _SEP_##N(V)
88
 #define _SEP_N(N,V...)    __SEP_N(N,V)
88
 #define _SEP_N(N,V...)    __SEP_N(N,V)
89
 #define _SEP_1(PRE)       SERIAL_ECHOPGM(PRE)
89
 #define _SEP_1(PRE)       SERIAL_ECHOPGM(PRE)
113
 
113
 
114
 #define SERIAL_ECHOPAIR(V...) _SEP_N(NUM_ARGS(V),V)
114
 #define SERIAL_ECHOPAIR(V...) _SEP_N(NUM_ARGS(V),V)
115
 
115
 
116
+// Print up to 12 pairs of values. Odd elements must be PSTR pointers.
117
+#define __SEP_N_P(N,V...)   _SEP_##N##_P(V)
118
+#define _SEP_N_P(N,V...)    __SEP_N_P(N,V)
119
+#define _SEP_1_P(PRE)       serialprintPGM(PRE)
120
+#define _SEP_2_P(PRE,V)     serial_echopair_PGM(PRE,V)
121
+#define _SEP_3_P(a,b,c)     do{ _SEP_2_P(a,b); serialprintPGM(c); }while(0)
122
+#define _SEP_4_P(a,b,V...)  do{ _SEP_2_P(a,b); _SEP_2_P(V); }while(0)
123
+#define _SEP_5_P(a,b,V...)  do{ _SEP_2_P(a,b); _SEP_3_P(V); }while(0)
124
+#define _SEP_6_P(a,b,V...)  do{ _SEP_2_P(a,b); _SEP_4_P(V); }while(0)
125
+#define _SEP_7_P(a,b,V...)  do{ _SEP_2_P(a,b); _SEP_5_P(V); }while(0)
126
+#define _SEP_8_P(a,b,V...)  do{ _SEP_2_P(a,b); _SEP_6_P(V); }while(0)
127
+#define _SEP_9_P(a,b,V...)  do{ _SEP_2_P(a,b); _SEP_7_P(V); }while(0)
128
+#define _SEP_10_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_8_P(V); }while(0)
129
+#define _SEP_11_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_9_P(V); }while(0)
130
+#define _SEP_12_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_10_P(V); }while(0)
131
+#define _SEP_13_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_11_P(V); }while(0)
132
+#define _SEP_14_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_12_P(V); }while(0)
133
+#define _SEP_15_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_13_P(V); }while(0)
134
+#define _SEP_16_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_14_P(V); }while(0)
135
+#define _SEP_17_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_15_P(V); }while(0)
136
+#define _SEP_18_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_16_P(V); }while(0)
137
+#define _SEP_19_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_17_P(V); }while(0)
138
+#define _SEP_20_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_18_P(V); }while(0)
139
+#define _SEP_21_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_19_P(V); }while(0)
140
+#define _SEP_22_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_20_P(V); }while(0)
141
+#define _SEP_23_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_21_P(V); }while(0)
142
+#define _SEP_24_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_22_P(V); }while(0)
143
+
144
+#define SERIAL_ECHOPAIR_P(V...) _SEP_N_P(NUM_ARGS(V),V)
145
+
116
 // Print up to 12 pairs of values followed by newline
146
 // Print up to 12 pairs of values followed by newline
117
 #define __SELP_N(N,V...)   _SELP_##N(V)
147
 #define __SELP_N(N,V...)   _SELP_##N(V)
118
 #define _SELP_N(N,V...)    __SELP_N(N,V)
148
 #define _SELP_N(N,V...)    __SELP_N(N,V)
139
 #define _SELP_21(a,b,V...) do{ _SEP_2(a,b); _SELP_19(V); }while(0)
169
 #define _SELP_21(a,b,V...) do{ _SEP_2(a,b); _SELP_19(V); }while(0)
140
 #define _SELP_22(a,b,V...) do{ _SEP_2(a,b); _SELP_20(V); }while(0)
170
 #define _SELP_22(a,b,V...) do{ _SEP_2(a,b); _SELP_20(V); }while(0)
141
 #define _SELP_23(a,b,V...) do{ _SEP_2(a,b); _SELP_21(V); }while(0)
171
 #define _SELP_23(a,b,V...) do{ _SEP_2(a,b); _SELP_21(V); }while(0)
142
-#define _SELP_24(a,b,V...) do{ _SEP_2(a,b); _SELP_22(V); }while(0) // Use up two, pass the rest up
172
+#define _SELP_24(a,b,V...) do{ _SEP_2(a,b); _SELP_22(V); }while(0) // Eat two args, pass the rest up
143
 
173
 
144
 #define SERIAL_ECHOLNPAIR(V...) _SELP_N(NUM_ARGS(V),V)
174
 #define SERIAL_ECHOLNPAIR(V...) _SELP_N(NUM_ARGS(V),V)
145
 
175
 
176
+// Print up to 12 pairs of values followed by newline
177
+#define __SELP_N_P(N,V...)   _SELP_##N##_P(V)
178
+#define _SELP_N_P(N,V...)    __SELP_N_P(N,V)
179
+#define _SELP_1_P(PRE)       serialprintPGM(PRE)
180
+#define _SELP_2_P(PRE,V)     do{ serial_echopair_PGM(PRE,V); SERIAL_EOL(); }while(0)
181
+#define _SELP_3_P(a,b,c)     do{ _SEP_2_P(a,b); serialprintPGM(c); }while(0)
182
+#define _SELP_4_P(a,b,V...)  do{ _SEP_2_P(a,b); _SELP_2_P(V); }while(0)
183
+#define _SELP_5_P(a,b,V...)  do{ _SEP_2_P(a,b); _SELP_3_P(V); }while(0)
184
+#define _SELP_6_P(a,b,V...)  do{ _SEP_2_P(a,b); _SELP_4_P(V); }while(0)
185
+#define _SELP_7_P(a,b,V...)  do{ _SEP_2_P(a,b); _SELP_5_P(V); }while(0)
186
+#define _SELP_8_P(a,b,V...)  do{ _SEP_2_P(a,b); _SELP_6_P(V); }while(0)
187
+#define _SELP_9_P(a,b,V...)  do{ _SEP_2_P(a,b); _SELP_7_P(V); }while(0)
188
+#define _SELP_10_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_8_P(V); }while(0)
189
+#define _SELP_11_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_9_P(V); }while(0)
190
+#define _SELP_12_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_10_P(V); }while(0)
191
+#define _SELP_13_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_11_P(V); }while(0)
192
+#define _SELP_14_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_12_P(V); }while(0)
193
+#define _SELP_15_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_13_P(V); }while(0)
194
+#define _SELP_16_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_14_P(V); }while(0)
195
+#define _SELP_17_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_15_P(V); }while(0)
196
+#define _SELP_18_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_16_P(V); }while(0)
197
+#define _SELP_19_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_17_P(V); }while(0)
198
+#define _SELP_20_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_18_P(V); }while(0)
199
+#define _SELP_21_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_19_P(V); }while(0)
200
+#define _SELP_22_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_20_P(V); }while(0)
201
+#define _SELP_23_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_21_P(V); }while(0)
202
+#define _SELP_24_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_22_P(V); }while(0) // Eat two args, pass the rest up
203
+
204
+#define SERIAL_ECHOLNPAIR_P(V...) _SELP_N_P(NUM_ARGS(V),V)
205
+
146
 // Print up to 20 comma-separated pairs of values
206
 // Print up to 20 comma-separated pairs of values
147
 #define __SLST_N(N,V...)   _SLST_##N(V)
207
 #define __SLST_N(N,V...)   _SLST_##N(V)
148
 #define _SLST_N(N,V...)    __SLST_N(N,V)
208
 #define _SLST_N(N,V...)    __SLST_N(N,V)
165
 #define _SLST_17(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_15(V); }while(0)
225
 #define _SLST_17(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_15(V); }while(0)
166
 #define _SLST_18(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_16(V); }while(0)
226
 #define _SLST_18(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_16(V); }while(0)
167
 #define _SLST_19(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_17(V); }while(0)
227
 #define _SLST_19(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_17(V); }while(0)
168
-#define _SLST_20(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_18(V); }while(0) // Use up two, pass the rest up
228
+#define _SLST_20(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_18(V); }while(0) // Eat two args, pass the rest up
169
 
229
 
170
 #define SERIAL_ECHOLIST(pre,V...)   do{ SERIAL_ECHOPGM(pre); _SLST_N(NUM_ARGS(V),V); }while(0)
230
 #define SERIAL_ECHOLIST(pre,V...)   do{ SERIAL_ECHOPGM(pre); _SLST_N(NUM_ARGS(V),V); }while(0)
171
 #define SERIAL_ECHOLIST_N(N,V...)   _SLST_N(N,LIST_N(N,V))
231
 #define SERIAL_ECHOLIST_N(N,V...)   _SLST_N(N,LIST_N(N,V))
172
 
232
 
233
+#define SERIAL_ECHOPGM_P(P)         (serialprintPGM(P))
234
+#define SERIAL_ECHOLNPGM_P(P)       (serialprintPGM(P "\n"))
235
+
173
 #define SERIAL_ECHOPGM(S)           (serialprintPGM(PSTR(S)))
236
 #define SERIAL_ECHOPGM(S)           (serialprintPGM(PSTR(S)))
174
 #define SERIAL_ECHOLNPGM(S)         (serialprintPGM(PSTR(S "\n")))
237
 #define SERIAL_ECHOLNPGM(S)         (serialprintPGM(PSTR(S "\n")))
175
 
238
 
176
-#define SERIAL_ECHOPAIR_F(S,V...)   do{ SERIAL_ECHOPGM(S); SERIAL_ECHO_F(V); }while(0)
239
+#define SERIAL_ECHOPAIR_F_P(P,V...) do{ serialprintPGM(P); SERIAL_ECHO_F(V); }while(0)
240
+#define SERIAL_ECHOLNPAIR_F_P(V...) do{ SERIAL_ECHOPAIR_F_P(V); SERIAL_EOL(); }while(0)
241
+
242
+#define SERIAL_ECHOPAIR_F(S,V...)   SERIAL_ECHOPAIR_F_P(PSTR(S),V)
177
 #define SERIAL_ECHOLNPAIR_F(V...)   do{ SERIAL_ECHOPAIR_F(V); SERIAL_EOL(); }while(0)
243
 #define SERIAL_ECHOLNPAIR_F(V...)   do{ SERIAL_ECHOPAIR_F(V); SERIAL_EOL(); }while(0)
178
 
244
 
179
 #define SERIAL_ECHO_START()         serial_echo_start()
245
 #define SERIAL_ECHO_START()         serial_echo_start()

+ 1
- 1
Marlin/src/core/utility.cpp View File

79
     );
79
     );
80
 
80
 
81
     #if HAS_BED_PROBE
81
     #if HAS_BED_PROBE
82
-      SERIAL_ECHOPAIR("Probe Offset X", probe_offset.x, " Y", probe_offset.y, " Z", probe_offset.z);
82
+      SERIAL_ECHOPAIR_P(PSTR("Probe Offset X"), probe_offset.x, SP_Y_STR, probe_offset.y, SP_Z_STR, probe_offset.z);
83
       if (probe_offset.x > 0)
83
       if (probe_offset.x > 0)
84
         SERIAL_ECHOPGM(" (Right");
84
         SERIAL_ECHOPGM(" (Right");
85
       else if (probe_offset.x < 0)
85
       else if (probe_offset.x < 0)

+ 1
- 1
Marlin/src/feature/bedlevel/ubl/ubl.cpp View File

51
         if (!isnan(z_values[x][y])) {
51
         if (!isnan(z_values[x][y])) {
52
           SERIAL_ECHO_START();
52
           SERIAL_ECHO_START();
53
           SERIAL_ECHOPAIR("  M421 I", int(x), " J", int(y));
53
           SERIAL_ECHOPAIR("  M421 I", int(x), " J", int(y));
54
-          SERIAL_ECHOLNPAIR_F(" Z", z_values[x][y], 4);
54
+          SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, z_values[x][y], 4);
55
           serial_delay(75); // Prevent Printrun from exploding
55
           serial_delay(75); // Prevent Printrun from exploding
56
         }
56
         }
57
   }
57
   }

+ 3
- 1
Marlin/src/feature/host_actions.cpp View File

64
 
64
 
65
 #if ENABLED(HOST_PROMPT_SUPPORT)
65
 #if ENABLED(HOST_PROMPT_SUPPORT)
66
 
66
 
67
+  const char CONTINUE_STR[] PROGMEM = "Continue";
68
+
67
   #if HAS_RESUME_CONTINUE
69
   #if HAS_RESUME_CONTINUE
68
     extern bool wait_for_user;
70
     extern bool wait_for_user;
69
   #endif
71
   #endif
126
             host_action_prompt_button(PSTR("DisableRunout"));
128
             host_action_prompt_button(PSTR("DisableRunout"));
127
           else {
129
           else {
128
             host_prompt_reason = PROMPT_FILAMENT_RUNOUT;
130
             host_prompt_reason = PROMPT_FILAMENT_RUNOUT;
129
-            host_action_prompt_button(PSTR("Continue"));
131
+            host_action_prompt_button(CONTINUE_STR);
130
           }
132
           }
131
           host_action_prompt_show();
133
           host_action_prompt_show();
132
         }
134
         }

+ 2
- 0
Marlin/src/feature/host_actions.h View File

46
 
46
 
47
 #if ENABLED(HOST_PROMPT_SUPPORT)
47
 #if ENABLED(HOST_PROMPT_SUPPORT)
48
 
48
 
49
+  extern const char CONTINUE_STR[];
50
+
49
   enum PromptReason : uint8_t {
51
   enum PromptReason : uint8_t {
50
     PROMPT_NOT_DEFINED,
52
     PROMPT_NOT_DEFINED,
51
     PROMPT_FILAMENT_RUNOUT,
53
     PROMPT_FILAMENT_RUNOUT,

+ 3
- 3
Marlin/src/feature/joystick.cpp View File

54
   void Joystick::report() {
54
   void Joystick::report() {
55
     SERIAL_ECHOPGM("Joystick");
55
     SERIAL_ECHOPGM("Joystick");
56
     #if HAS_JOY_ADC_X
56
     #if HAS_JOY_ADC_X
57
-      SERIAL_ECHOPAIR(" X", x.raw);
57
+      SERIAL_ECHOPAIR_P(SP_X_STR, x.raw);
58
     #endif
58
     #endif
59
     #if HAS_JOY_ADC_Y
59
     #if HAS_JOY_ADC_Y
60
-      SERIAL_ECHOPAIR(" Y", y.raw);
60
+      SERIAL_ECHOPAIR_P(SP_Y_STR, y.raw);
61
     #endif
61
     #endif
62
     #if HAS_JOY_ADC_Z
62
     #if HAS_JOY_ADC_Z
63
-      SERIAL_ECHOPAIR(" Z", z.raw);
63
+      SERIAL_ECHOPAIR_P(SP_Z_STR, z.raw);
64
     #endif
64
     #endif
65
     #if HAS_JOY_ADC_EN
65
     #if HAS_JOY_ADC_EN
66
       SERIAL_ECHO_TERNARY(READ(JOY_EN_PIN), " EN=", "HIGH (dis", "LOW (en", "abled)");
66
       SERIAL_ECHO_TERNARY(READ(JOY_EN_PIN), " EN=", "HIGH (dis", "LOW (en", "abled)");

+ 5
- 5
Marlin/src/feature/pause.cpp View File

191
       host_action_prompt_begin(PSTR("Load Filament T"), false);
191
       host_action_prompt_begin(PSTR("Load Filament T"), false);
192
       SERIAL_CHAR(tool);
192
       SERIAL_CHAR(tool);
193
       SERIAL_EOL();
193
       SERIAL_EOL();
194
-      host_action_prompt_button(PSTR("Continue"));
194
+      host_action_prompt_button(CONTINUE_STR);
195
       host_action_prompt_show();
195
       host_action_prompt_show();
196
     #endif
196
     #endif
197
     #if ENABLED(EXTENSIBLE_UI)
197
     #if ENABLED(EXTENSIBLE_UI)
247
 
247
 
248
     wait_for_user = true;
248
     wait_for_user = true;
249
     #if ENABLED(HOST_PROMPT_SUPPORT)
249
     #if ENABLED(HOST_PROMPT_SUPPORT)
250
-      host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Filament Purge Running..."), PSTR("Continue"));
250
+      host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Filament Purge Running..."), CONTINUE_STR);
251
     #endif
251
     #endif
252
     #if ENABLED(EXTENSIBLE_UI)
252
     #if ENABLED(EXTENSIBLE_UI)
253
       ExtUI::onUserConfirmRequired_P(PSTR("Filament Purge Running..."));
253
       ExtUI::onUserConfirmRequired_P(PSTR("Filament Purge Running..."));
283
           host_action_prompt_button(PSTR("DisableRunout"));
283
           host_action_prompt_button(PSTR("DisableRunout"));
284
         else {
284
         else {
285
           host_prompt_reason = PROMPT_FILAMENT_RUNOUT;
285
           host_prompt_reason = PROMPT_FILAMENT_RUNOUT;
286
-          host_action_prompt_button(PSTR("Continue"));
286
+          host_action_prompt_button(CONTINUE_STR);
287
         }
287
         }
288
         host_action_prompt_show();
288
         host_action_prompt_show();
289
       #endif
289
       #endif
523
   KEEPALIVE_STATE(PAUSED_FOR_USER);
523
   KEEPALIVE_STATE(PAUSED_FOR_USER);
524
   wait_for_user = true;    // LCD click or M108 will clear this
524
   wait_for_user = true;    // LCD click or M108 will clear this
525
   #if ENABLED(HOST_PROMPT_SUPPORT)
525
   #if ENABLED(HOST_PROMPT_SUPPORT)
526
-    host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Nozzle Parked"), PSTR("Continue"));
526
+    host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Nozzle Parked"), CONTINUE_STR);
527
   #endif
527
   #endif
528
   #if ENABLED(EXTENSIBLE_UI)
528
   #if ENABLED(EXTENSIBLE_UI)
529
     ExtUI::onUserConfirmRequired_P(PSTR("Nozzle Parked"));
529
     ExtUI::onUserConfirmRequired_P(PSTR("Nozzle Parked"));
577
 
577
 
578
       HOTEND_LOOP() thermalManager.hotend_idle[e].start(nozzle_timeout);
578
       HOTEND_LOOP() thermalManager.hotend_idle[e].start(nozzle_timeout);
579
       #if ENABLED(HOST_PROMPT_SUPPORT)
579
       #if ENABLED(HOST_PROMPT_SUPPORT)
580
-        host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheat Done"), PSTR("Continue"));
580
+        host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheat Done"), CONTINUE_STR);
581
       #endif
581
       #endif
582
       #if ENABLED(EXTENSIBLE_UI)
582
       #if ENABLED(EXTENSIBLE_UI)
583
         ExtUI::onUserConfirmRequired_P(PSTR("Reheat finished."));
583
         ExtUI::onUserConfirmRequired_P(PSTR("Reheat finished."));

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

709
       BUZZ(200, 404);
709
       BUZZ(200, 404);
710
       wait_for_user = true;
710
       wait_for_user = true;
711
       #if ENABLED(HOST_PROMPT_SUPPORT)
711
       #if ENABLED(HOST_PROMPT_SUPPORT)
712
-        host_prompt_do(PROMPT_USER_CONTINUE, PSTR("MMU2 Eject Recover"), PSTR("Continue"));
712
+        host_prompt_do(PROMPT_USER_CONTINUE, PSTR("MMU2 Eject Recover"), CONTINUE_STR);
713
       #endif
713
       #endif
714
       #if ENABLED(EXTENSIBLE_UI)
714
       #if ENABLED(EXTENSIBLE_UI)
715
         ExtUI::onUserConfirmRequired_P(PSTR("MMU2 Eject Recover"));
715
         ExtUI::onUserConfirmRequired_P(PSTR("MMU2 Eject Recover"));

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

560
           ExtUI::onMeshUpdate(meshCount, newz);
560
           ExtUI::onMeshUpdate(meshCount, newz);
561
         #endif
561
         #endif
562
 
562
 
563
-        if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Save X", meshCount.x, " Y", meshCount.y, " Z", measured_z + zoffset);
563
+        if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR_P(PSTR("Save X"), meshCount.x, SP_Y_STR, meshCount.y, SP_Z_STR, measured_z + zoffset);
564
 
564
 
565
       #endif
565
       #endif
566
     }
566
     }

+ 2
- 2
Marlin/src/gcode/calibrate/G34_M422.cpp View File

362
 void GcodeSuite::M422() {
362
 void GcodeSuite::M422() {
363
   if (!parser.seen_any()) {
363
   if (!parser.seen_any()) {
364
     for (uint8_t i = 0; i < G34_PROBE_COUNT; ++i)
364
     for (uint8_t i = 0; i < G34_PROBE_COUNT; ++i)
365
-      SERIAL_ECHOLNPAIR("M422 S", i + 1, " X", z_auto_align_pos[i].x, " Y", z_auto_align_pos[i].y);
365
+      SERIAL_ECHOLNPAIR_P(PSTR("M422 S"), i + 1, SP_X_STR, z_auto_align_pos[i].x, SP_Y_STR, z_auto_align_pos[i].y);
366
     #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
366
     #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
367
       for (uint8_t i = 0; i < Z_STEPPER_COUNT; ++i)
367
       for (uint8_t i = 0; i < Z_STEPPER_COUNT; ++i)
368
-        SERIAL_ECHOLNPAIR("M422 W", i + 1, " X", z_stepper_pos[i].x, " Y", z_stepper_pos[i].y);
368
+        SERIAL_ECHOLNPAIR_P(PSTR("M422 W"), i + 1, SP_X_STR, z_stepper_pos[i].x, SP_Y_STR, z_stepper_pos[i].y);
369
     #endif
369
     #endif
370
     return;
370
     return;
371
   }
371
   }

+ 9
- 9
Marlin/src/gcode/calibrate/G425.cpp View File

326
   inline void report_measured_center(const measurements_t &m) {
326
   inline void report_measured_center(const measurements_t &m) {
327
     SERIAL_ECHOLNPGM("Center:");
327
     SERIAL_ECHOLNPGM("Center:");
328
     #if HAS_X_CENTER
328
     #if HAS_X_CENTER
329
-      SERIAL_ECHOLNPAIR(" X", m.obj_center.x);
329
+      SERIAL_ECHOLNPAIR_P(SP_X_STR, m.obj_center.x);
330
     #endif
330
     #endif
331
     #if HAS_Y_CENTER
331
     #if HAS_Y_CENTER
332
-      SERIAL_ECHOLNPAIR(" Y", m.obj_center.y);
332
+      SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.obj_center.y);
333
     #endif
333
     #endif
334
-    SERIAL_ECHOLNPAIR(" Z", m.obj_center.z);
334
+    SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.obj_center.z);
335
     SERIAL_EOL();
335
     SERIAL_EOL();
336
   }
336
   }
337
 
337
 
358
     SERIAL_ECHO(int(active_extruder));
358
     SERIAL_ECHO(int(active_extruder));
359
     SERIAL_ECHOLNPGM(" Positional Error:");
359
     SERIAL_ECHOLNPGM(" Positional Error:");
360
     #if HAS_X_CENTER
360
     #if HAS_X_CENTER
361
-      SERIAL_ECHOLNPAIR(" X", m.pos_error.x);
361
+      SERIAL_ECHOLNPAIR_P(SP_X_STR, m.pos_error.x);
362
     #endif
362
     #endif
363
     #if HAS_Y_CENTER
363
     #if HAS_Y_CENTER
364
-      SERIAL_ECHOLNPAIR(" Y", m.pos_error.y);
364
+      SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.pos_error.y);
365
     #endif
365
     #endif
366
-    SERIAL_ECHOLNPAIR(" Z", m.pos_error.z);
366
+    SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.pos_error.z);
367
     SERIAL_EOL();
367
     SERIAL_EOL();
368
   }
368
   }
369
 
369
 
371
     SERIAL_ECHOLNPGM("Nozzle Tip Outer Dimensions:");
371
     SERIAL_ECHOLNPGM("Nozzle Tip Outer Dimensions:");
372
     #if HAS_X_CENTER || HAS_Y_CENTER
372
     #if HAS_X_CENTER || HAS_Y_CENTER
373
       #if HAS_X_CENTER
373
       #if HAS_X_CENTER
374
-        SERIAL_ECHOLNPAIR(" X", m.nozzle_outer_dimension.x);
374
+        SERIAL_ECHOLNPAIR_P(SP_X_STR, m.nozzle_outer_dimension.x);
375
       #endif
375
       #endif
376
       #if HAS_Y_CENTER
376
       #if HAS_Y_CENTER
377
-        SERIAL_ECHOLNPAIR(" Y", m.nozzle_outer_dimension.y);
377
+        SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.nozzle_outer_dimension.y);
378
       #endif
378
       #endif
379
     #else
379
     #else
380
       UNUSED(m);
380
       UNUSED(m);
388
     //
388
     //
389
     inline void report_hotend_offsets() {
389
     inline void report_hotend_offsets() {
390
       for (uint8_t e = 1; e < HOTENDS; e++)
390
       for (uint8_t e = 1; e < HOTENDS; e++)
391
-        SERIAL_ECHOLNPAIR("T", int(e), " Hotend Offset X", hotend_offset[e].x, " Y", hotend_offset[e].y, " Z", hotend_offset[e].z);
391
+        SERIAL_ECHOLNPAIR_P(PSTR("T"), int(e), PSTR(" Hotend Offset X"), hotend_offset[e].x, SP_Y_STR, hotend_offset[e].y, SP_Z_STR, hotend_offset[e].z);
392
     }
392
     }
393
   #endif
393
   #endif
394
 
394
 

+ 2
- 2
Marlin/src/gcode/calibrate/M48.cpp View File

178
             while (!position_is_reachable_by_probe(next_pos)) {
178
             while (!position_is_reachable_by_probe(next_pos)) {
179
               next_pos *= 0.8f;
179
               next_pos *= 0.8f;
180
               if (verbose_level > 3)
180
               if (verbose_level > 3)
181
-                SERIAL_ECHOLNPAIR("Moving inward: X", next_pos.x, " Y", next_pos.y);
181
+                SERIAL_ECHOLNPAIR_P(PSTR("Moving inward: X"), next_pos.x, SP_Y_STR, next_pos.y);
182
             }
182
             }
183
           #endif
183
           #endif
184
 
184
 
185
           if (verbose_level > 3)
185
           if (verbose_level > 3)
186
-            SERIAL_ECHOLNPAIR("Going to: X", next_pos.x, " Y", next_pos.y);
186
+            SERIAL_ECHOLNPAIR_P(PSTR("Going to: X"), next_pos.x, SP_Y_STR, next_pos.y);
187
 
187
 
188
           do_blocking_move_to_xy(next_pos);
188
           do_blocking_move_to_xy(next_pos);
189
         } // n_legs loop
189
         } // n_legs loop

+ 8
- 4
Marlin/src/gcode/config/M217.cpp View File

27
 #include "../gcode.h"
27
 #include "../gcode.h"
28
 #include "../../module/tool_change.h"
28
 #include "../../module/tool_change.h"
29
 
29
 
30
+#include "../../Marlin.h" // for SP_X_STR, etc.
31
+
32
+extern const char SP_X_STR[], SP_Y_STR[], SP_Z_STR[];
33
+
30
 void M217_report(const bool eeprom=false) {
34
 void M217_report(const bool eeprom=false) {
31
 
35
 
32
   #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
36
   #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
33
     serialprintPGM(eeprom ? PSTR("  M217") : PSTR("Toolchange:"));
37
     serialprintPGM(eeprom ? PSTR("  M217") : PSTR("Toolchange:"));
34
     SERIAL_ECHOPAIR(" S", LINEAR_UNIT(toolchange_settings.swap_length));
38
     SERIAL_ECHOPAIR(" S", LINEAR_UNIT(toolchange_settings.swap_length));
35
-    SERIAL_ECHOPAIR(" E", LINEAR_UNIT(toolchange_settings.extra_prime));
39
+    SERIAL_ECHOPAIR_P(SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime));
36
     SERIAL_ECHOPAIR(" P", LINEAR_UNIT(toolchange_settings.prime_speed));
40
     SERIAL_ECHOPAIR(" P", LINEAR_UNIT(toolchange_settings.prime_speed));
37
     SERIAL_ECHOPAIR(" R", LINEAR_UNIT(toolchange_settings.retract_speed));
41
     SERIAL_ECHOPAIR(" R", LINEAR_UNIT(toolchange_settings.retract_speed));
38
 
42
 
39
     #if ENABLED(TOOLCHANGE_PARK)
43
     #if ENABLED(TOOLCHANGE_PARK)
40
-      SERIAL_ECHOPAIR(" X", LINEAR_UNIT(toolchange_settings.change_point.x));
41
-      SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(toolchange_settings.change_point.y));
44
+      SERIAL_ECHOPAIR_P(SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x));
45
+      SERIAL_ECHOPAIR_P(SP_Y_STR, LINEAR_UNIT(toolchange_settings.change_point.y));
42
     #endif
46
     #endif
43
 
47
 
44
   #else
48
   #else
47
 
51
 
48
   #endif
52
   #endif
49
 
53
 
50
-  SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(toolchange_settings.z_raise));
54
+  SERIAL_ECHOPAIR_P(SP_Z_STR, LINEAR_UNIT(toolchange_settings.z_raise));
51
   SERIAL_EOL();
55
   SERIAL_EOL();
52
 }
56
 }
53
 
57
 

+ 1
- 1
Marlin/src/gcode/config/M43.cpp View File

331
       KEEPALIVE_STATE(PAUSED_FOR_USER);
331
       KEEPALIVE_STATE(PAUSED_FOR_USER);
332
       wait_for_user = true;
332
       wait_for_user = true;
333
       #if ENABLED(HOST_PROMPT_SUPPORT)
333
       #if ENABLED(HOST_PROMPT_SUPPORT)
334
-        host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M43 Wait Called"), PSTR("Continue"));
334
+        host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M43 Wait Called"), CONTINUE_STR);
335
       #endif
335
       #endif
336
       #if ENABLED(EXTENSIBLE_UI)
336
       #if ENABLED(EXTENSIBLE_UI)
337
         ExtUI::onUserConfirmRequired_P(PSTR("M43 Wait Called"));
337
         ExtUI::onUserConfirmRequired_P(PSTR("M43 Wait Called"));

+ 6
- 6
Marlin/src/gcode/config/M92.cpp View File

25
 
25
 
26
 void report_M92(const bool echo=true, const int8_t e=-1) {
26
 void report_M92(const bool echo=true, const int8_t e=-1) {
27
   if (echo) SERIAL_ECHO_START(); else SERIAL_CHAR(' ');
27
   if (echo) SERIAL_ECHO_START(); else SERIAL_CHAR(' ');
28
-  SERIAL_ECHOPAIR(" M92 X", LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]),
29
-                  " Y", LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]),
30
-                  " Z", LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]));
28
+  SERIAL_ECHOPAIR_P(PSTR(" M92 X"), LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]),
29
+                          SP_Y_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]),
30
+                          SP_Z_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]));
31
   #if DISABLED(DISTINCT_E_FACTORS)
31
   #if DISABLED(DISTINCT_E_FACTORS)
32
-    SERIAL_ECHOPAIR(" E", VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS]));
32
+    SERIAL_ECHOPAIR_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS]));
33
   #endif
33
   #endif
34
   SERIAL_EOL();
34
   SERIAL_EOL();
35
 
35
 
37
     for (uint8_t i = 0; i < E_STEPPERS; i++) {
37
     for (uint8_t i = 0; i < E_STEPPERS; i++) {
38
       if (e >= 0 && i != e) continue;
38
       if (e >= 0 && i != e) continue;
39
       if (echo) SERIAL_ECHO_START(); else SERIAL_CHAR(' ');
39
       if (echo) SERIAL_ECHO_START(); else SERIAL_CHAR(' ');
40
-      SERIAL_ECHOLNPAIR(" M92 T", (int)i,
41
-                        " E", VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)]));
40
+      SERIAL_ECHOLNPAIR_P(PSTR(" M92 T"), (int)i,
41
+                        SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)]));
42
     }
42
     }
43
   #endif
43
   #endif
44
 
44
 

+ 1
- 1
Marlin/src/gcode/feature/mixing/M166.cpp View File

35
 
35
 
36
 inline void echo_zt(const int t, const float &z) {
36
 inline void echo_zt(const int t, const float &z) {
37
   mixer.update_mix_from_vtool(t);
37
   mixer.update_mix_from_vtool(t);
38
-  SERIAL_ECHOPAIR(" Z", z, " T", t);
38
+  SERIAL_ECHOPAIR_P(SP_Z_STR, z, PSTR(" T"), t);
39
   echo_mix();
39
   echo_mix();
40
 }
40
 }
41
 
41
 

+ 1
- 1
Marlin/src/gcode/lcd/M0_M1.cpp View File

98
   wait_for_user = true;
98
   wait_for_user = true;
99
 
99
 
100
   #if ENABLED(HOST_PROMPT_SUPPORT)
100
   #if ENABLED(HOST_PROMPT_SUPPORT)
101
-    host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M0/1 Break Called"), PSTR("Continue"));
101
+    host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M0/1 Break Called"), CONTINUE_STR);
102
   #endif
102
   #endif
103
 
103
 
104
   if (ms > 0) {
104
   if (ms > 0) {

+ 16
- 8
Marlin/src/gcode/motion/M290.cpp View File

103
 
103
 
104
     #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
104
     #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
105
     {
105
     {
106
-      SERIAL_ECHOLNPAIR("Hotend ", int(active_extruder), "Offset"
106
+      #error "Hey!"
107
+      SERIAL_ECHOLNPAIR_P(
108
+        PSTR("Hotend "), int(active_extruder)
107
         #if ENABLED(BABYSTEP_XY)
109
         #if ENABLED(BABYSTEP_XY)
108
-          " X", hotend_offset[active_extruder].x,
109
-          " Y", hotend_offset[active_extruder].y,
110
+          , PSTR("Offset X"), hotend_offset[active_extruder].x
111
+          , SP_Y_STR, hotend_offset[active_extruder].y
112
+          , SP_Z_STR
113
+        #else
114
+          , PSTR("Offset Z")
110
         #endif
115
         #endif
111
-        " Z", hotend_offset[active_extruder].z
116
+        , hotend_offset[active_extruder].z
112
       );
117
       );
113
     }
118
     }
114
     #endif
119
     #endif
119
 
124
 
120
     #if ENABLED(BABYSTEP_DISPLAY_TOTAL)
125
     #if ENABLED(BABYSTEP_DISPLAY_TOTAL)
121
     {
126
     {
122
-      SERIAL_ECHOLNPAIR("Babystep"
127
+      SERIAL_ECHOLNPAIR_P(
123
         #if ENABLED(BABYSTEP_XY)
128
         #if ENABLED(BABYSTEP_XY)
124
-          " X", babystep.axis_total[X_AXIS],
125
-          " Y", babystep.axis_total[Y_AXIS],
129
+            PSTR("Babystep X"), babystep.axis_total[X_AXIS]
130
+          , SP_Y_STR, babystep.axis_total[Y_AXIS]
131
+          , SP_Z_STR
132
+        #else
133
+          , PSTR("Babystep Z")
126
         #endif
134
         #endif
127
-        " Z", babystep.axis_total[BS_TODO_AXIS(Z_AXIS)]
135
+        , babystep.axis_total[BS_TODO_AXIS(Z_AXIS)]
128
       );
136
       );
129
     }
137
     }
130
     #endif
138
     #endif

+ 3
- 1
Marlin/src/gcode/probe/M851.cpp View File

28
 #include "../../feature/bedlevel/bedlevel.h"
28
 #include "../../feature/bedlevel/bedlevel.h"
29
 #include "../../module/probe.h"
29
 #include "../../module/probe.h"
30
 
30
 
31
+extern const char SP_Y_STR[], SP_Z_STR[];
32
+
31
 /**
33
 /**
32
  * M851: Set the nozzle-to-probe offsets in current units
34
  * M851: Set the nozzle-to-probe offsets in current units
33
  */
35
  */
35
 
37
 
36
   // Show usage with no parameters
38
   // Show usage with no parameters
37
   if (!parser.seen("XYZ")) {
39
   if (!parser.seen("XYZ")) {
38
-    SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET " X", probe_offset.x, " Y", probe_offset.y, " Z", probe_offset.z);
40
+    SERIAL_ECHOLNPAIR_P(PSTR(MSG_PROBE_OFFSET " X"), probe_offset.x, SP_Y_STR, probe_offset.y, SP_Z_STR, probe_offset.z);
39
     return;
41
     return;
40
   }
42
   }
41
 
43
 

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

61
     ui.defer_status_screen();
61
     ui.defer_status_screen();
62
     wait_for_user = true;
62
     wait_for_user = true;
63
     #if ENABLED(HOST_PROMPT_SUPPORT)
63
     #if ENABLED(HOST_PROMPT_SUPPORT)
64
-      host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Delta Calibration in progress"), PSTR("Continue"));
64
+      host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Delta Calibration in progress"), CONTINUE_STR);
65
     #endif
65
     #endif
66
     #if ENABLED(EXTENSIBLE_UI)
66
     #if ENABLED(EXTENSIBLE_UI)
67
       ExtUI::onUserConfirmRequired_P(PSTR("Delta Calibration in progress"));
67
       ExtUI::onUserConfirmRequired_P(PSTR("Delta Calibration in progress"));

+ 3
- 3
Marlin/src/libs/vector_3.cpp View File

78
 
78
 
79
 void vector_3::debug(PGM_P const title) {
79
 void vector_3::debug(PGM_P const title) {
80
   serialprintPGM(title);
80
   serialprintPGM(title);
81
-  SERIAL_ECHOPAIR_F(" X", x, 6);
82
-  SERIAL_ECHOPAIR_F(" Y", y, 6);
83
-  SERIAL_ECHOLNPAIR_F(" Z", z, 6);
81
+  SERIAL_ECHOPAIR_F_P(SP_X_STR, x, 6);
82
+  SERIAL_ECHOPAIR_F_P(SP_Y_STR, y, 6);
83
+  SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, z, 6);
84
 }
84
 }
85
 
85
 
86
 /**
86
 /**

+ 117
- 108
Marlin/src/module/configuration_store.cpp View File

129
 static const float     _DASU[] PROGMEM = DEFAULT_AXIS_STEPS_PER_UNIT;
129
 static const float     _DASU[] PROGMEM = DEFAULT_AXIS_STEPS_PER_UNIT;
130
 static const feedRate_t _DMF[] PROGMEM = DEFAULT_MAX_FEEDRATE;
130
 static const feedRate_t _DMF[] PROGMEM = DEFAULT_MAX_FEEDRATE;
131
 
131
 
132
+extern const char SP_X_STR[], SP_Y_STR[], SP_Z_STR[], SP_E_STR[];
133
+
132
 /**
134
 /**
133
  * Current EEPROM Layout
135
  * Current EEPROM Layout
134
  *
136
  *
2728
 
2730
 
2729
     CONFIG_ECHO_HEADING("Maximum feedrates (units/s):");
2731
     CONFIG_ECHO_HEADING("Maximum feedrates (units/s):");
2730
     CONFIG_ECHO_START();
2732
     CONFIG_ECHO_START();
2731
-    SERIAL_ECHOLNPAIR(
2732
-        "  M203 X", LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS])
2733
-      , " Y", LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Y_AXIS])
2734
-      , " Z", LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Z_AXIS])
2733
+    SERIAL_ECHOLNPAIR_P(
2734
+        PSTR("  M203 X"), LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS])
2735
+      , SP_Y_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Y_AXIS])
2736
+      , SP_Z_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Z_AXIS])
2735
       #if DISABLED(DISTINCT_E_FACTORS)
2737
       #if DISABLED(DISTINCT_E_FACTORS)
2736
-        , " E", VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS])
2738
+        , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS])
2737
       #endif
2739
       #endif
2738
     );
2740
     );
2739
     #if ENABLED(DISTINCT_E_FACTORS)
2741
     #if ENABLED(DISTINCT_E_FACTORS)
2740
       CONFIG_ECHO_START();
2742
       CONFIG_ECHO_START();
2741
       for (uint8_t i = 0; i < E_STEPPERS; i++) {
2743
       for (uint8_t i = 0; i < E_STEPPERS; i++) {
2742
-        SERIAL_ECHOLNPAIR(
2743
-            "  M203 T", (int)i
2744
-          , " E", VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS_N(i)])
2744
+        SERIAL_ECHOLNPAIR_P(
2745
+            PSTR("  M203 T"), (int)i
2746
+          , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS_N(i)])
2745
         );
2747
         );
2746
       }
2748
       }
2747
     #endif
2749
     #endif
2748
 
2750
 
2749
     CONFIG_ECHO_HEADING("Maximum Acceleration (units/s2):");
2751
     CONFIG_ECHO_HEADING("Maximum Acceleration (units/s2):");
2750
     CONFIG_ECHO_START();
2752
     CONFIG_ECHO_START();
2751
-    SERIAL_ECHOLNPAIR(
2752
-        "  M201 X", LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS])
2753
-      , " Y", LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Y_AXIS])
2754
-      , " Z", LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Z_AXIS])
2753
+    SERIAL_ECHOLNPAIR_P(
2754
+        PSTR("  M201 X"), LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS])
2755
+      , SP_Y_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Y_AXIS])
2756
+      , SP_Z_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Z_AXIS])
2755
       #if DISABLED(DISTINCT_E_FACTORS)
2757
       #if DISABLED(DISTINCT_E_FACTORS)
2756
-        , " E", VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS])
2758
+        , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS])
2757
       #endif
2759
       #endif
2758
     );
2760
     );
2759
     #if ENABLED(DISTINCT_E_FACTORS)
2761
     #if ENABLED(DISTINCT_E_FACTORS)
2760
       CONFIG_ECHO_START();
2762
       CONFIG_ECHO_START();
2761
       for (uint8_t i = 0; i < E_STEPPERS; i++)
2763
       for (uint8_t i = 0; i < E_STEPPERS; i++)
2762
-        SERIAL_ECHOLNPAIR(
2763
-            "  M201 T", (int)i
2764
-          , " E", VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(i)])
2764
+        SERIAL_ECHOLNPAIR_P(
2765
+            PSTR("  M201 T"), (int)i
2766
+          , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(i)])
2765
         );
2767
         );
2766
     #endif
2768
     #endif
2767
 
2769
 
2788
       SERIAL_EOL();
2790
       SERIAL_EOL();
2789
     }
2791
     }
2790
     CONFIG_ECHO_START();
2792
     CONFIG_ECHO_START();
2791
-    SERIAL_ECHOLNPAIR(
2792
-        "  M205 B", LINEAR_UNIT(planner.settings.min_segment_time_us)
2793
-      , " S", LINEAR_UNIT(planner.settings.min_feedrate_mm_s)
2794
-      , " T", LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s)
2793
+    SERIAL_ECHOLNPAIR_P(
2794
+        PSTR("  M205 B"), LINEAR_UNIT(planner.settings.min_segment_time_us)
2795
+      , PSTR(" S"), LINEAR_UNIT(planner.settings.min_feedrate_mm_s)
2796
+      , PSTR(" T"), LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s)
2795
       #if DISABLED(CLASSIC_JERK)
2797
       #if DISABLED(CLASSIC_JERK)
2796
-        , " J", LINEAR_UNIT(planner.junction_deviation_mm)
2798
+        , PSTR(" J"), LINEAR_UNIT(planner.junction_deviation_mm)
2797
       #endif
2799
       #endif
2798
       #if HAS_CLASSIC_JERK
2800
       #if HAS_CLASSIC_JERK
2799
-        , " X", LINEAR_UNIT(planner.max_jerk.x)
2800
-        , " Y", LINEAR_UNIT(planner.max_jerk.y)
2801
-        , " Z", LINEAR_UNIT(planner.max_jerk.z)
2801
+        , SP_X_STR, LINEAR_UNIT(planner.max_jerk.x)
2802
+        , SP_Y_STR, LINEAR_UNIT(planner.max_jerk.y)
2803
+        , SP_Z_STR, LINEAR_UNIT(planner.max_jerk.z)
2802
         #if HAS_CLASSIC_E_JERK
2804
         #if HAS_CLASSIC_E_JERK
2803
-          , " E", LINEAR_UNIT(planner.max_jerk.e)
2805
+          , SP_E_STR, LINEAR_UNIT(planner.max_jerk.e)
2804
         #endif
2806
         #endif
2805
       #endif
2807
       #endif
2806
     );
2808
     );
2808
     #if HAS_M206_COMMAND
2810
     #if HAS_M206_COMMAND
2809
       CONFIG_ECHO_HEADING("Home offset:");
2811
       CONFIG_ECHO_HEADING("Home offset:");
2810
       CONFIG_ECHO_START();
2812
       CONFIG_ECHO_START();
2811
-      SERIAL_ECHOLNPAIR("  M206"
2813
+      SERIAL_ECHOLNPAIR_P(
2812
         #if IS_CARTESIAN
2814
         #if IS_CARTESIAN
2813
-          " X", LINEAR_UNIT(home_offset.x),
2814
-          " Y", LINEAR_UNIT(home_offset.y),
2815
+            PSTR("  M206 X"), LINEAR_UNIT(home_offset.x)
2816
+          , SP_Y_STR, LINEAR_UNIT(home_offset.y)
2817
+          , SP_Z_STR
2818
+        #else
2819
+          PSTR("  M206 Z")
2815
         #endif
2820
         #endif
2816
-        " Z", LINEAR_UNIT(home_offset.z)
2821
+        , LINEAR_UNIT(home_offset.z)
2817
       );
2822
       );
2818
     #endif
2823
     #endif
2819
 
2824
 
2821
       CONFIG_ECHO_HEADING("Hotend offsets:");
2826
       CONFIG_ECHO_HEADING("Hotend offsets:");
2822
       CONFIG_ECHO_START();
2827
       CONFIG_ECHO_START();
2823
       for (uint8_t e = 1; e < HOTENDS; e++) {
2828
       for (uint8_t e = 1; e < HOTENDS; e++) {
2824
-        SERIAL_ECHOPAIR(
2825
-          "  M218 T", (int)e,
2826
-          " X", LINEAR_UNIT(hotend_offset[e].x), " Y", LINEAR_UNIT(hotend_offset[e].y)
2829
+        SERIAL_ECHOPAIR_P(
2830
+          PSTR("  M218 T"), (int)e,
2831
+          SP_X_STR, LINEAR_UNIT(hotend_offset[e].x),
2832
+          SP_Y_STR, LINEAR_UNIT(hotend_offset[e].y)
2827
         );
2833
         );
2828
-        SERIAL_ECHOLNPAIR_F(" Z", LINEAR_UNIT(hotend_offset[e].z), 3);
2834
+        SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(hotend_offset[e].z), 3);
2829
       }
2835
       }
2830
     #endif
2836
     #endif
2831
 
2837
 
2853
       #endif
2859
       #endif
2854
 
2860
 
2855
       CONFIG_ECHO_START();
2861
       CONFIG_ECHO_START();
2856
-      SERIAL_ECHOLNPAIR(
2857
-        "  M420 S", planner.leveling_active ? 1 : 0
2862
+      SERIAL_ECHOLNPAIR_P(
2863
+        PSTR("  M420 S"), planner.leveling_active ? 1 : 0
2858
         #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
2864
         #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
2859
-          , " Z", LINEAR_UNIT(planner.z_fade_height)
2865
+          , SP_Z_STR, LINEAR_UNIT(planner.z_fade_height)
2860
         #endif
2866
         #endif
2861
       );
2867
       );
2862
 
2868
 
2866
           for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
2872
           for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
2867
             for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
2873
             for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
2868
               CONFIG_ECHO_START();
2874
               CONFIG_ECHO_START();
2869
-              SERIAL_ECHOPAIR("  G29 S3 X", (int)px + 1, " Y", (int)py + 1);
2870
-              SERIAL_ECHOLNPAIR_F(" Z", LINEAR_UNIT(mbl.z_values[px][py]), 5);
2875
+              SERIAL_ECHOPAIR_P(PSTR("  G29 S3 X"), (int)px + 1, SP_Y_STR, (int)py + 1);
2876
+              SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(mbl.z_values[px][py]), 5);
2871
             }
2877
             }
2872
           }
2878
           }
2873
         }
2879
         }
2890
             for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
2896
             for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
2891
               CONFIG_ECHO_START();
2897
               CONFIG_ECHO_START();
2892
               SERIAL_ECHOPAIR("  G29 W I", (int)px, " J", (int)py);
2898
               SERIAL_ECHOPAIR("  G29 W I", (int)px, " J", (int)py);
2893
-              SERIAL_ECHOLNPAIR_F(" Z", LINEAR_UNIT(z_values[px][py]), 5);
2899
+              SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(z_values[px][py]), 5);
2894
             }
2900
             }
2895
           }
2901
           }
2896
         }
2902
         }
2926
 
2932
 
2927
       CONFIG_ECHO_HEADING("SCARA settings: S<seg-per-sec> P<theta-psi-offset> T<theta-offset>");
2933
       CONFIG_ECHO_HEADING("SCARA settings: S<seg-per-sec> P<theta-psi-offset> T<theta-offset>");
2928
       CONFIG_ECHO_START();
2934
       CONFIG_ECHO_START();
2929
-      SERIAL_ECHOLNPAIR(
2930
-          "  M665 S", delta_segments_per_second
2931
-        , " P", scara_home_offset.a
2932
-        , " T", scara_home_offset.b
2933
-        , " Z", LINEAR_UNIT(scara_home_offset.z)
2935
+      SERIAL_ECHOLNPAIR_P(
2936
+          PSTR("  M665 S"), delta_segments_per_second
2937
+        , PSTR(" P"), scara_home_offset.a
2938
+        , PSTR(" T"), scara_home_offset.b
2939
+        , SP_Z_STR, LINEAR_UNIT(scara_home_offset.z)
2934
       );
2940
       );
2935
 
2941
 
2936
     #elif ENABLED(DELTA)
2942
     #elif ENABLED(DELTA)
2937
 
2943
 
2938
       CONFIG_ECHO_HEADING("Endstop adjustment:");
2944
       CONFIG_ECHO_HEADING("Endstop adjustment:");
2939
       CONFIG_ECHO_START();
2945
       CONFIG_ECHO_START();
2940
-      SERIAL_ECHOLNPAIR(
2941
-          "  M666 X", LINEAR_UNIT(delta_endstop_adj.a)
2942
-        , " Y", LINEAR_UNIT(delta_endstop_adj.b)
2943
-        , " Z", LINEAR_UNIT(delta_endstop_adj.c)
2946
+      SERIAL_ECHOLNPAIR_P(
2947
+          PSTR("  M666 X"), LINEAR_UNIT(delta_endstop_adj.a)
2948
+        , SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b)
2949
+        , SP_Z_STR, LINEAR_UNIT(delta_endstop_adj.c)
2944
       );
2950
       );
2945
 
2951
 
2946
       CONFIG_ECHO_HEADING("Delta settings: L<diagonal_rod> R<radius> H<height> S<segments_per_s> XYZ<tower angle corrections>");
2952
       CONFIG_ECHO_HEADING("Delta settings: L<diagonal_rod> R<radius> H<height> S<segments_per_s> XYZ<tower angle corrections>");
2947
       CONFIG_ECHO_START();
2953
       CONFIG_ECHO_START();
2948
-      SERIAL_ECHOLNPAIR(
2949
-          "  M665 L", LINEAR_UNIT(delta_diagonal_rod)
2950
-        , " R", LINEAR_UNIT(delta_radius)
2951
-        , " H", LINEAR_UNIT(delta_height)
2952
-        , " S", delta_segments_per_second
2953
-        , " X", LINEAR_UNIT(delta_tower_angle_trim.a)
2954
-        , " Y", LINEAR_UNIT(delta_tower_angle_trim.b)
2955
-        , " Z", LINEAR_UNIT(delta_tower_angle_trim.c)
2954
+      SERIAL_ECHOLNPAIR_P(
2955
+          PSTR("  M665 L"), LINEAR_UNIT(delta_diagonal_rod)
2956
+        , PSTR(" R"), LINEAR_UNIT(delta_radius)
2957
+        , PSTR(" H"), LINEAR_UNIT(delta_height)
2958
+        , PSTR(" S"), delta_segments_per_second
2959
+        , SP_X_STR, LINEAR_UNIT(delta_tower_angle_trim.a)
2960
+        , SP_Y_STR, LINEAR_UNIT(delta_tower_angle_trim.b)
2961
+        , SP_Z_STR, LINEAR_UNIT(delta_tower_angle_trim.c)
2956
       );
2962
       );
2957
 
2963
 
2958
     #elif EITHER(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
2964
     #elif EITHER(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
2961
       CONFIG_ECHO_START();
2967
       CONFIG_ECHO_START();
2962
       SERIAL_ECHOPGM("  M666");
2968
       SERIAL_ECHOPGM("  M666");
2963
       #if ENABLED(X_DUAL_ENDSTOPS)
2969
       #if ENABLED(X_DUAL_ENDSTOPS)
2964
-        SERIAL_ECHOPAIR(" X", LINEAR_UNIT(endstops.x2_endstop_adj));
2970
+        SERIAL_ECHOPAIR_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj));
2965
       #endif
2971
       #endif
2966
       #if ENABLED(Y_DUAL_ENDSTOPS)
2972
       #if ENABLED(Y_DUAL_ENDSTOPS)
2967
-        SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(endstops.y2_endstop_adj));
2973
+        SERIAL_ECHOPAIR_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj));
2968
       #endif
2974
       #endif
2969
       #if ENABLED(Z_TRIPLE_ENDSTOPS)
2975
       #if ENABLED(Z_TRIPLE_ENDSTOPS)
2970
         SERIAL_ECHOLNPAIR("S1 Z", LINEAR_UNIT(endstops.z2_endstop_adj));
2976
         SERIAL_ECHOLNPAIR("S1 Z", LINEAR_UNIT(endstops.z2_endstop_adj));
2971
         CONFIG_ECHO_START();
2977
         CONFIG_ECHO_START();
2972
         SERIAL_ECHOPAIR("  M666 S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
2978
         SERIAL_ECHOPAIR("  M666 S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
2973
       #elif ENABLED(Z_DUAL_ENDSTOPS)
2979
       #elif ENABLED(Z_DUAL_ENDSTOPS)
2974
-        SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(endstops.z2_endstop_adj));
2980
+        SERIAL_ECHOPAIR_P(SP_Z_STR, LINEAR_UNIT(endstops.z2_endstop_adj));
2975
       #endif
2981
       #endif
2976
       SERIAL_EOL();
2982
       SERIAL_EOL();
2977
 
2983
 
2999
       #if ENABLED(PIDTEMP)
3005
       #if ENABLED(PIDTEMP)
3000
         HOTEND_LOOP() {
3006
         HOTEND_LOOP() {
3001
           CONFIG_ECHO_START();
3007
           CONFIG_ECHO_START();
3002
-          SERIAL_ECHOPAIR("  M301"
3008
+          SERIAL_ECHOPAIR_P(
3003
             #if HOTENDS > 1 && ENABLED(PID_PARAMS_PER_HOTEND)
3009
             #if HOTENDS > 1 && ENABLED(PID_PARAMS_PER_HOTEND)
3004
-              " E", e,
3010
+              PSTR("  M301 E"), e,
3011
+              PSTR(" P")
3012
+            #else
3013
+              PSTR("  M301 P")
3005
             #endif
3014
             #endif
3006
-              " P", PID_PARAM(Kp, e)
3007
-            , " I", unscalePID_i(PID_PARAM(Ki, e))
3008
-            , " D", unscalePID_d(PID_PARAM(Kd, e))
3015
+                        , PID_PARAM(Kp, e)
3016
+            , PSTR(" I"), unscalePID_i(PID_PARAM(Ki, e))
3017
+            , PSTR(" D"), unscalePID_d(PID_PARAM(Kd, e))
3009
           );
3018
           );
3010
           #if ENABLED(PID_EXTRUSION_SCALING)
3019
           #if ENABLED(PID_EXTRUSION_SCALING)
3011
             SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, e));
3020
             SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, e));
3051
 
3060
 
3052
       CONFIG_ECHO_HEADING("Retract: S<length> F<units/m> Z<lift>");
3061
       CONFIG_ECHO_HEADING("Retract: S<length> F<units/m> Z<lift>");
3053
       CONFIG_ECHO_START();
3062
       CONFIG_ECHO_START();
3054
-      SERIAL_ECHOLNPAIR(
3055
-          "  M207 S", LINEAR_UNIT(fwretract.settings.retract_length)
3056
-        , " W", LINEAR_UNIT(fwretract.settings.swap_retract_length)
3057
-        , " F", LINEAR_UNIT(MMS_TO_MMM(fwretract.settings.retract_feedrate_mm_s))
3058
-        , " Z", LINEAR_UNIT(fwretract.settings.retract_zraise)
3063
+      SERIAL_ECHOLNPAIR_P(
3064
+          PSTR("  M207 S"), LINEAR_UNIT(fwretract.settings.retract_length)
3065
+        , PSTR(" W"), LINEAR_UNIT(fwretract.settings.swap_retract_length)
3066
+        , PSTR(" F"), LINEAR_UNIT(MMS_TO_MMM(fwretract.settings.retract_feedrate_mm_s))
3067
+        , SP_Z_STR, LINEAR_UNIT(fwretract.settings.retract_zraise)
3059
       );
3068
       );
3060
 
3069
 
3061
       CONFIG_ECHO_HEADING("Recover: S<length> F<units/m>");
3070
       CONFIG_ECHO_HEADING("Recover: S<length> F<units/m>");
3086
         say_units(true);
3095
         say_units(true);
3087
       }
3096
       }
3088
       CONFIG_ECHO_START();
3097
       CONFIG_ECHO_START();
3089
-      SERIAL_ECHOLNPAIR("  M851 X", LINEAR_UNIT(probe_offset.x),
3090
-                              " Y", LINEAR_UNIT(probe_offset.y),
3091
-                              " Z", LINEAR_UNIT(probe_offset.z));
3098
+      SERIAL_ECHOLNPAIR_P(PSTR("  M851 X"), LINEAR_UNIT(probe_offset.x),
3099
+                                  SP_Y_STR, LINEAR_UNIT(probe_offset.y),
3100
+                                  SP_Z_STR, LINEAR_UNIT(probe_offset.z));
3092
     #endif
3101
     #endif
3093
 
3102
 
3094
     /**
3103
     /**
3115
 
3124
 
3116
       #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z)
3125
       #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z)
3117
         say_M906(forReplay);
3126
         say_M906(forReplay);
3118
-        SERIAL_ECHOLNPAIR(
3127
+        SERIAL_ECHOLNPAIR_P(
3119
           #if AXIS_IS_TMC(X)
3128
           #if AXIS_IS_TMC(X)
3120
-            " X", stepperX.getMilliamps(),
3129
+            SP_X_STR, stepperX.getMilliamps(),
3121
           #endif
3130
           #endif
3122
           #if AXIS_IS_TMC(Y)
3131
           #if AXIS_IS_TMC(Y)
3123
-            " Y", stepperY.getMilliamps(),
3132
+            SP_Y_STR, stepperY.getMilliamps(),
3124
           #endif
3133
           #endif
3125
           #if AXIS_IS_TMC(Z)
3134
           #if AXIS_IS_TMC(Z)
3126
-            " Z", stepperZ.getMilliamps()
3135
+            SP_Z_STR, stepperZ.getMilliamps()
3127
           #endif
3136
           #endif
3128
         );
3137
         );
3129
       #endif
3138
       #endif
3131
       #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2)
3140
       #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2)
3132
         say_M906(forReplay);
3141
         say_M906(forReplay);
3133
         SERIAL_ECHOPGM(" I1");
3142
         SERIAL_ECHOPGM(" I1");
3134
-        SERIAL_ECHOLNPAIR(
3143
+        SERIAL_ECHOLNPAIR_P(
3135
           #if AXIS_IS_TMC(X2)
3144
           #if AXIS_IS_TMC(X2)
3136
-            " X", stepperX2.getMilliamps(),
3145
+            SP_X_STR, stepperX2.getMilliamps(),
3137
           #endif
3146
           #endif
3138
           #if AXIS_IS_TMC(Y2)
3147
           #if AXIS_IS_TMC(Y2)
3139
-            " Y", stepperY2.getMilliamps(),
3148
+            SP_Y_STR, stepperY2.getMilliamps(),
3140
           #endif
3149
           #endif
3141
           #if AXIS_IS_TMC(Z2)
3150
           #if AXIS_IS_TMC(Z2)
3142
-            " Z", stepperZ2.getMilliamps()
3151
+            SP_Z_STR, stepperZ2.getMilliamps()
3143
           #endif
3152
           #endif
3144
         );
3153
         );
3145
       #endif
3154
       #endif
3184
           say_M913(forReplay);
3193
           say_M913(forReplay);
3185
         #endif
3194
         #endif
3186
         #if AXIS_HAS_STEALTHCHOP(X)
3195
         #if AXIS_HAS_STEALTHCHOP(X)
3187
-          SERIAL_ECHOPAIR(" X", stepperX.get_pwm_thrs());
3196
+          SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.get_pwm_thrs());
3188
         #endif
3197
         #endif
3189
         #if AXIS_HAS_STEALTHCHOP(Y)
3198
         #if AXIS_HAS_STEALTHCHOP(Y)
3190
-          SERIAL_ECHOPAIR(" Y", stepperY.get_pwm_thrs());
3199
+          SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.get_pwm_thrs());
3191
         #endif
3200
         #endif
3192
         #if AXIS_HAS_STEALTHCHOP(Z)
3201
         #if AXIS_HAS_STEALTHCHOP(Z)
3193
-          SERIAL_ECHOPAIR(" Z", stepperZ.get_pwm_thrs());
3202
+          SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.get_pwm_thrs());
3194
         #endif
3203
         #endif
3195
         #if AXIS_HAS_STEALTHCHOP(X) || AXIS_HAS_STEALTHCHOP(Y) || AXIS_HAS_STEALTHCHOP(Z)
3204
         #if AXIS_HAS_STEALTHCHOP(X) || AXIS_HAS_STEALTHCHOP(Y) || AXIS_HAS_STEALTHCHOP(Z)
3196
           SERIAL_EOL();
3205
           SERIAL_EOL();
3201
           SERIAL_ECHOPGM(" I1");
3210
           SERIAL_ECHOPGM(" I1");
3202
         #endif
3211
         #endif
3203
         #if AXIS_HAS_STEALTHCHOP(X2)
3212
         #if AXIS_HAS_STEALTHCHOP(X2)
3204
-          SERIAL_ECHOPAIR(" X", stepperX2.get_pwm_thrs());
3213
+          SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.get_pwm_thrs());
3205
         #endif
3214
         #endif
3206
         #if AXIS_HAS_STEALTHCHOP(Y2)
3215
         #if AXIS_HAS_STEALTHCHOP(Y2)
3207
-          SERIAL_ECHOPAIR(" Y", stepperY2.get_pwm_thrs());
3216
+          SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.get_pwm_thrs());
3208
         #endif
3217
         #endif
3209
         #if AXIS_HAS_STEALTHCHOP(Z2)
3218
         #if AXIS_HAS_STEALTHCHOP(Z2)
3210
-          SERIAL_ECHOPAIR(" Z", stepperZ2.get_pwm_thrs());
3219
+          SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.get_pwm_thrs());
3211
         #endif
3220
         #endif
3212
         #if AXIS_HAS_STEALTHCHOP(X2) || AXIS_HAS_STEALTHCHOP(Y2) || AXIS_HAS_STEALTHCHOP(Z2)
3221
         #if AXIS_HAS_STEALTHCHOP(X2) || AXIS_HAS_STEALTHCHOP(Y2) || AXIS_HAS_STEALTHCHOP(Z2)
3213
           SERIAL_EOL();
3222
           SERIAL_EOL();
3254
           CONFIG_ECHO_START();
3263
           CONFIG_ECHO_START();
3255
           say_M914();
3264
           say_M914();
3256
           #if X_SENSORLESS
3265
           #if X_SENSORLESS
3257
-            SERIAL_ECHOPAIR(" X", stepperX.homing_threshold());
3266
+            SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.homing_threshold());
3258
           #endif
3267
           #endif
3259
           #if Y_SENSORLESS
3268
           #if Y_SENSORLESS
3260
-            SERIAL_ECHOPAIR(" Y", stepperY.homing_threshold());
3269
+            SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.homing_threshold());
3261
           #endif
3270
           #endif
3262
           #if Z_SENSORLESS
3271
           #if Z_SENSORLESS
3263
-            SERIAL_ECHOPAIR(" Z", stepperZ.homing_threshold());
3272
+            SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.homing_threshold());
3264
           #endif
3273
           #endif
3265
           SERIAL_EOL();
3274
           SERIAL_EOL();
3266
         #endif
3275
         #endif
3270
           say_M914();
3279
           say_M914();
3271
           SERIAL_ECHOPGM(" I1");
3280
           SERIAL_ECHOPGM(" I1");
3272
           #if X2_SENSORLESS
3281
           #if X2_SENSORLESS
3273
-            SERIAL_ECHOPAIR(" X", stepperX2.homing_threshold());
3282
+            SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.homing_threshold());
3274
           #endif
3283
           #endif
3275
           #if Y2_SENSORLESS
3284
           #if Y2_SENSORLESS
3276
-            SERIAL_ECHOPAIR(" Y", stepperY2.homing_threshold());
3285
+            SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.homing_threshold());
3277
           #endif
3286
           #endif
3278
           #if Z2_SENSORLESS
3287
           #if Z2_SENSORLESS
3279
-            SERIAL_ECHOPAIR(" Z", stepperZ2.homing_threshold());
3288
+            SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.homing_threshold());
3280
           #endif
3289
           #endif
3281
           SERIAL_EOL();
3290
           SERIAL_EOL();
3282
         #endif
3291
         #endif
3312
 
3321
 
3313
         if (chop_x || chop_y || chop_z) {
3322
         if (chop_x || chop_y || chop_z) {
3314
           say_M569(forReplay);
3323
           say_M569(forReplay);
3315
-          if (chop_x) SERIAL_ECHOPGM(" X");
3316
-          if (chop_y) SERIAL_ECHOPGM(" Y");
3317
-          if (chop_z) SERIAL_ECHOPGM(" Z");
3324
+          if (chop_x) SERIAL_ECHOPGM_P(SP_X_STR);
3325
+          if (chop_y) SERIAL_ECHOPGM_P(SP_Y_STR);
3326
+          if (chop_z) SERIAL_ECHOPGM_P(SP_Z_STR);
3318
           SERIAL_EOL();
3327
           SERIAL_EOL();
3319
         }
3328
         }
3320
 
3329
 
3336
 
3345
 
3337
         if (chop_x2 || chop_y2 || chop_z2) {
3346
         if (chop_x2 || chop_y2 || chop_z2) {
3338
           say_M569(forReplay, PSTR("I1"));
3347
           say_M569(forReplay, PSTR("I1"));
3339
-          if (chop_x2) SERIAL_ECHOPGM(" X");
3340
-          if (chop_y2) SERIAL_ECHOPGM(" Y");
3341
-          if (chop_z2) SERIAL_ECHOPGM(" Z");
3348
+          if (chop_x2) SERIAL_ECHOPGM_P(SP_X_STR);
3349
+          if (chop_y2) SERIAL_ECHOPGM_P(SP_Y_STR);
3350
+          if (chop_z2) SERIAL_ECHOPGM_P(SP_Z_STR);
3342
           SERIAL_EOL();
3351
           SERIAL_EOL();
3343
         }
3352
         }
3344
 
3353
 
3386
     #if HAS_MOTOR_CURRENT_PWM
3395
     #if HAS_MOTOR_CURRENT_PWM
3387
       CONFIG_ECHO_HEADING("Stepper motor currents:");
3396
       CONFIG_ECHO_HEADING("Stepper motor currents:");
3388
       CONFIG_ECHO_START();
3397
       CONFIG_ECHO_START();
3389
-      SERIAL_ECHOLNPAIR(
3390
-          "  M907 X", stepper.motor_current_setting[0]
3391
-        , " Z", stepper.motor_current_setting[1]
3392
-        , " E", stepper.motor_current_setting[2]
3398
+      SERIAL_ECHOLNPAIR_P(
3399
+          PSTR("  M907 X"), stepper.motor_current_setting[0]
3400
+        , SP_Z_STR, stepper.motor_current_setting[1]
3401
+        , SP_E_STR, stepper.motor_current_setting[2]
3393
       );
3402
       );
3394
     #endif
3403
     #endif
3395
 
3404
 
3429
     #if ENABLED(BACKLASH_GCODE)
3438
     #if ENABLED(BACKLASH_GCODE)
3430
       CONFIG_ECHO_HEADING("Backlash compensation:");
3439
       CONFIG_ECHO_HEADING("Backlash compensation:");
3431
       CONFIG_ECHO_START();
3440
       CONFIG_ECHO_START();
3432
-      SERIAL_ECHOLNPAIR(
3433
-        "  M425 F", backlash.get_correction(),
3434
-        " X", LINEAR_UNIT(backlash.distance_mm.x),
3435
-        " Y", LINEAR_UNIT(backlash.distance_mm.y),
3436
-        " Z", LINEAR_UNIT(backlash.distance_mm.z)
3441
+      SERIAL_ECHOLNPAIR_P(
3442
+          PSTR("  M425 F"), backlash.get_correction()
3443
+        , SP_X_STR, LINEAR_UNIT(backlash.distance_mm.x)
3444
+        , SP_Y_STR, LINEAR_UNIT(backlash.distance_mm.y)
3445
+        , SP_Z_STR, LINEAR_UNIT(backlash.distance_mm.z)
3437
         #ifdef BACKLASH_SMOOTHING_MM
3446
         #ifdef BACKLASH_SMOOTHING_MM
3438
-          , " S", LINEAR_UNIT(backlash.smoothing_mm)
3447
+          , PSTR(" S"), LINEAR_UNIT(backlash.smoothing_mm)
3439
         #endif
3448
         #endif
3440
       );
3449
       );
3441
     #endif
3450
     #endif

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

117
  */
117
  */
118
 
118
 
119
 #define DELTA_DEBUG(VAR) do { \
119
 #define DELTA_DEBUG(VAR) do { \
120
-    SERIAL_ECHOLNPAIR("Cartesian X", VAR.x, " Y", VAR.y, " Z", VAR.z);   \
120
+    SERIAL_ECHOLNPAIR_P(PSTR("Cartesian X"), VAR.x, SP_Y_STR, VAR.y, SP_Z_STR, VAR.z); \
121
     SERIAL_ECHOLNPAIR("Delta A", delta.a, " B", delta.b, " C", delta.c); \
121
     SERIAL_ECHOLNPAIR("Delta A", delta.a, " B", delta.b, " C", delta.c); \
122
   }while(0)
122
   }while(0)
123
 
123
 

+ 2
- 2
Marlin/src/module/probe.cpp View File

129
       KEEPALIVE_STATE(PAUSED_FOR_USER);
129
       KEEPALIVE_STATE(PAUSED_FOR_USER);
130
       wait_for_user = true; // LCD click or M108 will clear this
130
       wait_for_user = true; // LCD click or M108 will clear this
131
       #if ENABLED(HOST_PROMPT_SUPPORT)
131
       #if ENABLED(HOST_PROMPT_SUPPORT)
132
-        host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Deploy TouchMI probe."), PSTR("Continue"));
132
+        host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Deploy TouchMI probe."), CONTINUE_STR);
133
       #endif
133
       #endif
134
       while (wait_for_user) idle();
134
       while (wait_for_user) idle();
135
       ui.reset_status();
135
       ui.reset_status();
290
       KEEPALIVE_STATE(PAUSED_FOR_USER);
290
       KEEPALIVE_STATE(PAUSED_FOR_USER);
291
       wait_for_user = true;
291
       wait_for_user = true;
292
       #if ENABLED(HOST_PROMPT_SUPPORT)
292
       #if ENABLED(HOST_PROMPT_SUPPORT)
293
-        host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Stow Probe"), PSTR("Continue"));
293
+        host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Stow Probe"), CONTINUE_STR);
294
       #endif
294
       #endif
295
       #if ENABLED(EXTENSIBLE_UI)
295
       #if ENABLED(EXTENSIBLE_UI)
296
         ExtUI::onUserConfirmRequired_P(PSTR("Stow Probe"));
296
         ExtUI::onUserConfirmRequired_P(PSTR("Stow Probe"));

+ 1
- 1
buildroot/share/tests/megaatmega2560-tests View File

41
            FWRETRACT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \
41
            FWRETRACT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \
42
            PSU_CONTROL AUTO_POWER_CONTROL POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE \
42
            PSU_CONTROL AUTO_POWER_CONTROL POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE \
43
            SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER LIN_ADVANCE \
43
            SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER LIN_ADVANCE \
44
-           PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL
44
+           HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL
45
 opt_set TEMP_SENSOR_CHAMBER 3
45
 opt_set TEMP_SENSOR_CHAMBER 3
46
 opt_set HEATER_CHAMBER_PIN 45
46
 opt_set HEATER_CHAMBER_PIN 45
47
 exec_test $1 $2 "RAMPS | EXTRUDERS 2 | CHAR LCD + SD | FIX Probe | ABL-Linear | Advanced Pause | PLR | LEDs ..."
47
 exec_test $1 $2 "RAMPS | EXTRUDERS 2 | CHAR LCD + SD | FIX Probe | ABL-Linear | Advanced Pause | PLR | LEDs ..."

Loading…
Cancel
Save