ソースを参照

🚸 Machine-relative Z_STEPPER_ALIGN_XY (#24261)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
InsanityAutomation 2年前
コミット
bb3c5aa186
コミッターのメールアドレスに関連付けられたアカウントが存在しません
2個のファイルの変更10行の追加5行の削除
  1. 6
    3
      Marlin/Configuration_adv.h
  2. 4
    2
      Marlin/src/gcode/calibrate/G34_M422.cpp

+ 6
- 3
Marlin/Configuration_adv.h ファイルの表示

@@ -937,9 +937,12 @@
937 937
  */
938 938
 //#define Z_STEPPER_AUTO_ALIGN
939 939
 #if ENABLED(Z_STEPPER_AUTO_ALIGN)
940
-  // Define probe X and Y positions for Z1, Z2 [, Z3 [, Z4]]
941
-  // If not defined, probe limits will be used.
942
-  // Override with 'M422 S<index> X<pos> Y<pos>'
940
+  /**
941
+   * Define probe X and Y positions for Z1, Z2 [, Z3 [, Z4]]
942
+   * These positions are machine-relative and do not shift with the M206 home offset!
943
+   * If not defined, probe limits will be used.
944
+   * Override with 'M422 S<index> X<pos> Y<pos>'.
945
+   */
943 946
   //#define Z_STEPPER_ALIGN_XY { {  10, 190 }, { 100,  10 }, { 190, 190 } }
944 947
 
945 948
   /**

+ 4
- 2
Marlin/src/gcode/calibrate/G34_M422.cpp ファイルの表示

@@ -224,13 +224,15 @@ void GcodeSuite::G34() {
224 224
           // Safe clearance even on an incline
225 225
           if ((iteration == 0 || i > 0) && z_probe > current_position.z) do_blocking_move_to_z(z_probe);
226 226
 
227
+          xy_pos_t &ppos = z_stepper_align.xy[iprobe];
228
+
227 229
           if (DEBUGGING(LEVELING))
228
-            DEBUG_ECHOLNPGM_P(PSTR("Probing X"), z_stepper_align.xy[iprobe].x, SP_Y_STR, z_stepper_align.xy[iprobe].y);
230
+            DEBUG_ECHOLNPGM_P(PSTR("Probing X"), ppos.x, SP_Y_STR, ppos.y);
229 231
 
230 232
           // Probe a Z height for each stepper.
231 233
           // Probing sanity check is disabled, as it would trigger even in normal cases because
232 234
           // current_position.z has been manually altered in the "dirty trick" above.
233
-          const float z_probed_height = probe.probe_at_point(z_stepper_align.xy[iprobe], raise_after, 0, true, false);
235
+          const float z_probed_height = probe.probe_at_point(DIFF_TERN(HAS_HOME_OFFSET, ppos, xy_pos_t(home_offset)), raise_after, 0, true, false);
234 236
           if (isnan(z_probed_height)) {
235 237
             SERIAL_ECHOLNPGM("Probing failed");
236 238
             LCD_MESSAGE(MSG_LCD_PROBING_FAILED);

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