Browse Source

Bring filament menu up to speed

pull/1/head
Scott Lahteine 5 years ago
parent
commit
f5b5b9e8ec
  1. 56
      Marlin/src/lcd/menu/menu_filament.cpp

56
Marlin/src/lcd/menu/menu_filament.cpp

@ -109,44 +109,44 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
#if E_STEPPERS == 1 #if E_STEPPERS == 1
PGM_P const msg0 = GET_TEXT(MSG_FILAMENTCHANGE); PGM_P const msg0 = GET_TEXT(MSG_FILAMENTCHANGE);
if (thermalManager.targetTooColdToExtrude(active_extruder)) if (thermalManager.targetTooColdToExtrude(active_extruder))
MENU_ITEM_P(submenu, msg0, []{ _menu_temp_filament_op(PauseMode(editable.int8), 0); }); SUBMENU_P(msg0, []{ _menu_temp_filament_op(PauseMode(editable.int8), 0); });
else else
MENU_ITEM_P(gcode, msg0, PSTR("M600 B0")); GCODES_ITEM_P(msg0, PSTR("M600 B0"));
#else #else
PGM_P const msg0 = GET_TEXT(MSG_FILAMENTCHANGE_E0); PGM_P const msg0 = GET_TEXT(MSG_FILAMENTCHANGE_E0);
PGM_P const msg1 = GET_TEXT(MSG_FILAMENTCHANGE_E1); PGM_P const msg1 = GET_TEXT(MSG_FILAMENTCHANGE_E1);
if (thermalManager.targetTooColdToExtrude(0)) if (thermalManager.targetTooColdToExtrude(0))
MENU_ITEM_P(submenu, msg0, []{ _menu_temp_filament_op(PauseMode(editable.int8), 0); }); SUBMENU_P(msg0, []{ _menu_temp_filament_op(PauseMode(editable.int8), 0); });
else else
MENU_ITEM_P(gcode, msg0, PSTR("M600 B0 T0")); GCODES_ITEM_P(msg0, PSTR("M600 B0 T0"));
if (thermalManager.targetTooColdToExtrude(1)) if (thermalManager.targetTooColdToExtrude(1))
MENU_ITEM_P(submenu, msg1, []{ _menu_temp_filament_op(PauseMode(editable.int8), 1); }); SUBMENU_P(msg1, []{ _menu_temp_filament_op(PauseMode(editable.int8), 1); });
else else
MENU_ITEM_P(gcode, msg1, PSTR("M600 B0 T1")); GCODES_ITEM_P(msg1, PSTR("M600 B0 T1"));
#if E_STEPPERS > 2 #if E_STEPPERS > 2
PGM_P const msg2 = GET_TEXT(MSG_FILAMENTCHANGE_E2); PGM_P const msg2 = GET_TEXT(MSG_FILAMENTCHANGE_E2);
if (thermalManager.targetTooColdToExtrude(2)) if (thermalManager.targetTooColdToExtrude(2))
MENU_ITEM_P(submenu, msg2, []{ _menu_temp_filament_op(PauseMode(editable.int8), 2); }); SUBMENU_P(msg2, []{ _menu_temp_filament_op(PauseMode(editable.int8), 2); });
else else
MENU_ITEM_P(gcode, msg2, PSTR("M600 B0 T2")); GCODES_ITEM_P(msg2, PSTR("M600 B0 T2"));
#if E_STEPPERS > 3 #if E_STEPPERS > 3
PGM_P const msg3 = GET_TEXT(MSG_FILAMENTCHANGE_E3); PGM_P const msg3 = GET_TEXT(MSG_FILAMENTCHANGE_E3);
if (thermalManager.targetTooColdToExtrude(3)) if (thermalManager.targetTooColdToExtrude(3))
MENU_ITEM_P(submenu, msg3, []{ _menu_temp_filament_op(PauseMode(editable.int8), 3); }); SUBMENU_P(msg3, []{ _menu_temp_filament_op(PauseMode(editable.int8), 3); });
else else
MENU_ITEM_P(gcode, msg3, PSTR("M600 B0 T3")); GCODES_ITEM_P(msg3, PSTR("M600 B0 T3"));
#if E_STEPPERS > 4 #if E_STEPPERS > 4
PGM_P const msg4 = GET_TEXT(MSG_FILAMENTCHANGE_E4); PGM_P const msg4 = GET_TEXT(MSG_FILAMENTCHANGE_E4);
if (thermalManager.targetTooColdToExtrude(4)) if (thermalManager.targetTooColdToExtrude(4))
MENU_ITEM_P(submenu, msg4, []{ _menu_temp_filament_op(PauseMode(editable.int8), 4); }); SUBMENU_P(msg4, []{ _menu_temp_filament_op(PauseMode(editable.int8), 4); });
else else
MENU_ITEM_P(gcode, msg4, PSTR("M600 B0 T4")); GCODES_ITEM_P(msg4, PSTR("M600 B0 T4"));
#if E_STEPPERS > 5 #if E_STEPPERS > 5
PGM_P const msg5 = GET_TEXT(MSG_FILAMENTCHANGE_E5); PGM_P const msg5 = GET_TEXT(MSG_FILAMENTCHANGE_E5);
if (thermalManager.targetTooColdToExtrude(5)) if (thermalManager.targetTooColdToExtrude(5))
MENU_ITEM_P(submenu, msg5, []{ _menu_temp_filament_op(PauseMode(editable.int8), 5); }); SUBMENU_P(msg5, []{ _menu_temp_filament_op(PauseMode(editable.int8), 5); });
else else
MENU_ITEM_P(gcode, msg5, PSTR("M600 B0 T5")); GCODES_ITEM_P(msg5, PSTR("M600 B0 T5"));
#endif // E_STEPPERS > 5 #endif // E_STEPPERS > 5
#endif // E_STEPPERS > 4 #endif // E_STEPPERS > 4
#endif // E_STEPPERS > 3 #endif // E_STEPPERS > 3
@ -159,44 +159,44 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
#if E_STEPPERS == 1 #if E_STEPPERS == 1
PGM_P const msg0 = GET_TEXT(MSG_FILAMENTLOAD); PGM_P const msg0 = GET_TEXT(MSG_FILAMENTLOAD);
if (thermalManager.targetTooColdToExtrude(active_extruder)) if (thermalManager.targetTooColdToExtrude(active_extruder))
MENU_ITEM_P(submenu, msg0, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 0); }); SUBMENU_P(msg0, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 0); });
else else
MENU_ITEM_P(gcode, msg0, PSTR("M701")); GCODES_ITEM_P(msg0, PSTR("M701"));
#else #else
PGM_P const msg0 = GET_TEXT(MSG_FILAMENTLOAD_E0); PGM_P const msg0 = GET_TEXT(MSG_FILAMENTLOAD_E0);
PGM_P const msg1 = GET_TEXT(MSG_FILAMENTLOAD_E1); PGM_P const msg1 = GET_TEXT(MSG_FILAMENTLOAD_E1);
if (thermalManager.targetTooColdToExtrude(0)) if (thermalManager.targetTooColdToExtrude(0))
MENU_ITEM_P(submenu, msg0, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 0); }); SUBMENU_P(msg0, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 0); });
else else
MENU_ITEM_P(gcode, msg0, PSTR("M701 T0")); GCODES_ITEM_P(msg0, PSTR("M701 T0"));
if (thermalManager.targetTooColdToExtrude(1)) if (thermalManager.targetTooColdToExtrude(1))
MENU_ITEM_P(submenu, msg1, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 1); }); SUBMENU_P(msg1, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 1); });
else else
MENU_ITEM_P(gcode, msg1, PSTR("M701 T1")); GCODES_ITEM_P(msg1, PSTR("M701 T1"));
#if E_STEPPERS > 2 #if E_STEPPERS > 2
PGM_P const msg2 = GET_TEXT(MSG_FILAMENTLOAD_E2); PGM_P const msg2 = GET_TEXT(MSG_FILAMENTLOAD_E2);
if (thermalManager.targetTooColdToExtrude(2)) if (thermalManager.targetTooColdToExtrude(2))
MENU_ITEM_P(submenu, msg2, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 2); }); SUBMENU_P(msg2, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 2); });
else else
MENU_ITEM_P(gcode, msg2, PSTR("M701 T2")); GCODES_ITEM_P(msg2, PSTR("M701 T2"));
#if E_STEPPERS > 3 #if E_STEPPERS > 3
PGM_P const msg3 = GET_TEXT(MSG_FILAMENTLOAD_E3); PGM_P const msg3 = GET_TEXT(MSG_FILAMENTLOAD_E3);
if (thermalManager.targetTooColdToExtrude(3)) if (thermalManager.targetTooColdToExtrude(3))
MENU_ITEM_P(submenu, msg3, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 3); }); SUBMENU_P(msg3, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 3); });
else else
MENU_ITEM_P(gcode, msg3, PSTR("M701 T3")); GCODES_ITEM_P(msg3, PSTR("M701 T3"));
#if E_STEPPERS > 4 #if E_STEPPERS > 4
PGM_P const msg4 = GET_TEXT(MSG_FILAMENTLOAD_E4); PGM_P const msg4 = GET_TEXT(MSG_FILAMENTLOAD_E4);
if (thermalManager.targetTooColdToExtrude(4)) if (thermalManager.targetTooColdToExtrude(4))
MENU_ITEM_P(submenu, msg4, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 4); }); SUBMENU_P(msg4, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 4); });
else else
MENU_ITEM_P(gcode, msg4, PSTR("M701 T4")); GCODES_ITEM_P(msg4, PSTR("M701 T4"));
#if E_STEPPERS > 5 #if E_STEPPERS > 5
PGM_P const msg5 = GET_TEXT(MSG_FILAMENTLOAD_E5); PGM_P const msg5 = GET_TEXT(MSG_FILAMENTLOAD_E5);
if (thermalManager.targetTooColdToExtrude(5)) if (thermalManager.targetTooColdToExtrude(5))
MENU_ITEM_P(submenu, msg5, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 5); }); SUBMENU_P(msg5, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, 5); });
else else
MENU_ITEM_P(gcode, msg5, PSTR("M701 T5")); GCODES_ITEM_P(msg5, PSTR("M701 T5"));
#endif // E_STEPPERS > 5 #endif // E_STEPPERS > 5
#endif // E_STEPPERS > 4 #endif // E_STEPPERS > 4
#endif // E_STEPPERS > 3 #endif // E_STEPPERS > 3

Loading…
Cancel
Save