Browse Source

Move 1mm down with disabled endstop after calibrate_z_auto (PFW718)

Robert Pelnar 5 years ago
parent
commit
34f116b4d9
1 changed files with 6 additions and 1 deletions
  1. 6 1
      Firmware/Marlin_main.cpp

+ 6 - 1
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