Fix ExtUI mesh functions (#14027)
This commit is contained in:
parent
9b5f9dda0e
commit
84ac5b360b
3 changed files with 7 additions and 4 deletions
|
@ -83,7 +83,7 @@ void Babystep::add_steps(const AxisEnum axis, const int16_t distance) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(BABYSTEP_ALWAYS_AVAILABLE)
|
#if ENABLED(BABYSTEP_ALWAYS_AVAILABLE)
|
||||||
#define BSA_ENABLE(AXIS) do{ switch (AXIS) { case X_AXIS: enable_X(); break; case Y_AXIS: enable_Y(); break; case Z_AXIS: enable_Z(); } }while(0)
|
#define BSA_ENABLE(AXIS) do{ switch (AXIS) { case X_AXIS: enable_X(); break; case Y_AXIS: enable_Y(); break; case Z_AXIS: enable_Z(); break; default: break; } }while(0)
|
||||||
#else
|
#else
|
||||||
#define BSA_ENABLE(AXIS) NOOP
|
#define BSA_ENABLE(AXIS) NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -725,8 +725,8 @@ namespace ExtUI {
|
||||||
#if HAS_LEVELING
|
#if HAS_LEVELING
|
||||||
bool getLevelingActive() { return planner.leveling_active; }
|
bool getLevelingActive() { return planner.leveling_active; }
|
||||||
void setLevelingActive(const bool state) { set_bed_leveling_enabled(state); }
|
void setLevelingActive(const bool state) { set_bed_leveling_enabled(state); }
|
||||||
#if HAS_MESH
|
|
||||||
bool getMeshValid() { return leveling_is_valid(); }
|
bool getMeshValid() { return leveling_is_valid(); }
|
||||||
|
#if HAS_MESH
|
||||||
bed_mesh_t getMeshArray() { return Z_VALUES_ARR; }
|
bed_mesh_t getMeshArray() { return Z_VALUES_ARR; }
|
||||||
float getMeshPoint(const uint8_t xpos, const uint8_t ypos) { return Z_VALUES(xpos,ypos); }
|
float getMeshPoint(const uint8_t xpos, const uint8_t ypos) { return Z_VALUES(xpos,ypos); }
|
||||||
void setMeshPoint(const uint8_t xpos, const uint8_t ypos, const float zoff) {
|
void setMeshPoint(const uint8_t xpos, const uint8_t ypos, const float zoff) {
|
||||||
|
|
|
@ -61,6 +61,10 @@ namespace ExtUI {
|
||||||
constexpr uint8_t hotendCount = HOTENDS;
|
constexpr uint8_t hotendCount = HOTENDS;
|
||||||
constexpr uint8_t fanCount = FAN_COUNT;
|
constexpr uint8_t fanCount = FAN_COUNT;
|
||||||
|
|
||||||
|
#if HAS_MESH
|
||||||
|
typedef float (&bed_mesh_t)[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
|
||||||
|
#endif
|
||||||
|
|
||||||
bool isMoving();
|
bool isMoving();
|
||||||
bool isAxisPositionKnown(const axis_t);
|
bool isAxisPositionKnown(const axis_t);
|
||||||
bool isPositionKnown(); // Axis position guaranteed, steppers active since homing
|
bool isPositionKnown(); // Axis position guaranteed, steppers active since homing
|
||||||
|
@ -122,9 +126,8 @@ namespace ExtUI {
|
||||||
#if HAS_LEVELING
|
#if HAS_LEVELING
|
||||||
bool getLevelingActive();
|
bool getLevelingActive();
|
||||||
void setLevelingActive(const bool);
|
void setLevelingActive(const bool);
|
||||||
#if HAS_MESH
|
|
||||||
#include "../../feature/bedlevel/bedlevel.h"
|
|
||||||
bool getMeshValid();
|
bool getMeshValid();
|
||||||
|
#if HAS_MESH
|
||||||
bed_mesh_t getMeshArray();
|
bed_mesh_t getMeshArray();
|
||||||
float getMeshPoint(const uint8_t xpos, const uint8_t ypos);
|
float getMeshPoint(const uint8_t xpos, const uint8_t ypos);
|
||||||
void setMeshPoint(const uint8_t xpos, const uint8_t ypos, const float zval);
|
void setMeshPoint(const uint8_t xpos, const uint8_t ypos, const float zval);
|
||||||
|
|
Reference in a new issue