ソースを参照

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

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
chestwood96 4年前
コミット
c7b553c7b2
コミッターのメールアドレスに関連付けられたアカウントが存在しません
1個のファイルの変更6行の追加11行の削除
  1. 6
    11
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

+ 6
- 11
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp ファイルの表示

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

読み込み中…
キャンセル
保存