Browse Source

Optional move-to-center after UBL G29 J (3-point) (#17964)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
vanilla_fb_2.0.x
chestwood96 5 years ago
committed by GitHub
parent
commit
c7b553c7b2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

17
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

@ -393,17 +393,12 @@
#if HAS_BED_PROBE
if (parser.seen('J')) {
if (g29_grid_size) { // if not 0 it is a normal n x n grid being probed
save_ubl_active_state_and_disable();
tilt_mesh_based_on_probed_grid(false /* false says to do normal grid probing */ );
restore_ubl_active_state_and_leave();
}
else { // grid_size == 0 : A 3-Point leveling has been requested
save_ubl_active_state_and_disable();
tilt_mesh_based_on_probed_grid(true /* true says to do 3-Point leveling */ );
restore_ubl_active_state_and_leave();
}
do_blocking_move_to_xy(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)));
save_ubl_active_state_and_disable();
tilt_mesh_based_on_probed_grid(g29_grid_size == 0); // Zero size does 3-Point
restore_ubl_active_state_and_leave();
#if ENABLED(UBL_G29_J_RECENTER)
do_blocking_move_to_xy(0.5f * ((MESH_MIN_X) + (MESH_MAX_X)), 0.5f * ((MESH_MIN_Y) + (MESH_MAX_Y)));
#endif
report_current_position();
probe_deployed = true;
}

Loading…
Cancel
Save