Skip to content

Commit

Permalink
🩹 Fix EXTRUDERS 0 manual move compile (#24255)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellensp authored and thinkyhead committed Jun 6, 2022
1 parent aabf09d commit fa27796
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions Marlin/src/lcd/menu/menu_motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,12 @@

#include "../../module/motion.h"
#include "../../gcode/parser.h" // for inch support
#include "../../module/temperature.h"

#if ENABLED(DELTA)
#include "../../module/delta.h"
#endif

#if ENABLED(PREVENT_COLD_EXTRUSION)
#include "../../module/temperature.h"
#endif

#if HAS_LEVELING
#include "../../module/planner.h"
#include "../../feature/bedlevel/bedlevel.h"
Expand Down Expand Up @@ -210,23 +207,20 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
}

inline void _menu_move_distance_e_maybe() {
#if ENABLED(PREVENT_COLD_EXTRUSION)
const bool too_cold = thermalManager.tooColdToExtrude(active_extruder);
if (too_cold) {
ui.goto_screen([]{
MenuItem_confirm::select_screen(
GET_TEXT_F(MSG_BUTTON_PROCEED), GET_TEXT_F(MSG_BACK),
_goto_menu_move_distance_e, nullptr,
GET_TEXT_F(MSG_HOTEND_TOO_COLD), (const char *)nullptr, F("!")
);
});
return;
}
#endif
_goto_menu_move_distance_e();
if (thermalManager.tooColdToExtrude(active_extruder)) {
ui.goto_screen([]{
MenuItem_confirm::select_screen(
GET_TEXT_F(MSG_BUTTON_PROCEED), GET_TEXT_F(MSG_BACK),
_goto_menu_move_distance_e, nullptr,
GET_TEXT_F(MSG_HOTEND_TOO_COLD), (const char *)nullptr, F("!")
);
});
}
else
_goto_menu_move_distance_e();
}

#endif // E_MANUAL
#endif

void menu_move() {
START_MENU();
Expand Down

0 comments on commit fa27796

Please sign in to comment.