Tweak call to reset_bed_level in G29

This commit is contained in:
Scott Lahteine 2016-12-13 23:50:28 -08:00
parent 0995a5d734
commit 8244fefcc2

View File

@ -4031,7 +4031,11 @@ inline void gcode_G28() {
|| left_probe_bed_position != bilinear_start[X_AXIS] || left_probe_bed_position != bilinear_start[X_AXIS]
|| front_probe_bed_position != bilinear_start[Y_AXIS] || front_probe_bed_position != bilinear_start[Y_AXIS]
) { ) {
// Before reset bed level, re-enable to correct the position
planner.abl_enabled = abl_should_enable;
// Reset grid to 0.0 or "not probed". (Also disables ABL)
reset_bed_level(); reset_bed_level();
#if ENABLED(ABL_BILINEAR_SUBDIVISION) #if ENABLED(ABL_BILINEAR_SUBDIVISION)
bilinear_grid_spacing_virt[X_AXIS] = xGridSpacing / (BILINEAR_SUBDIVISIONS); bilinear_grid_spacing_virt[X_AXIS] = xGridSpacing / (BILINEAR_SUBDIVISIONS);
bilinear_grid_spacing_virt[Y_AXIS] = yGridSpacing / (BILINEAR_SUBDIVISIONS); bilinear_grid_spacing_virt[Y_AXIS] = yGridSpacing / (BILINEAR_SUBDIVISIONS);
@ -4040,6 +4044,7 @@ inline void gcode_G28() {
bilinear_grid_spacing[Y_AXIS] = yGridSpacing; bilinear_grid_spacing[Y_AXIS] = yGridSpacing;
bilinear_start[X_AXIS] = RAW_X_POSITION(left_probe_bed_position); bilinear_start[X_AXIS] = RAW_X_POSITION(left_probe_bed_position);
bilinear_start[Y_AXIS] = RAW_Y_POSITION(front_probe_bed_position); bilinear_start[Y_AXIS] = RAW_Y_POSITION(front_probe_bed_position);
// Can't re-enable (on error) until the new grid is written // Can't re-enable (on error) until the new grid is written
abl_should_enable = false; abl_should_enable = false;
} }