Kaynağa Gözat

Small code reduction

Scott Lahteine 9 yıl önce
ebeveyn
işleme
ce44bee28b
1 değiştirilmiş dosya ile 6 ekleme ve 5 silme
  1. 6
    5
      Marlin/Marlin_main.cpp

+ 6
- 5
Marlin/Marlin_main.cpp Dosyayı Görüntüle

@@ -2382,16 +2382,17 @@ inline void gcode_G28() {
2382 2382
 
2383 2383
     #else // !AUTO_BED_LEVELING_GRID
2384 2384
 
2385
-      // Probe at 3 arbitrary points
2386
-      float z_at_pt_1, z_at_pt_2, z_at_pt_3;
2385
+      // Actions for each probe
2387 2386
       ProbeAction p1, p2, p3;
2388 2387
       if (engage_probe_for_each_reading)
2389 2388
         p1 = p2 = p3 = ProbeEngageAndRetract;
2390 2389
       else
2391 2390
         p1 = ProbeEngage, p2 = ProbeStay, p3 = ProbeRetract;
2392
-      z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING, p1, verbose_level);
2393
-      z_at_pt_2 = probe_pt(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, p2, verbose_level);
2394
-      z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, p3, verbose_level);
2391
+
2392
+      // Probe at 3 arbitrary points
2393
+      float z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING, p1, verbose_level),
2394
+            z_at_pt_2 = probe_pt(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, p2, verbose_level),
2395
+            z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, p3, verbose_level);
2395 2396
       clean_up_after_endstop_move();
2396 2397
       if (!dryrun) set_bed_level_equation_3pts(z_at_pt_1, z_at_pt_2, z_at_pt_3);
2397 2398
 

Loading…
İptal
Kaydet