From b284c70d9b71222fb5cd721023180b10ae2d54d3 Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Wed, 29 Aug 2018 13:08:09 +0200 Subject: [PATCH 1/3] auto deplete: dont eject filament --- Firmware/Marlin_main.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 31424d9e..413dec65 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -3121,16 +3121,18 @@ void gcode_M600(bool automatic, float x_position, float y_position, float z_shif if (mmu_enabled) { - if (saved_printing) mmu_eject_filament(mmu_extruder, false); //if M600 was invoked by filament senzor (FINDA) eject filament so user can easily remove it - if (!automatic) mmu_M600_wait_and_beep(); - if (saved_printing) { + if (!automatic) { + if (saved_printing) mmu_eject_filament(mmu_extruder, false); //if M600 was invoked by filament senzor (FINDA) eject filament so user can easily remove it + mmu_M600_wait_and_beep(); + if (saved_printing) { - lcd_clear(); - lcd_set_cursor(0, 2); - lcd_puts_P(_T(MSG_PLEASE_WAIT)); + lcd_clear(); + lcd_set_cursor(0, 2); + lcd_puts_P(_T(MSG_PLEASE_WAIT)); - mmu_command(MMU_CMD_R0); - manage_response(false, false); + mmu_command(MMU_CMD_R0); + manage_response(false, false); + } } mmu_M600_load_filament(automatic); } From 8a453e65f8fd6a4cd5a672be31c1e1a12765ff59 Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Wed, 29 Aug 2018 13:16:17 +0200 Subject: [PATCH 2/3] eject filament allowed only when nozzle is hot (there can be filament loaded in printer nozzle) --- Firmware/mmu.cpp | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index 12319d97..a23a402a 100644 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -954,13 +954,37 @@ void mmu_eject_filament(uint8_t filament, bool recover) { if (filament < 5) { - mmu_command(MMU_CMD_E0 + filament); - manage_response(false, false); - if (recover) + + if (degHotend0() > EXTRUDE_MINTEMP) { - lcd_show_fullscreen_message_and_wait_P(_i("Please remove filament and then press the knob.")); - mmu_command(MMU_CMD_R0); + st_synchronize(); + lcd_update_enable(false); + lcd_clear(); + lcd_set_cursor(0, 1); lcd_puts_P(_i("Ejecting filament")); + current_position[E_AXIS] -= 80; + plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2500 / 60, active_extruder); + st_synchronize(); + + lcd_update_enable(true); + + mmu_command(MMU_CMD_E0 + filament); manage_response(false, false); + if (recover) + { + lcd_show_fullscreen_message_and_wait_P(_i("Please remove filament and then press the knob.")); + mmu_command(MMU_CMD_R0); + manage_response(false, false); + } + } + else + { + lcd_clear(); + lcd_set_cursor(0, 0); + lcd_puts_P(_T(MSG_ERROR)); + lcd_set_cursor(0, 2); + lcd_puts_P(_T(MSG_PREHEAT_NOZZLE)); + delay(2000); + lcd_clear(); } } else From b2c94f36ccb3eef4c8d4a76b38920fe593c94651 Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Wed, 29 Aug 2018 14:41:39 +0200 Subject: [PATCH 3/3] removed unused "out of range" function --- Firmware/mmu.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index a23a402a..7ceb53e9 100644 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -814,11 +814,6 @@ void mmu_eject_fil_4() mmu_eject_filament(4, true); } -void mmu_eject_fil_5() -{ - mmu_eject_filament(5, true); -} - void load_all() { #ifndef SNMM