Browse Source

Tweak call to `reset_bed_level` in G29

pull/1/head
Scott Lahteine 8 years ago
parent
commit
8244fefcc2
  1. 5
      Marlin/Marlin_main.cpp

5
Marlin/Marlin_main.cpp

@ -4031,7 +4031,11 @@ inline void gcode_G28() {
|| left_probe_bed_position != bilinear_start[X_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();
#if ENABLED(ABL_BILINEAR_SUBDIVISION)
bilinear_grid_spacing_virt[X_AXIS] = xGridSpacing / (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_start[X_AXIS] = RAW_X_POSITION(left_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
abl_should_enable = false;
}

Loading…
Cancel
Save