From 75d31fd2cb9d07c0be10a514ce53852075531409 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Tue, 18 Dec 2018 18:47:54 +0100 Subject: [PATCH 1/9] Repeat last MMU command after timeout --- Firmware/mmu.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index b0c1beda..d8e32458 100644 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -51,6 +51,8 @@ int16_t mmu_buildnr = -1; uint32_t mmu_last_request = 0; uint32_t mmu_last_response = 0; +uint8_t mmu_last_cmd = 0; + //clear rx buffer void mmu_clr_rx_buf(void) @@ -251,6 +253,7 @@ void mmu_loop(void) mmu_puts_P(PSTR("R0\n")); //send recover after eject mmu_state = 3; // wait for response } + mmu_last_cmd = mmu_cmd; mmu_cmd = 0; } else if ((mmu_last_response + 300) < millis()) //request every 300ms @@ -291,11 +294,20 @@ void mmu_loop(void) #ifdef MMU_DEBUG printf_P(PSTR("MMU => 'ok'\n")); #endif //MMU_DEBUG + mmu_last_cmd = 0; mmu_ready = true; mmu_state = 1; } else if ((mmu_last_request + MMU_CMD_TIMEOUT) < millis()) { //resend request after timeout (5 min) + if (mmu_last_cmd) + { +#ifdef MMU_DEBUG + printf_P(PSTR("MMU retry\n")); +#endif //MMU_DEBUG + mmu_cmd = mmu_last_cmd; +// mmu_last_cmd = 0; //resend just once + } mmu_state = 1; } return; From b5430c29686da4767e1b2fa0e2d6b17c420e07cc Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Tue, 18 Dec 2018 19:10:02 +0100 Subject: [PATCH 2/9] M600: consume click --- Firmware/ultralcd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index f2a91f02..2827216a 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -2351,7 +2351,7 @@ void lcd_alright() { enc_dif = lcd_encoder_diff; - + lcd_consume_click(); while (lcd_change_fil_state == 0) { manage_heater(); From 34f116b4d9584b35f3d3f52e16721818952d5b27 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Tue, 18 Dec 2018 19:57:29 +0100 Subject: [PATCH 3/9] Move 1mm down with disabled endstop after calibrate_z_auto (PFW718) --- Firmware/Marlin_main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 0318ee2b..27d729d1 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -2796,7 +2796,12 @@ bool gcode_M45(bool onlyZ, int8_t verbosity_level) // Move the print head close to the bed. current_position[Z_AXIS] = MESH_HOME_Z_SEARCH; - bool endstops_enabled = enable_endstops(true); + bool endstops_enabled = enable_endstops(false); + current_position[Z_AXIS] -= 1; //move 1mm down with disabled endstop + plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 40, active_extruder); + st_synchronize(); + + enable_endstops(true); #ifdef TMC2130 tmc2130_home_enter(Z_AXIS_MASK); #endif //TMC2130 From 16e5fb50ddc72a294c7eb173622d0ec2961210cc Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Tue, 18 Dec 2018 20:39:38 +0100 Subject: [PATCH 4/9] Remove M601 from queue before saving state (prevent infinite loop - PFW713) --- Firmware/Marlin_main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 27d729d1..fa5a1028 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -6518,6 +6518,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) #endif //FILAMENTCHANGEENABLE case 601: //! M601 - Pause print { + cmdqueue_pop_front(); //trick because we want skip this command (M601) after restore lcd_pause_print(); } break; From c69d4aa914ad9c7e7a8f506646ded084b84df0b8 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Tue, 18 Dec 2018 19:57:29 +0100 Subject: [PATCH 5/9] Move 1mm down with disabled endstop after calibrate_z_auto (PFW718) --- Firmware/Marlin_main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 0318ee2b..27d729d1 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -2796,7 +2796,12 @@ bool gcode_M45(bool onlyZ, int8_t verbosity_level) // Move the print head close to the bed. current_position[Z_AXIS] = MESH_HOME_Z_SEARCH; - bool endstops_enabled = enable_endstops(true); + bool endstops_enabled = enable_endstops(false); + current_position[Z_AXIS] -= 1; //move 1mm down with disabled endstop + plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 40, active_extruder); + st_synchronize(); + + enable_endstops(true); #ifdef TMC2130 tmc2130_home_enter(Z_AXIS_MASK); #endif //TMC2130 From b8c5b6259ed7c635292240e36d435b0397191374 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Wed, 19 Dec 2018 14:40:10 +0100 Subject: [PATCH 6/9] Fix - move down after calibrate Z (PFW718) --- Firmware/Marlin_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index fa5a1028..dc96673c 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -2793,14 +2793,14 @@ bool gcode_M45(bool onlyZ, int8_t verbosity_level) lcd_puts_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE2)); } - // Move the print head close to the bed. - current_position[Z_AXIS] = MESH_HOME_Z_SEARCH; - bool endstops_enabled = enable_endstops(false); current_position[Z_AXIS] -= 1; //move 1mm down with disabled endstop plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 40, active_extruder); st_synchronize(); + // Move the print head close to the bed. + current_position[Z_AXIS] = MESH_HOME_Z_SEARCH; + enable_endstops(true); #ifdef TMC2130 tmc2130_home_enter(Z_AXIS_MASK); From 40fe52202de4b544c51832a30f57d169ac8fba1a Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Wed, 19 Dec 2018 19:20:09 +0100 Subject: [PATCH 7/9] stop paused print fix: saved_printing set to false when doing stop print --- Firmware/ultralcd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index f2a91f02..8c647ae6 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -6058,6 +6058,7 @@ static void lcd_sd_updir() void lcd_print_stop() { + saved_printing = false; cancel_heatup = true; #ifdef MESH_BED_LEVELING mbl.active = false; @@ -6091,7 +6092,7 @@ void lcd_print_stop() void lcd_sdcard_stop() { - + lcd_set_cursor(0, 0); lcd_puts_P(_T(MSG_STOP_PRINT)); lcd_set_cursor(2, 2); From f79137898a9a729b7d06abe1afbd33697dedf154 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Wed, 19 Dec 2018 14:40:10 +0100 Subject: [PATCH 8/9] Fix - move down after calibrate Z (PFW718) --- Firmware/Marlin_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 27d729d1..c5fc3029 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -2793,14 +2793,14 @@ bool gcode_M45(bool onlyZ, int8_t verbosity_level) lcd_puts_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE2)); } - // Move the print head close to the bed. - current_position[Z_AXIS] = MESH_HOME_Z_SEARCH; - bool endstops_enabled = enable_endstops(false); current_position[Z_AXIS] -= 1; //move 1mm down with disabled endstop plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 40, active_extruder); st_synchronize(); + // Move the print head close to the bed. + current_position[Z_AXIS] = MESH_HOME_Z_SEARCH; + enable_endstops(true); #ifdef TMC2130 tmc2130_home_enter(Z_AXIS_MASK); From acbfe89f0468bfc797c2e35df9ce1747cbdb01ba Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Wed, 19 Dec 2018 20:07:18 +0100 Subject: [PATCH 9/9] version changed --- Firmware/Configuration.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/Configuration.h b/Firmware/Configuration.h index 3bed653b..5959c7e9 100644 --- a/Firmware/Configuration.h +++ b/Firmware/Configuration.h @@ -7,8 +7,8 @@ #define STR(x) STR_HELPER(x) // Firmware version -#define FW_VERSION "3.5.0" -#define FW_COMMIT_NR 1749 +#define FW_VERSION "3.5.1" +#define FW_COMMIT_NR 1778 // FW_VERSION_UNKNOWN means this is an unofficial build. // The firmware should only be checked into github with this symbol. #define FW_DEV_VERSION FW_VERSION_UNKNOWN