From cfe83daf4ad80e3c3b88a3e81193d6e491d509b5 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Fri, 14 Dec 2018 15:32:47 +0100 Subject: [PATCH 1/2] Meshbed leveling fail - move 1mm outside of colission with disabled endstop --- Firmware/Marlin_main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 180a04ab..b08e2f41 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -4526,10 +4526,16 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) lcd_calibrate_z_end_stop_manual(true); // Z-leveling (X-assembly stay up!!!) #endif // TMC2130 // ~ Z-homing (can not be used "G28", because X & Y-homing would have been done before (Z-homing)) - bState=enable_z_endstop(true); + bState=enable_z_endstop(false); + current_position[Z_AXIS] -= 1; + 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_z_endstop(true); + tmc2130_home_enter(Z_AXIS_MASK); current_position[Z_AXIS] = MESH_HOME_Z_SEARCH; 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(); + tmc2130_home_exit(); enable_z_endstop(bState); } while (st_get_position_mm(Z_AXIS) > MESH_HOME_Z_SEARCH); // i.e. Z-leveling not o.k. // plan_set_z_position(MESH_HOME_Z_SEARCH); // is not necessary ('do-while' loop always ends at the expected Z-position) From 927898151af0a8dd64a91b26ab596a4f8261a1b1 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Fri, 14 Dec 2018 15:46:50 +0100 Subject: [PATCH 2/2] fix - tmc2130 conditional translation --- Firmware/Marlin_main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index b08e2f41..0318ee2b 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -4531,11 +4531,15 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) 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_z_endstop(true); +#ifdef TMC2130 tmc2130_home_enter(Z_AXIS_MASK); +#endif // TMC2130 current_position[Z_AXIS] = MESH_HOME_Z_SEARCH; 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(); +#ifdef TMC2130 tmc2130_home_exit(); +#endif // TMC2130 enable_z_endstop(bState); } while (st_get_position_mm(Z_AXIS) > MESH_HOME_Z_SEARCH); // i.e. Z-leveling not o.k. // plan_set_z_position(MESH_HOME_Z_SEARCH); // is not necessary ('do-while' loop always ends at the expected Z-position)