Skip to content

Commit

Permalink
Use TEMPORARY_SOFT_ENDSTOP_STATE
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Oct 12, 2020
1 parent 5ca5ddc commit cf05468
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,8 @@

TERN_(UBL_MESH_EDIT_MOVES_Z, do_blocking_move_to_z(h_offset)); // Move Z to the given 'H' offset

TEMPORARY_SOFT_ENDSTOP_STATE(false); // Disable soft endstops until this method exits

MeshFlags done_flags{0};
const xy_int8_t &lpos = location.pos;
do {
Expand All @@ -989,10 +991,6 @@

if (!position_is_reachable(raw)) break; // SHOULD NOT OCCUR (find_closest_mesh_point_of_type only returns reachable)

#if HAS_SOFTWARE_ENDSTOPS
gcode.process_subcommands_now_P(PSTR("M211 S0")); // We can go below Z=0 while fine tuning the mesh
#endif

do_blocking_move_to(raw); // Move the nozzle to the edit point with probe clearance

TERN_(UBL_MESH_EDIT_MOVES_Z, do_blocking_move_to_z(h_offset)); // Move Z to the given 'H' offset before editing
Expand Down Expand Up @@ -1020,10 +1018,6 @@
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
} while (!ui.button_pressed());

#if HAS_SOFTWARE_ENDSTOPS
gcode.process_subcommands_now_P(PSTR("M211 S1")); // Return to normal endstop operation
#endif

if (!lcd_map_control) ui.return_to_status(); // Just editing a single point? Return to status

if (click_and_hold(abort_fine_tune)) break; // Button held down? Abort editing
Expand Down

0 comments on commit cf05468

Please sign in to comment.