Browse Source

Fixup reset_bed_level

Scott Lahteine 8 years ago
parent
commit
0995a5d734
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      Marlin/Marlin_main.cpp

+ 4
- 3
Marlin/Marlin_main.cpp View File

575
 #endif
575
 #endif
576
 
576
 
577
 #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
577
 #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
578
-  int bilinear_grid_spacing[2] = { 0 }, bilinear_start[2] = { 0 };
578
+  int bilinear_grid_spacing[2], bilinear_start[2];
579
   float bed_level_grid[ABL_GRID_MAX_POINTS_X][ABL_GRID_MAX_POINTS_Y];
579
   float bed_level_grid[ABL_GRID_MAX_POINTS_X][ABL_GRID_MAX_POINTS_Y];
580
 #endif
580
 #endif
581
 
581
 
2289
    * Reset calibration results to zero.
2289
    * Reset calibration results to zero.
2290
    */
2290
    */
2291
   void reset_bed_level() {
2291
   void reset_bed_level() {
2292
+    set_bed_leveling_enabled(false);
2292
     #if ENABLED(MESH_BED_LEVELING)
2293
     #if ENABLED(MESH_BED_LEVELING)
2293
       if (mbl.has_mesh()) {
2294
       if (mbl.has_mesh()) {
2294
-        set_bed_leveling_enabled(false);
2295
         mbl.reset();
2295
         mbl.reset();
2296
         mbl.set_has_mesh(false);
2296
         mbl.set_has_mesh(false);
2297
       }
2297
       }
2298
     #else
2298
     #else
2299
-      planner.abl_enabled = false;
2300
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2299
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2301
         if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("reset_bed_level");
2300
         if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("reset_bed_level");
2302
       #endif
2301
       #endif
2303
       #if ABL_PLANAR
2302
       #if ABL_PLANAR
2304
         planner.bed_level_matrix.set_to_identity();
2303
         planner.bed_level_matrix.set_to_identity();
2305
       #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
2304
       #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
2305
+        bilinear_start[X_AXIS] = bilinear_start[Y_AXIS] =
2306
+        bilinear_grid_spacing[X_AXIS] = bilinear_grid_spacing[Y_AXIS] = 0;
2306
         for (uint8_t x = 0; x < ABL_GRID_MAX_POINTS_X; x++)
2307
         for (uint8_t x = 0; x < ABL_GRID_MAX_POINTS_X; x++)
2307
           for (uint8_t y = 0; y < ABL_GRID_MAX_POINTS_Y; y++)
2308
           for (uint8_t y = 0; y < ABL_GRID_MAX_POINTS_Y; y++)
2308
             bed_level_grid[x][y] = 1000.0;
2309
             bed_level_grid[x][y] = 1000.0;

Loading…
Cancel
Save