Browse Source

Init bed_level_virt_interpolate on EEPROM load

Scott Lahteine 7 years ago
parent
commit
8bc0d90b00
1 changed files with 2 additions and 5 deletions
  1. 2
    5
      Marlin/Marlin_main.cpp

+ 2
- 5
Marlin/Marlin_main.cpp View File

@@ -2615,6 +2615,8 @@ static void clean_up_after_endstop_or_probe_move() {
2615 2615
     }
2616 2616
 
2617 2617
     void bed_level_virt_interpolate() {
2618
+      bilinear_grid_spacing_virt[X_AXIS] = bilinear_grid_spacing[X_AXIS] / (BILINEAR_SUBDIVISIONS);
2619
+      bilinear_grid_spacing_virt[Y_AXIS] = bilinear_grid_spacing[Y_AXIS] / (BILINEAR_SUBDIVISIONS);
2618 2620
       for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
2619 2621
         for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
2620 2622
           for (uint8_t ty = 0; ty < BILINEAR_SUBDIVISIONS; ty++)
@@ -4268,11 +4270,6 @@ inline void gcode_G28() {
4268 4270
           bilinear_start[X_AXIS] = RAW_X_POSITION(left_probe_bed_position);
4269 4271
           bilinear_start[Y_AXIS] = RAW_Y_POSITION(front_probe_bed_position);
4270 4272
 
4271
-          #if ENABLED(ABL_BILINEAR_SUBDIVISION)
4272
-            bilinear_grid_spacing_virt[X_AXIS] = xGridSpacing / (BILINEAR_SUBDIVISIONS);
4273
-            bilinear_grid_spacing_virt[Y_AXIS] = yGridSpacing / (BILINEAR_SUBDIVISIONS);
4274
-          #endif
4275
-
4276 4273
           // Can't re-enable (on error) until the new grid is written
4277 4274
           abl_should_enable = false;
4278 4275
         }

Loading…
Cancel
Save