1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

🚸 Filament Change add confirm step (#22277)

This commit is contained in:
Cytown 2021-07-02 08:37:44 +08:00 committed by GitHub
parent e96720c076
commit 71bf61901c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 9 deletions

View File

@ -106,10 +106,11 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
* "Change Filament" submenu * "Change Filament" submenu
*/ */
#if E_STEPPERS > 1 || ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) #if E_STEPPERS > 1 || ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
bool printingIsPaused(); bool printingIsPaused();
#endif
void menu_change_filament() { void menu_change_filament() {
#if E_STEPPERS > 1 || ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
// Say "filament change" when no print is active // Say "filament change" when no print is active
editable.int8 = printingIsPaused() ? PAUSE_MODE_PAUSE_PRINT : PAUSE_MODE_CHANGE_FILAMENT; editable.int8 = printingIsPaused() ? PAUSE_MODE_PAUSE_PRINT : PAUSE_MODE_CHANGE_FILAMENT;
@ -204,8 +205,16 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
#endif #endif
END_MENU(); END_MENU();
}
#else
if (thermalManager.targetHotEnoughToExtrude(active_extruder))
queue.inject_P(PSTR("M600B0"));
else
_menu_temp_filament_op(PAUSE_MODE_CHANGE_FILAMENT, 0);
#endif #endif
}
static uint8_t hotend_status_extruder = 0; static uint8_t hotend_status_extruder = 0;

View File

@ -77,7 +77,6 @@ void menu_configuration();
#endif #endif
#if ENABLED(ADVANCED_PAUSE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
void _menu_temp_filament_op(const PauseMode, const int8_t);
void menu_change_filament(); void menu_change_filament();
#endif #endif
@ -365,10 +364,11 @@ void menu_main() {
#if ENABLED(ADVANCED_PAUSE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#if E_STEPPERS == 1 && DISABLED(FILAMENT_LOAD_UNLOAD_GCODES) #if E_STEPPERS == 1 && DISABLED(FILAMENT_LOAD_UNLOAD_GCODES)
if (thermalManager.targetHotEnoughToExtrude(active_extruder)) CONFIRM_ITEM(MSG_FILAMENTCHANGE,
GCODES_ITEM(MSG_FILAMENTCHANGE, PSTR("M600 B0")); MSG_YES, MSG_NO,
else menu_change_filament, ui.goto_previous_screen,
SUBMENU(MSG_FILAMENTCHANGE, []{ _menu_temp_filament_op(PAUSE_MODE_CHANGE_FILAMENT, 0); }); GET_TEXT(MSG_FILAMENTCHANGE), (const char *)nullptr, PSTR("?")
);
#else #else
SUBMENU(MSG_FILAMENTCHANGE, menu_change_filament); SUBMENU(MSG_FILAMENTCHANGE, menu_change_filament);
#endif #endif