Browse Source

🩹 Fix EXTRUDERS 0 manual move compile (#24255)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
ellensp 2 years ago
parent
commit
7dd34848b6
No account linked to committer's email address
1 changed files with 13 additions and 19 deletions
  1. 13
    19
      Marlin/src/lcd/menu/menu_motion.cpp

+ 13
- 19
Marlin/src/lcd/menu/menu_motion.cpp View File

@@ -35,15 +35,12 @@
35 35
 
36 36
 #include "../../module/motion.h"
37 37
 #include "../../gcode/parser.h" // for inch support
38
+#include "../../module/temperature.h"
38 39
 
39 40
 #if ENABLED(DELTA)
40 41
   #include "../../module/delta.h"
41 42
 #endif
42 43
 
43
-#if ENABLED(PREVENT_COLD_EXTRUSION)
44
-  #include "../../module/temperature.h"
45
-#endif
46
-
47 44
 #if HAS_LEVELING
48 45
   #include "../../module/planner.h"
49 46
   #include "../../feature/bedlevel/bedlevel.h"
@@ -222,23 +219,20 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
222 219
   }
223 220
 
224 221
   inline void _menu_move_distance_e_maybe() {
225
-    #if ENABLED(PREVENT_COLD_EXTRUSION)
226
-      const bool too_cold = thermalManager.tooColdToExtrude(active_extruder);
227
-      if (too_cold) {
228
-        ui.goto_screen([]{
229
-          MenuItem_confirm::select_screen(
230
-            GET_TEXT_F(MSG_BUTTON_PROCEED), GET_TEXT_F(MSG_BACK),
231
-            _goto_menu_move_distance_e, nullptr,
232
-            GET_TEXT_F(MSG_HOTEND_TOO_COLD), (const char *)nullptr, F("!")
233
-          );
234
-        });
235
-        return;
236
-      }
237
-    #endif
238
-    _goto_menu_move_distance_e();
222
+    if (thermalManager.tooColdToExtrude(active_extruder)) {
223
+      ui.goto_screen([]{
224
+        MenuItem_confirm::select_screen(
225
+          GET_TEXT_F(MSG_BUTTON_PROCEED), GET_TEXT_F(MSG_BACK),
226
+          _goto_menu_move_distance_e, nullptr,
227
+          GET_TEXT_F(MSG_HOTEND_TOO_COLD), (const char *)nullptr, F("!")
228
+        );
229
+      });
230
+    }
231
+    else
232
+      _goto_menu_move_distance_e();
239 233
   }
240 234
 
241
-#endif // E_MANUAL
235
+#endif
242 236
 
243 237
 void menu_move() {
244 238
   START_MENU();

Loading…
Cancel
Save