♻️ Common Bed Leveling object name, accessors (#24214)

This commit is contained in:
Scott Lahteine
2022-05-19 06:05:52 -05:00
committed by GitHub
parent c814fe98d7
commit b523ddf1b2
47 changed files with 390 additions and 434 deletions

View File

@@ -69,9 +69,6 @@ class TemporaryBedLevelingState {
#include "mbl/mesh_bed_leveling.h"
#endif
#define Z_VALUES(X,Y) Z_VALUES_ARR[X][Y]
#define _GET_MESH_POS(M) { _GET_MESH_X(M.a), _GET_MESH_Y(M.b) }
#if EITHER(AUTO_BED_LEVELING_BILINEAR, MESH_BED_LEVELING)
#include <stdint.h>
@@ -92,7 +89,7 @@ class TemporaryBedLevelingState {
bool valid() const { return pos.x >= 0 && pos.y >= 0; }
#if ENABLED(AUTO_BED_LEVELING_UBL)
xy_pos_t meshpos() {
return { ubl.mesh_index_to_xpos(pos.x), ubl.mesh_index_to_ypos(pos.y) };
return { bedlevel.get_mesh_x(pos.x), bedlevel.get_mesh_y(pos.y) };
}
#endif
operator xy_int8_t&() { return pos; }