General cleanup of config-store, reset_bed_level
This commit is contained in:
@ -173,27 +173,25 @@ void set_bed_leveling_enabled(const bool enable/*=true*/) {
|
||||
* Reset calibration results to zero.
|
||||
*/
|
||||
void reset_bed_level() {
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("reset_bed_level");
|
||||
#endif
|
||||
set_bed_leveling_enabled(false);
|
||||
#if ENABLED(MESH_BED_LEVELING)
|
||||
if (leveling_is_valid()) {
|
||||
mbl.reset();
|
||||
mbl.has_mesh = false;
|
||||
}
|
||||
#else
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("reset_bed_level");
|
||||
#endif
|
||||
#if ABL_PLANAR
|
||||
planner.bed_level_matrix.set_to_identity();
|
||||
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
bilinear_start[X_AXIS] = bilinear_start[Y_AXIS] =
|
||||
bilinear_grid_spacing[X_AXIS] = bilinear_grid_spacing[Y_AXIS] = 0;
|
||||
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
|
||||
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
|
||||
z_values[x][y] = NAN;
|
||||
#elif ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
ubl.reset();
|
||||
#endif
|
||||
#elif ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
ubl.reset();
|
||||
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
bilinear_start[X_AXIS] = bilinear_start[Y_AXIS] =
|
||||
bilinear_grid_spacing[X_AXIS] = bilinear_grid_spacing[Y_AXIS] = 0;
|
||||
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
|
||||
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
|
||||
z_values[x][y] = NAN;
|
||||
#elif ABL_PLANAR
|
||||
planner.bed_level_matrix.set_to_identity();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user