General cleanup of config-store, reset_bed_level
This commit is contained in:
parent
e0d487e339
commit
3c7cdcdc22
5 changed files with 50 additions and 53 deletions
|
|
@ -2502,27 +2502,25 @@ static void clean_up_after_endstop_or_probe_move() {
|
|||
* 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
|
||||
}
|
||||
|
||||
|
|
@ -9643,7 +9641,7 @@ void quickstop_stepper() {
|
|||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
const int8_t storage_slot = parser.has_value() ? parser.value_int() : ubl.storage_slot;
|
||||
const int16_t a = settings.calc_num_meshes();
|
||||
const uint16_t a = settings.calc_num_meshes();
|
||||
|
||||
if (!a) {
|
||||
SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue