Explorar el Código

Tweak / reduce menu items

Scott Lahteine hace 6 años
padre
commit
19f49db96f

+ 6
- 6
Marlin/src/core/language.h Ver fichero

@@ -294,12 +294,12 @@
294 294
 #define MSG_H4 "4"
295 295
 #define MSG_H5 "5"
296 296
 #define MSG_H6 "6"
297
-#define MSG_N1 " 1"
298
-#define MSG_N2 " 2"
299
-#define MSG_N3 " 3"
300
-#define MSG_N4 " 4"
301
-#define MSG_N5 " 5"
302
-#define MSG_N6 " 6"
297
+#define MSG_LCD_N0 " 1"
298
+#define MSG_LCD_N1 " 2"
299
+#define MSG_LCD_N2 " 3"
300
+#define MSG_LCD_N3 " 4"
301
+#define MSG_LCD_N4 " 5"
302
+#define MSG_LCD_N5 " 6"
303 303
 #define MSG_E0 "E0"
304 304
 #define MSG_E1 "E1"
305 305
 #define MSG_E2 "E2"

+ 7
- 7
Marlin/src/lcd/menu/menu_temperature.cpp Ver fichero

@@ -310,17 +310,17 @@ void menu_temperature() {
310 310
   #if HOTENDS == 1
311 311
     MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
312 312
   #else // HOTENDS > 1
313
-    #define EDIT_TARGET(N,I) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N##N, &thermalManager.target_temperature[I], 0, HEATER_##I##_MAXTEMP - 15, watch_temp_callback_E##I)
314
-    EDIT_TARGET(1,0);
315
-    EDIT_TARGET(2,1);
313
+    #define EDIT_TARGET(N) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_LCD_N##N, &thermalManager.target_temperature[N], 0, HEATER_##N##_MAXTEMP - 15, watch_temp_callback_E##N)
314
+    EDIT_TARGET(0);
315
+    EDIT_TARGET(1);
316 316
     #if HOTENDS > 2
317
-      EDIT_TARGET(3,2);
317
+      EDIT_TARGET(2);
318 318
       #if HOTENDS > 3
319
-        EDIT_TARGET(4,3);
319
+        EDIT_TARGET(3);
320 320
         #if HOTENDS > 4
321
-          EDIT_TARGET(5,4);
321
+          EDIT_TARGET(4);
322 322
           #if HOTENDS > 5
323
-            EDIT_TARGET(6,5);
323
+            EDIT_TARGET(5);
324 324
           #endif // HOTENDS > 5
325 325
         #endif // HOTENDS > 4
326 326
       #endif // HOTENDS > 3

+ 14
- 12
Marlin/src/lcd/menu/menu_tune.cpp Ver fichero

@@ -112,16 +112,17 @@ void menu_tune() {
112 112
   #if HOTENDS == 1
113 113
     MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
114 114
   #else // HOTENDS > 1
115
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N1, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
116
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N2, &thermalManager.target_temperature[1], 0, HEATER_1_MAXTEMP - 15, watch_temp_callback_E1);
115
+    #define EDIT_NOZZLE(N) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_LCD_N##N, &thermalManager.target_temperature[N], 0, HEATER_##N##_MAXTEMP - 15, watch_temp_callback_E##N)
116
+    EDIT_NOZZLE(0);
117
+    EDIT_NOZZLE(1);
117 118
     #if HOTENDS > 2
118
-      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N3, &thermalManager.target_temperature[2], 0, HEATER_2_MAXTEMP - 15, watch_temp_callback_E2);
119
+      EDIT_NOZZLE(2);
119 120
       #if HOTENDS > 3
120
-        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N4, &thermalManager.target_temperature[3], 0, HEATER_3_MAXTEMP - 15, watch_temp_callback_E3);
121
+        EDIT_NOZZLE(3);
121 122
         #if HOTENDS > 4
122
-          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N5, &thermalManager.target_temperature[4], 0, HEATER_4_MAXTEMP - 15, watch_temp_callback_E4);
123
+          EDIT_NOZZLE(4);
123 124
           #if HOTENDS > 5
124
-            MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N6, &thermalManager.target_temperature[5], 0, HEATER_5_MAXTEMP - 15, watch_temp_callback_E5);
125
+            EDIT_NOZZLE(5);
125 126
           #endif // HOTENDS > 5
126 127
         #endif // HOTENDS > 4
127 128
       #endif // HOTENDS > 3
@@ -167,16 +168,17 @@ void menu_tune() {
167 168
     MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW, &planner.flow_percentage[0], 10, 999, _lcd_refresh_e_factor_0);
168 169
   #else // EXTRUDERS > 1
169 170
     MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW, &planner.flow_percentage[active_extruder], 10, 999, _lcd_refresh_e_factor);
170
-    MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N1, &planner.flow_percentage[0], 10, 999, _lcd_refresh_e_factor_0);
171
-    MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N2, &planner.flow_percentage[1], 10, 999, _lcd_refresh_e_factor_1);
171
+    #define EDIT_FLOW(N) MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_LCD_N##N, &planner.flow_percentage[N], 10, 999, _lcd_refresh_e_factor_##N)
172
+    EDIT_FLOW(0);
173
+    EDIT_FLOW(1);
172 174
     #if EXTRUDERS > 2
173
-      MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N3, &planner.flow_percentage[2], 10, 999, _lcd_refresh_e_factor_2);
175
+      EDIT_FLOW(2);
174 176
       #if EXTRUDERS > 3
175
-        MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N4, &planner.flow_percentage[3], 10, 999, _lcd_refresh_e_factor_3);
177
+        EDIT_FLOW(3);
176 178
         #if EXTRUDERS > 4
177
-          MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N5, &planner.flow_percentage[4], 10, 999, _lcd_refresh_e_factor_4);
179
+          EDIT_FLOW(4);
178 180
           #if EXTRUDERS > 5
179
-            MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_N6, &planner.flow_percentage[5], 10, 999, _lcd_refresh_e_factor_5);
181
+            EDIT_FLOW(5);
180 182
           #endif // EXTRUDERS > 5
181 183
         #endif // EXTRUDERS > 4
182 184
       #endif // EXTRUDERS > 3

Loading…
Cancelar
Guardar