Browse Source

Preheat Menu shortcut option (#20350)

Vi B-P 4 years ago
parent
commit
f7d9305786
No account linked to committer's email address

+ 3
- 0
Marlin/Configuration_adv.h View File

1147
     #endif
1147
     #endif
1148
   #endif
1148
   #endif
1149
 
1149
 
1150
+  // Insert a menu for preheating at the top level to allow for quick access
1151
+  //#define PREHEAT_SHORTCUT_MENU_ITEM
1152
+
1150
 #endif // HAS_LCD_MENU
1153
 #endif // HAS_LCD_MENU
1151
 
1154
 
1152
 #if HAS_DISPLAY
1155
 #if HAS_DISPLAY

+ 4
- 0
Marlin/src/inc/Conditionals_post.h View File

2380
   #endif
2380
   #endif
2381
 #endif
2381
 #endif
2382
 
2382
 
2383
+#if !PREHEAT_COUNT
2384
+  #undef PREHEAT_SHORTCUT_MENU_ITEM
2385
+#endif
2386
+
2383
 /**
2387
 /**
2384
  * Up to 3 PWM fans
2388
  * Up to 3 PWM fans
2385
  */
2389
  */

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

97
   void menu_spindle_laser();
97
   void menu_spindle_laser();
98
 #endif
98
 #endif
99
 
99
 
100
+#if ENABLED(PREHEAT_SHORTCUT_MENU_ITEM)
101
+  void menu_preheat_only();
102
+#endif
103
+
100
 #if HAS_MULTI_LANGUAGE
104
 #if HAS_MULTI_LANGUAGE
101
   void menu_language();
105
   void menu_language();
102
 #endif
106
 #endif
177
       ACTION_ITEM(MSG_HOST_START_PRINT, host_action_start);
181
       ACTION_ITEM(MSG_HOST_START_PRINT, host_action_start);
178
     #endif
182
     #endif
179
 
183
 
184
+    #if ENABLED(PREHEAT_SHORTCUT_MENU_ITEM)
185
+      SUBMENU(MSG_PREHEAT_CUSTOM, menu_preheat_only);
186
+    #endif
187
+
180
     SUBMENU(MSG_MOTION, menu_motion);
188
     SUBMENU(MSG_MOTION, menu_motion);
181
   }
189
   }
182
 
190
 

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

226
 
226
 
227
   #if PREHEAT_COUNT
227
   #if PREHEAT_COUNT
228
     //
228
     //
229
-    // Preheat for Materials 1 to 5
229
+    // Preheat for all Materials
230
     //
230
     //
231
     LOOP_L_N(m, PREHEAT_COUNT) {
231
     LOOP_L_N(m, PREHEAT_COUNT) {
232
       editable.int8 = m;
232
       editable.int8 = m;
249
   END_MENU();
249
   END_MENU();
250
 }
250
 }
251
 
251
 
252
+#if ENABLED(PREHEAT_SHORTCUT_MENU_ITEM)
253
+
254
+  void menu_preheat_only() {
255
+    START_MENU();
256
+    BACK_ITEM(MSG_MAIN);
257
+
258
+    LOOP_L_N(m, PREHEAT_COUNT) {
259
+      editable.int8 = m;
260
+      #if HOTENDS > 1 || HAS_HEATED_BED
261
+        SUBMENU_S(ui.get_preheat_label(m), MSG_PREHEAT_M, menu_preheat_m);
262
+      #else
263
+        ACTION_ITEM_S(ui.get_preheat_label(m), MSG_PREHEAT_M, do_preheat_end_m);
264
+      #endif
265
+    }
266
+
267
+    END_MENU();
268
+  }
269
+
270
+#endif
271
+
252
 #endif // HAS_LCD_MENU && HAS_TEMPERATURE
272
 #endif // HAS_LCD_MENU && HAS_TEMPERATURE

Loading…
Cancel
Save