♻️ Common Bed Leveling object name, accessors (#24214)
This commit is contained in:
committed by
Scott Lahteine
parent
06c4a9acdb
commit
b72f9277e9
@ -341,8 +341,8 @@ void DGUSTxHandler::ABLGrid(DGUS_VP &vp) {
|
||||
int16_t fixed;
|
||||
|
||||
for (int i = 0; i < DGUS_LEVEL_GRID_SIZE; i++) {
|
||||
point.x = i % GRID_MAX_POINTS_X;
|
||||
point.y = i / GRID_MAX_POINTS_X;
|
||||
point.x = i % (GRID_MAX_POINTS_X);
|
||||
point.y = i / (GRID_MAX_POINTS_X);
|
||||
fixed = dgus_display.ToFixedPoint<float, int16_t, 3>(ExtUI::getMeshPoint(point));
|
||||
data[i] = Swap16(fixed);
|
||||
}
|
||||
|
@ -889,11 +889,11 @@ namespace ExtUI {
|
||||
|
||||
#if HAS_MESH
|
||||
|
||||
bed_mesh_t& getMeshArray() { return Z_VALUES_ARR; }
|
||||
float getMeshPoint(const xy_uint8_t &pos) { return Z_VALUES(pos.x, pos.y); }
|
||||
bed_mesh_t& getMeshArray() { return bedlevel.z_values; }
|
||||
float getMeshPoint(const xy_uint8_t &pos) { return bedlevel.z_values[pos.x][pos.y]; }
|
||||
void setMeshPoint(const xy_uint8_t &pos, const_float_t zoff) {
|
||||
if (WITHIN(pos.x, 0, (GRID_MAX_POINTS_X) - 1) && WITHIN(pos.y, 0, (GRID_MAX_POINTS_Y) - 1)) {
|
||||
Z_VALUES(pos.x, pos.y) = zoff;
|
||||
bedlevel.z_values[pos.x][pos.y] = zoff;
|
||||
TERN_(ABL_BILINEAR_SUBDIVISION, bed_level_virt_interpolate());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user