Ubl delta fixes and improvements (#6941)
* Change all direct changes of ubl.state.active to set_bed_leveling_enabled() which handles apply/unapply leveling to maintain current_position consistency. Fix invalidation of UBL mesh to invalid unreachable mesh points as well (delta corners). Fix UBL_DELTA unapply_leveling logic and when it gets applied, including fade_height changes. Add optional M114 D for detailed position information, disabled from compilation by default (M114_DETAIL). * UBL_DELTA raw and inline kinematics * UBL planner fall through fix * consistent variable names * Cleanup orphaned code and whitespace changes. Use _O2. * compile warnings cleanup * Remove redundant #ifdef condition
This commit is contained in:
@@ -83,7 +83,7 @@
|
||||
}
|
||||
|
||||
void unified_bed_leveling::reset() {
|
||||
state.active = false;
|
||||
set_bed_leveling_enabled(false);
|
||||
state.z_offset = 0;
|
||||
state.storage_slot = -1;
|
||||
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
||||
@@ -94,11 +94,17 @@
|
||||
}
|
||||
|
||||
void unified_bed_leveling::invalidate() {
|
||||
state.active = false;
|
||||
set_bed_leveling_enabled(false);
|
||||
state.z_offset = 0;
|
||||
for (int x = 0; x < GRID_MAX_POINTS_X; x++)
|
||||
for (int y = 0; y < GRID_MAX_POINTS_Y; y++)
|
||||
z_values[x][y] = NAN;
|
||||
set_all_mesh_points_to_value(NAN);
|
||||
}
|
||||
|
||||
void unified_bed_leveling::set_all_mesh_points_to_value(float value) {
|
||||
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] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void unified_bed_leveling::display_map(const int map_type) {
|
||||
|
Reference in New Issue
Block a user