Browse Source

Merge pull request #6950 from MagoKimbra/fix_g29_3_point

Fix G29 with 3 point
Scott Lahteine 8 years ago
parent
commit
5938dae200
1 changed files with 7 additions and 5 deletions
  1. 7
    5
      Marlin/Marlin_main.cpp

+ 7
- 5
Marlin/Marlin_main.cpp View File

4203
       ABL_VAR int left_probe_bed_position, right_probe_bed_position, front_probe_bed_position, back_probe_bed_position;
4203
       ABL_VAR int left_probe_bed_position, right_probe_bed_position, front_probe_bed_position, back_probe_bed_position;
4204
       ABL_VAR float xGridSpacing, yGridSpacing;
4204
       ABL_VAR float xGridSpacing, yGridSpacing;
4205
 
4205
 
4206
-      #if ABL_PLANAR
4206
+      #if ENABLED(AUTO_BED_LEVELING_LINEAR)
4207
         ABL_VAR uint8_t abl_grid_points_x = GRID_MAX_POINTS_X,
4207
         ABL_VAR uint8_t abl_grid_points_x = GRID_MAX_POINTS_X,
4208
                         abl_grid_points_y = GRID_MAX_POINTS_Y;
4208
                         abl_grid_points_y = GRID_MAX_POINTS_Y;
4209
         ABL_VAR bool do_topography_map;
4209
         ABL_VAR bool do_topography_map;
4210
-      #else // 3-point
4210
+      #else // Bilinear
4211
         uint8_t constexpr abl_grid_points_x = GRID_MAX_POINTS_X,
4211
         uint8_t constexpr abl_grid_points_x = GRID_MAX_POINTS_X,
4212
                           abl_grid_points_y = GRID_MAX_POINTS_Y;
4212
                           abl_grid_points_y = GRID_MAX_POINTS_Y;
4213
       #endif
4213
       #endif
4214
 
4214
 
4215
       #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(PROBE_MANUALLY)
4215
       #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(PROBE_MANUALLY)
4216
-        #if ABL_PLANAR
4216
+        #if ENABLED(AUTO_BED_LEVELING_LINEAR)
4217
           ABL_VAR int abl2;
4217
           ABL_VAR int abl2;
4218
-        #else // 3-point
4218
+        #else // Bilinear
4219
           int constexpr abl2 = GRID_MAX_POINTS;
4219
           int constexpr abl2 = GRID_MAX_POINTS;
4220
         #endif
4220
         #endif
4221
       #endif
4221
       #endif
4235
 
4235
 
4236
     #elif ENABLED(AUTO_BED_LEVELING_3POINT)
4236
     #elif ENABLED(AUTO_BED_LEVELING_3POINT)
4237
 
4237
 
4238
+      int constexpr abl2 = 3;
4239
+
4238
       // Probe at 3 arbitrary points
4240
       // Probe at 3 arbitrary points
4239
       ABL_VAR vector_3 points[3] = {
4241
       ABL_VAR vector_3 points[3] = {
4240
         vector_3(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, 0),
4242
         vector_3(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, 0),
4527
 
4529
 
4528
         #elif ENABLED(AUTO_BED_LEVELING_3POINT)
4530
         #elif ENABLED(AUTO_BED_LEVELING_3POINT)
4529
 
4531
 
4530
-          points[i].z = measured_z;
4532
+          points[abl_probe_index].z = measured_z;
4531
 
4533
 
4532
         #endif
4534
         #endif
4533
       }
4535
       }

Loading…
Cancel
Save