Merge pull request #6950 from MagoKimbra/fix_g29_3_point

Fix G29 with 3 point
2.0.x
Scott Lahteine 8 years ago committed by GitHub
commit 5938dae200

@ -4203,19 +4203,19 @@ void home_all_axes() { gcode_G28(true); }
ABL_VAR int left_probe_bed_position, right_probe_bed_position, front_probe_bed_position, back_probe_bed_position;
ABL_VAR float xGridSpacing, yGridSpacing;
#if ABL_PLANAR
#if ENABLED(AUTO_BED_LEVELING_LINEAR)
ABL_VAR uint8_t abl_grid_points_x = GRID_MAX_POINTS_X,
abl_grid_points_y = GRID_MAX_POINTS_Y;
ABL_VAR bool do_topography_map;
#else // 3-point
#else // Bilinear
uint8_t constexpr abl_grid_points_x = GRID_MAX_POINTS_X,
abl_grid_points_y = GRID_MAX_POINTS_Y;
#endif
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(PROBE_MANUALLY)
#if ABL_PLANAR
#if ENABLED(AUTO_BED_LEVELING_LINEAR)
ABL_VAR int abl2;
#else // 3-point
#else // Bilinear
int constexpr abl2 = GRID_MAX_POINTS;
#endif
#endif
@ -4235,6 +4235,8 @@ void home_all_axes() { gcode_G28(true); }
#elif ENABLED(AUTO_BED_LEVELING_3POINT)
int constexpr abl2 = 3;
// Probe at 3 arbitrary points
ABL_VAR vector_3 points[3] = {
vector_3(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, 0),
@ -4527,7 +4529,7 @@ void home_all_axes() { gcode_G28(true); }
#elif ENABLED(AUTO_BED_LEVELING_3POINT)
points[i].z = measured_z;
points[abl_probe_index].z = measured_z;
#endif
}

Loading…
Cancel
Save