Переглянути джерело

Fix MSG_En messages for consistency (#13788)

Marcio Teixeira 6 роки тому
джерело
коміт
ca7f6ff287
2 змінених файлів з 42 додано та 43 видалено
  1. 0
    1
      Marlin/src/core/language.h
  2. 42
    42
      Marlin/src/lcd/menu/menu_tmc.cpp

+ 0
- 1
Marlin/src/core/language.h Переглянути файл

@@ -344,7 +344,6 @@
344 344
 #define MSG_LCD_N3 " 4"
345 345
 #define MSG_LCD_N4 " 5"
346 346
 #define MSG_LCD_N5 " 6"
347
-#define MSG_E0 "E0"
348 347
 #define MSG_E1 "E1"
349 348
 #define MSG_E2 "E2"
350 349
 #define MSG_E3 "E3"

+ 42
- 42
Marlin/src/lcd/menu/menu_tmc.cpp Переглянути файл

@@ -32,7 +32,7 @@
32 32
 #include "../../module/stepper_indirection.h"
33 33
 #include "../../feature/tmc_util.h"
34 34
 
35
-#define TMC_EDIT_STORED_I_RMS(ST) MENU_ITEM_EDIT_CALLBACK(uint16_4, MSG_##ST, &stepper##ST.val_mA, 100, 3000, refresh_stepper_current_##ST)
35
+#define TMC_EDIT_STORED_I_RMS(ST,MSG) MENU_ITEM_EDIT_CALLBACK(uint16_4, MSG, &stepper##ST.val_mA, 100, 3000, refresh_stepper_current_##ST)
36 36
 
37 37
 #if AXIS_IS_TMC(X)
38 38
   void refresh_stepper_current_X()  { stepperX.refresh_stepper_current();  }
@@ -78,50 +78,50 @@ void menu_tmc_current() {
78 78
   START_MENU();
79 79
   MENU_BACK(MSG_TMC_DRIVERS);
80 80
   #if AXIS_IS_TMC(X)
81
-    TMC_EDIT_STORED_I_RMS(X);
81
+    TMC_EDIT_STORED_I_RMS(X, MSG_X);
82 82
   #endif
83 83
   #if AXIS_IS_TMC(Y)
84
-    TMC_EDIT_STORED_I_RMS(Y);
84
+    TMC_EDIT_STORED_I_RMS(Y, MSG_Y);
85 85
   #endif
86 86
   #if AXIS_IS_TMC(Z)
87
-    TMC_EDIT_STORED_I_RMS(Z);
87
+    TMC_EDIT_STORED_I_RMS(Z, MSG_Z);
88 88
   #endif
89 89
   #if AXIS_IS_TMC(X2)
90
-    TMC_EDIT_STORED_I_RMS(X2);
90
+    TMC_EDIT_STORED_I_RMS(X2, MSG_X2);
91 91
   #endif
92 92
   #if AXIS_IS_TMC(Y2)
93
-    TMC_EDIT_STORED_I_RMS(Y2);
93
+    TMC_EDIT_STORED_I_RMS(Y2, MSG_Y2);
94 94
   #endif
95 95
   #if AXIS_IS_TMC(Z2)
96
-    TMC_EDIT_STORED_I_RMS(Z2);
96
+    TMC_EDIT_STORED_I_RMS(Z2, MSG_Z2);
97 97
   #endif
98 98
   #if AXIS_IS_TMC(Z3)
99
-    TMC_EDIT_STORED_I_RMS(Z3);
99
+    TMC_EDIT_STORED_I_RMS(Z3, MSG_Z3);
100 100
   #endif
101 101
   #if AXIS_IS_TMC(E0)
102
-    TMC_EDIT_STORED_I_RMS(E0);
102
+    TMC_EDIT_STORED_I_RMS(E0, MSG_E1);
103 103
   #endif
104 104
   #if AXIS_IS_TMC(E1)
105
-    TMC_EDIT_STORED_I_RMS(E1);
105
+    TMC_EDIT_STORED_I_RMS(E1, MSG_E2);
106 106
   #endif
107 107
   #if AXIS_IS_TMC(E2)
108
-    TMC_EDIT_STORED_I_RMS(E2);
108
+    TMC_EDIT_STORED_I_RMS(E2, MSG_E3);
109 109
   #endif
110 110
   #if AXIS_IS_TMC(E3)
111
-    TMC_EDIT_STORED_I_RMS(E3);
111
+    TMC_EDIT_STORED_I_RMS(E3, MSG_E4);
112 112
   #endif
113 113
   #if AXIS_IS_TMC(E4)
114
-    TMC_EDIT_STORED_I_RMS(E4);
114
+    TMC_EDIT_STORED_I_RMS(E4, MSG_E5);
115 115
   #endif
116 116
   #if AXIS_IS_TMC(E5)
117
-    TMC_EDIT_STORED_I_RMS(E5);
117
+    TMC_EDIT_STORED_I_RMS(E5, MSG_E6);
118 118
   #endif
119 119
   END_MENU();
120 120
 }
121 121
 
122 122
 #if ENABLED(HYBRID_THRESHOLD)
123 123
 
124
-  #define TMC_EDIT_STORED_HYBRID_THRS(ST) MENU_ITEM_EDIT_CALLBACK(uint8, MSG_##ST, &stepper##ST.stored.hybrid_thrs, 0, 255, refresh_hybrid_thrs_##ST);
124
+  #define TMC_EDIT_STORED_HYBRID_THRS(ST, MSG) MENU_ITEM_EDIT_CALLBACK(uint8, MSG, &stepper##ST.stored.hybrid_thrs, 0, 255, refresh_hybrid_thrs_##ST);
125 125
 
126 126
   #if AXIS_HAS_STEALTHCHOP(X)
127 127
     void refresh_hybrid_thrs_X()  {  stepperX.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[X_AXIS]); }
@@ -167,43 +167,43 @@ void menu_tmc_current() {
167 167
     START_MENU();
168 168
     MENU_BACK(MSG_TMC_DRIVERS);
169 169
     #if AXIS_HAS_STEALTHCHOP(X)
170
-      TMC_EDIT_STORED_HYBRID_THRS(X);
170
+      TMC_EDIT_STORED_HYBRID_THRS(X, MSG_X);
171 171
     #endif
172 172
     #if AXIS_HAS_STEALTHCHOP(Y)
173
-      TMC_EDIT_STORED_HYBRID_THRS(Y);
173
+      TMC_EDIT_STORED_HYBRID_THRS(Y, MSG_Y);
174 174
     #endif
175 175
     #if AXIS_HAS_STEALTHCHOP(Z)
176
-      TMC_EDIT_STORED_HYBRID_THRS(Z);
176
+      TMC_EDIT_STORED_HYBRID_THRS(Z, MSG_Z);
177 177
     #endif
178 178
     #if AXIS_HAS_STEALTHCHOP(X2)
179
-      TMC_EDIT_STORED_HYBRID_THRS(X2);
179
+      TMC_EDIT_STORED_HYBRID_THRS(X2, MSG_X2);
180 180
     #endif
181 181
     #if AXIS_HAS_STEALTHCHOP(Y2)
182
-      TMC_EDIT_STORED_HYBRID_THRS(Y2);
182
+      TMC_EDIT_STORED_HYBRID_THRS(Y2, MSG_Y2);
183 183
     #endif
184 184
     #if AXIS_HAS_STEALTHCHOP(Z2)
185
-      TMC_EDIT_STORED_HYBRID_THRS(Z2);
185
+      TMC_EDIT_STORED_HYBRID_THRS(Z2, MSG_Z2);
186 186
     #endif
187 187
     #if AXIS_HAS_STEALTHCHOP(Z3)
188
-      TMC_EDIT_STORED_HYBRID_THRS(Z3);
188
+      TMC_EDIT_STORED_HYBRID_THRS(Z3, MSG_Z3);
189 189
     #endif
190 190
     #if AXIS_HAS_STEALTHCHOP(E0)
191
-      TMC_EDIT_STORED_HYBRID_THRS(E0);
191
+      TMC_EDIT_STORED_HYBRID_THRS(E0, MSG_E1);
192 192
     #endif
193 193
     #if AXIS_HAS_STEALTHCHOP(E1)
194
-      TMC_EDIT_STORED_HYBRID_THRS(E1);
194
+      TMC_EDIT_STORED_HYBRID_THRS(E1, MSG_E2);
195 195
     #endif
196 196
     #if AXIS_HAS_STEALTHCHOP(E2)
197
-      TMC_EDIT_STORED_HYBRID_THRS(E2);
197
+      TMC_EDIT_STORED_HYBRID_THRS(E2, MSG_E3);
198 198
     #endif
199 199
     #if AXIS_HAS_STEALTHCHOP(E3)
200
-      TMC_EDIT_STORED_HYBRID_THRS(E3);
200
+      TMC_EDIT_STORED_HYBRID_THRS(E3, MSG_E4);
201 201
     #endif
202 202
     #if AXIS_HAS_STEALTHCHOP(E4)
203
-      TMC_EDIT_STORED_HYBRID_THRS(E4);
203
+      TMC_EDIT_STORED_HYBRID_THRS(E4, MSG_E5);
204 204
     #endif
205 205
     #if AXIS_HAS_STEALTHCHOP(E5)
206
-      TMC_EDIT_STORED_HYBRID_THRS(E5);
206
+      TMC_EDIT_STORED_HYBRID_THRS(E5, MSG_E6);
207 207
     #endif
208 208
     END_MENU();
209 209
   }
@@ -243,7 +243,7 @@ void menu_tmc_current() {
243 243
 
244 244
 #if HAS_STEALTHCHOP
245 245
 
246
-  #define TMC_EDIT_STEP_MODE(ST) MENU_ITEM_EDIT_CALLBACK(bool, MSG_##ST, &stepper##ST.stored.stealthChop_enabled, refresh_stepping_mode_##ST)
246
+  #define TMC_EDIT_STEP_MODE(ST, MSG) MENU_ITEM_EDIT_CALLBACK(bool, MSG, &stepper##ST.stored.stealthChop_enabled, refresh_stepping_mode_##ST)
247 247
 
248 248
   #if AXIS_HAS_STEALTHCHOP(X)
249 249
     void refresh_stepping_mode_X()  { stepperX.refresh_stepping_mode();  }
@@ -290,43 +290,43 @@ void menu_tmc_current() {
290 290
     STATIC_ITEM(MSG_TMC_STEALTH_ENABLED);
291 291
     MENU_BACK(MSG_TMC_DRIVERS);
292 292
     #if AXIS_HAS_STEALTHCHOP(X)
293
-      TMC_EDIT_STEP_MODE(X);
293
+      TMC_EDIT_STEP_MODE(X, MSG_X);
294 294
     #endif
295 295
     #if AXIS_HAS_STEALTHCHOP(Y)
296
-      TMC_EDIT_STEP_MODE(Y);
296
+      TMC_EDIT_STEP_MODE(Y, MSG_Y);
297 297
     #endif
298 298
     #if AXIS_HAS_STEALTHCHOP(Z)
299
-      TMC_EDIT_STEP_MODE(Z);
299
+      TMC_EDIT_STEP_MODE(Z, MSG_Z);
300 300
     #endif
301 301
     #if AXIS_HAS_STEALTHCHOP(X2)
302
-      TMC_EDIT_STEP_MODE(X2);
302
+      TMC_EDIT_STEP_MODE(X2, MSG_X2);
303 303
     #endif
304 304
     #if AXIS_HAS_STEALTHCHOP(Y2)
305
-      TMC_EDIT_STEP_MODE(Y2);
305
+      TMC_EDIT_STEP_MODE(Y2, MSG_Y2);
306 306
     #endif
307 307
     #if AXIS_HAS_STEALTHCHOP(Z2)
308
-      TMC_EDIT_STEP_MODE(Z2);
308
+      TMC_EDIT_STEP_MODE(Z2, MSG_Z2);
309 309
     #endif
310 310
     #if AXIS_HAS_STEALTHCHOP(Z3)
311
-      TMC_EDIT_STEP_MODE(Z3);
311
+      TMC_EDIT_STEP_MODE(Z3, MSG_Z3);
312 312
     #endif
313 313
     #if AXIS_HAS_STEALTHCHOP(E0)
314
-      TMC_EDIT_STEP_MODE(E0);
314
+      TMC_EDIT_STEP_MODE(E0, MSG_E1);
315 315
     #endif
316 316
     #if AXIS_HAS_STEALTHCHOP(E1)
317
-      TMC_EDIT_STEP_MODE(E1);
317
+      TMC_EDIT_STEP_MODE(E1, MSG_E2);
318 318
     #endif
319 319
     #if AXIS_HAS_STEALTHCHOP(E2)
320
-      TMC_EDIT_STEP_MODE(E2);
320
+      TMC_EDIT_STEP_MODE(E2, MSG_E3);
321 321
     #endif
322 322
     #if AXIS_HAS_STEALTHCHOP(E3)
323
-      TMC_EDIT_STEP_MODE(E3);
323
+      TMC_EDIT_STEP_MODE(E3, MSG_E4);
324 324
     #endif
325 325
     #if AXIS_HAS_STEALTHCHOP(E4)
326
-      TMC_EDIT_STEP_MODE(E4);
326
+      TMC_EDIT_STEP_MODE(E4, MSG_E5);
327 327
     #endif
328 328
     #if AXIS_HAS_STEALTHCHOP(E5)
329
-      TMC_EDIT_STEP_MODE(E5);
329
+      TMC_EDIT_STEP_MODE(E5, MSG_E6);
330 330
     #endif
331 331
     END_MENU();
332 332
   }

Завантаження…
Відмінити
Зберегти