From 8bc0d90b007fdcc994b8a2e4a58ed9d35a6d29f2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 2 Apr 2017 09:55:38 -0500 Subject: [PATCH] Init bed_level_virt_interpolate on EEPROM load --- Marlin/Marlin_main.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 8eacd70565..da85f9337a 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2615,6 +2615,8 @@ static void clean_up_after_endstop_or_probe_move() { } void bed_level_virt_interpolate() { + bilinear_grid_spacing_virt[X_AXIS] = bilinear_grid_spacing[X_AXIS] / (BILINEAR_SUBDIVISIONS); + bilinear_grid_spacing_virt[Y_AXIS] = bilinear_grid_spacing[Y_AXIS] / (BILINEAR_SUBDIVISIONS); for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) for (uint8_t ty = 0; ty < BILINEAR_SUBDIVISIONS; ty++) @@ -4268,11 +4270,6 @@ inline void gcode_G28() { bilinear_start[X_AXIS] = RAW_X_POSITION(left_probe_bed_position); bilinear_start[Y_AXIS] = RAW_Y_POSITION(front_probe_bed_position); - #if ENABLED(ABL_BILINEAR_SUBDIVISION) - bilinear_grid_spacing_virt[X_AXIS] = xGridSpacing / (BILINEAR_SUBDIVISIONS); - bilinear_grid_spacing_virt[Y_AXIS] = yGridSpacing / (BILINEAR_SUBDIVISIONS); - #endif - // Can't re-enable (on error) until the new grid is written abl_should_enable = false; }