Procházet zdrojové kódy

Fix G29 with 3 point

MagoKimbra před 8 roky
rodič
revize
663ff7f92a
1 změnil soubory, kde provedl 7 přidání a 5 odebrání
  1. 7
    5
      Marlin/Marlin_main.cpp

+ 7
- 5
Marlin/Marlin_main.cpp Zobrazit soubor

4198
       ABL_VAR int left_probe_bed_position, right_probe_bed_position, front_probe_bed_position, back_probe_bed_position;
4198
       ABL_VAR int left_probe_bed_position, right_probe_bed_position, front_probe_bed_position, back_probe_bed_position;
4199
       ABL_VAR float xGridSpacing, yGridSpacing;
4199
       ABL_VAR float xGridSpacing, yGridSpacing;
4200
 
4200
 
4201
-      #if ABL_PLANAR
4201
+      #if ENABLED(AUTO_BED_LEVELING_LINEAR)
4202
         ABL_VAR uint8_t abl_grid_points_x = GRID_MAX_POINTS_X,
4202
         ABL_VAR uint8_t abl_grid_points_x = GRID_MAX_POINTS_X,
4203
                         abl_grid_points_y = GRID_MAX_POINTS_Y;
4203
                         abl_grid_points_y = GRID_MAX_POINTS_Y;
4204
         ABL_VAR bool do_topography_map;
4204
         ABL_VAR bool do_topography_map;
4205
-      #else // 3-point
4205
+      #else // Bilinear
4206
         uint8_t constexpr abl_grid_points_x = GRID_MAX_POINTS_X,
4206
         uint8_t constexpr abl_grid_points_x = GRID_MAX_POINTS_X,
4207
                           abl_grid_points_y = GRID_MAX_POINTS_Y;
4207
                           abl_grid_points_y = GRID_MAX_POINTS_Y;
4208
       #endif
4208
       #endif
4209
 
4209
 
4210
       #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(PROBE_MANUALLY)
4210
       #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(PROBE_MANUALLY)
4211
-        #if ABL_PLANAR
4211
+        #if ENABLED(AUTO_BED_LEVELING_LINEAR)
4212
           ABL_VAR int abl2;
4212
           ABL_VAR int abl2;
4213
-        #else // 3-point
4213
+        #else // Bilinear
4214
           int constexpr abl2 = GRID_MAX_POINTS;
4214
           int constexpr abl2 = GRID_MAX_POINTS;
4215
         #endif
4215
         #endif
4216
       #endif
4216
       #endif
4230
 
4230
 
4231
     #elif ENABLED(AUTO_BED_LEVELING_3POINT)
4231
     #elif ENABLED(AUTO_BED_LEVELING_3POINT)
4232
 
4232
 
4233
+      int constexpr abl2 = 3;
4234
+
4233
       // Probe at 3 arbitrary points
4235
       // Probe at 3 arbitrary points
4234
       ABL_VAR vector_3 points[3] = {
4236
       ABL_VAR vector_3 points[3] = {
4235
         vector_3(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, 0),
4237
         vector_3(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, 0),
4522
 
4524
 
4523
         #elif ENABLED(AUTO_BED_LEVELING_3POINT)
4525
         #elif ENABLED(AUTO_BED_LEVELING_3POINT)
4524
 
4526
 
4525
-          points[i].z = measured_z;
4527
+          points[abl_probe_index].z = measured_z;
4526
 
4528
 
4527
         #endif
4529
         #endif
4528
       }
4530
       }

Loading…
Zrušit
Uložit